From f7c29b29054545c37bd71b755b1e22ffa1934c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87?= Date: Thu, 6 Mar 2025 19:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E4=BF=AE=E8=A1=A5=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/request.js | 18 ++-- api/user.js | 2 +- app.js | 18 ++-- app.wxss | 11 ++- components/background-notice/index.wxml | 2 +- components/listView/index.wxml | 4 +- pages/index/index.js | 9 +- pages/index/index.wxml | 108 ++++++++++++------------ pages/index/index.wxss | 21 +++-- pages/order-detail/index.wxml | 5 +- pages/user/info/index.wxml | 2 +- pages/user/password/index.js | 2 +- pages/withdraw/index/index.wxml | 4 +- pages/withdraw/index/index.wxss | 5 +- 14 files changed, 113 insertions(+), 98 deletions(-) diff --git a/api/request.js b/api/request.js index 46c5b86..61c46e3 100644 --- a/api/request.js +++ b/api/request.js @@ -36,14 +36,16 @@ const sendRequest = (options)=>{ rj(result.data); } }else if(result.statusCode==401){ - const pages = getCurrentPages(); - const currentPages = pages[pages.length-1]; - if(currentPages&¤tPages.route.indexOf('pages/login/login')>-1){ - return; - } - wx.navigateTo({ - url: '/pages/login/login', - }) + if(!app)app = getApp(); + app.logout(); + // const pages = getCurrentPages(); + // const currentPages = pages[pages.length-1]; + // if(currentPages&¤tPages.route.indexOf('pages/login/login')>-1){ + // return; + // } + // wx.navigateTo({ + // url: '/pages/login/index', + // }) }else{ rj(result.data); if(!options.options.noTips){ diff --git a/api/user.js b/api/user.js index aab12db..b0ea546 100644 --- a/api/user.js +++ b/api/user.js @@ -19,7 +19,7 @@ export default { delete:(card_id)=>request.delete(`/api/bank-cards/${card_id}`) }, verifyCode:(phone)=>request.post('/api/user/send-code',{phone}), - modifyPassword:(new_password,verify_code)=>request.post('/api/user/change-password',{new_password,verify_code}), + modifyPassword:(phone,new_password,verify_code)=>request.post('/api/user/change-password',{phone,new_password,verify_code}), withdraw:{ add:(bank_card_id,amount)=>request.post('/api/withdraw',{bank_card_id,amount}), diff --git a/app.js b/app.js index 53e28e7..7f46d41 100644 --- a/app.js +++ b/app.js @@ -8,11 +8,6 @@ App({ wx.setInnerAudioOption({ obeyMuteSwitch:false }); - if(!token){ - wx.reLaunch({ - url: '/pages/login/index', - }) - } }, resetUserInfoUpdateTag(){ this.globalData.userInfoGetTime = null; @@ -126,6 +121,19 @@ App({ } return result; }, + logout(){ + wx.removeStorageSync('accessToken'); + this.globalData.accessToken = ''; + this.globalData.userInfo = null; + const pages = getCurrentPages(); + const currentPages = pages[pages.length-1]; + if(currentPages&¤tPages.route.indexOf('pages/login/index')>-1){ + return; + } + wx.navigateTo({ + url: '/pages/login/index', + }) + }, globalData: { userInfo: null, accessToken:token, diff --git a/app.wxss b/app.wxss index fa6e846..102803d 100644 --- a/app.wxss +++ b/app.wxss @@ -9,6 +9,9 @@ page{ background-color:var(--main-bgclolor); overflow: hidden; } +view::-webkit-scrollbar{ + display: none; +} .main-color{ color:var(--main-color); } @@ -181,7 +184,7 @@ page-container .content{ font-size: 80%; } .money{ - color:#EB0000; + color:#ff0000; } .money-promation{ color:#FF8400; @@ -222,7 +225,7 @@ page-container .content{ } .custom-scroll-view .main{ flex:1; - overflow: auto; + overflow: hidden; } .bottom-bar-v2{ padding:24rpx; @@ -361,7 +364,9 @@ navigator button{ font-weight: 500; color:rgba(124, 134, 149, 0.6); } - +scroll-view{ + overflow: hidden; +} .scroll-view-dispatch{ height:100rpx; } diff --git a/components/background-notice/index.wxml b/components/background-notice/index.wxml index 650c901..0de6d29 100644 --- a/components/background-notice/index.wxml +++ b/components/background-notice/index.wxml @@ -1,2 +1,2 @@ -空组件 \ No newline at end of file +空组件 \ No newline at end of file diff --git a/components/listView/index.wxml b/components/listView/index.wxml index 427a70e..bd871b9 100644 --- a/components/listView/index.wxml +++ b/components/listView/index.wxml @@ -1,4 +1,6 @@ - + diff --git a/pages/index/index.js b/pages/index/index.js index a399510..ab4c910 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -501,14 +501,7 @@ Page({ } }, logout(){ - wx.removeStorage({ - key: 'accessToken', - success(){ - wx.redirectTo({ - url: '/pages/login/index', - }) - } - }) + app.logout(); }, concatUser(event){ const item = event.currentTarget.dataset.item; diff --git a/pages/index/index.wxml b/pages/index/index.wxml index d7dd5dd..872a590 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -42,8 +42,8 @@ class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}}"> 代取快递 - - 送达时间() + + 期望送达 @@ -136,63 +136,63 @@ - diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 1b11fe4..3475c95 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -77,7 +77,10 @@ background-color: red; border-radius: 50%; font-size: 24rpx; - padding:4rpx 8rpx; + padding:4rpx 6rpx; + text-align: center; + min-width: 20rpx; + font-weight: normal; } .building{ display: flex; @@ -87,9 +90,6 @@ margin:20rpx 16rpx; position: relative; } -.building::-webkit-scrollbar{ - display: none; -} .building.loading{ overflow: hidden; } @@ -112,9 +112,8 @@ font-weight: 500; } - .package-list .item{ - margin:30rpx 16rpx; + margin:16rpx; background-color: #ffffff; border-radius: 18rpx; color: #555555; @@ -142,7 +141,7 @@ font-weight: 500; } .package-list .item:first-child{ - margin-top:0; + margin-top:8rpx; } .package-list .item::before{ content: ''; @@ -356,7 +355,7 @@ } .left-move-view{ - width:1070rpx;height:100vh; + width:1020rpx;height:100vh; left: -510rpx;top:0; position: fixed; } @@ -387,6 +386,7 @@ text-align: center; padding-bottom:0; padding-top:140rpx; + margin-top:0; } .left-panel .user-info .avatar{ width:120rpx;height:120rpx; @@ -465,11 +465,10 @@ } .left-panel .logout-btn{ - position: fixed; + position: absolute; bottom:calc(constant(safe-area-inset-bottom) + 20rpx); bottom:calc(env(safe-area-inset-bottom) + 20rpx); - left:0;right:0; - margin:30rpx 20rpx; + left:20rpx;right:20rpx; background-color: #fff; font-weight: normal; color: #888888; diff --git a/pages/order-detail/index.wxml b/pages/order-detail/index.wxml index cf12f23..df42ba9 100644 --- a/pages/order-detail/index.wxml +++ b/pages/order-detail/index.wxml @@ -1,5 +1,6 @@ + refresher-enabled scroll-y class="order-detail {{orderDetail.is_first_order?'is-new-order':''}}" + enhanced show-scrollbar="{{false}}"> @@ -11,7 +12,7 @@ {{orderDetail.address_name}}{{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}} - 送达时间: + 期望送达 diff --git a/pages/user/info/index.wxml b/pages/user/info/index.wxml index 994d8c6..c90431a 100644 --- a/pages/user/info/index.wxml +++ b/pages/user/info/index.wxml @@ -1,7 +1,7 @@ - - + {{amountMessage}} diff --git a/pages/withdraw/index/index.wxss b/pages/withdraw/index/index.wxss index d7069fa..a24ae67 100644 --- a/pages/withdraw/index/index.wxss +++ b/pages/withdraw/index/index.wxss @@ -34,11 +34,14 @@ } .amount .input{ flex: 1; - font-size: 56rpx; + font-size: 76rpx; font-weight: 600; height:114rpx; margin-left:24rpx; } +.amount .input-placeholder{ + font-size: 56rpx; +} .amount .bottom{ display: flex; align-items: center;