订单完成
27
api/order.js
Normal file
@ -0,0 +1,27 @@
|
||||
import request from './request';
|
||||
|
||||
export default {
|
||||
status:{
|
||||
created:'CREATED',
|
||||
cancelled:'CANCELLED',
|
||||
received:'RECEIVED',
|
||||
delivering:'DELIVERING',
|
||||
unpaid:'UNPAID',
|
||||
completed:'COMPLETED'
|
||||
},
|
||||
statusKV:{
|
||||
CREATED:'已创建',CANCELLED:'已取消',RECEIVED:'已接单',DELIVERING:'配送中',UNPAID:'未支付',COMPLETED:'已完成'
|
||||
},
|
||||
deliverStatusKV:{
|
||||
DELIVERY_AT_DOORSTEP:"放在门口",
|
||||
DELIVERY_TO_ROOM:"敲门递件"
|
||||
},
|
||||
|
||||
buildingList:(community_id,status)=>request.get('/api/order/community_building/count',{community_id,status}),
|
||||
list:(data)=>request.get('/api/order/deliveryman/list',data,true),
|
||||
|
||||
statusDetail:(community_id)=>request.get('/api/order/status/count',{community_id}),
|
||||
receive:(orderid)=>request.post(`/api/order/${orderid}/deliveryman/receive`),
|
||||
pickup:(orderid)=>request.post(`/api/order/${orderid}/deliveryman/pickup`),
|
||||
complete:(orderid,images)=>request.post(`/api/order/${orderid}/deliveryman/complete`,{images:JSON.stringify(images)})
|
||||
}
|
||||
69
api/request.js
Normal file
@ -0,0 +1,69 @@
|
||||
const baseUrl = 'https://api-dev.beefast.co';
|
||||
let app = getApp();
|
||||
|
||||
const sendRequest = (options)=>{
|
||||
if(!app)app = getApp();
|
||||
let timer;
|
||||
if(options.delayLoading){
|
||||
timer = setTimeout(()=>{
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
})
|
||||
},800)
|
||||
}
|
||||
return new Promise((rs,rj)=>{
|
||||
wx.request({
|
||||
url: `${baseUrl}${options.url}`,
|
||||
success:(result)=>{
|
||||
if(timer){
|
||||
clearTimeout(timer);
|
||||
wx.hideLoading();
|
||||
}
|
||||
if(result.statusCode==200){
|
||||
if(result.data.code==200){
|
||||
rs(result.data.data);
|
||||
}else{
|
||||
wx.showToast({
|
||||
icon:'error',
|
||||
title: result.data.message,
|
||||
});
|
||||
rj(result.data);
|
||||
}
|
||||
}else if(result.statusCode==401){
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
method:options.method,
|
||||
data:options.data,
|
||||
header:{
|
||||
Authorization: `Bearer ${app.globalData.accessToken}`,
|
||||
"content-type":options.data&&options.data.file?'application/x-www-form-urlencoded':'application/json'
|
||||
},
|
||||
fail:(res)=>{
|
||||
wx.showToast({
|
||||
title: 'Request Error',
|
||||
})
|
||||
rj(res);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
baseUrl:baseUrl,
|
||||
get(url,data,delayLoading){
|
||||
return sendRequest({url,method:'get',data,delayLoading});
|
||||
},
|
||||
post(url,data){
|
||||
return sendRequest({url,method:'post',data});
|
||||
},
|
||||
put(url,data){
|
||||
return sendRequest({url,method:'put',data});
|
||||
},
|
||||
delete(url,data){
|
||||
return sendRequest({url,method:'delete',data});
|
||||
}
|
||||
}
|
||||
34
api/user.js
Normal file
@ -0,0 +1,34 @@
|
||||
import request from './request';
|
||||
let app = getApp();
|
||||
const token = wx.getStorageSync('accessToken');
|
||||
|
||||
export default {
|
||||
genderKV:{
|
||||
MALE:'先生',FEMALE:'女士'
|
||||
},
|
||||
login:(phone,password)=>request.post('/api/user/password-login',{phone,password,role:'deliveryman'}),
|
||||
userInfo:()=>request.get('/api/user/info'),
|
||||
summary:()=>request.get('/api/account/summary'),
|
||||
incomeList:(data)=>request.get('/api/account/details',data),
|
||||
|
||||
uploadImg(file,progress){
|
||||
return new Promise((rs,rj)=>{
|
||||
const task = wx.uploadFile({
|
||||
filePath: file.tempFilePath,
|
||||
name: 'file',
|
||||
header:{
|
||||
Authorization: `Bearer ${token||app.globalData.accessToken}`
|
||||
},
|
||||
url: request.baseUrl+'/api/upload/image',
|
||||
success:(res)=>{
|
||||
const response = JSON.parse(res.data);
|
||||
rs(response.data);
|
||||
},
|
||||
fail:(res)=>{
|
||||
rj(res);
|
||||
}
|
||||
});
|
||||
task.onProgressUpdate(progress);
|
||||
});
|
||||
}
|
||||
}
|
||||
58
app.js
@ -1,19 +1,55 @@
|
||||
// app.js
|
||||
import userApi from './api/user';
|
||||
const token = wx.getStorageSync('accessToken');
|
||||
|
||||
const date = new Date();
|
||||
App({
|
||||
onLaunch() {
|
||||
// 展示本地存储能力
|
||||
const logs = wx.getStorageSync('logs') || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
|
||||
// 登录
|
||||
wx.login({
|
||||
success: res => {
|
||||
// 发送 res.code 到后台换取 openId, sessionKey, unionId
|
||||
if(!token){
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/index',
|
||||
})
|
||||
}
|
||||
wx.onAppShow((options) => {
|
||||
if(token){
|
||||
// this.getUserInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
forceGetUserInfo(){
|
||||
this.globalData.userInfoGetTime = null;
|
||||
return this.getUserInfo();
|
||||
},
|
||||
async getUserInfo(){
|
||||
if(this.globalData.userInfoGetTime&&
|
||||
this.globalData.userInfo&&
|
||||
new Date()-this.globalData.userInfoGetTime<1000*60*5){
|
||||
return this.globalData.userInfo;
|
||||
}
|
||||
const data = await userApi.userInfo();
|
||||
this.globalData.userInfo = data;
|
||||
this.globalData.userInfoGetTime = new Date();
|
||||
return data;
|
||||
},
|
||||
|
||||
|
||||
forceGetSummary(){
|
||||
this.globalData.summaryGetTime = null;
|
||||
return this.getSummary();
|
||||
},
|
||||
async getSummary(){
|
||||
if(this.globalData.summaryGetTime&&
|
||||
this.globalData.summary&&
|
||||
new Date()-this.globalData.summaryGetTime<1000*60*5){
|
||||
return this.globalData.summary;
|
||||
}
|
||||
const data = await userApi.summary();
|
||||
this.globalData.summary = data;
|
||||
this.globalData.summaryGetTime = new Date();
|
||||
return data;
|
||||
},
|
||||
globalData: {
|
||||
userInfo: null
|
||||
userInfo: null,
|
||||
accessToken:token,
|
||||
summary:null
|
||||
}
|
||||
})
|
||||
|
||||
7
app.json
@ -1,7 +1,12 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/order-detail/index"
|
||||
"pages/order-detail/index",
|
||||
"pages/login/index",
|
||||
"pages/user/info/index",
|
||||
"pages/withdraw/index/index",
|
||||
"pages/withdraw/success/index",
|
||||
"pages/user/income/index"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
||||
1
app.wxss
@ -255,6 +255,7 @@ page-container .content{
|
||||
.cells .cell-ft{
|
||||
position: relative;
|
||||
padding-right:40rpx;
|
||||
color:#999;
|
||||
}
|
||||
.cells .cell-ft::after{
|
||||
content:" ";
|
||||
|
||||
BIN
assets/icon/agreement.png
Normal file
|
After Width: | Height: | Size: 803 B |
BIN
assets/icon/back.png
Normal file
|
After Width: | Height: | Size: 745 B |
BIN
assets/icon/card.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/icon/password.png
Normal file
|
After Width: | Height: | Size: 877 B |
BIN
assets/icon/plus.png
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
assets/icon/right-arrow-small.png
Normal file
|
After Width: | Height: | Size: 609 B |
BIN
assets/icon/service.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/icon/success.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
assets/img/login-bg.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
53
components/navBar/index.js
Normal file
@ -0,0 +1,53 @@
|
||||
// components/navBar.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties:{
|
||||
back:{
|
||||
type:Boolean,
|
||||
value:false
|
||||
},
|
||||
backTitle:{
|
||||
type:String,
|
||||
value:''
|
||||
},
|
||||
share:{
|
||||
type:Boolean,
|
||||
value:false
|
||||
},
|
||||
background:{
|
||||
type:String,
|
||||
value:''
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
statusBarHeight:0,
|
||||
navBarHeight:44
|
||||
},
|
||||
lifetimes:{
|
||||
attached(){
|
||||
console.log('1212121212');
|
||||
const windowInfo = wx.getWindowInfo();
|
||||
|
||||
this.setData({
|
||||
statusBarHeight:windowInfo.statusBarHeight
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
back(){
|
||||
wx.navigateBack();
|
||||
},
|
||||
share(){
|
||||
},
|
||||
}
|
||||
})
|
||||
5
components/navBar/index.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {},
|
||||
"styleIsolation": "shared"
|
||||
}
|
||||
16
components/navBar/index.wxml
Normal file
@ -0,0 +1,16 @@
|
||||
<view class="nav-bar" style="padding-top:{{statusBarHeight}}px;background-color:{{background}};">
|
||||
<view class="nav-bar-content" style="height:{{navBarHeight}}px;">
|
||||
<view class="left">
|
||||
<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"/>
|
||||
<view class="spliter" wx:if="{{share&&back}}"></view>
|
||||
<image src="/assets/icon/navbar/share@2x.png" class="share" wx:if="{{share}}" bind:tap="share"/>
|
||||
</view>
|
||||
<view class="back-title" wx:if="{{backTitle}}" bind:tap="back">{{backTitle}}</view>
|
||||
</view>
|
||||
<view class="center">
|
||||
<slot/>
|
||||
</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
</view>
|
||||
51
components/navBar/index.wxss
Normal file
@ -0,0 +1,51 @@
|
||||
/* components/navBar.wxss */
|
||||
.nav-bar{
|
||||
}
|
||||
.nav-bar-content{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding:0 34rpx;
|
||||
}
|
||||
.nav-bar-content .left{
|
||||
flex:1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.nav-bar-content .left .btns{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
border-radius: 60rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.nav-bar-content .left .spliter{
|
||||
width:1.2rpx;height:36rpx;
|
||||
background-color:#D8D8D8;
|
||||
}
|
||||
/*单一一个返回或者加上 backTitle的时候*/
|
||||
.nav-bar-content .back{
|
||||
width:40rpx;height:40rpx;
|
||||
padding:12rpx 14rpx 12rpx 0;
|
||||
}
|
||||
.nav-bar-content .left .btns.border{
|
||||
border: 1.2px solid #D8D8D8;
|
||||
}
|
||||
/*有俩按钮 back+share 的时候*/
|
||||
.nav-bar-content .left .btns.border .back{
|
||||
padding:12rpx 24rpx;
|
||||
width:36rpx;height:36rpx;
|
||||
}
|
||||
.nav-bar-content .back-title{
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.nav-bar-content .share{
|
||||
width:30rpx;height:34rpx;
|
||||
padding:12rpx 28rpx;
|
||||
}
|
||||
.nav-bar-content .center{
|
||||
flex:1;
|
||||
text-align: center;
|
||||
}
|
||||
.nav-bar-content .right{flex:1;}
|
||||
88
components/swipeButton/index.js
Normal file
@ -0,0 +1,88 @@
|
||||
// components/swipeButton/index.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
loading:{
|
||||
type:Boolean,
|
||||
value:false
|
||||
},
|
||||
buttonText:{
|
||||
type:String,
|
||||
value:'我要接单'
|
||||
},
|
||||
buttonLoadingText:{
|
||||
type:String,
|
||||
value:'接单中'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
moveEvent:null,
|
||||
moveAreaWidth:0,
|
||||
moveViewWidth:92,
|
||||
|
||||
|
||||
textOpacity:1,
|
||||
textRight:120,
|
||||
moveViewX:0
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
buttonOnMove(event){
|
||||
this.data.moveEvent = event;
|
||||
if(!this.data.moveAreaWidth){
|
||||
this.createSelectorQuery().select('#moveArea'+index).boundingClientRect((res)=>{
|
||||
this.data.moveAreaWidth = res.width;
|
||||
}).exec();
|
||||
}
|
||||
let x = this.data.moveEvent.detail.x;
|
||||
let opacity = 1 - x/(this.data.moveAreaWidth - this.data.moveViewWidth);
|
||||
let right = opacity*120;
|
||||
this.setData({
|
||||
textOpacity:opacity,
|
||||
textRight:right
|
||||
})
|
||||
},
|
||||
buttonMoveCancel(event){
|
||||
const x = this.data.moveEvent.detail.x;
|
||||
//给 10 像素边界
|
||||
//moveAreaWidth - this.data.moveViewWidth - 10 <= x
|
||||
let viewX = 0,loading = false;
|
||||
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
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
lifetimes:{
|
||||
attached(){
|
||||
this.createSelectorQuery().select('#moveArea').boundingClientRect((res)=>{
|
||||
this.data.moveAreaWidth = res.width;
|
||||
}).exec();
|
||||
}
|
||||
},
|
||||
observers:{
|
||||
"loading"(l){
|
||||
if(!l){
|
||||
this.setData({
|
||||
moveViewX:0,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
4
components/swipeButton/index.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
9
components/swipeButton/index.wxml
Normal file
@ -0,0 +1,9 @@
|
||||
<movable-area class="move-area" id="moveArea">
|
||||
<movable-view class="move-view" direction="horizontal" x="{{moveViewX}}"
|
||||
damping="100" bindchange="buttonOnMove" disabled="{{loading}}"
|
||||
capture-catch:touchcancel="buttonMoveCancel" capture-catch:touchend="buttonMoveCancel">
|
||||
<image class="icon" src="/assets/icon/double-right-arrow.png"/>
|
||||
</movable-view>
|
||||
<view class="tips" style="opacity: {{textOpacity||1}};right:{{textRight}}rpx;" wx:if="{{!loading}}">{{buttonText}}</view>
|
||||
<view class="tips loading" style="opacity: {{loading?1:0}};">{{buttonLoadingText}}</view>
|
||||
</movable-area>
|
||||
35
components/swipeButton/index.wxss
Normal file
@ -0,0 +1,35 @@
|
||||
.move-area{
|
||||
background-color: var(--main-color);
|
||||
border-radius: 12rpx;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
.move-area .tips{
|
||||
position: absolute;
|
||||
/* right:120rpx; */
|
||||
top:30rpx;
|
||||
color: #000000;
|
||||
font-size: 36rpx;
|
||||
z-index: 0;
|
||||
font-weight: 500;
|
||||
transition-duration: .1s;
|
||||
}
|
||||
.move-area .tips.loading{
|
||||
transition-duration: .4s;
|
||||
left:110rpx;
|
||||
}
|
||||
|
||||
.move-view{
|
||||
background-color: #fff;
|
||||
/* 为了精确定位width 用 px 单位 包括下面的 border*/
|
||||
width: 88px;height:88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content:center;
|
||||
border-radius: 12rpx;
|
||||
border:2px solid var(--main-color);
|
||||
z-index: 1;
|
||||
}
|
||||
.move-view .icon{
|
||||
width:56rpx;height:56rpx;
|
||||
}
|
||||
@ -1,49 +1,201 @@
|
||||
import orderApi from '../../api/order';
|
||||
import userApi from '../../api/user';
|
||||
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
currentOrder:null,
|
||||
data: {
|
||||
statusBarHeight:0,
|
||||
list:[{}],
|
||||
moveEvent:null,
|
||||
moveViewX:0,
|
||||
tipsOpacity:1,
|
||||
tipsRight:120,
|
||||
moveAreaWidth:0,
|
||||
moveViewWidth:92,
|
||||
receiving:false,
|
||||
list:[],
|
||||
leftPanelEvent:null,
|
||||
|
||||
scrollViewHeight:0,
|
||||
pager:{limit:10,loading:false,loadAll:false,pageIndex:0,refreshTrigger:false},
|
||||
isShowConfirm:false,
|
||||
isShowLeftPanel:false,
|
||||
isShowLeftPanelMask:false,
|
||||
leftPanelMoveViewX:0,
|
||||
tempImgs:[],
|
||||
maxChooseImgCount:10
|
||||
maxChooseImgCount:10,
|
||||
|
||||
userInfo:{},
|
||||
userInfoTrigger:false,
|
||||
summary:{},
|
||||
statusDetail:{
|
||||
created:{
|
||||
key:'CREATED',value:0,text:"待接单"
|
||||
},
|
||||
received:{
|
||||
key:'RECEIVED',value:0,text:"待取货"
|
||||
},
|
||||
delivering:{
|
||||
key:'DELIVERING',value:0,text:"送货中"
|
||||
},
|
||||
completed:{
|
||||
key:'COMPLETED',value:0,text:"已送达"
|
||||
}
|
||||
},
|
||||
statusDetailKey:'created',
|
||||
buildingList:[],
|
||||
buildingIndex:0,
|
||||
|
||||
orderStatus:orderApi.status,
|
||||
orderStatusKV:orderApi.statusKV,
|
||||
|
||||
deliverStatusKV:orderApi.deliverStatusKV,
|
||||
|
||||
genderKV:userApi.genderKV
|
||||
},
|
||||
onLoad(){
|
||||
const windowInfo = wx.getWindowInfo();
|
||||
console.log(windowInfo);
|
||||
|
||||
this.setData({
|
||||
statusBarHeight:windowInfo.statusBarHeight,
|
||||
scrollViewHeight:windowInfo.windowHeight-windowInfo.statusBarHeight-44 - 125
|
||||
});
|
||||
//增加列表之后 放在列表加载之后 优化动画效果
|
||||
this.createSelectorQuery().select('#moveArea0').boundingClientRect((res)=>{
|
||||
console.log(res);
|
||||
this.data.moveAreaWidth = res.width;
|
||||
}).exec();
|
||||
},
|
||||
confirmSend(){
|
||||
|
||||
app.getUserInfo().then((data)=>{
|
||||
this.setData({
|
||||
isShowConfirm:true
|
||||
userInfo:data
|
||||
});
|
||||
return this.loadStatusDetail();
|
||||
}).then((data)=>{
|
||||
return this.loadBuilding();
|
||||
}).then((data)=>{
|
||||
this.loadList();
|
||||
});
|
||||
app.getSummary().then((data)=>{
|
||||
this.setData({
|
||||
summary:data
|
||||
});
|
||||
});
|
||||
},
|
||||
getUserInfo(){
|
||||
app.forceGetUserInfo().then((data)=>{
|
||||
this.setData({
|
||||
userInfo:data,
|
||||
userInfoTrigger:false
|
||||
})
|
||||
})
|
||||
},
|
||||
setStatus(event){
|
||||
const status = event.currentTarget.dataset.item;
|
||||
console.log(status);
|
||||
//先不setData 让加载出来之后再设置
|
||||
this.loadBuilding().then((data)=>{
|
||||
this.data.statusDetailKey = status.key.toLowerCase();
|
||||
this.data.pager.pageIndex = 0;
|
||||
this.data.pager.loadAll = false;
|
||||
this.loadList();
|
||||
})
|
||||
},
|
||||
setBuilding(event){
|
||||
const buildingIndex = event.currentTarget.dataset.index;
|
||||
//先不setData 让加载出来之后再设置
|
||||
this.data.buildingIndex = buildingIndex;
|
||||
this.data.pager.pageIndex = 0;
|
||||
this.data.pager.loadAll = false;
|
||||
this.loadList();
|
||||
},
|
||||
refreshList(){
|
||||
this.loadStatusDetail().then(()=>{
|
||||
return this.loadBuilding();
|
||||
}).then(()=>{
|
||||
this.data.pager.pageIndex = 0;
|
||||
this.data.pager.loadAll = false;
|
||||
this.loadList();
|
||||
})
|
||||
},
|
||||
async loadStatusDetail(){
|
||||
const data = await orderApi.statusDetail(this.data.userInfo.community_id);
|
||||
data.map((item)=>{
|
||||
this.data.statusDetail.completed.value = 0;
|
||||
if(item.status==this.data.orderStatus.unpaid||item.status==this.data.orderStatus.completed){
|
||||
this.data.statusDetail.completed.value += item.count;
|
||||
}else{
|
||||
this.data.statusDetail[item.status.toLowerCase()].value = item.count;
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
statusDetail:this.data.statusDetail
|
||||
})
|
||||
},
|
||||
async loadBuilding(){
|
||||
const cid = this.data.userInfo.community_id;
|
||||
const status = this.data.statusDetailKey;
|
||||
const data = await orderApi.buildingList(cid,status);
|
||||
this.setData({
|
||||
buildingList:data
|
||||
});
|
||||
},
|
||||
loadList(){
|
||||
if(this.data.pager.loading||this.data.pager.loadAll){
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
"pager.loading":true
|
||||
});
|
||||
let params = {
|
||||
building_id:this.data.buildingList[this.data.buildingIndex].building_id,
|
||||
skip:this.data.pager.pageIndex*this.data.pager.limit,
|
||||
limit:this.data.pager.limit,
|
||||
}
|
||||
if(this.data.statusDetailKey=='completed'){
|
||||
params.status = `${this.data.orderStatus.unpaid},${this.data.orderStatus.completed}`
|
||||
}else{
|
||||
params.status = this.data.statusDetailKey;
|
||||
}
|
||||
orderApi.list(params).then((data)=>{
|
||||
if(this.data.pager.pageIndex==0){
|
||||
this.data.list = data.items;
|
||||
}else{
|
||||
this.data.list = this.data.list.concat(data.items);
|
||||
}
|
||||
this.data.pager.loading = false;
|
||||
this.data.pager.pageIndex++;
|
||||
this.data.pager.refreshTrigger = false;
|
||||
if(data.items.length<this.data.pager.limit){
|
||||
this.data.pager.loadAll = true;
|
||||
}
|
||||
|
||||
data.items.map((item)=>{
|
||||
item.packages.map((pItem)=>{
|
||||
pItem.pickup_codes = pItem.pickup_codes.split(',');
|
||||
})
|
||||
})
|
||||
this.setData({
|
||||
list:this.data.list,
|
||||
pager:this.data.pager,
|
||||
statusDetailKey:this.data.statusDetailKey,
|
||||
buildingIndex:this.data.buildingIndex
|
||||
});
|
||||
console.log(this.data.list);
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
openLeftPanel(){
|
||||
this.setData({
|
||||
isShowLeftPanel:true
|
||||
isShowLeftPanel:true,
|
||||
});
|
||||
wx.nextTick(()=>{
|
||||
this.setData({
|
||||
isShowLeftPanelMask:true,
|
||||
leftPanelMoveViewX:560
|
||||
})
|
||||
})
|
||||
},
|
||||
closeLeftPanel(){
|
||||
this.setData({
|
||||
isShowLeftPanel:false
|
||||
leftPanelMoveViewX:0,
|
||||
isShowLeftPanelMask:false
|
||||
});
|
||||
setTimeout(()=>{
|
||||
this.setData({
|
||||
isShowLeftPanel:false,
|
||||
})
|
||||
},400)
|
||||
},
|
||||
refund(){
|
||||
wx.showModal({
|
||||
@ -79,45 +231,106 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//接单
|
||||
getOrder(event){
|
||||
const item = event.currentTarget.dataset.item;
|
||||
|
||||
buttonOnMove(event){
|
||||
if(this.data.receiving)return;
|
||||
this.setData({
|
||||
moveEvent:event
|
||||
});
|
||||
const index = event.currentTarget.dataset.index;
|
||||
if(!this.data.moveAreaWidth){
|
||||
this.createSelectorQuery().select('#moveArea'+index).boundingClientRect((res)=>{
|
||||
this.data.moveAreaWidth = res.width;
|
||||
}).exec();
|
||||
}
|
||||
let x = this.data.moveEvent.detail.x;
|
||||
let opacity = 1 - x/(this.data.moveAreaWidth - this.data.moveViewWidth);
|
||||
let right = opacity*120
|
||||
this.setData({
|
||||
tipsOpacity:opacity,
|
||||
tipsRight:right
|
||||
orderApi.receive(item.orderid).then((data)=>{
|
||||
wx.showToast({
|
||||
icon:'success',
|
||||
title: '接单成功',
|
||||
})
|
||||
this.refreshList();
|
||||
})
|
||||
},
|
||||
buttonMoveCancel(event){
|
||||
if(this.data.receiving)return;
|
||||
const index = event.currentTarget.dataset.index;
|
||||
this.createSelectorQuery().select('#moveArea'+index).boundingClientRect((res)=>{
|
||||
const x = this.data.moveEvent.detail.x;
|
||||
const moveAreaWidth = res.width;
|
||||
//给 10 像素边界
|
||||
//moveAreaWidth - this.data.moveViewWidth - 10 <= x
|
||||
if((moveAreaWidth - this.data.moveViewWidth)/3*2 < x){
|
||||
console.log('success');
|
||||
//取货完毕
|
||||
receivedOrder(event){
|
||||
const item = event.currentTarget.dataset.item;
|
||||
orderApi.pickup(item.orderid).then((data)=>{
|
||||
wx.showToast({
|
||||
icon:'success',
|
||||
title: '取货成功',
|
||||
})
|
||||
this.refreshList();
|
||||
})
|
||||
},
|
||||
//完成配送 选择图片
|
||||
confirmSend(event){
|
||||
this.currentOrder = event.currentTarget.dataset.item;
|
||||
this.setData({
|
||||
moveViewX:moveAreaWidth - this.data.moveViewWidth,
|
||||
receiving:true
|
||||
isShowConfirm:true
|
||||
})
|
||||
},
|
||||
//完成配送
|
||||
uploadAndConfirmSend(){
|
||||
console.log(this.currentOrder);
|
||||
if(this.data.tempImgs.length==0){
|
||||
wx.showToast({
|
||||
icon:'error',
|
||||
title: '请选择快递照片',
|
||||
})
|
||||
return;
|
||||
}
|
||||
this.uploadImages().then(()=>{
|
||||
let urls = [];
|
||||
this.data.tempImgs.map((item)=>{
|
||||
urls.push(item.serverUrl);
|
||||
})
|
||||
console.log('uploadAndConfirmSend',urls);
|
||||
// return;
|
||||
orderApi.complete(this.currentOrder.orderid,urls).then((data)=>{
|
||||
wx.showToast({
|
||||
icon:'success',
|
||||
title: '订单已完成',
|
||||
})
|
||||
})
|
||||
});
|
||||
},
|
||||
async uploadImages(){
|
||||
let imgIndex = -1;
|
||||
const file = this.data.tempImgs.find((item,index)=>{
|
||||
imgIndex = index;
|
||||
return !item.uploaded;
|
||||
});
|
||||
if(!file){
|
||||
return;
|
||||
}
|
||||
const uploadResult = await userApi.uploadImg(file,(res)=>{
|
||||
//进度
|
||||
this.setData({
|
||||
[`tempImgs[${imgIndex}].progress`]:res.progress
|
||||
})
|
||||
});
|
||||
console.log(uploadResult);
|
||||
if(uploadResult.url){
|
||||
this.setData({
|
||||
[`tempImgs[${imgIndex}].uploaded`]:true,
|
||||
[`tempImgs[${imgIndex}].serverUrl`]:uploadResult.url
|
||||
})
|
||||
await this.uploadImages();
|
||||
}else{
|
||||
//上传失败
|
||||
return new Error('失败')
|
||||
}
|
||||
},
|
||||
leftPanelMove(event){
|
||||
this.setData({
|
||||
leftPanelEvent:event
|
||||
});
|
||||
},
|
||||
leftPanelMoveCancel(){
|
||||
const leftPanelWidth = 280;
|
||||
if(this.data.leftPanelEvent.detail.x<280/4*3){
|
||||
this.closeLeftPanel();
|
||||
}else{
|
||||
this.setData({
|
||||
moveViewX:0
|
||||
});
|
||||
leftPanelMoveViewX:560
|
||||
})
|
||||
}
|
||||
}).exec();
|
||||
},
|
||||
navToUserInfo(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/user/info/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"list-view":"/components/listView"
|
||||
"list-view":"/components/listView",
|
||||
"swipe-button":"/components/swipeButton"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
@ -3,62 +3,70 @@
|
||||
<image src="/assets/icon/left-panel-btn.png" class="left-btn" bind:tap="openLeftPanel"/>
|
||||
<view class="community">
|
||||
<image class="icon" src="/assets/icon/community.png"/>
|
||||
<label>朝阳时代西锦</label>
|
||||
<label>{{userInfo.community_name}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="head">
|
||||
<view class="item current">待接单(0)</view>
|
||||
<view class="item">待取货(0)</view>
|
||||
<view class="item">送货中(0)</view>
|
||||
<view class="item">已送达(0)</view>
|
||||
|
||||
<view class="head {{pager.loading?'loading':''}}">
|
||||
<view class="item {{statusDetailKey==key?'current':''}}" wx:for="{{statusDetail}}"
|
||||
wx:for-index="key" wx:key="key" bind:tap="setStatus" data-item="{{item}}">
|
||||
{{item.text}}({{item.value}})
|
||||
</view>
|
||||
</view>
|
||||
<view class="building {{pager.loading?'loading':''}}">
|
||||
<view class="item {{index==buildingIndex?'current':''}}"
|
||||
wx:for="{{buildingList}}" wx:key="index" bind:tap="setBuilding"
|
||||
data-item="{{item}}" data-index="{{index}}">
|
||||
{{item.building_name}}({{item.order_count}})
|
||||
</view>
|
||||
<view class="building">
|
||||
<view class="item">1栋(10)</view>
|
||||
<view class="item">2栋(10)</view>
|
||||
<view class="item">3栋(10)</view>
|
||||
<view class="item">4栋(10)</view>
|
||||
<view class="item">5栋(10)</view>
|
||||
</view>
|
||||
<view class="test"></view>
|
||||
<list-view class="package-list" height="{{scrollViewHeight}}">
|
||||
<view wx:for="{{2}}" wx:key="index" class="item" bind:tap="navToOrderDetail">
|
||||
<list-view class="package-list" bind:refresh="refreshList"
|
||||
bind:loadMore="loadList" height="{{scrollViewHeight}}"
|
||||
refresher-triggered="{{pager.refreshTrigger}}"
|
||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||
<view wx:for="{{list}}" wx:key="index" bind:tap="navToOrderDetail"
|
||||
class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}}" >
|
||||
<view class="station-list">
|
||||
<view class="sl-item" wx:for="{{3}}" wx:key="index">
|
||||
<view class="name">菜鸟驿站(丽晶公馆)</view>
|
||||
<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="package">
|
||||
<view class="key">4件包裹:</view>
|
||||
<view class="key">{{pItem.pickup_codes.length}}件包裹:</view>
|
||||
<view class="value">
|
||||
<label wx:for="{{6}}" wx:key="index">****** </label>
|
||||
<label wx:for="{{pItem.pickup_codes}}" wx:key="index" class="code-item">******</label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="address">
|
||||
<view class="title">佳兆业丽晶公馆3栋2单元2702</view>
|
||||
<view class="sub-title">冯先生:158****3822丨放在门口</view>
|
||||
<view class="title">
|
||||
{{item.address.community_name}}
|
||||
{{item.address.building_name}}
|
||||
{{item.address.address_detail}}
|
||||
</view>
|
||||
<view class="btns" wx:if="{{index==0}}">
|
||||
<view class="sub-title">
|
||||
{{item.address.name}}{{genderKV[item.address.gender]}}:{{item.address.phone}}丨{{deliverStatusKV[item.delivery_method]}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns" wx:if="{{item.status==orderStatus.created}}">
|
||||
<button class="button refund-btn" plain capture-catch:tap="refund" data-item="{{item}}">退单</button>
|
||||
<movable-area class="move-area" id="moveArea{{index}}">
|
||||
<movable-view class="move-view" direction="horizontal" x="{{moveViewX}}" damping="100"
|
||||
bindchange="buttonOnMove" data-item="{{item}}" data-index="{{index}}"
|
||||
disabled="{{receiving}}" capture-catch:touchcancel="buttonMoveCancel"
|
||||
capture-catch:touchend="buttonMoveCancel">
|
||||
<image class="icon" src="/assets/icon/double-right-arrow.png"/>
|
||||
</movable-view>
|
||||
<view class="tips" style="opacity: {{tipsOpacity}};right:{{tipsRight}}rpx;" wx:if="{{!receiving}}">我要接单</view>
|
||||
<view class="tips receiving" style="opacity: {{receiving?1:0}};">接单中...</view>
|
||||
</movable-area>
|
||||
<swipe-button class="swipe-button" loading="{{item.receiving}}" bind:done="getOrder" data-item="{{item}}" button-text="我要接单" button-loading-text="接单中..."/>
|
||||
</view>
|
||||
<view class="btns" wx:if="{{index==1}}">
|
||||
<view class="btns" wx:if="{{item.status==orderStatus.received}}">
|
||||
<button class="button refund-btn" plain capture-catch:tap="refund" data-item="{{item}}">退单</button>
|
||||
<swipe-button class="swipe-button" loading="{{item.receiving}}" bind:done="receivedOrder" data-item="{{item}}" button-text="我已取货" button-loading-text="取货中..."/>
|
||||
</view>
|
||||
<view class="btns" wx:if="{{item.status==orderStatus.delivering}}">
|
||||
<button class="button concat-user-btn">
|
||||
<image class="icon" src="/assets/icon/phone.png"></image>
|
||||
<label>联系用户</label>
|
||||
</button>
|
||||
<button type="primary" class="confirm-send-btn" capture-catch:tap="confirmSend">我已送达</button>
|
||||
<button type="primary" class="confirm-send-btn"
|
||||
capture-catch:tap="confirmSend" data-item="{{item}}">我已送达</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-empty" wx:if="{{list.length==0}}">
|
||||
<view class="list-empty" wx:if="{{list.length==0&&pager.loadAll}}">
|
||||
<image class="icon" src="/assets/icon/list-empty.png"/>
|
||||
<view class="title">暂无跑腿订单</view>
|
||||
</view>
|
||||
@ -71,20 +79,91 @@
|
||||
<view class="sub-title">当用户要求把包裹放在门口请拍照上传留证</view>
|
||||
<view class="sub-title">拍摄时请把门牌号和包裹数量整体拍照</view>
|
||||
<view class="photos">
|
||||
<view class="item" wx:for="{{tempImgs}}" wx:key="index">
|
||||
<view class="item {{item.loading?'current':''}}" wx:for="{{tempImgs}}" wx:key="index">
|
||||
<image class="image" src="{{item.tempFilePath}}"/>
|
||||
<progress wx:if="{{!item.uploaded}}" class="progress" percent="{{item.progress}}" show-info stroke-width="5" show-info="{{false}}"/>
|
||||
</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"
|
||||
wx:if="{{tempImgs.length<maxChooseImgCount}}">
|
||||
<image class="icon" src="/assets/icon/camera.png"/>
|
||||
<view class="title">点击拍照</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="button" type="primary">我已送达</button>
|
||||
<button class="button" type="primary" bind:tap="uploadAndConfirmSend">我已送达</button>
|
||||
</view>
|
||||
</page-container>
|
||||
|
||||
<view class="left-panel-mask" wx:if="{{isShowLeftPanel}}" bind:tap="closeLeftPanel"></view>
|
||||
<view class="left-panel" style="left:{{isShowLeftPanel?'0':'-560rpx'}};">
|
||||
<view class="left-panel-mask" wx:if="{{isShowLeftPanel}}"
|
||||
style="opacity:{{isShowLeftPanelMask?1:0}};" bind:tap="closeLeftPanel"></view>
|
||||
<movable-area class="left-move-view" wx:if="{{isShowLeftPanel}}">
|
||||
<movable-view class="left-panel" x="{{leftPanelMoveViewX}}rpx"
|
||||
style="padding-top:{{statusBarHeight}}px;"
|
||||
direction="horizontal" damping="50" bindchange="leftPanelMove"
|
||||
capture-catch:touchcancel="leftPanelMoveCancel"
|
||||
capture-catch:touchend="leftPanelMoveCancel">
|
||||
|
||||
<scroll-view scroll-y style="height:calc(100vh - {{statusBarHeight}}px)" refresher-enabled
|
||||
bindrefresherrefresh="getUserInfo" refresher-triggered="{{userInfoTrigger}}">
|
||||
<view class="page-container user-info">
|
||||
<image class="avatar" src="{{userInfo.optimized_avatar}}" 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">{{summary.total}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="key">昨日订单</view>
|
||||
<view class="value">{{summary.yesterday_total}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="key">今日订单</view>
|
||||
<view class="value">{{summary.today_total}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page-container income">
|
||||
<view class="item">
|
||||
<view class="key">
|
||||
<label>账户余额</label>
|
||||
<image class="icon" src="/assets/icon/right-arrow-small.png"/>
|
||||
</view>
|
||||
<view class="value">{{summary.balance}}</view>
|
||||
</view>
|
||||
<view class="spliter"></view>
|
||||
<view 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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page-container actions">
|
||||
<view class="item">
|
||||
<image class="icon" src="/assets/icon/service.png"/>
|
||||
<view>在线客服</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image class="icon" src="/assets/icon/password.png"/>
|
||||
<view>修改密码</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image class="icon" src="/assets/icon/agreement.png"/>
|
||||
<view>用户协议</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" class="logout-btn">退出登录</button>
|
||||
</scroll-view>
|
||||
</movable-view>
|
||||
</movable-area>
|
||||
|
||||
@ -29,6 +29,12 @@
|
||||
.head{
|
||||
display: flex;
|
||||
background-color: #111111;
|
||||
position: relative;
|
||||
}
|
||||
.head.loading::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
left:0;right:0;top:0;bottom:0;
|
||||
}
|
||||
.head .item{
|
||||
color: #BEBEBE;
|
||||
@ -45,14 +51,29 @@
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
gap: 10rpx;
|
||||
margin:20rpx 8rpx;
|
||||
flex-wrap: nowrap;
|
||||
margin:20rpx 16rpx;
|
||||
position: relative;
|
||||
}
|
||||
.building.loading{
|
||||
overflow: hidden;
|
||||
}
|
||||
.building.loading::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width:100%;left:0;top:0;bottom:0;
|
||||
}
|
||||
.building .item{
|
||||
font-size:28rpx;
|
||||
color: #666666;
|
||||
padding:15rpx 36rpx;
|
||||
white-space: nowrap;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.building .item.current{
|
||||
background-color: var(--main-color);
|
||||
color:var(--main-font-color);
|
||||
}
|
||||
|
||||
|
||||
@ -78,6 +99,9 @@
|
||||
left:38.5rpx;top:90rpx;
|
||||
bottom:250rpx;
|
||||
}
|
||||
.package-list .item.no-btns::before{
|
||||
bottom:100rpx;
|
||||
}
|
||||
.package-list .item .name{
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
@ -112,11 +136,15 @@
|
||||
}
|
||||
.package-list .item .package .value{
|
||||
flex:1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.package-list .item .address{
|
||||
padding-left:64rpx;
|
||||
position: relative;
|
||||
padding-bottom:20rpx;
|
||||
}
|
||||
.package-list .item .address::before{
|
||||
content: '送';
|
||||
@ -143,7 +171,7 @@
|
||||
.package-list .item .btns{
|
||||
display: flex;
|
||||
gap:24rpx;
|
||||
margin-top:50rpx;
|
||||
margin-top:30rpx;
|
||||
|
||||
}
|
||||
.package-list .item .btns .button{
|
||||
@ -156,40 +184,11 @@
|
||||
padding:30rpx 40rpx;
|
||||
margin:0;
|
||||
}
|
||||
.package-list .item .btns .move-area{
|
||||
background-color: var(--main-color);
|
||||
border-radius: 12rpx;
|
||||
.package-list .item .btns .swipe-button{
|
||||
height:96rpx;
|
||||
flex:1;
|
||||
}
|
||||
.package-list .item .btns .move-view{
|
||||
background-color: #fff;
|
||||
/* 为了精确定位width 用 px 单位 包括下面的 border*/
|
||||
width: 88px;height:88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content:center;
|
||||
border-radius: 12rpx;
|
||||
border:2px solid var(--main-color);
|
||||
z-index: 1;
|
||||
}
|
||||
.package-list .item .btns .move-view .icon{
|
||||
width:56rpx;height:56rpx;
|
||||
}
|
||||
.move-area .tips{
|
||||
position: absolute;
|
||||
/* right:120rpx; */
|
||||
top:30rpx;
|
||||
color: #000000;
|
||||
font-size: 36rpx;
|
||||
z-index: 0;
|
||||
font-weight: 500;
|
||||
transition-duration: .1s;
|
||||
}
|
||||
.move-area .tips.receiving{
|
||||
transition-duration: .4s;
|
||||
left:110rpx;
|
||||
}
|
||||
|
||||
|
||||
.concat-user-btn{
|
||||
display: flex;
|
||||
@ -230,6 +229,21 @@
|
||||
height:160rpx;
|
||||
border-radius: 12rpx;
|
||||
border: 1.2rpx solid rgba(124, 134, 149, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
.confirm-sending .photos .item .progress{
|
||||
position: absolute;
|
||||
top:0;left:0;
|
||||
width:100%;
|
||||
z-index: 1;
|
||||
}
|
||||
.confirm-sending .photos .item.loading::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width:100%;height:100%;
|
||||
left:0;top:0;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
z-index: 0;
|
||||
}
|
||||
.confirm-sending .photos .item .image{
|
||||
width:100%;height:100%;
|
||||
@ -248,19 +262,121 @@
|
||||
margin-top:114rpx;
|
||||
}
|
||||
|
||||
.left-move-view{
|
||||
width:1120rpx;height:100vh;
|
||||
left: -560rpx;top:0;
|
||||
position: fixed;
|
||||
}
|
||||
.left-panel{
|
||||
width:560rpx;
|
||||
background-color: #fff;
|
||||
height:100vh;
|
||||
position: fixed;
|
||||
left:0;top:0;
|
||||
left:-560rpx;
|
||||
transition-duration: .3s;
|
||||
/* position: fixed; */
|
||||
/* left:0;top:0; */
|
||||
/* transition-duration: .3s; */
|
||||
}
|
||||
.left-panel-mask{
|
||||
position: fixed;
|
||||
width:100vw;
|
||||
width:calc(100vw + 560rpx);
|
||||
height:100vh;
|
||||
left:0;top:0;
|
||||
right:0;top:0;
|
||||
transition-duration: .4s;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
|
||||
.left-panel{
|
||||
background-color: var(--main-bgclolor);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.left-panel .user-info{
|
||||
text-align: center;
|
||||
padding-bottom:0;
|
||||
}
|
||||
.left-panel .user-info .avatar{
|
||||
width:120rpx;height:120rpx;
|
||||
border-radius: 50%;
|
||||
margin-top:40rpx;
|
||||
}
|
||||
.left-panel .user-info .name{
|
||||
margin-top:30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.left-panel .user-info .phone{
|
||||
color: #888888;
|
||||
margin-top:24rpx;
|
||||
}
|
||||
.left-panel .user-info .community-name{
|
||||
margin-top:24rpx;
|
||||
}
|
||||
.left-panel .user-info .spliter{
|
||||
margin-top:40rpx;
|
||||
}
|
||||
.left-panel .user-info .order-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.left-panel .user-info .order-info .item{
|
||||
padding:30rpx 24rpx;
|
||||
}
|
||||
.left-panel .user-info .order-info .key{
|
||||
font-size:24rpx;
|
||||
}
|
||||
.left-panel .user-info .order-info .value{
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
margin-top:22rpx;
|
||||
}
|
||||
|
||||
.left-panel .income{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text-align: center;
|
||||
}
|
||||
.left-panel .income .item{
|
||||
padding:0 20rpx;
|
||||
}
|
||||
.left-panel .income .spliter{
|
||||
width:1.2rpx;
|
||||
height:88rpx;
|
||||
background-color: rgba(153, 153, 153, 0.3);
|
||||
}
|
||||
.left-panel .income .item .key{
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.left-panel .income .item .value{
|
||||
font-size: 36rpx;
|
||||
margin-top:28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.left-panel .income .item .icon{
|
||||
width:16rpx;height:16rpx;
|
||||
margin-left:6rpx;
|
||||
}
|
||||
|
||||
.left-panel .actions{
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
}
|
||||
.left-panel .actions .item{
|
||||
padding:0 20rpx;
|
||||
}
|
||||
.left-panel .actions .item .icon{
|
||||
width:40rpx;height:40rpx;
|
||||
margin-bottom:28rpx;
|
||||
}
|
||||
|
||||
.left-panel .logout-btn{
|
||||
position: absolute;
|
||||
bottom:80rpx;
|
||||
left:20rpx;right:20rpx;
|
||||
background-color: #fff;
|
||||
font-weight: normal;
|
||||
}
|
||||
.left-panel .logout-btn:hover{
|
||||
background-color: #fff!important;
|
||||
color:#222!important;
|
||||
}
|
||||
93
pages/login/index.js
Normal file
@ -0,0 +1,93 @@
|
||||
import userApi from '../../api/user';
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
phone:'13438370499',
|
||||
password:'6x9vw9s2',
|
||||
isAgree:false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
login(){
|
||||
if(this.data.isAgree){
|
||||
userApi.login(this.data.phone,this.data.password).then((data)=>{
|
||||
app.globalData.userInfo = data.user;
|
||||
app.globalData.accessToken = data.access_token;
|
||||
wx.setStorage({
|
||||
key:'accessToken',
|
||||
data:data.access_token,
|
||||
success:()=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
handleAgreeChange(event){
|
||||
this.setData({
|
||||
isAgree:!!event.detail
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
4
pages/login/index.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
20
pages/login/index.wxml
Normal file
@ -0,0 +1,20 @@
|
||||
<view class="login">
|
||||
<view class="head">
|
||||
<image src="/assets/img/login-bg.png" class="bg"/>
|
||||
<view class="title">欢迎使用蜂快到家</view>
|
||||
</view>
|
||||
<view class="input-area">
|
||||
<input class="input" model:value="{{phone}}"/>
|
||||
<input class="input" model:value="{{password}}" type="password"/>
|
||||
<button bind:tap="login" type="primary" class="button">登录</button>
|
||||
|
||||
<radio-group bindchange="handleAgreeChange" class="agree">
|
||||
<label class="policy">
|
||||
<radio class="radio" value="agree" checked="{{false}}"></radio>
|
||||
<label>我已阅读并同意</label>
|
||||
<label class="yellow">《用户协议》</label>与
|
||||
<label class="yellow">《隐私政策》</label>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
51
pages/login/index.wxss
Normal file
@ -0,0 +1,51 @@
|
||||
.login{
|
||||
background-color: #fff;
|
||||
height:100vh;
|
||||
}
|
||||
.login .head{
|
||||
background-color: var(--main-color);
|
||||
position: relative;
|
||||
height:554rpx;
|
||||
}
|
||||
.login .head .bg{
|
||||
width: 450rpx;height:486rpx;
|
||||
position: absolute;
|
||||
right:-40rpx;top:204rpx;
|
||||
}
|
||||
.login .head .title{
|
||||
font-size: 46rpx;
|
||||
position: absolute;
|
||||
left:40rpx;
|
||||
bottom:144rpx;
|
||||
}
|
||||
.login .input-area{
|
||||
border-radius: 30rpx 30rpx 0px 0px;
|
||||
margin-top:-80rpx;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
padding:40rpx 50rpx;
|
||||
}
|
||||
.login .input-area .input{
|
||||
background-color:#F7F7F7;
|
||||
border-radius: 18rpx;
|
||||
height: 100rpx;
|
||||
padding:0 30rpx;
|
||||
margin-bottom:24rpx;
|
||||
}
|
||||
.login .input-area .button{
|
||||
margin-top:50rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.agree{
|
||||
font-size: 26rpx;
|
||||
margin-top:50rpx;
|
||||
}
|
||||
.agree .yellow{
|
||||
color:var(--main-color);
|
||||
margin: 0;
|
||||
}
|
||||
.agree .policy{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
@ -1,4 +1,12 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "订单详情"
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "title",
|
||||
"backgroundColor": "#eeeeee",
|
||||
"backgroundTextStyle": "light",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}
|
||||
68
pages/user/income/index.js
Normal file
@ -0,0 +1,68 @@
|
||||
import userApi from '../../../api/user';
|
||||
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
userApi.incomeList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
4
pages/user/income/index.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "交易明细"
|
||||
}
|
||||
9
pages/user/income/index.wxml
Normal file
@ -0,0 +1,9 @@
|
||||
<view class="income-list">
|
||||
<view class="item" wx:for="{{3}}">
|
||||
<view class="content">
|
||||
<view class="title">订单编号6777跑腿收益</view>
|
||||
<view class="sub-title">2024.10.10 12:15:51</view>
|
||||
</view>
|
||||
<view class="money">3.0</view>
|
||||
</view>
|
||||
</view>
|
||||
20
pages/user/income/index.wxss
Normal file
@ -0,0 +1,20 @@
|
||||
.income-list{
|
||||
background-color: #ffffff;
|
||||
margin-top:20rpx;
|
||||
}
|
||||
.income-list .item{
|
||||
display: flex;
|
||||
padding:40rpx 30rpx;
|
||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
||||
}
|
||||
.income-list .item .content{
|
||||
flex:1;
|
||||
|
||||
}
|
||||
.income-list .item .title{
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.income-list .item .sub-title{
|
||||
margin-top:32rpx;
|
||||
color: #888888;
|
||||
}
|
||||
77
pages/user/info/index.js
Normal file
@ -0,0 +1,77 @@
|
||||
import userApi from '../../../api/user';
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
summary:{},
|
||||
refreshTrigger:false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.refreshSummary();
|
||||
},
|
||||
|
||||
refreshSummary(){
|
||||
app.forceGetSummary().then((data)=>{
|
||||
this.setData({
|
||||
summary:data,
|
||||
refreshTrigger:false
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
6
pages/user/info/index.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav-bar":"/components/navBar"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
42
pages/user/info/index.wxml
Normal file
@ -0,0 +1,42 @@
|
||||
<view class="bg">
|
||||
<nav-bar back/>
|
||||
</view>
|
||||
<scroll-view scroll-y class="scroll-view" refresher-enabled
|
||||
bindrefresherrefresh="refreshSummary" refresher-triggered="{{refreshTrigger}}">
|
||||
<view class="page-container user-info">
|
||||
<view class="title">账户余额 (元)</view>
|
||||
<view class="_money">{{summary.balance}}</view>
|
||||
<view class="today">今日收益(元) {{summary.today_total}}</view>
|
||||
<navigator url="/pages/withdraw/index/index">
|
||||
<button class="button" type="primary" disabled="{{summary.balance==0||true}}">提现</button>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="cells">
|
||||
<navigator url="/pages/user/income/index" class="cell" hover-class="cell-active">
|
||||
<view class="cell-bd invite-cell">
|
||||
<view>交易明细</view>
|
||||
</view>
|
||||
<view class="cell-ft"></view>
|
||||
</navigator>
|
||||
<navigator url="" class="cell" hover-class="cell-active">
|
||||
<view class="cell-bd">
|
||||
<view>提现记录</view>
|
||||
</view>
|
||||
<view class="cell-ft"></view>
|
||||
</navigator>
|
||||
|
||||
<navigator url="" class="cell" hover-class="cell-active">
|
||||
<view class="cell-bd">
|
||||
<view>实名认证</view>
|
||||
</view>
|
||||
<view class="cell-ft"></view>
|
||||
</navigator>
|
||||
<navigator url="" class="cell" hover-class="cell-active">
|
||||
<view class="cell-bd">
|
||||
<view>银行卡管理</view>
|
||||
</view>
|
||||
<view class="cell-ft"></view>
|
||||
</navigator>
|
||||
</view>
|
||||
</scroll-view>
|
||||
28
pages/user/info/index.wxss
Normal file
@ -0,0 +1,28 @@
|
||||
.bg{
|
||||
background-color: var(--main-color);
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
padding-bottom:240rpx;
|
||||
}
|
||||
.scroll-view{
|
||||
position: fixed;
|
||||
top:15vh;left:0;
|
||||
height:85vh;
|
||||
}
|
||||
.user-info{
|
||||
text-align: center;
|
||||
padding-top:60rpx;
|
||||
}
|
||||
.user-info ._money{
|
||||
font-size: 80rpx;
|
||||
margin-top:50rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.user-info .today{
|
||||
font-size: 28rpx;
|
||||
color: #555555;
|
||||
margin-top:50rpx;
|
||||
}
|
||||
.user-info .button{
|
||||
border-radius: 60rpx;
|
||||
margin-top:70rpx;
|
||||
}
|
||||
70
pages/withdraw/index/index.js
Normal file
@ -0,0 +1,70 @@
|
||||
// pages/withdraw/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
widthdraw(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/withdraw/success/index',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/withdraw/index/index.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
39
pages/withdraw/index/index.wxml
Normal file
@ -0,0 +1,39 @@
|
||||
<view class="page-container amount">
|
||||
<view class="head">
|
||||
<view class="key">提现金额</view>
|
||||
<view class="value">24小时到账</view>
|
||||
</view>
|
||||
<view class="input-area">
|
||||
<input class="input" placeholder="请输入提现金额"/>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="key">账户余额:4500.0</view>
|
||||
<view class="value">全部提现</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page-container banks">
|
||||
<view class="head">提现方式</view>
|
||||
<view class="spliter"></view>
|
||||
<radio-group class="bank-list">
|
||||
<label class="item">
|
||||
<image class="icon" src="/assets/icon/card.png"/>
|
||||
<view class="name">中国工商银行(7726)</view>
|
||||
<checkbox class="checkbox"/>
|
||||
</label>
|
||||
<label class="item">
|
||||
<image class="icon" src="/assets/icon/card.png"/>
|
||||
<view class="name">中国工商银行(7726)</view>
|
||||
<checkbox class="checkbox"/>
|
||||
</label>
|
||||
|
||||
<view class="item">
|
||||
<view class="icon plus">
|
||||
<image src="/assets/icon/plus.png" class="plus"/>
|
||||
</view>
|
||||
<view class="name">添加银行卡</view>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
|
||||
<button type="primary" class="widthdraw-btn" bind:tap="widthdraw">立即提现</button>
|
||||
83
pages/withdraw/index/index.wxss
Normal file
@ -0,0 +1,83 @@
|
||||
.amount{
|
||||
padding-bottom:0;
|
||||
}
|
||||
.amount .head{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.amount .head .key{
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.amount .head .value{
|
||||
font-size: 26rpx;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.amount .input-area{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top:60rpx;
|
||||
}
|
||||
.amount .input-area::before{
|
||||
content: '¥';
|
||||
font-size: 50rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.amount .input{
|
||||
flex: 1;
|
||||
font-size: 56rpx;
|
||||
font-weight: 500;
|
||||
height:114rpx;
|
||||
margin-left:24rpx;
|
||||
}
|
||||
.amount .bottom{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.amount .bottom .value{
|
||||
padding:32rpx 0 32rpx 32rpx;
|
||||
color:var(--main-color);
|
||||
}
|
||||
|
||||
.banks{
|
||||
}
|
||||
.banks .spliter{
|
||||
margin-top:30rpx;
|
||||
}
|
||||
.banks .bank-list{
|
||||
margin-top:20rpx;
|
||||
}
|
||||
.banks .item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:20rpx 0;
|
||||
margin:0;
|
||||
}
|
||||
.banks .icon{
|
||||
width:44rpx;height:44rpx;
|
||||
}
|
||||
.banks .icon.plus{
|
||||
background-color: var(--main-color);
|
||||
border-radius: 50%;
|
||||
color:#fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.banks .icon .plus{
|
||||
width:28rpx;height:28rpx;
|
||||
}
|
||||
.banks .name{
|
||||
font-size: 32rpx;
|
||||
margin-left:30rpx;
|
||||
flex:1;
|
||||
}
|
||||
.banks .checkbox{}
|
||||
|
||||
.widthdraw-btn{
|
||||
margin:40rpx 20rpx 0 20rpx!important;
|
||||
}
|
||||
70
pages/withdraw/success/index.js
Normal file
@ -0,0 +1,70 @@
|
||||
// pages/withdraw/success/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
done(){
|
||||
wx.navigateBack({
|
||||
delta:2
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/withdraw/success/index.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
22
pages/withdraw/success/index.wxml
Normal file
@ -0,0 +1,22 @@
|
||||
<view class="page-container success-info">
|
||||
<image src="/assets/icon/success.png" class="icon"/>
|
||||
<view class="title">提现申请成功</view>
|
||||
<view class="sub-title">24小时到账 (周末节假日顺延),以实际到账时间为准!</view>
|
||||
</view>
|
||||
|
||||
<view class="cells order-info">
|
||||
<view class="cell">
|
||||
<view class="cell-hd">提现类型</view>
|
||||
<view class="cell-bd">账户提现</view>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<view class="cell-hd">提现金额</view>
|
||||
<view class="cell-bd money money-normal">8888.0</view>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<view class="cell-hd">到账方式</view>
|
||||
<view class="cell-bd">中国工商银行(7726)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" class="done-btn" bind:tap="done">完成</button>
|
||||
27
pages/withdraw/success/index.wxss
Normal file
@ -0,0 +1,27 @@
|
||||
.success-info{
|
||||
text-align: center;
|
||||
padding-top:70rpx
|
||||
}
|
||||
.success-info .icon{
|
||||
width:90rpx;height:90rpx;
|
||||
}
|
||||
.success-info .title{
|
||||
font-size: 44rpx;
|
||||
margin-top:40rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.success-info .sub-title{
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
margin-top:40rpx;
|
||||
}
|
||||
.order-info .cell-hd{
|
||||
color:#555555;
|
||||
}
|
||||
.order-info .cell-bd{
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.done-btn{
|
||||
margin:40rpx 20rpx 0 20rpx!important;
|
||||
}
|
||||