|
|
@@ -181,10 +181,11 @@ |
|
|
|
}); |
|
|
|
|
|
|
|
function cmdResult() { |
|
|
|
uni.showLoading({ |
|
|
|
uni.showToast({ |
|
|
|
title: '正在激活,请等待', |
|
|
|
mask: true, |
|
|
|
duration:10000 |
|
|
|
duration:10000, |
|
|
|
icon:"loading" |
|
|
|
}); |
|
|
|
const options = { |
|
|
|
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) |
|
|
@@ -199,11 +200,6 @@ |
|
|
|
request('4b001421f5354c248a7759971881b52f', options) |
|
|
|
.then((res) => { |
|
|
|
console.log("在线激活 请求"); |
|
|
|
uni.showLoading({ |
|
|
|
title: '正在激活,请等待', |
|
|
|
mask: true, |
|
|
|
duration:8000 |
|
|
|
}); |
|
|
|
console.log(stringToJson(res.bizContent)); |
|
|
|
const datas = stringToJson(res.bizContent).data; |
|
|
|
console.log("datas===",datas) |
|
|
@@ -212,20 +208,24 @@ |
|
|
|
implementCmd(datas.transOrderId,datas.cmd,res.toString(),datas.stepNo) |
|
|
|
}, () => { |
|
|
|
showModals('在线激活异常') |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
// tools.hideLoadingAlert(); |
|
|
|
uni.hideToast() |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log(err); |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
// tools.hideLoadingAlert(); |
|
|
|
uni.hideToast() |
|
|
|
console.log("Yin") |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function implementCmd(transOrderId, cmd, cmdResult, stepNo) { |
|
|
|
uni.showLoading({ |
|
|
|
uni.showToast({ |
|
|
|
title: '正在激活,请等待', |
|
|
|
mask: true, |
|
|
|
duration:5000 |
|
|
|
duration:5000, |
|
|
|
icon:"loading" |
|
|
|
}); |
|
|
|
const options = { |
|
|
|
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) |
|
|
@@ -246,7 +246,8 @@ |
|
|
|
console.log("在线激活 请求",datas); |
|
|
|
if (datas.stepNo == 100) { |
|
|
|
state.disabled = true |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
// tools.hideLoadingAlert(); |
|
|
|
uni.hideToast() |
|
|
|
msg("激活成功",{'icon':'success','duration':3000}) |
|
|
|
setTimeout(() => { |
|
|
|
uni.navigateTo({ |
|
|
@@ -259,19 +260,22 @@ |
|
|
|
implementCmd(transOrderId,datas.cmd,res.toString(),datas.stepNo) |
|
|
|
}, () => { |
|
|
|
showModals('在线激活异常') |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
// tools.hideLoadingAlert(); |
|
|
|
uni.hideToast() |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log(err); |
|
|
|
tools.hideLoadingAlert(); |
|
|
|
// tools.hideLoadingAlert(); |
|
|
|
uni.hideToast() |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//开始激活 按钮事件 |
|
|
|
const btn = () => { |
|
|
|
state.disabled = false |
|
|
|
|
|
|
|
console.log('orderInfo参数', orderInfo, state.disabled) |
|
|
|
cmdResult() |
|
|
|
}; |