修修补补

This commit is contained in:
2025-03-06 19:40:18 +08:00
parent 42f5eda659
commit f7c29b2905
14 changed files with 113 additions and 98 deletions

View File

@ -36,14 +36,16 @@ const sendRequest = (options)=>{
rj(result.data); rj(result.data);
} }
}else if(result.statusCode==401){ }else if(result.statusCode==401){
const pages = getCurrentPages(); if(!app)app = getApp();
const currentPages = pages[pages.length-1]; app.logout();
if(currentPages&&currentPages.route.indexOf('pages/login/login')>-1){ // const pages = getCurrentPages();
return; // const currentPages = pages[pages.length-1];
} // if(currentPages&&currentPages.route.indexOf('pages/login/login')>-1){
wx.navigateTo({ // return;
url: '/pages/login/login', // }
}) // wx.navigateTo({
// url: '/pages/login/index',
// })
}else{ }else{
rj(result.data); rj(result.data);
if(!options.options.noTips){ if(!options.options.noTips){

View File

@ -19,7 +19,7 @@ export default {
delete:(card_id)=>request.delete(`/api/bank-cards/${card_id}`) delete:(card_id)=>request.delete(`/api/bank-cards/${card_id}`)
}, },
verifyCode:(phone)=>request.post('/api/user/send-code',{phone}), 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:{ withdraw:{
add:(bank_card_id,amount)=>request.post('/api/withdraw',{bank_card_id,amount}), add:(bank_card_id,amount)=>request.post('/api/withdraw',{bank_card_id,amount}),

18
app.js
View File

@ -8,11 +8,6 @@ App({
wx.setInnerAudioOption({ wx.setInnerAudioOption({
obeyMuteSwitch:false obeyMuteSwitch:false
}); });
if(!token){
wx.reLaunch({
url: '/pages/login/index',
})
}
}, },
resetUserInfoUpdateTag(){ resetUserInfoUpdateTag(){
this.globalData.userInfoGetTime = null; this.globalData.userInfoGetTime = null;
@ -126,6 +121,19 @@ App({
} }
return result; return result;
}, },
logout(){
wx.removeStorageSync('accessToken');
this.globalData.accessToken = '';
this.globalData.userInfo = null;
const pages = getCurrentPages();
const currentPages = pages[pages.length-1];
if(currentPages&&currentPages.route.indexOf('pages/login/index')>-1){
return;
}
wx.navigateTo({
url: '/pages/login/index',
})
},
globalData: { globalData: {
userInfo: null, userInfo: null,
accessToken:token, accessToken:token,

View File

@ -9,6 +9,9 @@ page{
background-color:var(--main-bgclolor); background-color:var(--main-bgclolor);
overflow: hidden; overflow: hidden;
} }
view::-webkit-scrollbar{
display: none;
}
.main-color{ .main-color{
color:var(--main-color); color:var(--main-color);
} }
@ -181,7 +184,7 @@ page-container .content{
font-size: 80%; font-size: 80%;
} }
.money{ .money{
color:#EB0000; color:#ff0000;
} }
.money-promation{ .money-promation{
color:#FF8400; color:#FF8400;
@ -222,7 +225,7 @@ page-container .content{
} }
.custom-scroll-view .main{ .custom-scroll-view .main{
flex:1; flex:1;
overflow: auto; overflow: hidden;
} }
.bottom-bar-v2{ .bottom-bar-v2{
padding:24rpx; padding:24rpx;
@ -361,7 +364,9 @@ navigator button{
font-weight: 500; font-weight: 500;
color:rgba(124, 134, 149, 0.6); color:rgba(124, 134, 149, 0.6);
} }
scroll-view{
overflow: hidden;
}
.scroll-view-dispatch{ .scroll-view-dispatch{
height:100rpx; height:100rpx;
} }

View File

@ -1,2 +1,2 @@
<!--components/background-notice/index.wxml--> <!--components/background-notice/index.wxml-->
<text>空组件</text> <text style="display:none">空组件</text>

View File

@ -1,4 +1,6 @@
<scroll-view scroll-y refresher-enabled bindrefresherrefresh="refreshList" refresher-triggered="{{refresherTriggered}}" style="{{heightStyle}}" bindscroll="scrolling" class="scroll-view" id="scrollView"> <scroll-view scroll-y refresher-enabled bindrefresherrefresh="refreshList"
refresher-triggered="{{refresherTriggered}}" style="{{heightStyle}}" bindscroll="scrolling"
class="scroll-view" id="scrollView" enhanced show-scrollbar="{{false}}">
<view class="scroll-view-content"> <view class="scroll-view-content">
<slot/> <slot/>
</view> </view>

View File

@ -501,14 +501,7 @@ Page({
} }
}, },
logout(){ logout(){
wx.removeStorage({ app.logout();
key: 'accessToken',
success(){
wx.redirectTo({
url: '/pages/login/index',
})
}
})
}, },
concatUser(event){ concatUser(event){
const item = event.currentTarget.dataset.item; const item = event.currentTarget.dataset.item;

View File

@ -42,8 +42,8 @@
class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}}"> class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}}">
<view class="item-head"> <view class="item-head">
<view class="tag">代取快递</view> <view class="tag">代取快递</view>
<view class="deliver-time" wx:if="{{item.time_period_name}}"> <view class="deliver-time">
送达时间(<label class="time">{{item.time_period_name}}</label> 期望送达 <label class="time">{{item.delivery_time}}</label>
</view> </view>
</view> </view>
<view class="station-list"> <view class="station-list">
@ -136,7 +136,7 @@
<scroll-view scroll-y style="height:calc(100vh - {{snBarHeight}}px)" refresher-enabled <scroll-view scroll-y style="height:calc(100vh - {{snBarHeight}}px)" refresher-enabled
bindrefresherrefresh="getUserInfo" refresher-triggered="{{userInfoTrigger}}" class="scroll-view" bindrefresherrefresh="getUserInfo" refresher-triggered="{{userInfoTrigger}}" class="scroll-view"
show-scrollbar="{{false}}" enhanced> show-scrollbar="{{false}}" enhanced show-scrollbar="{{false}}">
<view class="page-container user-info"> <view class="page-container user-info">
<image class="avatar" src="{{userInfo.optimized_avatar||'/assets/icon/avatar.png'}}" bind:tap="navToUserInfo"/> <image class="avatar" src="{{userInfo.optimized_avatar||'/assets/icon/avatar.png'}}" bind:tap="navToUserInfo"/>
<view class="name">{{userInfo.nickname}}</view> <view class="name">{{userInfo.nickname}}</view>

View File

@ -77,7 +77,10 @@
background-color: red; background-color: red;
border-radius: 50%; border-radius: 50%;
font-size: 24rpx; font-size: 24rpx;
padding:4rpx 8rpx; padding:4rpx 6rpx;
text-align: center;
min-width: 20rpx;
font-weight: normal;
} }
.building{ .building{
display: flex; display: flex;
@ -87,9 +90,6 @@
margin:20rpx 16rpx; margin:20rpx 16rpx;
position: relative; position: relative;
} }
.building::-webkit-scrollbar{
display: none;
}
.building.loading{ .building.loading{
overflow: hidden; overflow: hidden;
} }
@ -112,9 +112,8 @@
font-weight: 500; font-weight: 500;
} }
.package-list .item{ .package-list .item{
margin:30rpx 16rpx; margin:16rpx;
background-color: #ffffff; background-color: #ffffff;
border-radius: 18rpx; border-radius: 18rpx;
color: #555555; color: #555555;
@ -142,7 +141,7 @@
font-weight: 500; font-weight: 500;
} }
.package-list .item:first-child{ .package-list .item:first-child{
margin-top:0; margin-top:8rpx;
} }
.package-list .item::before{ .package-list .item::before{
content: ''; content: '';
@ -356,7 +355,7 @@
} }
.left-move-view{ .left-move-view{
width:1070rpx;height:100vh; width:1020rpx;height:100vh;
left: -510rpx;top:0; left: -510rpx;top:0;
position: fixed; position: fixed;
} }
@ -387,6 +386,7 @@
text-align: center; text-align: center;
padding-bottom:0; padding-bottom:0;
padding-top:140rpx; padding-top:140rpx;
margin-top:0;
} }
.left-panel .user-info .avatar{ .left-panel .user-info .avatar{
width:120rpx;height:120rpx; width:120rpx;height:120rpx;
@ -465,11 +465,10 @@
} }
.left-panel .logout-btn{ .left-panel .logout-btn{
position: fixed; position: absolute;
bottom:calc(constant(safe-area-inset-bottom) + 20rpx); bottom:calc(constant(safe-area-inset-bottom) + 20rpx);
bottom:calc(env(safe-area-inset-bottom) + 20rpx); bottom:calc(env(safe-area-inset-bottom) + 20rpx);
left:0;right:0; left:20rpx;right:20rpx;
margin:30rpx 20rpx;
background-color: #fff; background-color: #fff;
font-weight: normal; font-weight: normal;
color: #888888; color: #888888;

View File

@ -1,5 +1,6 @@
<scroll-view refresher-triggered="{{refreshTrigger}}" bindrefresherrefresh="getOrderDetail" <scroll-view refresher-triggered="{{refreshTrigger}}" bindrefresherrefresh="getOrderDetail"
refresher-enabled scroll-y class="order-detail {{orderDetail.is_first_order?'is-new-order':''}}"> refresher-enabled scroll-y class="order-detail {{orderDetail.is_first_order?'is-new-order':''}}"
enhanced show-scrollbar="{{false}}">
<view class="content"> <view class="content">
<view class="page-container address-info"> <view class="page-container address-info">
<view class="title"> <view class="title">
@ -11,7 +12,7 @@
{{orderDetail.address_name}}{{genderKV[orderDetail.address_gender]}}{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}} {{orderDetail.address_name}}{{genderKV[orderDetail.address_gender]}}{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
</view> </view>
<view class="deliver-time"> <view class="deliver-time">
送达时间:<label class="time">{{orderDetail.time_period_name}}</label> 期望送达 <label class="time">{{orderDetail.delivery_time}}</label>
</view> </view>
</view> </view>
<view class="page-container station-info" wx:for="{{orderDetail.packages}}" wx:key="index"> <view class="page-container station-info" wx:for="{{orderDetail.packages}}" wx:key="index">

View File

@ -1,7 +1,7 @@
<view class="bg"> <view class="bg">
<nav-bar back black/> <nav-bar back black/>
</view> </view>
<scroll-view scroll-y class="scroll-view" refresher-enabled <scroll-view scroll-y class="scroll-view" refresher-enabled enhanced show-scrollbar="{{false}}"
bindrefresherrefresh="refreshSummary" refresher-triggered="{{refreshTrigger}}"> bindrefresherrefresh="refreshSummary" refresher-triggered="{{refreshTrigger}}">
<view class="page-container user-info"> <view class="page-container user-info">
<view class="title">账户余额 (元)</view> <view class="title">账户余额 (元)</view>

View File

@ -92,7 +92,7 @@ Page({
this.setData({ this.setData({
modifyLoading:true modifyLoading:true
}); });
userApi.modifyPassword(this.data.rePassword,this.data.verifyCode).then((data)=>{ userApi.modifyPassword(this.data.phone,this.data.rePassword,this.data.verifyCode).then((data)=>{
wx.navigateBack({ wx.navigateBack({
success(){ success(){
wx.showToast({ wx.showToast({

View File

@ -4,7 +4,9 @@
<view class="value">24小时到账</view> <view class="value">24小时到账</view>
</view> </view>
<view class="input-area"> <view class="input-area">
<input class="input" placeholder="请输入提现金额" type="digit" focus="{{inputFocus}}" value="{{amount}}" bindinput="amountInput" bindblur="amountBlur"/> <input class="input" placeholder-class="input-placeholder"
placeholder="请输入提现金额" type="digit" focus="{{inputFocus}}"
value="{{amount}}" bindinput="amountInput" bindblur="amountBlur"/>
<view class="error">{{amountMessage}}</view> <view class="error">{{amountMessage}}</view>
</view> </view>
<view class="bottom"> <view class="bottom">

View File

@ -34,11 +34,14 @@
} }
.amount .input{ .amount .input{
flex: 1; flex: 1;
font-size: 56rpx; font-size: 76rpx;
font-weight: 600; font-weight: 600;
height:114rpx; height:114rpx;
margin-left:24rpx; margin-left:24rpx;
} }
.amount .input-placeholder{
font-size: 56rpx;
}
.amount .bottom{ .amount .bottom{
display: flex; display: flex;
align-items: center; align-items: center;