瀏覽代碼

修复诺德bug

master
yangteng 10 月之前
父節點
當前提交
a38461815f
共有 3 個檔案被更改,包括 20 行新增16 行删除
  1. 18
    14
      subpackage/after-sale/activation/activate.vue
  2. 1
    1
      subpackage/orders/product-detail.vue
  3. 1
    1
      utils/network/request.js

+ 18
- 14
subpackage/after-sale/activation/activate.vue 查看文件

@@ -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()
};

+ 1
- 1
subpackage/orders/product-detail.vue 查看文件

@@ -237,8 +237,8 @@
for(var m=0;m<supAgreeArr.length;m++){
let obj={}
obj['name']=supAgreeArr[m]['name']
state.agreements.push(supAgreeArr[m]['id'])
for(var k=0;k<supAgreeArr[m]['address'].length;k++){
state.agreements.push(supAgreeArr[m]['address'][k]['id'])
obj['url']=envs[process.env.NODE_ENV].baseUrl+supAgreeArr[m]['address'][k]['url']
state.agreeURL.push(obj)
}

+ 1
- 1
utils/network/request.js 查看文件

@@ -240,6 +240,7 @@ export function request(code, options = {}, start = false) {
});
} else {
tools.hideLoadingAlert();
uni.hideToast()
console.log("请求失败返回参数", code, res)
uni.showModal({
title: '提示',
@@ -264,7 +265,6 @@ export function request(code, options = {}, start = false) {
}
}
options.fail = (err) => {
// console.log('请求失败返回参数:', res)
uni.hideLoading()
console.log('请求错误', err)
//处理请求错误

Loading…
取消
儲存