This commit is contained in:
parent
d1831e7428
commit
a94ddc0a70
|
|
@ -416,6 +416,10 @@ export default {
|
||||||
//确认按钮
|
//确认按钮
|
||||||
async onHandleConfirm() {
|
async onHandleConfirm() {
|
||||||
console.log(this.codeData.maId)
|
console.log(this.codeData.maId)
|
||||||
|
uni.showLoading({
|
||||||
|
title: '提交中...',
|
||||||
|
mask: true // 推荐加上,防止加载过程中用户再次点击
|
||||||
|
});
|
||||||
if (this.codeData.maId == undefined) {
|
if (this.codeData.maId == undefined) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请先识别编码!',
|
title: '请先识别编码!',
|
||||||
|
|
@ -444,6 +448,8 @@ export default {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: param,
|
data: param,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
// 3. 请求成功,先关闭 Loading
|
||||||
|
uni.hideLoading();
|
||||||
if (!res.data.code) {
|
if (!res.data.code) {
|
||||||
res = JSON.parse(decryptWithSM4(res.data))
|
res = JSON.parse(decryptWithSM4(res.data))
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -463,6 +469,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
|
// 3. 请求失败,同样要关闭 Loading
|
||||||
|
uni.hideLoading();
|
||||||
console.log(err)
|
console.log(err)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue