From 4aaf885ef0133dc8ca664697b478a0f7c1fcabb5 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: Tue, 6 Aug 2024 17:56:04 +0800 Subject: [PATCH] update --- uni-app/src/App.vue | 87 ++++- .../src/addon/components/diy/group/index.scss | 54 +-- .../src/addon/components/diy/group/index.vue | 189 ++--------- .../addon/components/diy/group/useDiyGroup.ts | 163 +++++++++ uni-app/src/app/api/auth.ts | 21 ++ uni-app/src/app/api/member.ts | 7 +- uni-app/src/app/api/system.ts | 9 +- uni-app/src/app/api/verify.ts | 20 +- .../app/components/diy/active-cube/index.vue | 4 +- .../components/diy/carousel-search/index.vue | 48 ++- .../app/components/diy/float-btn/index.vue | 82 ++++- .../app/components/diy/graphic-nav/index.vue | 99 +++++- .../app/components/diy/member-info/index.vue | 27 +- .../app/components/diy/member-level/index.vue | 27 +- .../src/app/components/diy/notice/index.vue | 29 +- .../app/locale/zh-Hans/pages.auth.bind.json | 3 +- .../app/locale/zh-Hans/pages.auth.login.json | 3 +- uni-app/src/app/pages/auth/agreement.vue | 10 +- uni-app/src/app/pages/auth/bind.vue | 19 +- uni-app/src/app/pages/auth/login.vue | 120 ++++++- uni-app/src/app/pages/auth/register.vue | 53 +-- uni-app/src/app/pages/auth/resetpwd.vue | 13 +- uni-app/src/app/pages/index/diy.vue | 5 +- uni-app/src/app/pages/index/index.vue | 5 +- uni-app/src/app/pages/member/account.vue | 10 +- uni-app/src/app/pages/member/account_edit.vue | 20 +- uni-app/src/app/pages/member/address.vue | 6 +- uni-app/src/app/pages/member/address_edit.vue | 44 ++- .../src/app/pages/member/apply_cash_out.vue | 63 ++-- uni-app/src/app/pages/member/balance.vue | 90 +++-- uni-app/src/app/pages/member/cash_out.vue | 22 +- .../src/app/pages/member/cash_out_detail.vue | 6 +- uni-app/src/app/pages/member/commission.vue | 120 ++++--- .../pages/member/components/select-date.vue | 192 +++++++++++ uni-app/src/app/pages/member/contact.vue | 49 +++ .../src/app/pages/member/detailed_account.vue | 92 +++++- uni-app/src/app/pages/member/index.vue | 5 +- uni-app/src/app/pages/member/level.vue | 55 ++-- .../pages/member/location_address_edit.vue | 10 +- uni-app/src/app/pages/member/personal.vue | 41 ++- uni-app/src/app/pages/member/point.vue | 33 +- uni-app/src/app/pages/member/point_detail.vue | 142 +++++++- uni-app/src/app/pages/member/sign_in.vue | 250 +++++++------- uni-app/src/app/pages/pay/browser.vue | 2 +- uni-app/src/app/pages/pay/result.vue | 4 +- uni-app/src/app/pages/setting/index.vue | 4 +- uni-app/src/app/pages/verify/detail.vue | 69 ++-- uni-app/src/app/pages/verify/index.vue | 66 ++-- uni-app/src/app/pages/verify/record.vue | 99 ++++-- uni-app/src/app/pages/verify/verify.vue | 119 +++---- uni-app/src/app/pages/webview/index.vue | 16 +- .../components/area-select/area-select.vue | 1 - .../components/bind-mobile/bind-mobile.vue | 198 +++++++++++ .../information-filling.vue | 83 ++++- .../mescroll-empty/mescroll-empty.vue | 16 +- .../src/components/nc-contact/nc-contact.vue | 99 ++++++ uni-app/src/components/pay/pay.vue | 2 +- .../components/select-date/select-date.vue | 199 +++++++++++ .../components/share-poster/share-poster.vue | 20 +- uni-app/src/components/sms-code/sms-code.vue | 6 +- .../src/components/top-tabbar/top-tabbar.vue | 114 +++---- .../wx-privacy-popup/wx-privacy-popup.vue | 31 +- uni-app/src/hooks/useDiy.ts | 35 +- uni-app/src/hooks/useLogin.ts | 155 ++++++--- uni-app/src/hooks/useSendSms.ts | 24 +- uni-app/src/hooks/useShare.ts | 219 +++++++------ uni-app/src/hooks/useSubscribeMessage.ts | 6 +- uni-app/src/locale/zh-Hans.json | 1 + uni-app/src/locale/zh-Hans/common.json | 11 +- uni-app/src/pages.json | 6 + uni-app/src/stores/config.ts | 15 +- uni-app/src/stores/member.ts | 42 ++- uni-app/src/stores/system.ts | 1 - uni-app/src/styles/common.scss | 86 ++++- uni-app/src/styles/diy.scss | 2 +- uni-app/src/styles/iconfont.css | 30 +- uni-app/src/styles/member_record_list.scss | 6 +- uni-app/src/styles/official-iconfont.css | 18 +- uni-app/src/utils/auth.ts | 2 +- uni-app/src/utils/common.ts | 15 + uni-app/src/utils/interceptor.ts | 7 +- uni-app/src/utils/pages.ts | 18 +- uni-app/src/utils/request.ts | 309 +++++++++--------- uni-app/src/utils/storage.ts | 14 +- uni-app/src/utils/topTabbar.ts | 58 ++++ 85 files changed, 3171 insertions(+), 1404 deletions(-) create mode 100644 uni-app/src/addon/components/diy/group/useDiyGroup.ts create mode 100644 uni-app/src/app/pages/member/components/select-date.vue create mode 100644 uni-app/src/app/pages/member/contact.vue create mode 100644 uni-app/src/components/bind-mobile/bind-mobile.vue create mode 100644 uni-app/src/components/nc-contact/nc-contact.vue create mode 100644 uni-app/src/components/select-date/select-date.vue create mode 100644 uni-app/src/utils/topTabbar.ts diff --git a/uni-app/src/App.vue b/uni-app/src/App.vue index 35f80f4d7..a32f12251 100644 --- a/uni-app/src/App.vue +++ b/uni-app/src/App.vue @@ -1,7 +1,7 @@ diff --git a/uni-app/src/addon/components/diy/group/index.scss b/uni-app/src/addon/components/diy/group/index.scss index dce75f40c..852605e70 100644 --- a/uni-app/src/addon/components/diy/group/index.scss +++ b/uni-app/src/addon/components/diy/group/index.scss @@ -1,29 +1,29 @@ -.draggable-element,.ignore-draggable-element { - &.decorate { - &:hover:before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - border: 4rpx dotted $u-primary; - z-index: 10; - pointer-events: none; - cursor: move; - } +.draggable-element { + &.decorate { + &:hover:before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + border: 4rpx dotted $u-primary; + z-index: 10; + pointer-events: none; + cursor: move; + } - &.selected:before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - border: 4rpx solid $u-primary; - z-index: 10; - pointer-events: none; - cursor: move; - } - } + &.selected:before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + border: 4rpx solid $u-primary; + z-index: 10; + pointer-events: none; + cursor: move; + } + } } diff --git a/uni-app/src/addon/components/diy/group/index.vue b/uni-app/src/addon/components/diy/group/index.vue index 2abc1ed99..dcde152f4 100644 --- a/uni-app/src/addon/components/diy/group/index.vue +++ b/uni-app/src/addon/components/diy/group/index.vue @@ -1,11 +1,11 @@ \ No newline at end of file + \ No newline at end of file diff --git a/uni-app/src/app/pages/member/apply_cash_out.vue b/uni-app/src/app/pages/member/apply_cash_out.vue index 4a8110672..462b594e1 100644 --- a/uni-app/src/app/pages/member/apply_cash_out.vue +++ b/uni-app/src/app/pages/member/apply_cash_out.vue @@ -1,18 +1,18 @@ @@ -156,7 +156,18 @@ title: t('abnormalOperation'), icon: 'none', success() { - setTimeout(() => { uni.navigateBack({ delta: 1}) }, 1500) + setTimeout(() => { + if(getCurrentPages().length > 1){ + uni.navigateBack({ + delta: 1 + }); + }else{ + redirect({ + url: '/app/pages/member/index', + mode: 'reLaunch' + }); + } + }, 1500) } }) return @@ -301,7 +312,7 @@ diff --git a/uni-app/src/app/pages/member/cash_out.vue b/uni-app/src/app/pages/member/cash_out.vue index 4ceeb4ab1..2485cdf9b 100644 --- a/uni-app/src/app/pages/member/cash_out.vue +++ b/uni-app/src/app/pages/member/cash_out.vue @@ -1,6 +1,6 @@ + diff --git a/uni-app/src/app/pages/member/sign_in.vue b/uni-app/src/app/pages/member/sign_in.vue index 560938ffa..85dfd30f3 100644 --- a/uni-app/src/app/pages/member/sign_in.vue +++ b/uni-app/src/app/pages/member/sign_in.vue @@ -4,111 +4,115 @@ - - + + 签到规则 - + - - + + 签到规则 - - - - + + + - - {{ state.curYear }}年{{ state.curMonth+1 }}月 - + + {{ state.curYear }}年{{ state.curMonth+1 }}月 + - + - + - 已连续签到{{ info.days }} + 已连续签到{{ info.days }} - + - + - - 周一 - 周二 - 周三 - 周四 - 周五 - 周六 - 周日 + + 周一 + 周二 + 周三 + 周四 + 周五 + 周六 + 周日 - - - {{ filteredDate(item) }} - + + + {{ filteredDate(item) }} + - + - + - - - {{ filteredDate(item) }} - + + + {{ filteredDate(item) }} + - + + - + - - - - - + + - 签到奖励 + 签到奖励 - + @@ -122,26 +126,28 @@ - 连续签到{{item.continue_sign}}天 + 连续签到{{item.continue_sign}}天 - + - {{item.gift.total.text}} + {{item.gift.total.text}} - 待完成 - 已完成 + 待完成 + 已完成 - + - - - 签到未开启 + + + + + @@ -153,35 +159,35 @@ - + - + - + - + - + - {{ signAward.title }} - {{ signAward.info }} - + {{ signAward.title }} + {{ signAward.info }} + - - 我知道了 + + 我知道了 - + @@ -189,26 +195,28 @@ - + - + - + - 签到奖励 - 您将获得以下奖励 - - + + {{ packInfo.title }} + + {{ packInfo.info }} + + - - 我知道了 + + 我知道了 @@ -224,12 +232,13 @@ diff --git a/uni-app/src/app/pages/verify/record.vue b/uni-app/src/app/pages/verify/record.vue index 13d174d27..528eac32d 100644 --- a/uni-app/src/app/pages/verify/record.vue +++ b/uni-app/src/app/pages/verify/record.vue @@ -1,46 +1,69 @@ diff --git a/uni-app/src/app/pages/verify/verify.vue b/uni-app/src/app/pages/verify/verify.vue index 9ea56672e..bbcbd169e 100644 --- a/uni-app/src/app/pages/verify/verify.vue +++ b/uni-app/src/app/pages/verify/verify.vue @@ -2,60 +2,50 @@ - - - 核销记录 + + + 核销记录 - - + + 验证核销码 - + 确定核销 - - - - - - {{item.name}} + + + + + + {{item.name}} + x1 - - 核销信息 - - - 核销类型 - {{verifyInfo.type_name}} - - - {{item.title}} - {{item.value}} - + + 核销信息 + + 核销类型 + {{verifyInfo.type_name}} + + + {{item.title}} + {{item.value}} - - {{item.title}} - - - {{subItem.title}} -
- {{ subItem.value }} - - 复制 -
-
- {{ subItem.value }} -
-
+ + {{item.title}} + + {{subItem.title}} + {{ subItem.value }} @@ -68,26 +58,23 @@ diff --git a/uni-app/src/components/area-select/area-select.vue b/uni-app/src/components/area-select/area-select.vue index e6276ef9a..14df5706f 100644 --- a/uni-app/src/components/area-select/area-select.vue +++ b/uni-app/src/components/area-select/area-select.vue @@ -73,7 +73,6 @@ data.city && (selected.city = data.city) data.district && (selected.district = data.district) }) - .catch() } },{ immediate:true diff --git a/uni-app/src/components/bind-mobile/bind-mobile.vue b/uni-app/src/components/bind-mobile/bind-mobile.vue new file mode 100644 index 000000000..741df86a9 --- /dev/null +++ b/uni-app/src/components/bind-mobile/bind-mobile.vue @@ -0,0 +1,198 @@ + + + + + \ No newline at end of file diff --git a/uni-app/src/components/information-filling/information-filling.vue b/uni-app/src/components/information-filling/information-filling.vue index 83026b43c..6d9c230d7 100644 --- a/uni-app/src/components/information-filling/information-filling.vue +++ b/uni-app/src/components/information-filling/information-filling.vue @@ -4,11 +4,11 @@ {{ t('getAvatarNickname') }} {{ t('getAvatarNicknameTips') }}
- + - + + + +
+ + diff --git a/uni-app/src/components/pay/pay.vue b/uni-app/src/components/pay/pay.vue index 38338a947..702c470ca 100644 --- a/uni-app/src/components/pay/pay.vue +++ b/uni-app/src/components/pay/pay.vue @@ -25,7 +25,7 @@
- +
diff --git a/uni-app/src/components/select-date/select-date.vue b/uni-app/src/components/select-date/select-date.vue new file mode 100644 index 000000000..c3ca62c56 --- /dev/null +++ b/uni-app/src/components/select-date/select-date.vue @@ -0,0 +1,199 @@ + + + + + \ No newline at end of file diff --git a/uni-app/src/components/share-poster/share-poster.vue b/uni-app/src/components/share-poster/share-poster.vue index 79043c757..cba718521 100644 --- a/uni-app/src/components/share-poster/share-poster.vue +++ b/uni-app/src/components/share-poster/share-poster.vue @@ -52,7 +52,7 @@ @@ -368,7 +352,6 @@ defineExpose({ .u-navbar { width: 100%; transition: background 0.3s; - position: fixed; left: 0; right: 0; top: 0; @@ -511,6 +494,7 @@ defineExpose({ margin: 0 10rpx; max-width: 360rpx; font-size: 27rpx; + line-height: normal; } .nearby-store-name { diff --git a/uni-app/src/components/wx-privacy-popup/wx-privacy-popup.vue b/uni-app/src/components/wx-privacy-popup/wx-privacy-popup.vue index 051c433ef..7944cccb8 100644 --- a/uni-app/src/components/wx-privacy-popup/wx-privacy-popup.vue +++ b/uni-app/src/components/wx-privacy-popup/wx-privacy-popup.vue @@ -23,7 +23,7 @@ const agree = ref(false) const showPop = ref(false) - const privacyAuthorization = ref(null) + const privacyAuthorization: any = ref(null) const privacyResolves = new Set() const closeOtherPagePopUpHooks = new Set() @@ -33,9 +33,9 @@ const emits = defineEmits(['agree','disagree']) // 监听何时需要提示用户阅读隐私政策 - const init = ()=>{ + const init = ()=> { if (wx.onNeedPrivacyAuthorization) { - wx.onNeedPrivacyAuthorization((resolve) => { + wx.onNeedPrivacyAuthorization((resolve: any) => { if (typeof privacyAuthorization.value === 'function') { privacyAuthorization.value(resolve) } @@ -45,7 +45,7 @@ //初始化监听程序 const curPageShow = ()=> { - privacyAuthorization.value = resolve => { + privacyAuthorization.value = (resolve: any) => { privacyResolves.add(resolve) //打开弹窗 popUp() @@ -56,7 +56,7 @@ } onMounted(()=>{ - //查询微信侧记录的用户是否有待同意的隐私政策信息 + // 查询微信侧记录的用户是否有待同意的隐私政策信息 try { wx.getPrivacySetting({ success(res:any) { @@ -72,7 +72,7 @@ } }); - //打开隐私协议 + // 打开隐私协议 const openPrivacyContract = ()=> { wx.openPrivacyContract({ success(res) { @@ -95,15 +95,15 @@ // 不同意 const handleDisagree = ()=> { - privacyResolves.forEach(resolve => { + privacyResolves.forEach((resolve: any) => { resolve({ event: 'disagree', }) }) privacyResolves.clear() - //关闭弹窗 + // 关闭弹窗 disPopUp() - //退出小程序 + // 退出小程序 uni.showModal({ content: '未同意隐私协议,无法使用相关功能', confirmColor: useConfigStore().themeColor['--primary-color'], @@ -115,7 +115,7 @@ // 同意并继续 const handleAgree = ()=> { - privacyResolves.forEach(resolve => { + privacyResolves.forEach((resolve: any) => { resolve({ event: 'agree', buttonId: 'agree-btn' @@ -127,24 +127,25 @@ emits('agree') } - //打开弹窗 + // 打开弹窗 const popUp = ()=> { if (showPop.value === false) { showPop.value = true } } - //关闭弹窗 + // 关闭弹窗 const disPopUp = ()=> { if (showPop.value === true) { showPop.value = false } } + // 主动打开协议弹出框(如果已经同意,则不会弹出) const proactive =()=> { if (wx.getPrivacySetting) { wx.getPrivacySetting({ - success: (res) => { + success: (res: any) => { if (res.needAuthorization) { popUp() // 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗 @@ -158,6 +159,10 @@ emits('agree') } } + + defineExpose({ + proactive + })