Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
郑艺斌
/
emaint-servicer-wechat-app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8859cf30
authored
Feb 20, 2023
by
zhuoym
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复完成报修bug
parent
0ef52a1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
45 deletions
pages/index/index.js
pages/index/index.js
View file @
8859cf30
...
...
@@ -195,54 +195,56 @@ Page({
// 点击完成维修
bindBtn
(
e
){
var
that
=
this
;
// debugger
//
wx
.
navigateTo
({
url
:
`/pages/endRepair/repair?
gong
id=
${
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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment