修修补补
This commit is contained in:
parent
42f5eda659
commit
f7c29b2905
@ -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){
|
||||
|
||||
@ -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}),
|
||||
|
||||
18
app.js
18
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,
|
||||
|
||||
11
app.wxss
11
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;
|
||||
}
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
<!--components/background-notice/index.wxml-->
|
||||
<text>空组件</text>
|
||||
<text style="display:none">空组件</text>
|
||||
@ -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">
|
||||
<slot/>
|
||||
</view>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -42,8 +42,8 @@
|
||||
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="tag">代取快递</view>
|
||||
<view class="deliver-time" wx:if="{{item.time_period_name}}">
|
||||
送达时间(<label class="time">{{item.time_period_name}}</label>)
|
||||
<view class="deliver-time">
|
||||
期望送达 <label class="time">{{item.delivery_time}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="station-list">
|
||||
@ -136,63 +136,63 @@
|
||||
|
||||
<scroll-view scroll-y style="height:calc(100vh - {{snBarHeight}}px)" refresher-enabled
|
||||
bindrefresherrefresh="getUserInfo" refresher-triggered="{{userInfoTrigger}}" class="scroll-view"
|
||||
show-scrollbar="{{false}}" enhanced>
|
||||
<view class="page-container user-info">
|
||||
<image class="avatar" src="{{userInfo.optimized_avatar||'/assets/icon/avatar.png'}}" bind:tap="navToUserInfo"/>
|
||||
<view class="name">{{userInfo.nickname}}</view>
|
||||
<view class="phone">{{userInfo.phone}}</view>
|
||||
<view class="community-name">{{userInfo.community_name}}</view>
|
||||
<view class="spliter"></view>
|
||||
<view class="order-info">
|
||||
<view class="item">
|
||||
<view class="key">总量订单</view>
|
||||
<view class="value">{{orderSummary.total_count}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="key">昨日订单</view>
|
||||
<view class="value">{{orderSummary.yesterday_count}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="key">今日订单</view>
|
||||
<view class="value">{{orderSummary.today_count}}</view>
|
||||
show-scrollbar="{{false}}" enhanced show-scrollbar="{{false}}">
|
||||
<view class="page-container user-info">
|
||||
<image class="avatar" src="{{userInfo.optimized_avatar||'/assets/icon/avatar.png'}}" bind:tap="navToUserInfo"/>
|
||||
<view class="name">{{userInfo.nickname}}</view>
|
||||
<view class="phone">{{userInfo.phone}}</view>
|
||||
<view class="community-name">{{userInfo.community_name}}</view>
|
||||
<view class="spliter"></view>
|
||||
<view class="order-info">
|
||||
<view class="item">
|
||||
<view class="key">总量订单</view>
|
||||
<view class="value">{{orderSummary.total_count}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="key">昨日订单</view>
|
||||
<view class="value">{{orderSummary.yesterday_count}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="key">今日订单</view>
|
||||
<view class="value">{{orderSummary.today_count}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page-container income">
|
||||
<navigator url="/pages/user/info/index" class="item">
|
||||
<view class="key">
|
||||
<label>账户余额</label>
|
||||
<image class="icon" src="/assets/icon/right-arrow-small.png"/>
|
||||
</view>
|
||||
<view class="value">{{summary.balance}}</view>
|
||||
</navigator>
|
||||
<view class="spliter"></view>
|
||||
<navigator url="/pages/user/income/index" class="item">
|
||||
<view class="key">
|
||||
<label>今日收益</label>
|
||||
<image class="icon" src="/assets/icon/right-arrow-small.png"/>
|
||||
</view>
|
||||
<view class="value">{{summary.today_income}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="page-container actions">
|
||||
<view class="item">
|
||||
<image class="icon" src="/assets/icon/service.png"/>
|
||||
<view>在线客服</view>
|
||||
<view class="page-container income">
|
||||
<navigator url="/pages/user/info/index" class="item">
|
||||
<view class="key">
|
||||
<label>账户余额</label>
|
||||
<image class="icon" src="/assets/icon/right-arrow-small.png"/>
|
||||
</view>
|
||||
<view class="value">{{summary.balance}}</view>
|
||||
</navigator>
|
||||
<view class="spliter"></view>
|
||||
<navigator url="/pages/user/income/index" class="item">
|
||||
<view class="key">
|
||||
<label>今日收益</label>
|
||||
<image class="icon" src="/assets/icon/right-arrow-small.png"/>
|
||||
</view>
|
||||
<view class="value">{{summary.today_income}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<navigator url="/pages/user/password/index" class="item">
|
||||
<image class="icon" src="/assets/icon/password.png"/>
|
||||
<view>修改密码</view>
|
||||
</navigator>
|
||||
<view class="item">
|
||||
<image class="icon" src="/assets/icon/agreement.png"/>
|
||||
<view>用户协议</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" class="logout-btn" bind:tap="logout">退出登录</button>
|
||||
<view class="page-container actions">
|
||||
<view class="item">
|
||||
<image class="icon" src="/assets/icon/service.png"/>
|
||||
<view>在线客服</view>
|
||||
</view>
|
||||
<navigator url="/pages/user/password/index" class="item">
|
||||
<image class="icon" src="/assets/icon/password.png"/>
|
||||
<view>修改密码</view>
|
||||
</navigator>
|
||||
<view class="item">
|
||||
<image class="icon" src="/assets/icon/agreement.png"/>
|
||||
<view>用户协议</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" class="logout-btn" bind:tap="logout">退出登录</button>
|
||||
</scroll-view>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<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="page-container address-info">
|
||||
<view class="title">
|
||||
@ -11,7 +12,7 @@
|
||||
{{orderDetail.address_name}}{{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
|
||||
</view>
|
||||
<view class="deliver-time">
|
||||
送达时间:<label class="time">{{orderDetail.time_period_name}}</label>
|
||||
期望送达 <label class="time">{{orderDetail.delivery_time}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-container station-info" wx:for="{{orderDetail.packages}}" wx:key="index">
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<view class="bg">
|
||||
<nav-bar back black/>
|
||||
</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}}">
|
||||
<view class="page-container user-info">
|
||||
<view class="title">账户余额 (元)</view>
|
||||
|
||||
@ -92,7 +92,7 @@ Page({
|
||||
this.setData({
|
||||
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({
|
||||
success(){
|
||||
wx.showToast({
|
||||
|
||||
@ -4,7 +4,9 @@
|
||||
<view class="value">24小时到账</view>
|
||||
</view>
|
||||
<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>
|
||||
<view class="bottom">
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user