From eabefef08734a5c6dfcf1e31b7219e26ad912186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Mon, 22 Dec 2025 15:21:53 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5Ffix:=20=E8=BF=94=E5=9B=9E=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E9=80=80=E5=87=BA=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/common/common.js | 17 ++++++++++++++++- src/pages/sparring/tip.vue | 5 ++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.env.development b/.env.development index e37f400d..71411a27 100644 --- a/.env.development +++ b/.env.development @@ -7,7 +7,7 @@ ENV = 'development' # VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' -VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7003' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' diff --git a/src/common/common.js b/src/common/common.js index 15175f2e..735507f6 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -14,7 +14,14 @@ function msg(title, duration = 1000) { }); } +let isShowConfirm = false function show(title, msg, showCancel = true, cancelText = '取消', confirmText = '确定') { + if(isShowConfirm) { + return new Promise((resolve, reject) => { + reject(res); + }); + } + isShowConfirm = true return new Promise((resolve, reject) => { // 创建通用参数对象 const dialogOptions = { @@ -26,7 +33,9 @@ function show(title, msg, showCancel = true, cancelText = '取消', confirmText success: (res) => { // 统一处理成功回调,解析为布尔值 resolve(!!res.confirm); - } + isShowConfirm = false + }, + }; // #ifdef APP-PLUS if (getPhoneEnvBool('AND')) { @@ -35,6 +44,7 @@ function show(title, msg, showCancel = true, cancelText = '取消', confirmText ...dialogOptions, cancel: () => { console.log('用户点击取消'); + isShowConfirm = false resolve(false); // 取消时也返回Promise结果 } }); @@ -43,6 +53,7 @@ function show(title, msg, showCancel = true, cancelText = '取消', confirmText uni.showModal({ ...dialogOptions, fail: (res) => { + isShowConfirm = false reject(res); } }); @@ -52,6 +63,7 @@ function show(title, msg, showCancel = true, cancelText = '取消', confirmText uni.showModal({ ...dialogOptions, fail: (res) => { + isShowConfirm = false reject(res); } }); @@ -59,6 +71,9 @@ function show(title, msg, showCancel = true, cancelText = '取消', confirmText }); } +const closeStatus = () => { + isShowConfirm = false +} const loading = (title = '加载中', mask = true) => uni.showLoading({ title: title, mask: mask diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue index aa9dee44..fec97659 100644 --- a/src/pages/sparring/tip.vue +++ b/src/pages/sparring/tip.vue @@ -290,6 +290,7 @@ const showModelComfirm = ref(false) const reconcatNum = ref(0) const answerText = ref('') const touchBtnCallBack = ref(null) +const stopAnswerCallBack = ref(false) let isLeave = false const initsocketTask = () => { let _src = isPreview.value ? '/trapractice/previewsocket/open' : '/trapractice/partnersocket/open' @@ -310,7 +311,7 @@ const initsocketTask = () => { if (watchFlag.value === 1 || showModelComfirm.value) return if (reconcatNum.value === 5) { common.msg('系统网络异常,请稍后再试!') - common.redirectTo(`/pages/index/dialog`) + common.reLaunch(`/pages/index/dialog`) return } showModelComfirm.value = true @@ -473,6 +474,7 @@ const initsocketTask = () => { watchFlag.value += 1 } const goBack = () => { + console.log(222,detailInfo.value.traInterTyp === '01') if (detailInfo.value.traInterTyp === '01') { overTalking() } else { @@ -585,6 +587,7 @@ onMounted(() => { // getDetailInfo() }) onBackPress(res => { + console.log(1111) if (res.from === 'backbutton') { goBack() return true