From 58a98c940347d2852665b530a014ce4f5e00f9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87?= Date: Mon, 3 Mar 2025 19:33:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=92=AD=E6=8A=A5=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/request.js | 5 + api/user.js | 3 +- app.js | 5 - app.wxss | 4 +- components/background-notice/index.js | 36 ++--- pages/index/index.js | 1 - pages/order-detail/index.wxml | 192 +++++++++++--------------- pages/order-detail/index.wxss | 93 +------------ pages/withdraw/index/index.wxss | 2 +- 9 files changed, 110 insertions(+), 231 deletions(-) diff --git a/api/request.js b/api/request.js index 2e773b4..46c5b86 100644 --- a/api/request.js +++ b/api/request.js @@ -36,6 +36,11 @@ 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', }) diff --git a/api/user.js b/api/user.js index 55980b5..aab12db 100644 --- a/api/user.js +++ b/api/user.js @@ -1,6 +1,5 @@ import request from './request'; let app = getApp(); -const token = wx.getStorageSync('accessToken'); export default { genderKV:{ @@ -37,7 +36,7 @@ export default { filePath: file.tempFilePath, name: 'file', header:{ - Authorization: `Bearer ${token||app.globalData.accessToken}` + Authorization: `Bearer ${app?.globalData?.accessToken}` }, url: request.baseUrl+'/api/upload/image', success:(res)=>{ diff --git a/app.js b/app.js index 2df36c2..a78cc8e 100644 --- a/app.js +++ b/app.js @@ -13,11 +13,6 @@ App({ url: '/pages/login/index', }) } - wx.onAppShow((options) => { - if(token){ - // this.getUserInfo(); - } - }) }, onHide(){ console.log('app on hide'); diff --git a/app.wxss b/app.wxss index b4e11f7..fa6e846 100644 --- a/app.wxss +++ b/app.wxss @@ -372,7 +372,9 @@ list-view{ display: block; } - +switch .wx-switch-input{ + background-color:#999999; +} switch .wx-switch-input.wx-switch-input-checked { background-color:var(--main-color); border-color: var(--main-color); diff --git a/components/background-notice/index.js b/components/background-notice/index.js index c15cc55..516bd24 100644 --- a/components/background-notice/index.js +++ b/components/background-notice/index.js @@ -81,34 +81,24 @@ Component({ if(this.loopOrderTimer){ clearInterval(this.loopOrderTimer); } - if(this.emptyAutioPlayTimer){ - clearTimeout(this.emptyAutioPlayTimer) - } if(this.bgam){ this.bgam.stop(); } }, notice(){ - if(this.emptyAutioPlayTimer){ - clearTimeout(this.emptyAutioPlayTimer) - } - - // this.bgam.src = this.data.haveOrderAudio; - // this.bgam.onEnded(()=>{ - // console.log('notice onend'); - // this.emptyAutioPlayTimer = setTimeout(()=>{ - // this.bgam.src = this.data.emptyAudio; - // },1000) - // }); - - const innerAudioContext = wx.createInnerAudioContext({ - useWebAudioImplement:true - }) - innerAudioContext.src = this.data.haveOrderAudio; - innerAudioContext.play(); - innerAudioContext.onEnded(()=>{ - innerAudioContext.destroy(); - }) + this.bgam.src = this.data.haveOrderAudio; + this.bgam.onEnded(()=>{ + this.bgam.src = this.data.emptyAudio; + }); + // console.log('notice order'); + // const innerAudioContext = wx.createInnerAudioContext({ + // useWebAudioImplement:true + // }) + // innerAudioContext.src = this.data.haveOrderAudio; + // innerAudioContext.play(); + // innerAudioContext.onEnded(()=>{ + // innerAudioContext.destroy(); + // }) } } }) \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 468624e..51da2ed 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -64,7 +64,6 @@ Page({ unReadOrderCount:0 }, onLoad(){ - console.log(wx.env.USER_DATA_PATH); this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice'); const snHeight = getStatusNavBarHeight(); this.setData({ diff --git a/pages/order-detail/index.wxml b/pages/order-detail/index.wxml index f03d89d..a99f829 100644 --- a/pages/order-detail/index.wxml +++ b/pages/order-detail/index.wxml @@ -1,68 +1,7 @@ - - - {{orderDetail.community_name}} - {{orderDetail.building_name}} - {{orderDetail.address_detail}} - - - {{orderDetail.address_name}} - {{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}} - - - - - {{item.station_name}} - - - {{ - orderDetail.status==orderStatus.received?(item.receivedAll?'已取件':'待取件'): - orderDetail.status==orderStatus.delivering?'已取件':'' - }} - - - - - - - - - 图片取件 {{orderDetail.pickup_images_count}} 件 - - - - - - - - - - - - - - - 接单 - {{orderDetail.received_time}} + + + {{item.station_name}} + + + {{ + orderDetail.status==orderStatus.received?(item.receivedAll?'已取件':'待取件'): + orderDetail.status==orderStatus.delivering?'已取件':'' + }} + + + + - - - 取货 - {{orderDetail.pickup_time}} + + + 图片取件 {{orderDetail.pickup_images_count}} 件 - - - - 送达 - {{orderDetail.complete_time}} + + + + - - - - 拍照留证 - - - - - - - - - - - 订单编号 - {{orderDetail.orderid}} - - 复制 + + - - 下单时间 - {{orderDetail.create_time}} - + + + + 接单 + {{orderDetail.received_time}} + + + + + 取货 + {{orderDetail.pickup_time}} + + + + + 送达 + {{orderDetail.complete_time}} + + + + + 拍照留证 + + + + + + + + + + + 订单编号 + {{orderDetail.orderid}} + + 复制 + + + + 下单时间 + {{orderDetail.create_time}} + - - 取件数量 - {{orderDetail.package_count}} - - - 订单金额 - {{orderDetail.original_amount}} + + + 取件数量 + {{orderDetail.package_count}} + + + 订单金额 + {{orderDetail.original_amount}} + + - diff --git a/pages/order-detail/index.wxss b/pages/order-detail/index.wxss index 0c2e77e..40b917f 100644 --- a/pages/order-detail/index.wxss +++ b/pages/order-detail/index.wxss @@ -1,6 +1,9 @@ .order-detail{ height:100vh; } +.order-detail .content{ + overflow: auto; +} .address-info .title{ font-size: 40rpx; font-weight: 600; @@ -70,96 +73,6 @@ width:160rpx;height:160rpx; border-radius: 12rpx; } -/* .package-info{ - padding:56rpx 20rpx 40rpx 20rpx; - position: relative; - color: #555555; -} - -.package-info::before{ - content: ''; - position: absolute; - width:1.2rpx; - background-color: rgba(85, 85, 85, 0.5); - left:38.5rpx;top:90rpx; - bottom:130rpx; -} */ - -/* .package-info .name{ - font-size: 40rpx; - font-weight: 600; - flex: 1; -} -.package-info .received-status{ - border-left: 1rpx solid #999999; - padding-left:18rpx; -} */ -/* .package-info .package{ - font-size:32rpx; - margin-top:24rpx; - display: flex; -} */ - -/* .package-info .station-list .sl-item{ - position: relative; - padding-left:64rpx; - padding-bottom:50rpx; - display: flex; - align-items: center; -} -.package-info .station-list .sl-item:first-child::before{ - content: '取'; - left:0;top:0; - width:40rpx;height:40rpx; - color:#fff; - font-size: 24rpx; - text-align: center; - line-height: 40rpx; -} -.package-info .station-list .sl-item::before{ - position: absolute; - left:12rpx;top:12rpx; - width:16rpx;height:16rpx; - content: ''; - background-color: #555555; - border-radius: 50%; - display: inline-block; -} -.package-list .item .station-list .sl-item{ - padding-bottom:50rpx; -} */ -/* .package-info .package .value{ - flex:1; - display: flex; - flex-wrap: wrap; - gap: 16rpx; -} */ - -/* .package-info .address{ - padding-left:64rpx; - position: relative; -} -.package-info .address::before{ - content: '送'; - position: absolute; - top:0;left:0; - width:40rpx;height:40rpx; - background-color: var(--main-color); - border-radius: 50%; - color:#fff; - line-height: 40rpx; - text-align: center; - font-size: 24rpx; -} -.package-info .address .title{ - color:var(--main-font-color); - font-size: 40rpx; - font-weight: 600; -} -.package-info .address .sub-title{ - font-size: 32rpx; - margin-top:24rpx -} */ .steps{ display: flex; diff --git a/pages/withdraw/index/index.wxss b/pages/withdraw/index/index.wxss index 6e00d3c..d7069fa 100644 --- a/pages/withdraw/index/index.wxss +++ b/pages/withdraw/index/index.wxss @@ -35,7 +35,7 @@ .amount .input{ flex: 1; font-size: 56rpx; - font-weight: 500; + font-weight: 600; height:114rpx; margin-left:24rpx; }