备份
This commit is contained in:
parent
0695c3ab34
commit
391f4d3c14
@ -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();
|
let app = getApp();
|
||||||
|
|
||||||
const sendRequest = (options)=>{
|
const sendRequest = (options)=>{
|
||||||
@ -12,7 +19,9 @@ const sendRequest = (options)=>{
|
|||||||
wx.request({
|
wx.request({
|
||||||
url: `${baseUrl}${options.url}`,
|
url: `${baseUrl}${options.url}`,
|
||||||
success:(result)=>{
|
success:(result)=>{
|
||||||
|
if(options.method!='get'){
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
|
}
|
||||||
if(result.statusCode==200){
|
if(result.statusCode==200){
|
||||||
if(result.data.code==200){
|
if(result.data.code==200){
|
||||||
rs(result.data.data);
|
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'
|
"content-type":options.data&&options.data.file?'application/x-www-form-urlencoded':'application/json'
|
||||||
},
|
},
|
||||||
fail:(res)=>{
|
fail:(res)=>{
|
||||||
|
if(options.method!='get'){
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
|
}
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: 'Request Error',
|
title: 'Request Error',
|
||||||
})
|
})
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export default {
|
|||||||
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}),
|
||||||
list:(data)=>request.get('/api/withdraw/user',data),
|
list:(data)=>request.get('/api/withdraw/user',data),
|
||||||
statusKV:{
|
statusKV:{
|
||||||
PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"被拒绝"
|
PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"审核未通过"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -48,7 +48,10 @@ export default {
|
|||||||
rj(res);
|
rj(res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if(progress){
|
||||||
|
progress.task = task;
|
||||||
task.onProgressUpdate(progress);
|
task.onProgressUpdate(progress);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
23
app.wxss
23
app.wxss
@ -90,8 +90,8 @@ radio-group label+label{
|
|||||||
}
|
}
|
||||||
|
|
||||||
radio{
|
radio{
|
||||||
width: 34rpx;
|
width: 17px;
|
||||||
height: 34rpx;
|
height: 17px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
radio .wx-radio-input{
|
radio .wx-radio-input{
|
||||||
@ -100,7 +100,6 @@ radio .wx-radio-input{
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 20px;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;left:0;
|
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{
|
radio .wx-radio-input.wx-radio-input-checked::before{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 22rpx;
|
width: 11px;
|
||||||
height:22rpx;
|
height:11px;
|
||||||
left:4rpx;top:4rpx;
|
left:2px;top:2px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--main-color);
|
background: var(--main-color);
|
||||||
transform: none;
|
transform: none;
|
||||||
@ -122,8 +121,17 @@ radio .wx-radio-input.wx-radio-input-checked::before{
|
|||||||
checkbox .wx-checkbox-input{
|
checkbox .wx-checkbox-input{
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
|
border: 2px solid #999999;
|
||||||
border-radius: 50%;
|
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{
|
page-container .content{
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
border-radius: 24rpx 24rpx 0 0;
|
||||||
@ -274,6 +282,7 @@ page-container .content{
|
|||||||
}
|
}
|
||||||
.cells .cell-bd input{
|
.cells .cell-bd input{
|
||||||
height:100rpx;
|
height:100rpx;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
.cells .cell-ft{
|
.cells .cell-ft{
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -345,7 +354,7 @@ navigator button{
|
|||||||
}
|
}
|
||||||
.list-empty .icon{
|
.list-empty .icon{
|
||||||
width:160rpx;height:160rpx;
|
width:160rpx;height:160rpx;
|
||||||
margin-top:360rpx;
|
padding-top:360rpx;
|
||||||
}
|
}
|
||||||
.list-empty .title{
|
.list-empty .title{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|||||||
BIN
assets/icon/avatar.png
Normal file
BIN
assets/icon/avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/icon/back-black.png
Normal file
BIN
assets/icon/back-black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 479 B |
BIN
assets/icon/close-btn.png
Normal file
BIN
assets/icon/close-btn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 880 B |
BIN
assets/icon/img-default.png
Normal file
BIN
assets/icon/img-default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 9.1 KiB |
@ -73,7 +73,7 @@ Component({
|
|||||||
required:true,
|
required:true,
|
||||||
message:this.properties.contentPlaceholder,
|
message:this.properties.contentPlaceholder,
|
||||||
shake:true,
|
shake:true,
|
||||||
autoFocus:true
|
// autoFocus:true //textarea 有 bug
|
||||||
}
|
}
|
||||||
},this);
|
},this);
|
||||||
if(valid.length>0)return;
|
if(valid.length>0)return;
|
||||||
@ -87,17 +87,23 @@ Component({
|
|||||||
|
|
||||||
lifetimes:{
|
lifetimes:{
|
||||||
attached(){
|
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({
|
this.setData({
|
||||||
textareaHeight:textareaHeight,
|
|
||||||
dynamicsStyle:`top:${(windowInfo.windowHeight-viewHeight)/2}px;height:${viewHeight}px;`
|
dynamicsStyle:`top:${(windowInfo.windowHeight-viewHeight)/2}px;height:${viewHeight}px;`
|
||||||
})
|
})
|
||||||
|
}).exec();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1,17 +1,16 @@
|
|||||||
|
|
||||||
<page-container show="{{show}}" position="center" class="custom-modal-view"
|
<page-container show="{{show}}" position="center" class="custom-modal-view"
|
||||||
custom-style="background-color:transparent;left:27px;width:calc(100vw - 54px);height:200px;{{dynamicsStyle}}">
|
custom-style="background-color:transparent;left:27px;width:calc(100vw - 54px);height:200px;{{dynamicsStyle}}">
|
||||||
<view class="modal-view-main">
|
<view class="modal-view-main" id="modalViewMain">
|
||||||
<view class="title {{titleTextCenter?'center':''}}">{{titleText}}</view>
|
<view class="title {{titleTextCenter?'center':''}}">{{titleText}}</view>
|
||||||
|
|
||||||
<textarea class="textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:if="{{editable}}"
|
<textarea class="textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:if="{{editable}}"
|
||||||
placeholder="{{contentPlaceholder}}" style="height:{{textareaHeight*2}}rpx"
|
placeholder="{{contentPlaceholder}}" focus="{{contentFocus}}" animation="{{contentAnimation}}" cursor-spacing="200rpx"></textarea>
|
||||||
focus="{{contentFocus}}" animation="{{contentAnimation}}"></textarea>
|
|
||||||
<view class="text" wx:else>{{content}}</view>
|
<view class="text" wx:else>{{content}}</view>
|
||||||
|
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<button class="button" plain vx:if="{{isShowCancel}}" bind:tap="cancelButtonTap">{{cancelButtonText}}</button>
|
<button class="button cancel" plain vx:if="{{isShowCancel}}" bind:tap="cancelButtonTap">{{cancelButtonText}}</button>
|
||||||
<button class="button" type="primary" bind:tap="okButtonTap">{{okButtonText}}</button>
|
<button class="button confirm" type="primary" bind:tap="okButtonTap">{{okButtonText}}</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</page-container>
|
</page-container>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
width:100%;
|
width:100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
line-height:50rpx;
|
line-height:50rpx;
|
||||||
height: 248rpx;
|
height: 214rpx;
|
||||||
}
|
}
|
||||||
.custom-modal-view .textarea.error{
|
.custom-modal-view .textarea.error{
|
||||||
border-color:red;
|
border-color:red;
|
||||||
@ -37,8 +37,19 @@
|
|||||||
}
|
}
|
||||||
.modal-view-main .btns .button{
|
.modal-view-main .btns .button{
|
||||||
flex:1;
|
flex:1;
|
||||||
font-size: 32rpx;
|
font-size: 16px;
|
||||||
padding:32rpx;
|
padding:16px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-weight: 500;
|
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;
|
||||||
}
|
}
|
||||||
@ -20,6 +20,10 @@ Component({
|
|||||||
background:{
|
background:{
|
||||||
type:String,
|
type:String,
|
||||||
value:''
|
value:''
|
||||||
|
},
|
||||||
|
black:{
|
||||||
|
type:Boolean,
|
||||||
|
value:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<view class="nav-bar-content" style="height:{{navBarHeight}}px;">
|
<view class="nav-bar-content" style="height:{{navBarHeight}}px;">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="btns {{(back||backTitle)&&share?'border':''}}" wx:if="{{share||back||backTitle}}">
|
<view class="btns {{(back||backTitle)&&share?'border':''}}" wx:if="{{share||back||backTitle}}">
|
||||||
<image src="/assets/icon/back.png" class="back" wx:if="{{back||backTitle}}" bind:tap="back"/>
|
<image src="{{black?'/assets/icon/back-black.png':'/assets/icon/back.png'}}" class="back" wx:if="{{back||backTitle}}" bind:tap="back"/>
|
||||||
<view class="spliter" wx:if="{{share&&back}}"></view>
|
<view class="spliter" wx:if="{{share&&back}}"></view>
|
||||||
<image src="/assets/icon/navbar/share@2x.png" class="share" wx:if="{{share}}" bind:tap="share"/>
|
<image src="/assets/icon/navbar/share@2x.png" class="share" wx:if="{{share}}" bind:tap="share"/>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Component({
|
|||||||
|
|
||||||
|
|
||||||
textOpacity:1,
|
textOpacity:1,
|
||||||
textRight:120,
|
textRight:80,
|
||||||
moveViewX:0
|
moveViewX:0
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ Component({
|
|||||||
}
|
}
|
||||||
let x = this.data.moveEvent.detail.x;
|
let x = this.data.moveEvent.detail.x;
|
||||||
let opacity = 1 - x/(this.data.moveAreaWidth - this.data.moveViewWidth);
|
let opacity = 1 - x/(this.data.moveAreaWidth - this.data.moveViewWidth);
|
||||||
let right = opacity*120;
|
let right = opacity*80;
|
||||||
this.setData({
|
this.setData({
|
||||||
textOpacity:opacity,
|
textOpacity:opacity,
|
||||||
textRight:right
|
textRight:right
|
||||||
@ -59,13 +59,14 @@ Component({
|
|||||||
if((this.data.moveAreaWidth - this.data.moveViewWidth)/3*2 < x){
|
if((this.data.moveAreaWidth - this.data.moveViewWidth)/3*2 < x){
|
||||||
viewX = this.data.moveAreaWidth - this.data.moveViewWidth;
|
viewX = this.data.moveAreaWidth - this.data.moveViewWidth;
|
||||||
loading = true;
|
loading = true;
|
||||||
this.triggerEvent('done');
|
|
||||||
}
|
}
|
||||||
console.log(viewX,this.data.moveAreaWidth,this.data.moveViewWidth,x);
|
|
||||||
this.setData({
|
this.setData({
|
||||||
moveViewX:viewX,
|
moveViewX:viewX,
|
||||||
loading:loading
|
loading:loading
|
||||||
});
|
});
|
||||||
|
if(loading){
|
||||||
|
this.triggerEvent('done');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -78,6 +79,7 @@ Component({
|
|||||||
},
|
},
|
||||||
observers:{
|
observers:{
|
||||||
"loading"(l){
|
"loading"(l){
|
||||||
|
console.log('loading',l);
|
||||||
if(!l){
|
if(!l){
|
||||||
this.setData({
|
this.setData({
|
||||||
moveViewX:0,
|
moveViewX:0,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import orderApi from '../../api/order';
|
import orderApi from '../../api/order';
|
||||||
import userApi from '../../api/user';
|
import userApi from '../../api/user';
|
||||||
|
import {hidePhoneNumber,getStatusNavBarHeight} from '../../utils/util';
|
||||||
|
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
|
|
||||||
@ -7,6 +8,7 @@ Page({
|
|||||||
currentOrder:null,
|
currentOrder:null,
|
||||||
data: {
|
data: {
|
||||||
statusBarHeight:0,
|
statusBarHeight:0,
|
||||||
|
snBarHeight:0,
|
||||||
list:[],
|
list:[],
|
||||||
leftPanelEvent:null,
|
leftPanelEvent:null,
|
||||||
|
|
||||||
@ -53,11 +55,10 @@ Page({
|
|||||||
isShowRefundConfirm:false
|
isShowRefundConfirm:false
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
const windowInfo = wx.getWindowInfo();
|
const snHeight = getStatusNavBarHeight();
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
statusBarHeight:windowInfo.statusBarHeight,
|
statusBarHeight:snHeight.statusBar,
|
||||||
scrollViewHeight:windowInfo.windowHeight-windowInfo.statusBarHeight-44 - 91
|
snBarHeight:snHeight.navBar+snHeight.statusBar
|
||||||
});
|
});
|
||||||
|
|
||||||
this.getUserInfo().then(()=>{
|
this.getUserInfo().then(()=>{
|
||||||
@ -99,6 +100,7 @@ Page({
|
|||||||
this.loadBuilding().then((data)=>{
|
this.loadBuilding().then((data)=>{
|
||||||
this.data.pager.pageIndex = 0;
|
this.data.pager.pageIndex = 0;
|
||||||
this.data.pager.loadAll = false;
|
this.data.pager.loadAll = false;
|
||||||
|
this.data.buildingIndex = 0;
|
||||||
this.loadList();
|
this.loadList();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -181,6 +183,7 @@ Page({
|
|||||||
params.status = this.data.statusDetail[this.data.statusDetailKey].key;
|
params.status = this.data.statusDetail[this.data.statusDetailKey].key;
|
||||||
}
|
}
|
||||||
orderApi.list(params).then((data)=>{
|
orderApi.list(params).then((data)=>{
|
||||||
|
const date = new Date();
|
||||||
if(this.data.pager.pageIndex==0){
|
if(this.data.pager.pageIndex==0){
|
||||||
this.data.list = data.items;
|
this.data.list = data.items;
|
||||||
}else{
|
}else{
|
||||||
@ -192,10 +195,12 @@ Page({
|
|||||||
if(data.items.length<this.data.pager.limit){
|
if(data.items.length<this.data.pager.limit){
|
||||||
this.data.pager.loadAll = true;
|
this.data.pager.loadAll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.items.map((item)=>{
|
data.items.map((item)=>{
|
||||||
|
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)=>{
|
item.packages.map((pItem)=>{
|
||||||
pItem.pickup_codes = pItem.pickup_codes.split(',');
|
pItem.receivedAll = this.getPackageReceiveStatus(item.orderid,pItem);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -204,7 +209,6 @@ Page({
|
|||||||
statusDetailKey:this.data.statusDetailKey,
|
statusDetailKey:this.data.statusDetailKey,
|
||||||
buildingIndex:this.data.buildingIndex
|
buildingIndex:this.data.buildingIndex
|
||||||
});
|
});
|
||||||
console.log(this.data.list);
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -217,7 +221,7 @@ Page({
|
|||||||
wx.nextTick(()=>{
|
wx.nextTick(()=>{
|
||||||
this.setData({
|
this.setData({
|
||||||
isShowLeftPanelMask:true,
|
isShowLeftPanelMask:true,
|
||||||
leftPanelMoveViewX:560
|
leftPanelMoveViewX:510
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -263,10 +267,13 @@ Page({
|
|||||||
mediaType:['image'],
|
mediaType:['image'],
|
||||||
sourceType:['camera'],
|
sourceType:['camera'],
|
||||||
success:(res)=>{
|
success:(res)=>{
|
||||||
console.log(res);
|
|
||||||
this.setData({
|
this.setData({
|
||||||
tempImgs:this.data.tempImgs.concat(res.tempFiles)
|
tempImgs:this.data.tempImgs.concat(res.tempFiles)
|
||||||
});
|
});
|
||||||
|
wx.nextTick(()=>{
|
||||||
|
console.log('nextTick');
|
||||||
|
this.uploadImages();
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -295,13 +302,28 @@ Page({
|
|||||||
},
|
},
|
||||||
//取货完毕
|
//取货完毕
|
||||||
receivedOrder(event){
|
receivedOrder(event){
|
||||||
|
const index = event.currentTarget.dataset.index;
|
||||||
const item = event.currentTarget.dataset.item;
|
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)=>{
|
orderApi.pickup(item.orderid).then((data)=>{
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
icon:'success',
|
icon:'success',
|
||||||
title: '取货成功',
|
title: '取货成功',
|
||||||
})
|
})
|
||||||
this.refreshList();
|
this.refreshList();
|
||||||
|
wx.removeStorage({
|
||||||
|
key: item.orderid,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//完成配送 选择图片
|
//完成配送 选择图片
|
||||||
@ -328,6 +350,10 @@ Page({
|
|||||||
this.data.tempImgs.map((item)=>{
|
this.data.tempImgs.map((item)=>{
|
||||||
urls.push(item.serverUrl);
|
urls.push(item.serverUrl);
|
||||||
})
|
})
|
||||||
|
//需求改成选择了就上图图片,所以传完就设置了 false,这里要发请求,再次改成true
|
||||||
|
this.setData({
|
||||||
|
completing:true
|
||||||
|
})
|
||||||
orderApi.complete(this.currentOrder.orderid,urls).then((data)=>{
|
orderApi.complete(this.currentOrder.orderid,urls).then((data)=>{
|
||||||
this.setData({
|
this.setData({
|
||||||
isShowConfirm:false,
|
isShowConfirm:false,
|
||||||
@ -353,15 +379,31 @@ Page({
|
|||||||
return !item.uploaded;
|
return !item.uploaded;
|
||||||
});
|
});
|
||||||
if(!file){
|
if(!file){
|
||||||
|
this.setData({
|
||||||
|
completing:false
|
||||||
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const uploadResult = await userApi.uploadImg(file,(res)=>{
|
console.log(this.data.tempImgs);
|
||||||
|
this.setData({
|
||||||
|
completing:true
|
||||||
|
})
|
||||||
|
let onProgress = (res)=>{
|
||||||
//进度
|
//进度
|
||||||
this.setData({
|
this.setData({
|
||||||
[`tempImgs[${imgIndex}].progress`]:res.progress
|
[`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){
|
if(uploadResult.url){
|
||||||
this.setData({
|
this.setData({
|
||||||
[`tempImgs[${imgIndex}].uploaded`]:true,
|
[`tempImgs[${imgIndex}].uploaded`]:true,
|
||||||
@ -373,6 +415,17 @@ Page({
|
|||||||
return new Error('失败')
|
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){
|
leftPanelMove(event){
|
||||||
this.setData({
|
this.setData({
|
||||||
leftPanelEvent:event
|
leftPanelEvent:event
|
||||||
@ -384,7 +437,7 @@ Page({
|
|||||||
this.closeLeftPanel();
|
this.closeLeftPanel();
|
||||||
}else{
|
}else{
|
||||||
this.setData({
|
this.setData({
|
||||||
leftPanelMoveViewX:560
|
leftPanelMoveViewX:510
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -404,5 +457,25 @@ Page({
|
|||||||
phoneNumber: item.address.phone,
|
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;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -27,20 +27,21 @@
|
|||||||
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
||||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||||
<view wx:for="{{list}}" wx:key="index" bind:tap="navToOrderDetail" data-id="{{item.orderid}}"
|
<view wx:for="{{list}}" wx:key="index" bind:tap="navToOrderDetail"
|
||||||
|
data-id="{{item.orderid}}"
|
||||||
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="station-list">
|
<view class="station-list">
|
||||||
<view class="sl-item" wx:for="{{item.packages}}" wx:key="index" wx:for-item="pItem" wx:for-index="pIndex">
|
<view class="sl-item" wx:for="{{item.packages}}" wx:key="index" wx:for-item="pItem" wx:for-index="pIndex">
|
||||||
<view class="name">{{pItem.station_name}}</view>
|
<view class="name">{{pItem.station_name}} {{pItem.pickup_codes.length}} 件</view>
|
||||||
<view class="package">
|
<view class="received-status {{item.status==orderStatus.received&&!pItem.receivedAll?'done':''}}" wx:if="{{item.status!=orderStatus.created}}">
|
||||||
<view class="key">{{pItem.pickup_codes.length}}件包裹:</view>
|
{{
|
||||||
<view class="value">
|
item.status==orderStatus.received?(pItem.receivedAll?'已取件':'待取件'):
|
||||||
<label wx:for="{{pItem.pickup_codes}}" wx:key="index" class="code-item"
|
item.status==orderStatus.delivering?'已取件':''
|
||||||
wx:for-item="code">
|
}}
|
||||||
{{item.status==orderStatus.created?'******':code}}
|
|
||||||
</label>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="sl-item" wx:if="{{item.pickup_images&&item.pickup_images.length>0}}">
|
||||||
|
<view class="name">图片取件 {{item.pickup_images_count}} 件</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="address">
|
<view class="address">
|
||||||
@ -93,12 +94,11 @@
|
|||||||
<view class="photos">
|
<view class="photos">
|
||||||
<view class="item {{item.loading?'current':''}}" wx:for="{{tempImgs}}" wx:key="index">
|
<view class="item {{item.loading?'current':''}}" wx:for="{{tempImgs}}" wx:key="index">
|
||||||
<image class="image" src="{{item.tempFilePath}}"/>
|
<image class="image" src="{{item.tempFilePath}}"/>
|
||||||
<progress wx:if="{{!item.uploaded}}" class="progress" percent="{{item.progress}}" stroke-width="5"/>
|
<progress wx:if="{{!item.uploaded}}" class="progress" percent="{{item.progress}}" stroke-width="4"/>
|
||||||
|
<view class="close-area" bind:tap="removeImage" data-index="{{index}}">
|
||||||
|
<image src="/assets/icon/close-btn.png" class="icon"/>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="item loading">
|
|
||||||
<progress class="progress" percent="20" show-info stroke-width="5" show-info="{{false}}"/>
|
|
||||||
<image class="image" src="/assets/img/login-bg.png"/>
|
|
||||||
</view> -->
|
|
||||||
<view class="take-photo item" bind:tap="chooseImage"
|
<view class="take-photo item" bind:tap="chooseImage"
|
||||||
wx:if="{{tempImgs.length<maxChooseImgCount}}">
|
wx:if="{{tempImgs.length<maxChooseImgCount}}">
|
||||||
<image class="icon" src="/assets/icon/camera.png"/>
|
<image class="icon" src="/assets/icon/camera.png"/>
|
||||||
@ -113,15 +113,16 @@
|
|||||||
style="opacity:{{isShowLeftPanelMask?1:0}};" bind:tap="closeLeftPanel"></view>
|
style="opacity:{{isShowLeftPanelMask?1:0}};" bind:tap="closeLeftPanel"></view>
|
||||||
<movable-area class="left-move-view" wx:if="{{isShowLeftPanel}}">
|
<movable-area class="left-move-view" wx:if="{{isShowLeftPanel}}">
|
||||||
<movable-view class="left-panel" x="{{leftPanelMoveViewX}}rpx"
|
<movable-view class="left-panel" x="{{leftPanelMoveViewX}}rpx"
|
||||||
style="padding-top:{{statusBarHeight}}px;"
|
style="padding-top:{{snBarHeight}}px;"
|
||||||
direction="horizontal" damping="50" bindchange="leftPanelMove"
|
direction="horizontal" damping="50" bindchange="leftPanelMove"
|
||||||
capture-catch:touchcancel="leftPanelMoveCancel"
|
capture-catch:touchcancel="leftPanelMoveCancel"
|
||||||
capture-catch:touchend="leftPanelMoveCancel">
|
capture-catch:touchend="leftPanelMoveCancel">
|
||||||
|
|
||||||
<scroll-view scroll-y style="height:calc(100vh - {{statusBarHeight}}px)" refresher-enabled
|
<scroll-view scroll-y style="height:calc(100vh - {{snBarHeight}}px)" refresher-enabled
|
||||||
bindrefresherrefresh="getUserInfo" refresher-triggered="{{userInfoTrigger}}">
|
bindrefresherrefresh="getUserInfo" refresher-triggered="{{userInfoTrigger}}" class="scroll-view"
|
||||||
|
show-scrollbar="{{false}}" enhanced>
|
||||||
<view class="page-container user-info">
|
<view class="page-container user-info">
|
||||||
<image class="avatar" src="{{userInfo.optimized_avatar}}" 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 class="phone">{{userInfo.phone}}</view>
|
<view class="phone">{{userInfo.phone}}</view>
|
||||||
<view class="community-name">{{userInfo.community_name}}</view>
|
<view class="community-name">{{userInfo.community_name}}</view>
|
||||||
|
|||||||
@ -77,6 +77,7 @@
|
|||||||
.building .item.current{
|
.building .item.current{
|
||||||
background-color: var(--main-color);
|
background-color: var(--main-color);
|
||||||
color:var(--main-font-color);
|
color:var(--main-font-color);
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -101,7 +102,12 @@
|
|||||||
left:38.5rpx;top:90rpx;
|
left:38.5rpx;top:90rpx;
|
||||||
bottom:250rpx;
|
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{
|
.package-list .item.is-new-order::after{
|
||||||
content:'新';
|
content:'新';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -120,16 +126,27 @@
|
|||||||
.package-list .item .name{
|
.package-list .item .name{
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 600;
|
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;
|
font-size:32rpx;
|
||||||
margin-top:24rpx;
|
margin-top:24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
} */
|
||||||
.package-list .item .station-list .sl-item{
|
.package-list .item .station-list .sl-item{
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left:64rpx;
|
padding-left:64rpx;
|
||||||
padding-bottom:50rpx;
|
padding-bottom:80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.package-list .item .station-list .sl-item:first-child::before{
|
.package-list .item .station-list .sl-item:first-child::before{
|
||||||
content: '取';
|
content: '取';
|
||||||
@ -149,12 +166,12 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.package-list .item .package .value{
|
/* .package-list .item .package .value{
|
||||||
flex:1;
|
flex:1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 16rpx;
|
gap: 16rpx;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.package-list .item .address{
|
.package-list .item .address{
|
||||||
padding-left:64rpx;
|
padding-left:64rpx;
|
||||||
@ -199,6 +216,9 @@
|
|||||||
padding:30rpx 40rpx;
|
padding:30rpx 40rpx;
|
||||||
margin:0;
|
margin:0;
|
||||||
}
|
}
|
||||||
|
.package-list .item .btns .refund-btn{
|
||||||
|
width:200rpx;
|
||||||
|
}
|
||||||
.package-list .item .btns .refund-btn[disabled]{
|
.package-list .item .btns .refund-btn[disabled]{
|
||||||
color:#999;
|
color:#999;
|
||||||
border-color:rgb(221, 219, 219);
|
border-color:rgb(221, 219, 219);
|
||||||
@ -255,6 +275,17 @@
|
|||||||
width:100%;
|
width:100%;
|
||||||
z-index: 1;
|
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{
|
.confirm-sending .photos .item.loading::after{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -265,6 +296,7 @@
|
|||||||
}
|
}
|
||||||
.confirm-sending .photos .item .image{
|
.confirm-sending .photos .item .image{
|
||||||
width:100%;height:100%;
|
width:100%;height:100%;
|
||||||
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
.confirm-sending .photos .take-photo .icon{
|
.confirm-sending .photos .take-photo .icon{
|
||||||
width:36rpx;height:36rpx;
|
width:36rpx;height:36rpx;
|
||||||
@ -281,21 +313,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.left-move-view{
|
.left-move-view{
|
||||||
width:1120rpx;height:100vh;
|
width:1070rpx;height:100vh;
|
||||||
left: -560rpx;top:0;
|
left: -510rpx;top:0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
.left-panel{
|
.left-panel{
|
||||||
width:560rpx;
|
width:510rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height:100vh;
|
height:100vh;
|
||||||
/* position: fixed; */
|
/* position: fixed; */
|
||||||
/* left:0;top:0; */
|
/* left:0;top:0; */
|
||||||
/* transition-duration: .3s; */
|
/* transition-duration: .3s; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-panel-mask{
|
.left-panel-mask{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width:calc(100vw + 560rpx);
|
width:calc(100vw + 510rpx);
|
||||||
height:100vh;
|
height:100vh;
|
||||||
right:0;top:0;
|
right:0;top:0;
|
||||||
transition-duration: .4s;
|
transition-duration: .4s;
|
||||||
@ -310,11 +343,11 @@
|
|||||||
.left-panel .user-info{
|
.left-panel .user-info{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-bottom:0;
|
padding-bottom:0;
|
||||||
|
padding-top:140rpx;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .avatar{
|
.left-panel .user-info .avatar{
|
||||||
width:120rpx;height:120rpx;
|
width:120rpx;height:120rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-top:40rpx;
|
|
||||||
}
|
}
|
||||||
.left-panel .user-info .name{
|
.left-panel .user-info .name{
|
||||||
margin-top:30rpx;
|
margin-top:30rpx;
|
||||||
@ -322,23 +355,24 @@
|
|||||||
}
|
}
|
||||||
.left-panel .user-info .phone{
|
.left-panel .user-info .phone{
|
||||||
color: #888888;
|
color: #888888;
|
||||||
margin-top:24rpx;
|
margin-top:30rpx;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .community-name{
|
.left-panel .user-info .community-name{
|
||||||
margin-top:24rpx;
|
margin-top:60rpx;
|
||||||
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .spliter{
|
.left-panel .user-info .spliter{
|
||||||
margin-top:40rpx;
|
margin-top:82rpx;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .order-info{
|
.left-panel .user-info .order-info{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .order-info .item{
|
.left-panel .user-info .order-info .item{
|
||||||
padding:30rpx 24rpx;
|
padding:30rpx 0;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .order-info .key{
|
.left-panel .user-info .order-info .key{
|
||||||
font-size:24rpx;
|
font-size:22rpx;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .order-info .value{
|
.left-panel .user-info .order-info .value{
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
@ -388,11 +422,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.left-panel .logout-btn{
|
.left-panel .logout-btn{
|
||||||
position: absolute;
|
position: fixed;
|
||||||
bottom:80rpx;
|
bottom:calc(constant(safe-area-inset-bottom) + 20rpx);
|
||||||
left:20rpx;right:20rpx;
|
bottom:calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
left:0;right:0;
|
||||||
|
margin:30rpx 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
color: #888888;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding:30rpx;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.left-panel .logout-btn:hover{
|
.left-panel .logout-btn:hover{
|
||||||
background-color: #fff!important;
|
background-color: #fff!important;
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import orderApi from '../../api/order';
|
import orderApi from '../../api/order';
|
||||||
import userApi from '../../api/user';
|
import userApi from '../../api/user';
|
||||||
|
import {hidePhoneNumber} from '../../utils/util';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
|
||||||
@ -42,15 +44,27 @@ Page({
|
|||||||
data.complete_time = this.formatTime(data.complete_time);
|
data.complete_time = this.formatTime(data.complete_time);
|
||||||
data.pickup_time = this.formatTime(data.pickup_time);
|
data.pickup_time = this.formatTime(data.pickup_time);
|
||||||
data.received_time = this.formatTime(data.received_time);
|
data.received_time = this.formatTime(data.received_time);
|
||||||
|
const receivedStatusCode = wx.getStorageSync(data.orderid);
|
||||||
data.packages.map((item)=>{
|
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({
|
this.setData({
|
||||||
orderDetail:data,
|
orderDetail:data,
|
||||||
refreshTrigger:false,
|
refreshTrigger:false,
|
||||||
orderStep
|
orderStep
|
||||||
})
|
})
|
||||||
}).catch(()=>{
|
}).catch((res)=>{
|
||||||
|
console.log(res);
|
||||||
this.setData({
|
this.setData({
|
||||||
refreshTrigger:false
|
refreshTrigger:false
|
||||||
})
|
})
|
||||||
@ -71,6 +85,32 @@ Page({
|
|||||||
urls: this.data.orderDetail.complete_images,
|
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
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,6 +1,53 @@
|
|||||||
<scroll-view refresher-triggered="{{refreshTrigger}}" bindrefresherrefresh="getOrderDetail"
|
<scroll-view refresher-triggered="{{refreshTrigger}}" bindrefresherrefresh="getOrderDetail"
|
||||||
refresher-enabled scroll-y class="order-detail">
|
refresher-enabled scroll-y class="order-detail">
|
||||||
<view class="page-container package-info">
|
<view class="page-container address-info">
|
||||||
|
<view class="title">
|
||||||
|
{{orderDetail.community_name}}
|
||||||
|
{{orderDetail.building_name}}
|
||||||
|
{{orderDetail.address_detail}}
|
||||||
|
</view>
|
||||||
|
<view class="sub-title">
|
||||||
|
{{orderDetail.address_name}}
|
||||||
|
{{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="page-container station-info" wx:for="{{orderDetail.packages}}" wx:key="index">
|
||||||
|
<view class="title">
|
||||||
|
<view class="name">{{item.station_name}}</view>
|
||||||
|
<view class="received-status {{orderDetail.status==orderStatus.received&&!item.receivedAll?'done':''}}"
|
||||||
|
wx:if="{{item.status!=orderStatus.created}}">
|
||||||
|
<!-- {{item.receivedAll?'已取件':'待取件'}} -->
|
||||||
|
{{
|
||||||
|
orderDetail.status==orderStatus.received?(item.receivedAll?'已取件':'待取件'):
|
||||||
|
orderDetail.status==orderStatus.delivering?'已取件':''
|
||||||
|
}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<checkbox-group value="{{receivedCodes}}" bindchange="selectPackageCode"
|
||||||
|
data-index="{{index}}">
|
||||||
|
<label class="code-item" wx:for="{{item.pickup_codes}}" wx:key="index" wx:for-item="code">
|
||||||
|
<view class="code {{orderDetail.status==orderStatus.created||(orderDetail.status==orderStatus.received&&!item[code])?'':'checked'}}">
|
||||||
|
{{orderDetail.status==orderStatus.created?'*********':code}}
|
||||||
|
</view>
|
||||||
|
<checkbox checked="{{!!item[code]}}" value="{{code}}" wx:if="{{orderDetail.status==orderStatus.received}}"/>
|
||||||
|
</label>
|
||||||
|
</checkbox-group>
|
||||||
|
</view>
|
||||||
|
<view class="page-container station-info" wx:if="{{orderDetail.pickup_images&&orderDetail.pickup_images.length>0}}">
|
||||||
|
<view class="title">
|
||||||
|
<view class="name">图片取件 {{orderDetail.pickup_images_count}} 件</view>
|
||||||
|
</view>
|
||||||
|
<view class="images" wx:if="{{orderDetail.status==orderStatus.created}}">
|
||||||
|
<view class="image empty-img" wx:for="{{orderDetail.pickup_images}}" wx:key="index" src="{{item}}">
|
||||||
|
<image class="icon" src="/assets/icon/img-default.png"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="images" wx:else="">
|
||||||
|
<image class="image" wx:for="{{orderDetail.pickup_images}}" wx:key="index"
|
||||||
|
src="{{item}}" bind:tap="previewPackageImage" data-item="{{item}}"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="page-container package-info">
|
||||||
<view class="station-list" bind:tap="navToOrderDetail">
|
<view class="station-list" bind:tap="navToOrderDetail">
|
||||||
<view class="sl-item" wx:for="{{orderDetail.packages}}" wx:key="index">
|
<view class="sl-item" wx:for="{{orderDetail.packages}}" wx:key="index">
|
||||||
<view class="name">{{item.station_name}}</view>
|
<view class="name">{{item.station_name}}</view>
|
||||||
@ -12,6 +59,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="received-status" wx:if="{{item.status!=orderStatus.created}}">待取件</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="address">
|
<view class="address">
|
||||||
@ -25,7 +73,7 @@
|
|||||||
{{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
|
{{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="page-container steps">
|
<view class="page-container steps">
|
||||||
<view class="item {{orderStep>0?'night':''}}">
|
<view class="item {{orderStep>0?'night':''}}">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -68,6 +116,17 @@
|
|||||||
<view class="key">下单时间</view>
|
<view class="key">下单时间</view>
|
||||||
<view class="value">{{orderDetail.create_time}}</view>
|
<view class="value">{{orderDetail.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="row">
|
||||||
|
<view class="key">取件数量</view>
|
||||||
|
<view class="value">{{orderDetail.package_count}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="row">
|
||||||
|
<view class="key">订单金额</view>
|
||||||
|
<view class="value money money-normal">{{orderDetail.original_amount}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="scroll-view-dispatch"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,76 @@
|
|||||||
.order-detail{
|
.order-detail{
|
||||||
height:100vh;
|
height:100vh;
|
||||||
}
|
}
|
||||||
|
.address-info .title{
|
||||||
.package-info{
|
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;
|
padding:56rpx 20rpx 40rpx 20rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #555555;
|
color: #555555;
|
||||||
@ -15,26 +83,29 @@
|
|||||||
background-color: rgba(85, 85, 85, 0.5);
|
background-color: rgba(85, 85, 85, 0.5);
|
||||||
left:38.5rpx;top:90rpx;
|
left:38.5rpx;top:90rpx;
|
||||||
bottom:130rpx;
|
bottom:130rpx;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.package-info .name{
|
/* .package-info .name{
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 600;
|
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;
|
font-size:32rpx;
|
||||||
margin-top:24rpx;
|
margin-top:24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
} */
|
||||||
.package-info .package{
|
|
||||||
font-size:32rpx;
|
/* .package-info .station-list .sl-item{
|
||||||
margin-top:24rpx;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.package-info .station-list .sl-item{
|
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left:64rpx;
|
padding-left:64rpx;
|
||||||
padding-bottom:50rpx;
|
padding-bottom:50rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.package-info .station-list .sl-item:first-child::before{
|
.package-info .station-list .sl-item:first-child::before{
|
||||||
content: '取';
|
content: '取';
|
||||||
@ -56,15 +127,15 @@
|
|||||||
}
|
}
|
||||||
.package-list .item .station-list .sl-item{
|
.package-list .item .station-list .sl-item{
|
||||||
padding-bottom:50rpx;
|
padding-bottom:50rpx;
|
||||||
}
|
} */
|
||||||
.package-info .package .value{
|
/* .package-info .package .value{
|
||||||
flex:1;
|
flex:1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 16rpx;
|
gap: 16rpx;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.package-info .address{
|
/* .package-info .address{
|
||||||
padding-left:64rpx;
|
padding-left:64rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -88,7 +159,7 @@
|
|||||||
.package-info .address .sub-title{
|
.package-info .address .sub-title{
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-top:24rpx
|
margin-top:24rpx
|
||||||
}
|
} */
|
||||||
|
|
||||||
.steps{
|
.steps{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<view class="cells">
|
<view class="cells">
|
||||||
<view class="cell">
|
<view class="cell">
|
||||||
<view class="cell-hd">持卡姓名</view>
|
<view class="cell-hd">持卡姓名</view>
|
||||||
@ -25,7 +24,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom-bar">
|
<view class="bottom-bar">
|
||||||
<button type="primary" class="save-btn" bind:tap="addCard">提交并认证</button>
|
<button type="primary" class="save-btn" bind:tap="addCard">提交并认证</button>
|
||||||
</view>
|
</view>
|
||||||
@ -19,10 +19,6 @@
|
|||||||
<view class="value card-no">{{item.card_number}}</view>
|
<view class="value card-no">{{item.card_number}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-empty" wx:if="{{cardList.length==0&&!listLoading}}">
|
|
||||||
<image class="icon" src="/assets/icon/list-empty.png"/>
|
|
||||||
<view class="title">暂无银行卡</view>
|
|
||||||
</view>
|
|
||||||
<button bind:tap="navToAdd" class="add-card-btn">添加银行卡</button>
|
<button bind:tap="navToAdd" class="add-card-btn">添加银行卡</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import userApi from '../../../api/user';
|
import userApi from '../../../api/user';
|
||||||
|
const app = getApp();
|
||||||
|
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
@ -9,7 +10,8 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
scrollViewHeight:0,
|
scrollViewHeight:0,
|
||||||
pager:{limit:10,loading:false,loadAll:false,pageIndex:0,refreshTrigger:false},
|
pager:{limit:10,loading:false,loadAll:false,pageIndex:0,refreshTrigger:false},
|
||||||
list:[]
|
list:[],
|
||||||
|
summary:{}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,6 +19,11 @@ Page({
|
|||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.loadList();
|
this.loadList();
|
||||||
|
app.getSummary().then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
summary:data
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
refreshList(){
|
refreshList(){
|
||||||
this.data.pager.pageIndex = 0;
|
this.data.pager.pageIndex = 0;
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
|
<view class="custom-scroll-view">
|
||||||
|
<view class="total">
|
||||||
|
<view class="title">今日收益(元)</view>
|
||||||
|
<view class="num">{{summary.total_income}}</view>
|
||||||
|
</view>
|
||||||
<list-view bind:refresh="refreshList" bind:loadMore="loadList"
|
<list-view bind:refresh="refreshList" bind:loadMore="loadList"
|
||||||
refresher-triggered="{{pager.refreshTrigger}}" class="income-list"
|
refresher-triggered="{{pager.refreshTrigger}}" class="income-list main"
|
||||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||||
<view class="item" wx:for="{{list}}" wx:key="index">
|
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||||
@ -7,6 +12,7 @@
|
|||||||
<view class="title">{{item.description}}</view>
|
<view class="title">{{item.description}}</view>
|
||||||
<view class="sub-title">{{item.create_time}}</view>
|
<view class="sub-title">{{item.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money">{{item.amount}}</view>
|
<view class="money money-normal">{{item.amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
</list-view>
|
</list-view>
|
||||||
|
</view>
|
||||||
@ -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{
|
.income-list{
|
||||||
height:100vh;
|
height:100vh;
|
||||||
}
|
margin: 0 20rpx;
|
||||||
.income-list .scroll-view-content{
|
|
||||||
padding-top:20rpx;
|
|
||||||
}
|
}
|
||||||
.income-list .item{
|
.income-list .item{
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding:40rpx 30rpx;
|
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{
|
.income-list .item .content{
|
||||||
flex:1;
|
flex:1;
|
||||||
@ -21,7 +38,3 @@
|
|||||||
margin-top:32rpx;
|
margin-top:32rpx;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
}
|
}
|
||||||
|
|
||||||
.income-list .item .money{
|
|
||||||
color:var(--main-color);
|
|
||||||
}
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<view class="bg">
|
<view class="bg">
|
||||||
<nav-bar back/>
|
<nav-bar back black/>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="scroll-view" refresher-enabled
|
<scroll-view scroll-y class="scroll-view" refresher-enabled
|
||||||
bindrefresherrefresh="refreshSummary" refresher-triggered="{{refreshTrigger}}">
|
bindrefresherrefresh="refreshSummary" refresher-triggered="{{refreshTrigger}}">
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<view>实名认证</view>
|
<view>实名认证</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cell-ft">
|
<view class="cell-ft">
|
||||||
<label class="main-color">{{isAuth?'已认证':''}}</label>
|
<label class="main-color">{{isAuth?'已认证':'未认证'}}</label>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator url="/pages/user/bank/index/index" class="cell" hover-class="cell-active">
|
<navigator url="/pages/user/bank/index/index" class="cell" hover-class="cell-active">
|
||||||
|
|||||||
@ -11,6 +11,10 @@ Page({
|
|||||||
idCard:'',
|
idCard:'',
|
||||||
already:false
|
already:false
|
||||||
},
|
},
|
||||||
|
validator:{
|
||||||
|
name:{minLength:2,message:'请输入真实的姓名',autoFocus:true,shake:true},
|
||||||
|
idCard:{length:18,message:'请输入正确的身份证号码',autoFocus:true,shake:true}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
@ -29,6 +33,8 @@ Page({
|
|||||||
|
|
||||||
save(){
|
save(){
|
||||||
app.resetUserInfoUpdateTag();
|
app.resetUserInfoUpdateTag();
|
||||||
|
const valid = app.validateForm(this.validator,this);
|
||||||
|
if(valid.length==0){
|
||||||
userApi.setRNAuth({
|
userApi.setRNAuth({
|
||||||
name:this.data.name,
|
name:this.data.name,
|
||||||
id_number:this.data.idCard
|
id_number:this.data.idCard
|
||||||
@ -41,6 +47,7 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
|||||||
@ -4,14 +4,16 @@
|
|||||||
<view class="cell-hd">真实姓名</view>
|
<view class="cell-hd">真实姓名</view>
|
||||||
<view class="cell-bd">
|
<view class="cell-bd">
|
||||||
<label wx:if="{{already}}">{{name}}</label>
|
<label wx:if="{{already}}">{{name}}</label>
|
||||||
<input placeholder="请输入真实姓名" model:value="{{name}}" wx:else/>
|
<input focus="{{nameFocus}}" animation="{{nameAnimation}}" placeholder="请输入真实姓名" model:value="{{name}}" wx:else/>
|
||||||
|
<view class="error">{{nameMessage}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cell">
|
<view class="cell">
|
||||||
<view class="cell-hd">身份证号</view>
|
<view class="cell-hd">身份证号</view>
|
||||||
<view class="cell-bd">
|
<view class="cell-bd">
|
||||||
<label wx:if="{{already}}">{{idCard}}</label>
|
<label wx:if="{{already}}">{{idCard}}</label>
|
||||||
<input placeholder="请输入身份证号" model:value="{{idCard}}" wx:else/>
|
<input focus="{{idCardFocus}}" animation="{{idCardAnimation}}" placeholder="请输入身份证号" model:value="{{idCard}}" wx:else/>
|
||||||
|
<view class="error">{{idCardMessage}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="cell">
|
<!-- <view class="cell">
|
||||||
|
|||||||
@ -13,4 +13,8 @@
|
|||||||
<view class="status {{item.status}}">{{statusKV[item.status]}}</view>
|
<view class="status {{item.status}}">{{statusKV[item.status]}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="list-empty">
|
||||||
|
<image src="/assets/icon/list-empty.png" class="icon"/>
|
||||||
|
<view class="title">暂无记录</view>
|
||||||
|
</view>
|
||||||
</list-view>
|
</list-view>
|
||||||
@ -14,6 +14,20 @@ const formatNumber = n => {
|
|||||||
return n[1] ? n : `0${n}`
|
return n[1] ? n : `0${n}`
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
const getStatusNavBarHeight = ()=>{
|
||||||
formatTime
|
const windowInfo = wx.getWindowInfo();
|
||||||
|
return {
|
||||||
|
statusBar:windowInfo.statusBarHeight,
|
||||||
|
navBar:44
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const hidePhoneNumber = phone=>{
|
||||||
|
return `${phone.substr(0,3)}****${phone.substr(phone.length-4,4)}`
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
formatTime,
|
||||||
|
hidePhoneNumber,
|
||||||
|
getStatusNavBarHeight
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user