diff --git a/api/request.js b/api/request.js
index 5d31577..2e773b4 100644
--- a/api/request.js
+++ b/api/request.js
@@ -1,4 +1,11 @@
-const baseUrl = 'https://api-dev.beefast.co';
+const { miniProgram } = wx.getAccountInfoSync();
+const envVersion = miniProgram.envVersion;
+let baseUrl = '';
+if(envVersion=='develop'){
+ baseUrl = 'https://api-dev.beefast.co';
+}else{
+ baseUrl = 'https://api.beefast.co'
+}
let app = getApp();
const sendRequest = (options)=>{
@@ -12,7 +19,9 @@ const sendRequest = (options)=>{
wx.request({
url: `${baseUrl}${options.url}`,
success:(result)=>{
- wx.hideLoading();
+ if(options.method!='get'){
+ wx.hideLoading();
+ }
if(result.statusCode==200){
if(result.data.code==200){
rs(result.data.data);
@@ -48,7 +57,9 @@ const sendRequest = (options)=>{
"content-type":options.data&&options.data.file?'application/x-www-form-urlencoded':'application/json'
},
fail:(res)=>{
- wx.hideLoading();
+ if(options.method!='get'){
+ wx.hideLoading();
+ }
wx.showToast({
title: 'Request Error',
})
diff --git a/api/user.js b/api/user.js
index 351eef8..5b28b06 100644
--- a/api/user.js
+++ b/api/user.js
@@ -26,7 +26,7 @@ export default {
add:(bank_card_id,amount)=>request.post('/api/withdraw',{bank_card_id,amount}),
list:(data)=>request.get('/api/withdraw/user',data),
statusKV:{
- PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"被拒绝"
+ PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"审核未通过"
}
},
@@ -48,7 +48,10 @@ export default {
rj(res);
}
});
- task.onProgressUpdate(progress);
+ if(progress){
+ progress.task = task;
+ task.onProgressUpdate(progress);
+ }
});
}
}
\ No newline at end of file
diff --git a/app.wxss b/app.wxss
index 8f8d3cd..69e1b3c 100644
--- a/app.wxss
+++ b/app.wxss
@@ -90,8 +90,8 @@ radio-group label+label{
}
radio{
- width: 34rpx;
- height: 34rpx;
+ width: 17px;
+ height: 17px;
position: relative;
}
radio .wx-radio-input{
@@ -100,7 +100,6 @@ radio .wx-radio-input{
box-sizing: border-box;
width: 100%;
height: 100%;
- line-height: 20px;
position: absolute;
top: 0;left:0;
}
@@ -111,9 +110,9 @@ radio .wx-radio-input.wx-radio-input-checked{
radio .wx-radio-input.wx-radio-input-checked::before{
content: '';
position: absolute;
- width: 22rpx;
- height:22rpx;
- left:4rpx;top:4rpx;
+ width: 11px;
+ height:11px;
+ left:2px;top:2px;
border-radius: 50%;
background: var(--main-color);
transform: none;
@@ -121,9 +120,18 @@ radio .wx-radio-input.wx-radio-input-checked::before{
}
checkbox .wx-checkbox-input{
width: 40rpx;
- height: 40rpx;
+ height: 40rpx;
+ border: 2px solid #999999;
border-radius: 50%;
}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked{
+ border-color: var(--main-font-color);
+ border: 2px solid #000000;
+}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
+ color: var(--main-font-color);
+ /* font-size: 30px; */
+}
page-container .content{
border-radius: 24rpx 24rpx 0 0;
@@ -274,6 +282,7 @@ page-container .content{
}
.cells .cell-bd input{
height:100rpx;
+ width: 100%;
}
.cells .cell-ft{
position: relative;
@@ -345,7 +354,7 @@ navigator button{
}
.list-empty .icon{
width:160rpx;height:160rpx;
- margin-top:360rpx;
+ padding-top:360rpx;
}
.list-empty .title{
font-size: 30rpx;
diff --git a/assets/icon/avatar.png b/assets/icon/avatar.png
new file mode 100644
index 0000000..2577c70
Binary files /dev/null and b/assets/icon/avatar.png differ
diff --git a/assets/icon/back-black.png b/assets/icon/back-black.png
new file mode 100644
index 0000000..573c92b
Binary files /dev/null and b/assets/icon/back-black.png differ
diff --git a/assets/icon/close-btn.png b/assets/icon/close-btn.png
new file mode 100644
index 0000000..f05d67f
Binary files /dev/null and b/assets/icon/close-btn.png differ
diff --git a/assets/icon/img-default.png b/assets/icon/img-default.png
new file mode 100644
index 0000000..dee91de
Binary files /dev/null and b/assets/icon/img-default.png differ
diff --git a/assets/img/login-bg.png b/assets/img/login-bg.png
index 652ad3a..d719884 100644
Binary files a/assets/img/login-bg.png and b/assets/img/login-bg.png differ
diff --git a/components/modalView/index.js b/components/modalView/index.js
index 221688b..da6537a 100644
--- a/components/modalView/index.js
+++ b/components/modalView/index.js
@@ -73,7 +73,7 @@ Component({
required:true,
message:this.properties.contentPlaceholder,
shake:true,
- autoFocus:true
+ // autoFocus:true //textarea 有 bug
}
},this);
if(valid.length>0)return;
@@ -87,17 +87,23 @@ Component({
lifetimes:{
attached(){
- console.log(this.properties.row);
- const windowInfo = wx.getWindowInfo();
- let viewHeight = 50+96+32+48;
- const textareaHeight = this.properties.row*25+24;
- if(this.properties.editable){
- viewHeight+=textareaHeight;
+
+ }
+ },
+ observers:{
+ "show"(show){
+ if(show){
+ const windowInfo = wx.getWindowInfo();
+ // this.setData({
+ // textareaHeight:this.properties.row*25+24,
+ // })
+ this.createSelectorQuery().select('#modalViewMain').boundingClientRect((res)=>{
+ const viewHeight = res.height;
+ this.setData({
+ dynamicsStyle:`top:${(windowInfo.windowHeight-viewHeight)/2}px;height:${viewHeight}px;`
+ })
+ }).exec();
}
- this.setData({
- textareaHeight:textareaHeight,
- dynamicsStyle:`top:${(windowInfo.windowHeight-viewHeight)/2}px;height:${viewHeight}px;`
- })
}
}
})
\ No newline at end of file
diff --git a/components/modalView/index.wxml b/components/modalView/index.wxml
index 8f161d7..a28b980 100644
--- a/components/modalView/index.wxml
+++ b/components/modalView/index.wxml
@@ -1,17 +1,16 @@
-
+
{{titleText}}
+ placeholder="{{contentPlaceholder}}" focus="{{contentFocus}}" animation="{{contentAnimation}}" cursor-spacing="200rpx">
{{content}}
-
-
+
+
\ No newline at end of file
diff --git a/components/modalView/index.wxss b/components/modalView/index.wxss
index bd3115a..6bc922e 100644
--- a/components/modalView/index.wxss
+++ b/components/modalView/index.wxss
@@ -24,7 +24,7 @@
width:100%;
box-sizing: border-box;
line-height:50rpx;
- height: 248rpx;
+ height: 214rpx;
}
.custom-modal-view .textarea.error{
border-color:red;
@@ -37,8 +37,19 @@
}
.modal-view-main .btns .button{
flex:1;
- font-size: 32rpx;
- padding:32rpx;
+ font-size: 16px;
+ padding:16px;
line-height: 1;
font-weight: 500;
+ border-width: 2rpx;/* 边框显示不完整 bug */
+}
+
+.modal-view-main .btns .button.cancel{
+ border-color:rgba(153, 153, 153, 0.5);
+ background-color: rgba(153, 153, 153, 0.1);
+ color:var(--main-font-color);
+}
+
+.modal-view-main .btns .button.confirm{
+ font-weight: bold;
}
\ No newline at end of file
diff --git a/components/navBar/index.js b/components/navBar/index.js
index 28d0974..ad78189 100644
--- a/components/navBar/index.js
+++ b/components/navBar/index.js
@@ -20,6 +20,10 @@ Component({
background:{
type:String,
value:''
+ },
+ black:{
+ type:Boolean,
+ value:false
}
},
diff --git a/components/navBar/index.wxml b/components/navBar/index.wxml
index a0eabbd..4216db8 100644
--- a/components/navBar/index.wxml
+++ b/components/navBar/index.wxml
@@ -2,7 +2,7 @@
-
+
diff --git a/components/swipeButton/index.js b/components/swipeButton/index.js
index 6caa00d..5b6be68 100644
--- a/components/swipeButton/index.js
+++ b/components/swipeButton/index.js
@@ -28,7 +28,7 @@ Component({
textOpacity:1,
- textRight:120,
+ textRight:80,
moveViewX:0
},
@@ -45,7 +45,7 @@ Component({
}
let x = this.data.moveEvent.detail.x;
let opacity = 1 - x/(this.data.moveAreaWidth - this.data.moveViewWidth);
- let right = opacity*120;
+ let right = opacity*80;
this.setData({
textOpacity:opacity,
textRight:right
@@ -59,13 +59,14 @@ Component({
if((this.data.moveAreaWidth - this.data.moveViewWidth)/3*2 < x){
viewX = this.data.moveAreaWidth - this.data.moveViewWidth;
loading = true;
- this.triggerEvent('done');
}
- console.log(viewX,this.data.moveAreaWidth,this.data.moveViewWidth,x);
this.setData({
moveViewX:viewX,
loading:loading
});
+ if(loading){
+ this.triggerEvent('done');
+ }
}
},
@@ -78,6 +79,7 @@ Component({
},
observers:{
"loading"(l){
+ console.log('loading',l);
if(!l){
this.setData({
moveViewX:0,
diff --git a/pages/index/index.js b/pages/index/index.js
index e7f760a..54279b5 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,5 +1,6 @@
import orderApi from '../../api/order';
import userApi from '../../api/user';
+import {hidePhoneNumber,getStatusNavBarHeight} from '../../utils/util';
const app = getApp();
@@ -7,6 +8,7 @@ Page({
currentOrder:null,
data: {
statusBarHeight:0,
+ snBarHeight:0,
list:[],
leftPanelEvent:null,
@@ -53,11 +55,10 @@ Page({
isShowRefundConfirm:false
},
onLoad(){
- const windowInfo = wx.getWindowInfo();
-
+ const snHeight = getStatusNavBarHeight();
this.setData({
- statusBarHeight:windowInfo.statusBarHeight,
- scrollViewHeight:windowInfo.windowHeight-windowInfo.statusBarHeight-44 - 91
+ statusBarHeight:snHeight.statusBar,
+ snBarHeight:snHeight.navBar+snHeight.statusBar
});
this.getUserInfo().then(()=>{
@@ -99,6 +100,7 @@ Page({
this.loadBuilding().then((data)=>{
this.data.pager.pageIndex = 0;
this.data.pager.loadAll = false;
+ this.data.buildingIndex = 0;
this.loadList();
})
},
@@ -181,6 +183,7 @@ Page({
params.status = this.data.statusDetail[this.data.statusDetailKey].key;
}
orderApi.list(params).then((data)=>{
+ const date = new Date();
if(this.data.pager.pageIndex==0){
this.data.list = data.items;
}else{
@@ -192,10 +195,12 @@ Page({
if(data.items.length{
+ if(item.status==this.data.orderStatus.created||item.status==this.data.orderStatus.completed||item.status==this.data.orderStatus.unpaid){
+ item.address.phone = hidePhoneNumber(item.address.phone);
+ }
item.packages.map((pItem)=>{
- pItem.pickup_codes = pItem.pickup_codes.split(',');
+ pItem.receivedAll = this.getPackageReceiveStatus(item.orderid,pItem);
})
})
this.setData({
@@ -204,7 +209,6 @@ Page({
statusDetailKey:this.data.statusDetailKey,
buildingIndex:this.data.buildingIndex
});
- console.log(this.data.list);
})
},
@@ -217,7 +221,7 @@ Page({
wx.nextTick(()=>{
this.setData({
isShowLeftPanelMask:true,
- leftPanelMoveViewX:560
+ leftPanelMoveViewX:510
})
})
},
@@ -263,10 +267,13 @@ Page({
mediaType:['image'],
sourceType:['camera'],
success:(res)=>{
- console.log(res);
this.setData({
tempImgs:this.data.tempImgs.concat(res.tempFiles)
});
+ wx.nextTick(()=>{
+ console.log('nextTick');
+ this.uploadImages();
+ })
}
});
},
@@ -295,13 +302,28 @@ Page({
},
//取货完毕
receivedOrder(event){
+ const index = event.currentTarget.dataset.index;
const item = event.currentTarget.dataset.item;
+ const hasUnReceive = !!item.packages.find((p)=>!p.receivedAll);
+ if(hasUnReceive){
+ this.setData({
+ [`list[${index}].receiving`]:false
+ })
+ wx.showToast({
+ icon:'none',
+ title: '请先取件',
+ })
+ return;
+ }
orderApi.pickup(item.orderid).then((data)=>{
wx.showToast({
icon:'success',
title: '取货成功',
})
this.refreshList();
+ wx.removeStorage({
+ key: item.orderid,
+ })
})
},
//完成配送 选择图片
@@ -328,6 +350,10 @@ Page({
this.data.tempImgs.map((item)=>{
urls.push(item.serverUrl);
})
+ //需求改成选择了就上图图片,所以传完就设置了 false,这里要发请求,再次改成true
+ this.setData({
+ completing:true
+ })
orderApi.complete(this.currentOrder.orderid,urls).then((data)=>{
this.setData({
isShowConfirm:false,
@@ -353,15 +379,31 @@ Page({
return !item.uploaded;
});
if(!file){
+ this.setData({
+ completing:false
+ })
return;
}
- const uploadResult = await userApi.uploadImg(file,(res)=>{
+ console.log(this.data.tempImgs);
+ this.setData({
+ completing:true
+ })
+ let onProgress = (res)=>{
//进度
this.setData({
[`tempImgs[${imgIndex}].progress`]:res.progress
})
- });
- console.log(uploadResult);
+ }
+ //无奈之举,不大范围改动代码的同时,我需要获取到上传任务task,来中断上传操作,不然要出问题task在上传时被附加到了onProgress
+ this.data.tempImgs[imgIndex].onProgress = onProgress;
+ let uploadResult = {};
+ try {
+ uploadResult = await userApi.uploadImg(file,onProgress);
+ } catch (error) {
+ await this.uploadImages();
+ console.log(new Date().getTime());
+ return;
+ }
if(uploadResult.url){
this.setData({
[`tempImgs[${imgIndex}].uploaded`]:true,
@@ -373,6 +415,17 @@ Page({
return new Error('失败')
}
},
+ removeImage(event){
+ const index = event.currentTarget.dataset.index;
+ if(this.data.tempImgs[index].onProgress&&this.data.tempImgs[index].onProgress.task){
+ this.data.tempImgs[index].onProgress.task.abort();
+ }
+ console.log('remove',new Date().getTime());
+ this.data.tempImgs.splice(index,1);
+ this.setData({
+ tempImgs:this.data.tempImgs
+ });
+ },
leftPanelMove(event){
this.setData({
leftPanelEvent:event
@@ -384,7 +437,7 @@ Page({
this.closeLeftPanel();
}else{
this.setData({
- leftPanelMoveViewX:560
+ leftPanelMoveViewX:510
})
}
},
@@ -404,5 +457,25 @@ Page({
phoneNumber: item.address.phone,
})
},
- emptyFun(){}
+ emptyFun(){},
+ onShow(){
+ if(this.data.statusDetailKey==this.data.statusDetail.received.key.toLowerCase()){
+ let needRefreshData = {}
+ this.data.list.map((item,index)=>{
+ item.packages.map((pItem,pIndex)=>{
+ let reveivedAll = this.getPackageReceiveStatus(item.orderid,pItem);
+ needRefreshData[`list[${index}].packages[${pIndex}].receivedAll`] = reveivedAll;
+ })
+ })
+ this.setData(needRefreshData);
+ }
+ },
+ getPackageReceiveStatus(orderId,pkg){
+ let receivedInfo = wx.getStorageSync(orderId);
+ let codes = receivedInfo[pkg.id];
+ if(codes&&pkg.pickup_codes.length==codes.length){
+ return true;
+ }
+ return false;
+ }
})
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 5cead9b..56d8ec4 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -27,21 +27,22 @@
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
-
- {{pItem.station_name}}
-
- {{pItem.pickup_codes.length}}件包裹:
-
-
-
+ {{pItem.station_name}} {{pItem.pickup_codes.length}} 件
+
+ {{
+ item.status==orderStatus.received?(pItem.receivedAll?'已取件':'待取件'):
+ item.status==orderStatus.delivering?'已取件':''
+ }}
+
+ 图片取件 {{item.pickup_images_count}} 件
+
@@ -93,12 +94,11 @@
-
+
+
+
+
-
@@ -113,15 +113,16 @@
style="opacity:{{isShowLeftPanelMask?1:0}};" bind:tap="closeLeftPanel">
-
+
-
+
{{userInfo.nickname}}
{{userInfo.phone}}
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 0cd2be4..70d5a18 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -77,6 +77,7 @@
.building .item.current{
background-color: var(--main-color);
color:var(--main-font-color);
+ font-weight: 500;
}
@@ -101,7 +102,12 @@
left:38.5rpx;top:90rpx;
bottom:250rpx;
}
-
+.package-list .item.is-new-order::before{
+ top:145rpx;
+}
+.package-list .item.is-new-order{
+ padding-top:110rpx;
+}
.package-list .item.is-new-order::after{
content:'新';
position: absolute;
@@ -120,16 +126,27 @@
.package-list .item .name{
font-size: 40rpx;
font-weight: 600;
+ flex: 1;
}
-.package-list .item .package{
+.package-list .item .received-status{
+ border-left: 1rpx solid #999999;
+ padding-left:18rpx;
+ color:var(--main-color);
+}
+.package-list .item .received-status.done{
+ color:unset;
+}
+/* .package-list .item .package{
font-size:32rpx;
margin-top:24rpx;
display: flex;
-}
+} */
.package-list .item .station-list .sl-item{
position: relative;
padding-left:64rpx;
- padding-bottom:50rpx;
+ padding-bottom:80rpx;
+ display: flex;
+ align-items: center;
}
.package-list .item .station-list .sl-item:first-child::before{
content: '取';
@@ -149,12 +166,12 @@
border-radius: 50%;
display: inline-block;
}
-.package-list .item .package .value{
+/* .package-list .item .package .value{
flex:1;
display: flex;
flex-wrap: wrap;
gap: 16rpx;
-}
+} */
.package-list .item .address{
padding-left:64rpx;
@@ -199,6 +216,9 @@
padding:30rpx 40rpx;
margin:0;
}
+.package-list .item .btns .refund-btn{
+ width:200rpx;
+}
.package-list .item .btns .refund-btn[disabled]{
color:#999;
border-color:rgb(221, 219, 219);
@@ -255,6 +275,17 @@
width:100%;
z-index: 1;
}
+.confirm-sending .photos .item .close-area{
+ position: absolute;
+ right:-16rpx;top:-16rpx;
+ z-index: 2;
+ padding:5rpx;
+ display: flex;
+ align-items: center;
+}
+.confirm-sending .photos .item .close-area .icon{
+ width:28rpx;height:28rpx;
+}
.confirm-sending .photos .item.loading::after{
content: '';
position: absolute;
@@ -265,6 +296,7 @@
}
.confirm-sending .photos .item .image{
width:100%;height:100%;
+ border-radius: 12rpx;
}
.confirm-sending .photos .take-photo .icon{
width:36rpx;height:36rpx;
@@ -281,21 +313,22 @@
}
.left-move-view{
- width:1120rpx;height:100vh;
- left: -560rpx;top:0;
+ width:1070rpx;height:100vh;
+ left: -510rpx;top:0;
position: fixed;
}
.left-panel{
- width:560rpx;
+ width:510rpx;
background-color: #fff;
height:100vh;
/* position: fixed; */
/* left:0;top:0; */
/* transition-duration: .3s; */
}
+
.left-panel-mask{
position: fixed;
- width:calc(100vw + 560rpx);
+ width:calc(100vw + 510rpx);
height:100vh;
right:0;top:0;
transition-duration: .4s;
@@ -310,11 +343,11 @@
.left-panel .user-info{
text-align: center;
padding-bottom:0;
+ padding-top:140rpx;
}
.left-panel .user-info .avatar{
width:120rpx;height:120rpx;
border-radius: 50%;
- margin-top:40rpx;
}
.left-panel .user-info .name{
margin-top:30rpx;
@@ -322,23 +355,24 @@
}
.left-panel .user-info .phone{
color: #888888;
- margin-top:24rpx;
+ margin-top:30rpx;
}
.left-panel .user-info .community-name{
- margin-top:24rpx;
+ margin-top:60rpx;
+ font-size: 34rpx;
}
.left-panel .user-info .spliter{
- margin-top:40rpx;
+ margin-top:82rpx;
}
.left-panel .user-info .order-info{
display: flex;
justify-content: space-between;
}
.left-panel .user-info .order-info .item{
- padding:30rpx 24rpx;
+ padding:30rpx 0;
}
.left-panel .user-info .order-info .key{
- font-size:24rpx;
+ font-size:22rpx;
}
.left-panel .user-info .order-info .value{
font-size: 36rpx;
@@ -388,11 +422,17 @@
}
.left-panel .logout-btn{
- position: absolute;
- bottom:80rpx;
- left:20rpx;right:20rpx;
+ position: fixed;
+ bottom:calc(constant(safe-area-inset-bottom) + 20rpx);
+ bottom:calc(env(safe-area-inset-bottom) + 20rpx);
+ left:0;right:0;
+ margin:30rpx 20rpx;
background-color: #fff;
font-weight: normal;
+ color: #888888;
+ font-size: 24rpx;
+ padding:30rpx;
+ line-height: 1;
}
.left-panel .logout-btn:hover{
background-color: #fff!important;
diff --git a/pages/order-detail/index.js b/pages/order-detail/index.js
index 6d9c2c4..18b6272 100644
--- a/pages/order-detail/index.js
+++ b/pages/order-detail/index.js
@@ -1,5 +1,7 @@
import orderApi from '../../api/order';
import userApi from '../../api/user';
+import {hidePhoneNumber} from '../../utils/util';
+
Page({
@@ -42,15 +44,27 @@ Page({
data.complete_time = this.formatTime(data.complete_time);
data.pickup_time = this.formatTime(data.pickup_time);
data.received_time = this.formatTime(data.received_time);
+ const receivedStatusCode = wx.getStorageSync(data.orderid);
data.packages.map((item)=>{
- item.pickup_codes = item.pickup_codes.split(',')
- })
+ if(receivedStatusCode){
+ if(item.pickup_codes.length==(receivedStatusCode[item.id]||[]).length){
+ item.receivedAll = true;
+ }
+ (receivedStatusCode[item.id]||[]).map((code)=>{
+ item[code] = true;
+ })
+ }
+ });
+ if(data.status==this.data.orderStatus.created||data.status==this.data.orderStatus.completed||data.status==this.data.orderStatus.unpaid){
+ data.address_phone = hidePhoneNumber(data.address_phone);
+ }
this.setData({
orderDetail:data,
refreshTrigger:false,
orderStep
})
- }).catch(()=>{
+ }).catch((res)=>{
+ console.log(res);
this.setData({
refreshTrigger:false
})
@@ -71,6 +85,32 @@ Page({
urls: this.data.orderDetail.complete_images,
})
},
+ previewPackageImage(event){
+ const current = event.currentTarget.dataset.item;
+ wx.previewImage({
+ current:current,
+ urls: this.data.orderDetail.pickup_images,
+ })
+ },
+ selectPackageCode(event){
+ const index = event.currentTarget.dataset.index;
+ const item = this.data.orderDetail.packages[index];
+ let receviedStatus = wx.getStorageSync(item.orderid)||{};
+ const checkedCode = event.detail.value;
+ item.pickup_codes.map((code)=>{
+ item[code] = !!checkedCode.find((c)=>c==code);
+ })
+ let receivedAll = item.pickup_codes.length==checkedCode.length;
+ item.receivedAll = receivedAll
+ this.setData({
+ [`orderDetail.packages[${index}]`]:item
+ });
+ receviedStatus[item.id] = checkedCode;
+ wx.setStorage({
+ key:item.orderid,
+ data:receviedStatus
+ })
+ },
/**
* 生命周期函数--监听页面初次渲染完成
*/
diff --git a/pages/order-detail/index.wxml b/pages/order-detail/index.wxml
index 7d6007c..f03d89d 100644
--- a/pages/order-detail/index.wxml
+++ b/pages/order-detail/index.wxml
@@ -1,6 +1,53 @@
-
+
+
+ {{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}} 件
+
+
+
+
+
+
+
+
+
+
+
@@ -68,6 +116,17 @@
下单时间
{{orderDetail.create_time}}
+
+
+
+ 取件数量
+ {{orderDetail.package_count}}
+
+
+ 订单金额
+ {{orderDetail.original_amount}}
+
+
diff --git a/pages/order-detail/index.wxss b/pages/order-detail/index.wxss
index b372346..0c2e77e 100644
--- a/pages/order-detail/index.wxss
+++ b/pages/order-detail/index.wxss
@@ -1,8 +1,76 @@
.order-detail{
height:100vh;
}
-
-.package-info{
+.address-info .title{
+ font-size: 40rpx;
+ font-weight: 600;
+}
+.address-info .sub-title{
+ font-size: 32rpx;
+ margin-top:36rpx;
+}
+.station-info{
+ padding-bottom:0;
+}
+.station-info .title{
+ display: flex;
+ align-items: center;
+ padding-bottom:32rpx;
+ border-bottom: 1rpx solid rgba(153, 153, 153, 0.3);
+}
+.station-info .title .name{
+ font-size: 40rpx;
+ color: #555555;
+ font-weight: 500;
+ flex: 1;
+}
+.station-info .title .received-status{
+ font-size: 32rpx;
+ border-left: 1rpx solid #999999;
+ padding-left:18rpx;
+ color:var(--main-color);
+}
+.station-info .title .received-status.done{
+ color: #555555;
+}
+.station-info .code-item{
+ height:132rpx;
+ display: flex;
+ align-items: center;
+ border-top: 0.5px solid rgba(153, 153, 153, 0.2);
+}
+.station-info .code-item:first-child{
+ border: 0;
+}
+.station-info .code-item .code{
+ font-size: 52rpx;
+ font-weight: 600;
+ flex:1;
+ color: #888888;
+}
+.station-info .code-item .code.checked{
+ color:var(--main-font-color);
+}
+.station-info .images{
+ display: flex;
+ align-items: center;
+ gap: 20rpx;
+ padding:40rpx 0;
+}
+.station-info .images .empty-img{
+ background: rgba(153, 153, 153, 0.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.station-info .images .empty-img .icon{
+ width:84rpx;height:84rpx;
+}
+.station-info .image{
+ width:160rpx;height:160rpx;
+ border-radius: 12rpx;
+}
+/* .package-info{
padding:56rpx 20rpx 40rpx 20rpx;
position: relative;
color: #555555;
@@ -15,26 +83,29 @@
background-color: rgba(85, 85, 85, 0.5);
left:38.5rpx;top:90rpx;
bottom:130rpx;
-}
+} */
-.package-info .name{
+/* .package-info .name{
font-size: 40rpx;
font-weight: 600;
+ flex: 1;
}
-.package-info .package{
+.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 .package{
- font-size:32rpx;
- margin-top:24rpx;
- display: flex;
-}
-.package-info .station-list .sl-item{
+} */
+
+/* .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: '取';
@@ -56,15 +127,15 @@
}
.package-list .item .station-list .sl-item{
padding-bottom:50rpx;
-}
-.package-info .package .value{
+} */
+/* .package-info .package .value{
flex:1;
display: flex;
flex-wrap: wrap;
gap: 16rpx;
-}
+} */
-.package-info .address{
+/* .package-info .address{
padding-left:64rpx;
position: relative;
}
@@ -88,7 +159,7 @@
.package-info .address .sub-title{
font-size: 32rpx;
margin-top:24rpx
-}
+} */
.steps{
display: flex;
diff --git a/pages/user/bank/editor/index.wxml b/pages/user/bank/editor/index.wxml
index 39591b9..3376ea6 100644
--- a/pages/user/bank/editor/index.wxml
+++ b/pages/user/bank/editor/index.wxml
@@ -1,4 +1,3 @@
-
持卡姓名
@@ -25,7 +24,6 @@
-
\ No newline at end of file
diff --git a/pages/user/bank/index/index.wxml b/pages/user/bank/index/index.wxml
index ca15984..7eb33c9 100644
--- a/pages/user/bank/index/index.wxml
+++ b/pages/user/bank/index/index.wxml
@@ -19,10 +19,6 @@
{{item.card_number}}
-
-
- 暂无银行卡
-
diff --git a/pages/user/income/index.js b/pages/user/income/index.js
index 742859f..4091319 100644
--- a/pages/user/income/index.js
+++ b/pages/user/income/index.js
@@ -1,4 +1,5 @@
import userApi from '../../../api/user';
+const app = getApp();
Page({
@@ -9,7 +10,8 @@ Page({
data: {
scrollViewHeight:0,
pager:{limit:10,loading:false,loadAll:false,pageIndex:0,refreshTrigger:false},
- list:[]
+ list:[],
+ summary:{}
},
/**
@@ -17,6 +19,11 @@ Page({
*/
onLoad(options) {
this.loadList();
+ app.getSummary().then((data)=>{
+ this.setData({
+ summary:data
+ })
+ })
},
refreshList(){
this.data.pager.pageIndex = 0;
diff --git a/pages/user/income/index.wxml b/pages/user/income/index.wxml
index 5214fe6..e64201d 100644
--- a/pages/user/income/index.wxml
+++ b/pages/user/income/index.wxml
@@ -1,12 +1,18 @@
-
-
-
- {{item.description}}
- {{item.create_time}}
-
- {{item.amount}}
+
+
+ 今日收益(元)
+ {{summary.total_income}}
-
\ No newline at end of file
+
+
+
+ {{item.description}}
+ {{item.create_time}}
+
+ {{item.amount}}
+
+
+
\ No newline at end of file
diff --git a/pages/user/income/index.wxss b/pages/user/income/index.wxss
index 0782301..8201259 100644
--- a/pages/user/income/index.wxss
+++ b/pages/user/income/index.wxss
@@ -1,14 +1,31 @@
+.custom-scroll-view .total{
+ box-shadow: 0px 6px 6px 0px rgba(0, 0, 0, 0.06);
+ background: #FFC300;
+ border-radius: 18rpx;
+ padding:30rpx;
+ margin:20rpx;
+}
+.custom-scroll-view .total .title{
+ font-size: 32rpx;
+}
+.custom-scroll-view .total .num{
+ font-size: 68rpx;
+ font-weight: 600;
+ margin-top:40rpx;
+}
.income-list{
height:100vh;
-}
-.income-list .scroll-view-content{
- padding-top:20rpx;
+ margin: 0 20rpx;
}
.income-list .item{
background-color: #ffffff;
display: flex;
padding:40rpx 30rpx;
- border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
+ margin:20rpx 0;
+ border-radius: 18rpx;
+}
+.income-list .item:first-child{
+ margin-top:0;
}
.income-list .item .content{
flex:1;
@@ -21,7 +38,3 @@
margin-top:32rpx;
color: #888888;
}
-
-.income-list .item .money{
- color:var(--main-color);
-}
\ No newline at end of file
diff --git a/pages/user/info/index.wxml b/pages/user/info/index.wxml
index 47b62b8..994d8c6 100644
--- a/pages/user/info/index.wxml
+++ b/pages/user/info/index.wxml
@@ -1,5 +1,5 @@
-
+
@@ -31,7 +31,7 @@
实名认证
-
+
diff --git a/pages/user/rnAuth/index.js b/pages/user/rnAuth/index.js
index cbe6beb..34e37dd 100644
--- a/pages/user/rnAuth/index.js
+++ b/pages/user/rnAuth/index.js
@@ -11,6 +11,10 @@ Page({
idCard:'',
already:false
},
+ validator:{
+ name:{minLength:2,message:'请输入真实的姓名',autoFocus:true,shake:true},
+ idCard:{length:18,message:'请输入正确的身份证号码',autoFocus:true,shake:true}
+ },
/**
* 生命周期函数--监听页面加载
@@ -29,18 +33,21 @@ Page({
save(){
app.resetUserInfoUpdateTag();
- userApi.setRNAuth({
- name:this.data.name,
- id_number:this.data.idCard
- }).then((data)=>{
- wx.navigateBack({
- success(){
- wx.showToast({
- title: '保存成功',
- })
- }
+ const valid = app.validateForm(this.validator,this);
+ if(valid.length==0){
+ userApi.setRNAuth({
+ name:this.data.name,
+ id_number:this.data.idCard
+ }).then((data)=>{
+ wx.navigateBack({
+ success(){
+ wx.showToast({
+ title: '保存成功',
+ })
+ }
+ })
})
- })
+ }
},
/**
* 生命周期函数--监听页面初次渲染完成
diff --git a/pages/user/rnAuth/index.wxml b/pages/user/rnAuth/index.wxml
index 7dc32ec..feadfe7 100644
--- a/pages/user/rnAuth/index.wxml
+++ b/pages/user/rnAuth/index.wxml
@@ -4,14 +4,16 @@
真实姓名
-
+
+ {{nameMessage}}
身份证号
-
+
+ {{idCardMessage}}