Commit 8859cf30 by zhuoym

修复完成报修bug

parent 0ef52a1d
Showing with 47 additions and 45 deletions
......@@ -195,54 +195,56 @@ Page({
// 点击完成维修
bindBtn(e){
var that = this;
// debugger
//
wx.navigateTo({
url: `/pages/endRepair/repair?gongid=${e.currentTarget.dataset.id}`,
url: `/pages/endRepair/repair?id=${e.currentTarget.dataset.id}`,
})
console.log(that.data.gongid);
console.log(e.currentTarget.dataset.id)
// console.log(that.data.gongid);
// console.log(e.currentTarget.dataset.id)
return
this.setData({
// wantan:true,
gongid: e.currentTarget.dataset.id,
})
wx.showModal({
title: '提示',
content: '确认完成维修吗?',
success: function (res) {
if (res.confirm) {
wx.showLoading({
title: '提交中...',
icon: 'loading'
})
wx.request({
url: baseUrl + '/api/emaint/repairProblem/complete',
data: {
id: that.data.gongid,
},
method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
header: {
"Content-Type": "application/x-www-form-urlencoded",
"accessToken": wx.getStorageSync('accessToken'),
}, // 设置请求的 header
success: function (res) {
console.log(res)
wx.hideLoading();
that.setData({
// buttonClickeds: false,
// wantan: false,
page: '1'
})
that.login();
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
// this.setData({
// // wantan:true,
// gongid: e.currentTarget.dataset.id,
// })
// wx.showModal({
// title: '提示',
// content: '确认完成维修吗?',
// success: function (res) {
// if (res.confirm) {
// wx.showLoading({
// title: '提交中...',
// icon: 'loading'
// })
//
// wx.request({
// url: baseUrl + '/api/emaint/repairProblem/complete',
// data: {
// id: that.data.gongid,
// },
// method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
//
// header: {
// "Content-Type": "application/x-www-form-urlencoded",
// "accessToken": wx.getStorageSync('accessToken'),
// }, // 设置请求的 header
//
// success: function (res) {
// console.log(res)
// wx.hideLoading();
// that.setData({
// // buttonClickeds: false,
// // wantan: false,
// page: '1'
// })
// that.login();
// }
// })
// } else if (res.cancel) {
// console.log('用户点击取消')
// }
// }
// })
},
// bindBtnok(){
// var that = this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment