From 7f8d86eed469360dbf86deeb8fb659a31be207f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8=E6=A0=88=E5=B0=8F=E5=AD=A6=E7=94=9F?= <1518079521@qq.com> Date: Wed, 11 Jun 2025 09:20:03 +0800 Subject: [PATCH] up uni-app --- uni-app/publish.cjs | 39 ++- uni-app/src/app/pages/friendspay/money.vue | 18 +- uni-app/src/app/pages/index/tabbar.vue | 222 ++++++++++++++++++ uni-app/src/app/pages/member/address_edit.vue | 12 +- uni-app/src/app/pages/member/level.vue | 24 +- .../components/area-select/area-select.vue | 5 + .../information-filling.vue | 4 + uni-app/src/components/tabbar/tabbar.vue | 7 +- .../src/components/top-tabbar/top-tabbar.vue | 4 +- .../wx-privacy-popup/wx-privacy-popup.vue | 8 +- uni-app/src/hooks/useSendSms.ts | 2 +- uni-app/src/locale/index.ts | 14 +- uni-app/src/locale/language.ts | 3 +- uni-app/src/locale/zh-Hans.json | 2 +- uni-app/src/pages.json | 9 + uni-app/src/stores/system.ts | 10 +- uni-app/src/tabbar.json | 2 + uni-app/src/utils/common.ts | 4 +- uni-app/src/utils/interceptor.ts | 24 ++ 19 files changed, 368 insertions(+), 45 deletions(-) create mode 100644 uni-app/src/app/pages/index/tabbar.vue create mode 100644 uni-app/src/tabbar.json diff --git a/uni-app/publish.cjs b/uni-app/publish.cjs index 115123a67..1d918b678 100644 --- a/uni-app/publish.cjs +++ b/uni-app/publish.cjs @@ -71,18 +71,23 @@ const solve = () => { } const handleWeappAddonComponents = (mode) => { - const src = `./dist/${mode}/mp-weixin/addon/components/diy/group/index.json` + const files = [ + `./dist/${mode}/mp-weixin/addon/components/diy/group/index.json`, + `./dist/${mode}/mp-weixin/app/pages/index/tabbar.json` + ] - try { - const data = JSON.parse(fs.readFileSync(src, 'utf8')); - data.componentPlaceholder = {}; + files.forEach(src => { + try { + const data = JSON.parse(fs.readFileSync(src, 'utf8')); + data.componentPlaceholder = {}; - Object.keys(data.usingComponents).map(key => { - data.componentPlaceholder[key] = "view"; - }) - fs.writeFileSync(src, JSON.stringify(data)) - } catch (err) { - } + Object.keys(data.usingComponents).map(key => { + data.componentPlaceholder[key] = "view"; + }) + fs.writeFileSync(src, JSON.stringify(data)) + } catch (err) { + } + }) } const handleWeappLanguage = (mode) => { @@ -115,6 +120,20 @@ const listenWeappRunDev = () => { handleWeappLanguage('dev') } }); + + // 监听 stderr 输出,用于捕获错误信息 + devProcess.stderr.on('data', (data) => { + console.error(data.toString()); + }); + + // 监听子进程退出事件 + devProcess.on('close', (code) => { + if (code !== 0) { // 如果退出码不是0,则认为发生了错误 + console.error(`Child process exited with code ${code}`); + } else { + console.log('Child process exited successfully.'); + } + }); } main() diff --git a/uni-app/src/app/pages/friendspay/money.vue b/uni-app/src/app/pages/friendspay/money.vue index 0c64cd9f2..f67880dd4 100644 --- a/uni-app/src/app/pages/friendspay/money.vue +++ b/uni-app/src/app/pages/friendspay/money.vue @@ -28,18 +28,26 @@ - - 返回首页 - + + + 返回首页 + + + {{ friendsInfo.config.pay_explain_title }} + + + + + @@ -136,6 +142,16 @@ const levelIndex = ref(0); //当前等级的索引 /********* 自定义头部 - start ***********/ const topTabarObj = topTabar() let topTabbarData = topTabarObj.setTopTabbarParam({ title: '会员等级' }) +let topTabbarDataEmpty =ref({ + title: '会员等级', + topStatusBar: { + style: 'style-1', + bgColor: '#fff', + rollBgColor: '#333', + textColor: '#333', + rollTextColor: '#333' + } +}) /********* 自定义头部 - end ***********/ onShow(() => { diff --git a/uni-app/src/components/area-select/area-select.vue b/uni-app/src/components/area-select/area-select.vue index 1b5f1354a..c8d75d1c5 100644 --- a/uni-app/src/components/area-select/area-select.vue +++ b/uni-app/src/components/area-select/area-select.vue @@ -118,6 +118,11 @@ watch(() => selected.city, (nval) => { selected.district = null } } + if (!data.length) { + emits('complete', selected) + show.value = false + } + }).catch() } else { areaList.district = [] diff --git a/uni-app/src/components/information-filling/information-filling.vue b/uni-app/src/components/information-filling/information-filling.vue index 98cfbd8ae..a8832ce19 100644 --- a/uni-app/src/components/information-filling/information-filling.vue +++ b/uni-app/src/components/information-filling/information-filling.vue @@ -148,6 +148,10 @@ const getPhoneNumber = (e: any) => { let msg = '用户未授权隐私权限'; uni.showToast({ title: msg, icon: 'none' }) } + if (e.detail.errno == 112) { + let msg = `隐私协议中未声明,获取手机号失败`; + uni.showToast({ title: msg, icon: 'none' }) + } if (e.detail.errMsg == "getPhoneNumber:fail user deny") { let msg = '用户拒绝获取手机号码'; uni.showToast({ title: msg, icon: 'none' }) diff --git a/uni-app/src/components/tabbar/tabbar.vue b/uni-app/src/components/tabbar/tabbar.vue index 4827e7bfc..b006aead6 100644 --- a/uni-app/src/components/tabbar/tabbar.vue +++ b/uni-app/src/components/tabbar/tabbar.vue @@ -1,5 +1,5 @@