From 090819b136cc0903bf2ac25845c9b275ddbcba89 Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期五, 01 八月 2025 17:32:29 +0800 Subject: [PATCH] dataobjcreat而返回处理 --- pages/modal/3037.vue | 65 ++++++++++++++++++++------------ 1 files changed, 40 insertions(+), 25 deletions(-) diff --git a/pages/modal/3037.vue b/pages/modal/3037.vue index ebdda44..a811383 100644 --- a/pages/modal/3037.vue +++ b/pages/modal/3037.vue @@ -2475,32 +2475,47 @@ dataObjCreate(dataInfo).then(result => { console.log(result); uni.hideLoading(); - if (success.result - .action) { - var action = JSON - .parse(success - .result.Action - ); - if (action.ret == - '0') { - if (action - .result_type == - '0') { - uni.showToast({ - title: action - .result, - icon: "success", - duration: 3000 - }); - } - // "{"ret":0, "result_type":0, "result":"鍒涘缓鎴愬姛123123123","info":""}" + let data = result.lua_result + if (data) { + if (data.ret != 0) { + var tip = data.err_info ? typeof data.err_info == 'string' ? data + .err_info : + data + .err_info.join('<br/>') : ''; + if (data.ret == 801) uni.showModal({ + title: this.translateSys('tip'), + content: tip, + showCancel: false, + confirmText: this.translateSys('close') + }); + else uni.showModal({ + title: this.translateSys('tip'), + content: tip + ',' + this.translateSys('tip') + ':' + data + .ret, + showCancel: false, + confirmText: this.translateSys('close') + }); + return false + } else { + var tip = data.info ? typeof data.info == 'string' ? data.info : data + .info + .join( + '<br/>') : ''; + tip = tip || data.err_info + if (tip) uni.showModal({ + title: this.translateSys('tip'), + content: tip, + showCancel: false, + confirmText: this.translateSys('close') + }); + uni.showToast({ + title: this.translate('create_success'), + icon: "success", + duration: 3000 + }); } - } else - uni.showToast({ - title: "鍒涘缓鎴愬姛锛�, - icon: "success", - duration: 3000 - }); + + } //鍒锋柊 uni.redirectTo({ url: '../modal/3037?param=' + -- Gitblit v1.9.1