From 07925905f1a596e20e980de6d42db217abb753b0 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 12 十二月 2025 18:06:11 +0800
Subject: [PATCH] plugin

---
 pages/modal/3202_view.vue |  157 ++++++++++++++++++++++++++--------------------------
 1 files changed, 78 insertions(+), 79 deletions(-)

diff --git a/pages/modal/3202_view.vue b/pages/modal/3202_view.vue
index 2d21a57..6ffd908 100644
--- a/pages/modal/3202_view.vue
+++ b/pages/modal/3202_view.vue
@@ -117,13 +117,16 @@
 		onBackPress(e) {
 			this.beforeNavigateBack()
 		},
+		onReady() {
+			uni.setNavigationBarTitle({
+				title: this.title 
+			}); //璁剧疆椤堕儴鏍囬 
+		},
 		async onLoad(options) {
 			try {
 				showLoading("loading...")
 				console.log(options);
-				uni.setNavigationBarTitle({
-					title: options.titlename
-				}); //璁剧疆椤堕儴鏍囬 
+
 				this.title = options.titlename;
 				this.param = JSON.parse(options.param);
 				this.head_styledef = {
@@ -403,86 +406,82 @@
 				try {
 					var $this = this;
 
-					runCustomEvent(dataInfo).then(result => {
-						console.log(result);
+					const result = await runCustomEvent(dataInfo)
+					console.log(result);
 
-						if (result.ret != 0 && result.ret != 1) {
-							let cls_name = result.event_info?.cls_name
-							let event_name = result.event_info?.event_name
-							tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info :
-								result
-								.err_info
-								.join('\n') : ''
-							if (result.ret == 801) {
-								if (this.param.Only_Script_Error) {
-									let pos = tip.indexOf("锛�);
-									if (pos > -1) tip = tip.substring(pos + 1);
-								}
+					if (result.ret != 0 && result.ret != 1) {
+						let cls_name = result.event_info?.cls_name
+						let event_name = result.event_info?.event_name
+						tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info :
+							result
+							.err_info
+							.join('\n') : ''
+						if (result.ret == 801) {
+							if (this.param.Only_Script_Error) {
+								let pos = tip.indexOf("锛�);
+								if (pos > -1) tip = tip.substring(pos + 1);
 							}
-							if (cls_name && event_name) tip =
-								`鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
-							if (result.ret == 801) showInfo(tip)
-							else showError(`${tip}锛屾彁绀猴細${result.ret}`, this.translateSys('tip'))
-							this.saving = false
-							return false
-						} else {
-							var tip = result.info ? typeof result.info == 'string' ? result.info :
-								result.info.join('\n') : '';
-							tip = tip || result.err_info
-							let time = result.info_time || 0
-							if (time)
-								showError(tip, this.translateSys('tip'))
-							else
-								showInfo(tip)
-							if ([0, 2, 3, 4, -1].includes(result.result_type)) {
-								if (result.result_type == 2) {
-
-								} else if (typeof result.result == 'string') {
-									showInfo(result.result)
-
-								}
-								try {
-									var actionList = result.action || []
-									actionList.forEach(item => {
-										if (item.action_type == "goback_to_pre_page") { //杩斿洖涓婁竴椤�-											var value = item.value;
-											uni.navigateBack({
-												delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
-											});
-										} else {
-											showInfo(this
-												.translateSys(
-													"quotation_mark_left"
-												) +
-												item
-												.action_type +
-												this
-												.translateSys(
-													"quotation_mark_right"
-												) +
-												this
-												.translate(
-													"tip_action_unprocessed"
-												))
-
-										}
-									});
-
-								} catch (ex) {
-									let actionList = (result.action || []).map(a => a.action_type).join(';')
-									let tip = typeof ex == 'string' ? ex : ex.message
-									tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
-									showError(tip, this.translateSys('tip'))
-									return
-								}
-							}
-
 						}
-					}).catch(ex => {
-						console.log(ex);
-						showError(ex, this.translateSys("error") + "9.1")
+						if (cls_name && event_name) tip =
+							`鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+						if (result.ret == 801) showInfo(tip)
+						else showError(`${tip}锛屾彁绀猴細${result.ret}`, this.translateSys('tip'))
+						this.saving = false
+						return false
+					} else {
+						var tip = result.info ? typeof result.info == 'string' ? result.info :
+							result.info.join('\n') : '';
+						tip = tip || result.err_info
+						let time = result.info_time || 0
+						if (time)
+							showError(tip, this.translateSys('tip'))
+						else
+							showInfo(tip)
+						if ([0, 2, 3, 4, -1].includes(result.result_type)) {
+							if (result.result_type == 2) {
 
-					});
+							} else if (typeof result.result == 'string') {
+								showInfo(result.result)
+
+							}
+							try {
+								var actionList = result.action || []
+								actionList.forEach(item => {
+									if (item.action_type == "goback_to_pre_page") { //杩斿洖涓婁竴椤�+										var value = item.value;
+										uni.navigateBack({
+											delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
+										});
+									} else {
+										showInfo(this
+											.translateSys(
+												"quotation_mark_left"
+											) +
+											item
+											.action_type +
+											this
+											.translateSys(
+												"quotation_mark_right"
+											) +
+											this
+											.translate(
+												"tip_action_unprocessed"
+											))
+
+									}
+								});
+
+							} catch (ex) {
+								let actionList = (result.action || []).map(a => a.action_type).join(';')
+								let tip = typeof ex == 'string' ? ex : ex.message
+								tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
+								showError(tip, this.translateSys('tip'))
+								return
+							}
+						}
+
+					}
+
 				} catch (ex) {
 					showError(ex, this.translateSys('error') + "9.2")
 

--
Gitblit v1.9.1