界面细节
This commit is contained in:
parent
fa443237c7
commit
0695c3ab34
@ -24,7 +24,10 @@ export default {
|
|||||||
|
|
||||||
withdraw:{
|
withdraw:{
|
||||||
add:(bank_card_id,amount)=>request.post('/api/withdraw',{bank_card_id,amount}),
|
add:(bank_card_id,amount)=>request.post('/api/withdraw',{bank_card_id,amount}),
|
||||||
list:(status)=>request.get('/api/withdraw/user',status?{status}:{}),
|
list:(data)=>request.get('/api/withdraw/user',data),
|
||||||
|
statusKV:{
|
||||||
|
PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"被拒绝"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
uploadImg(file,progress){
|
uploadImg(file,progress){
|
||||||
|
|||||||
37
app.wxss
37
app.wxss
@ -1,7 +1,7 @@
|
|||||||
page{
|
page{
|
||||||
font-size:32rpx;
|
font-size:32rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
--main-font-color:#222222;
|
--main-font-color:#000000;
|
||||||
--main-bgclolor:#F5F5F5;
|
--main-bgclolor:#F5F5F5;
|
||||||
--main-color:#FFC300;
|
--main-color:#FFC300;
|
||||||
--main-hover-color:#fcce39;
|
--main-hover-color:#fcce39;
|
||||||
@ -26,7 +26,6 @@ button .icon,button label{
|
|||||||
}
|
}
|
||||||
button:not([size=mini]){
|
button:not([size=mini]){
|
||||||
width:auto;
|
width:auto;
|
||||||
/* height: 108rpx; */
|
|
||||||
padding:30rpx 25rpx;
|
padding:30rpx 25rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
@ -38,28 +37,33 @@ button[type=primary]{
|
|||||||
background-color:var(--main-color);
|
background-color:var(--main-color);
|
||||||
color:#222222;
|
color:#222222;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button[type=primary]:not([disabled]).button-hover{
|
||||||
|
background-color: var(--main-hover-color);
|
||||||
|
color:var(--main-font-color);
|
||||||
|
}
|
||||||
|
|
||||||
button[plain]{
|
button[plain]{
|
||||||
border: 1rpx solid rgba(255, 195, 0, 0.5);
|
border: 1rpx solid rgba(255, 195, 0, 0.5);
|
||||||
color: #FFC300;
|
color: #FFC300;
|
||||||
}
|
}
|
||||||
button:not([plain]):not([disabled])[type=primary]:hover{
|
|
||||||
background-color:var(--main-hover-color);
|
|
||||||
}
|
|
||||||
button[type=default]{
|
button[type=default]{
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size:32rpx;
|
font-size:32rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button[type=default].button-hover{
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
|
||||||
button[type=primary][plain]{
|
button[type=primary][plain]{
|
||||||
border-color: var(--main-color);
|
border-color: var(--main-color);
|
||||||
color:var(--main-color);
|
color:var(--main-color);
|
||||||
padding:28rpx 25rpx;
|
padding:28rpx 25rpx;
|
||||||
}
|
}
|
||||||
button[type=primary][plain]:hover{
|
|
||||||
border-color:var(--main-color);
|
|
||||||
color:var(--main-color);
|
|
||||||
}
|
|
||||||
button[loading][type=primary] {
|
button[loading][type=primary] {
|
||||||
background-color:var(--main-color);
|
background-color:var(--main-color);
|
||||||
color: hsla(0,0%,100%,.6);
|
color: hsla(0,0%,100%,.6);
|
||||||
@ -194,12 +198,14 @@ page-container .content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottom-bar{
|
.bottom-bar{
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
border-top: 0.5px solid rgba(153, 153, 153, 0.2);
|
||||||
padding:34rpx 40rpx;
|
padding:24rpx;
|
||||||
position:fixed;
|
position:fixed;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
left:0;right:0;
|
left:0;right:0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
padding-bottom:calc(constant(safe-area-inset-bottom) + 24rpx);
|
||||||
|
padding-bottom:calc(env(safe-area-inset-bottom) + 24rpx);
|
||||||
}
|
}
|
||||||
.custom-scroll-view{
|
.custom-scroll-view{
|
||||||
height:100vh;
|
height:100vh;
|
||||||
@ -211,10 +217,12 @@ page-container .content{
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.bottom-bar-v2{
|
.bottom-bar-v2{
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
padding:24rpx;
|
||||||
padding:34rpx 40rpx;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
border-top: 0.5px solid rgba(153, 153, 153, 0.2);
|
||||||
|
padding-bottom:calc(constant(safe-area-inset-bottom) + 24rpx);
|
||||||
|
padding-bottom:calc(env(safe-area-inset-bottom) + 24rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cells{
|
.cells{
|
||||||
@ -350,4 +358,7 @@ navigator button{
|
|||||||
}
|
}
|
||||||
.page-dispatch{
|
.page-dispatch{
|
||||||
height:40rpx;
|
height:40rpx;
|
||||||
|
}
|
||||||
|
list-view{
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
@ -12,9 +12,7 @@ Component({
|
|||||||
type:Boolean,
|
type:Boolean,
|
||||||
value:false
|
value:false
|
||||||
},
|
},
|
||||||
"height":{
|
height:0,
|
||||||
type:Number
|
|
||||||
},
|
|
||||||
loadMoreText:{
|
loadMoreText:{
|
||||||
type:String,
|
type:String,
|
||||||
value:'已经到底了'
|
value:'已经到底了'
|
||||||
@ -33,14 +31,15 @@ Component({
|
|||||||
* 组件的初始数据
|
* 组件的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
defaultHeight:''
|
heightStyle:'',
|
||||||
|
scrollHeight:0
|
||||||
},
|
},
|
||||||
lifetimes:{
|
lifetimes:{
|
||||||
attached(){
|
attached(){
|
||||||
|
this.createSelectorQuery().select('#scrollView').boundingClientRect((res)=>{
|
||||||
|
this.data.scrollHeight = res.height;
|
||||||
|
}).exec();
|
||||||
const windowInfo = wx.getWindowInfo();
|
const windowInfo = wx.getWindowInfo();
|
||||||
this.setData({
|
|
||||||
defaultHeight:`calc(100vh)`
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -52,10 +51,26 @@ Component({
|
|||||||
},
|
},
|
||||||
scrolling(event){
|
scrolling(event){
|
||||||
//scrollTop scrollHeight
|
//scrollTop scrollHeight
|
||||||
const bottomHeight = event.detail.scrollHeight-event.detail.scrollTop-this.properties.height;
|
const bottomHeight = event.detail.scrollHeight-event.detail.scrollTop-this.data.scrollHeight;
|
||||||
if(bottomHeight<100){
|
if(bottomHeight<100){
|
||||||
this.triggerEvent('loadMore');
|
this.triggerEvent('loadMore');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
observers:{
|
||||||
|
height(h){
|
||||||
|
let heightStyle = '';
|
||||||
|
if(h){
|
||||||
|
if(typeof h == 'string'){
|
||||||
|
heightStyle = `height:${h}`
|
||||||
|
}else{
|
||||||
|
heightStyle = `height:${this.properties.height*2}rpx`
|
||||||
|
}
|
||||||
|
console.log(heightStyle);
|
||||||
|
this.setData({
|
||||||
|
heightStyle:heightStyle
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"component": true,
|
"component": true,
|
||||||
"usingComponents": {}
|
"usingComponents": {},
|
||||||
|
"styleIsolation": "apply-shared"
|
||||||
}
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
<scroll-view scroll-y refresher-enabled="true" bindrefresherrefresh="refreshList" refresher-triggered="{{refresherTriggered}}" style="height:{{height}}px;" bindscroll="scrolling">
|
<scroll-view scroll-y refresher-enabled bindrefresherrefresh="refreshList" refresher-triggered="{{refresherTriggered}}" style="{{heightStyle}}" bindscroll="scrolling" class="scroll-view" id="scrollView">
|
||||||
<slot/>
|
<view class="scroll-view-content">
|
||||||
|
<slot/>
|
||||||
|
</view>
|
||||||
<view class="load-more" wx:if="{{showLoadMore}}">
|
<view class="load-more" wx:if="{{showLoadMore}}">
|
||||||
<label class="text" wx:if="{{loadAll}}">{{loadMoreText}}</label>
|
<label class="text" wx:if="{{loadAll}}">{{loadMoreText}}</label>
|
||||||
<label class="text" wx:else>加载中...</label>
|
<label class="text" wx:else>加载中...</label>
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
|
.scroll-view{
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
.load-more{
|
.load-more{
|
||||||
padding:100rpx 0;
|
padding:56rpx 0 80rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #888888;
|
color: #888888;
|
||||||
font-size:24rpx;
|
font-size:24rpx;
|
||||||
@ -14,8 +17,8 @@
|
|||||||
.load-more::before{
|
.load-more::before{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left:0;top:112rpx;
|
left:0;top:68rpx;
|
||||||
width:100%;height:1.5rpx;
|
width:100%;height:1rpx;
|
||||||
background-color: rgba(136, 136, 136, 0.25);
|
background-color: rgba(136, 136, 136, 0.25);
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
103
components/modalView/index.js
Normal file
103
components/modalView/index.js
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
const app = getApp();
|
||||||
|
|
||||||
|
Component({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
titleText:{
|
||||||
|
type:String,
|
||||||
|
value:''
|
||||||
|
},
|
||||||
|
titleTextCenter:{
|
||||||
|
type:Boolean,
|
||||||
|
value:true
|
||||||
|
},
|
||||||
|
editable:{
|
||||||
|
type:Boolean,
|
||||||
|
value:false
|
||||||
|
},
|
||||||
|
editRequired:{
|
||||||
|
type:Boolean,
|
||||||
|
value:false
|
||||||
|
},
|
||||||
|
row:{
|
||||||
|
type:Number,
|
||||||
|
value:4
|
||||||
|
},
|
||||||
|
content:{
|
||||||
|
type:String,
|
||||||
|
value:''
|
||||||
|
},
|
||||||
|
contentPlaceholder:{
|
||||||
|
type:String,
|
||||||
|
value:'请输入内容'
|
||||||
|
},
|
||||||
|
isShowCancel:true,
|
||||||
|
cancelButtonText:{
|
||||||
|
type:String,
|
||||||
|
value:'取消'
|
||||||
|
},
|
||||||
|
okButtonText:{
|
||||||
|
type:String,
|
||||||
|
value:'确定'
|
||||||
|
},
|
||||||
|
show:{
|
||||||
|
type:Boolean,
|
||||||
|
value:false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
dynamicsStyle:'',
|
||||||
|
textareaHeight:124
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
cancelButtonTap(){
|
||||||
|
this.setData({
|
||||||
|
show:false
|
||||||
|
});
|
||||||
|
this.triggerEvent('cancel');
|
||||||
|
},
|
||||||
|
okButtonTap(){
|
||||||
|
if(this.properties.editRequired){
|
||||||
|
const valid = app.validateForm({
|
||||||
|
content:{
|
||||||
|
required:true,
|
||||||
|
message:this.properties.contentPlaceholder,
|
||||||
|
shake:true,
|
||||||
|
autoFocus:true
|
||||||
|
}
|
||||||
|
},this);
|
||||||
|
if(valid.length>0)return;
|
||||||
|
}
|
||||||
|
this.setData({
|
||||||
|
show:false
|
||||||
|
});
|
||||||
|
this.triggerEvent('ok',this.properties.content);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
lifetimes:{
|
||||||
|
attached(){
|
||||||
|
console.log(this.properties.row);
|
||||||
|
const windowInfo = wx.getWindowInfo();
|
||||||
|
let viewHeight = 50+96+32+48;
|
||||||
|
const textareaHeight = this.properties.row*25+24;
|
||||||
|
if(this.properties.editable){
|
||||||
|
viewHeight+=textareaHeight;
|
||||||
|
}
|
||||||
|
this.setData({
|
||||||
|
textareaHeight:textareaHeight,
|
||||||
|
dynamicsStyle:`top:${(windowInfo.windowHeight-viewHeight)/2}px;height:${viewHeight}px;`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/modalView/index.json
Normal file
4
components/modalView/index.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
17
components/modalView/index.wxml
Normal file
17
components/modalView/index.wxml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
<page-container show="{{show}}" position="center" class="custom-modal-view"
|
||||||
|
custom-style="background-color:transparent;left:27px;width:calc(100vw - 54px);height:200px;{{dynamicsStyle}}">
|
||||||
|
<view class="modal-view-main">
|
||||||
|
<view class="title {{titleTextCenter?'center':''}}">{{titleText}}</view>
|
||||||
|
|
||||||
|
<textarea class="textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:if="{{editable}}"
|
||||||
|
placeholder="{{contentPlaceholder}}" style="height:{{textareaHeight*2}}rpx"
|
||||||
|
focus="{{contentFocus}}" animation="{{contentAnimation}}"></textarea>
|
||||||
|
<view class="text" wx:else>{{content}}</view>
|
||||||
|
|
||||||
|
<view class="btns">
|
||||||
|
<button class="button" plain vx:if="{{isShowCancel}}" bind:tap="cancelButtonTap">{{cancelButtonText}}</button>
|
||||||
|
<button class="button" type="primary" bind:tap="okButtonTap">{{okButtonText}}</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</page-container>
|
||||||
44
components/modalView/index.wxss
Normal file
44
components/modalView/index.wxss
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
.custom-modal-view{
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
.custom-modal-view .title{
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 50rpx;
|
||||||
|
padding:0 20rpx;
|
||||||
|
}
|
||||||
|
.custom-modal-view .title.center{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.modal-view-main{
|
||||||
|
border-radius: 24rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
padding:32rpx;
|
||||||
|
}
|
||||||
|
.custom-modal-view .textarea{
|
||||||
|
border: 1.2px solid rgba(85, 85, 85, 0.3);
|
||||||
|
border-radius: 18px;
|
||||||
|
margin:30rpx 0;
|
||||||
|
padding:24rpx 20rpx;
|
||||||
|
font-size: 34rpx;
|
||||||
|
width:100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height:50rpx;
|
||||||
|
height: 248rpx;
|
||||||
|
}
|
||||||
|
.custom-modal-view .textarea.error{
|
||||||
|
border-color:red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-view-main .btns{
|
||||||
|
margin-top:32rpx;
|
||||||
|
display: flex;
|
||||||
|
gap: 18rpx;
|
||||||
|
}
|
||||||
|
.modal-view-main .btns .button{
|
||||||
|
flex:1;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding:32rpx;
|
||||||
|
line-height: 1;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
@ -48,7 +48,9 @@ Page({
|
|||||||
|
|
||||||
genderKV:userApi.genderKV,
|
genderKV:userApi.genderKV,
|
||||||
|
|
||||||
completing:false
|
completing:false,
|
||||||
|
|
||||||
|
isShowRefundConfirm:false
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
const windowInfo = wx.getWindowInfo();
|
const windowInfo = wx.getWindowInfo();
|
||||||
@ -167,8 +169,11 @@ Page({
|
|||||||
limit:this.data.pager.limit,
|
limit:this.data.pager.limit,
|
||||||
}
|
}
|
||||||
const buildingId = this.data.buildingList[this.data.buildingIndex].building_id;
|
const buildingId = this.data.buildingList[this.data.buildingIndex].building_id;
|
||||||
|
//有buildingId 就传 没有(全部) buildingId就传community_id 因为要过滤小区
|
||||||
if(buildingId){
|
if(buildingId){
|
||||||
params.building_id = buildingId;
|
params.building_id = buildingId;
|
||||||
|
}else{
|
||||||
|
params.community_id = this.data.userInfo.community_id;
|
||||||
}
|
}
|
||||||
if(this.data.statusDetailKey=='completed'){
|
if(this.data.statusDetailKey=='completed'){
|
||||||
params.status = `${this.data.orderStatus.unpaid},${this.data.orderStatus.completed}`
|
params.status = `${this.data.orderStatus.unpaid},${this.data.orderStatus.completed}`
|
||||||
@ -227,29 +232,29 @@ Page({
|
|||||||
})
|
})
|
||||||
},400)
|
},400)
|
||||||
},
|
},
|
||||||
refund(event){
|
showRefundConfirm(event){
|
||||||
const item = event.currentTarget.dataset.item;
|
const item = event.currentTarget.dataset.item;
|
||||||
const index = event.currentTarget.dataset.index;
|
const index = event.currentTarget.dataset.index;
|
||||||
if(item.receiving)return;
|
if(item.receiving)return;
|
||||||
wx.showModal({
|
this.refundOrderIndex = index;
|
||||||
title: '取消订单需联系客户说明原因',
|
this.setData({
|
||||||
content: '',
|
isShowRefundConfirm:true
|
||||||
placeholderText:'请输入退款原因',
|
})
|
||||||
editable:true,
|
},
|
||||||
complete: (res) => {
|
refund(event){
|
||||||
if (res.confirm) {
|
const index = this.refundOrderIndex;
|
||||||
this.setData({
|
const item = this.data.list[index];
|
||||||
[`list[${index}].receiving`]:true
|
if(item.receiving)return;
|
||||||
})
|
|
||||||
orderApi.cancel(item.orderid,res.content).then((data)=>{
|
this.setData({
|
||||||
wx.showToast({
|
[`list[${index}].receiving`]:true
|
||||||
title: '取消成功',
|
})
|
||||||
icon:'success'
|
orderApi.cancel(item.orderid,event.detail).then((data)=>{
|
||||||
});
|
wx.showToast({
|
||||||
this.refreshList();
|
title: '取消成功',
|
||||||
})
|
icon:'success'
|
||||||
}
|
});
|
||||||
}
|
this.refreshList();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseImage(){
|
chooseImage(){
|
||||||
@ -393,5 +398,11 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
concatUser(event){
|
||||||
|
const item = event.currentTarget.dataset.item;
|
||||||
|
wx.makePhoneCall({
|
||||||
|
phoneNumber: item.address.phone,
|
||||||
|
})
|
||||||
|
},
|
||||||
emptyFun(){}
|
emptyFun(){}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"list-view":"/components/listView",
|
"list-view":"/components/listView",
|
||||||
"swipe-button":"/components/swipeButton"
|
"swipe-button":"/components/swipeButton",
|
||||||
|
"modal-view":"/components/modalView"
|
||||||
},
|
},
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
|
|||||||
@ -1,87 +1,90 @@
|
|||||||
<view style="height:{{statusBarHeight}}px" class="status-bar"></view>
|
<view class="custom-scroll-view">
|
||||||
<view class="nav-bar">
|
<view>
|
||||||
<image src="/assets/icon/left-panel-btn.png" class="left-btn" bind:tap="openLeftPanel"/>
|
<view style="height:{{statusBarHeight}}px" class="status-bar"></view>
|
||||||
<view class="community">
|
<view class="nav-bar">
|
||||||
<image class="icon" src="/assets/icon/community.png"/>
|
<image src="/assets/icon/left-panel-btn.png" class="left-btn" bind:tap="openLeftPanel"/>
|
||||||
<label>{{userInfo.community_name}}</label>
|
<view class="community">
|
||||||
</view>
|
<image class="icon" src="/assets/icon/community.png"/>
|
||||||
</view>
|
<label>{{userInfo.community_name}}</label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="head {{pager.loading?'loading':''}}">
|
<view class="head {{pager.loading?'loading':''}}">
|
||||||
<view class="item {{statusDetailKey==key?'current':''}}" wx:for="{{statusDetail}}"
|
<view class="item {{statusDetailKey==key?'current':''}}" wx:for="{{statusDetail}}"
|
||||||
wx:for-index="key" wx:key="key" bind:tap="setStatus" data-item="{{item}}">
|
wx:for-index="key" wx:key="key" bind:tap="setStatus" data-item="{{item}}">
|
||||||
{{item.text}}({{item.value}})
|
{{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>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<list-view class="package-list main" bind:refresh="refreshList"
|
||||||
<view class="building {{pager.loading?'loading':''}}">
|
bind:loadMore="loadList" refresher-triggered="{{pager.refreshTrigger}}"
|
||||||
<view class="item {{index==buildingIndex?'current':''}}"
|
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
||||||
wx:for="{{buildingList}}" wx:key="index" bind:tap="setBuilding"
|
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||||
data-item="{{item}}" data-index="{{index}}">
|
<view wx:for="{{list}}" wx:key="index" bind:tap="navToOrderDetail" data-id="{{item.orderid}}"
|
||||||
{{item.building_name}}({{item.order_count}})
|
class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}} {{item.is_first_order?'is-new-order':''}}" >
|
||||||
</view>
|
<view class="station-list">
|
||||||
</view>
|
<view class="sl-item" wx:for="{{item.packages}}" wx:key="index" wx:for-item="pItem" wx:for-index="pIndex">
|
||||||
<view class="test"></view>
|
<view class="name">{{pItem.station_name}}</view>
|
||||||
<list-view class="package-list" bind:refresh="refreshList"
|
<view class="package">
|
||||||
bind:loadMore="loadList" height="{{scrollViewHeight}}"
|
<view class="key">{{pItem.pickup_codes.length}}件包裹:</view>
|
||||||
refresher-triggered="{{pager.refreshTrigger}}"
|
<view class="value">
|
||||||
show-load-more="{{!(list.length==0&&pager.loadAll)}}"
|
<label wx:for="{{pItem.pickup_codes}}" wx:key="index" class="code-item"
|
||||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
wx:for-item="code">
|
||||||
<view wx:for="{{list}}" wx:key="index" bind:tap="navToOrderDetail" data-id="{{item.orderid}}"
|
{{item.status==orderStatus.created?'******':code}}
|
||||||
class="item {{item.status==orderStatus.unpaid||item.status==orderStatus.completed?'no-btns':''}}" >
|
</label>
|
||||||
<view class="station-list">
|
</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">{{pItem.pickup_codes.length}}件包裹:</view>
|
|
||||||
<view class="value">
|
|
||||||
<label wx:for="{{pItem.pickup_codes}}" wx:key="index" class="code-item"
|
|
||||||
wx:for-item="code">
|
|
||||||
{{item.status==orderStatus.created?'******':code}}
|
|
||||||
</label>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="address">
|
||||||
<view class="address">
|
<view class="title">
|
||||||
<view class="title">
|
{{item.address.community_name}}
|
||||||
{{item.address.community_name}}
|
{{item.address.building_name}}
|
||||||
{{item.address.building_name}}
|
{{item.address.address_detail}}
|
||||||
{{item.address.address_detail}}
|
</view>
|
||||||
|
<view class="sub-title">
|
||||||
|
{{item.address.name}}{{genderKV[item.address.gender]}}:{{item.address.phone}}丨{{deliverStatusKV[item.delivery_method]}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-title">
|
<view class="btns" wx:if="{{item.status==orderStatus.created}}">
|
||||||
{{item.address.name}}{{genderKV[item.address.gender]}}:{{item.address.phone}}丨{{deliverStatusKV[item.delivery_method]}}
|
<button disabled="{{item.receiving}}" class="button refund-btn" plain
|
||||||
|
capture-catch:tap="showRefundConfirm" data-item="{{item}}" data-index="{{index}}">退单</button>
|
||||||
|
<swipe-button class="swipe-button" loading="{{item.receiving}}" bind:done="getOrder"
|
||||||
|
data-item="{{item}}" data-index="{{index}}" button-text="我要接单"
|
||||||
|
button-loading-text="接单中..." capture-catch:tap="emptyFun"/>
|
||||||
|
</view>
|
||||||
|
<view class="btns" wx:if="{{item.status==orderStatus.received}}">
|
||||||
|
<button disabled="{{item.receiving}}" class="button refund-btn" capture-catch:tap="showRefundConfirm"
|
||||||
|
plain data-index="{{index}}" data-item="{{item}}">退单</button>
|
||||||
|
<swipe-button class="swipe-button" loading="{{item.receiving}}" bind:done="receivedOrder"
|
||||||
|
data-item="{{item}}" data-index="{{index}}" button-text="我已取货"
|
||||||
|
button-loading-text="取货中..." capture-catch:tap="emptyFun"/>
|
||||||
|
</view>
|
||||||
|
<view class="btns" wx:if="{{item.status==orderStatus.delivering}}">
|
||||||
|
<button class="button concat-user-btn" capture-catch:tap="concatUser"
|
||||||
|
data-item="{{item}}">
|
||||||
|
<image class="icon" src="/assets/icon/phone.png"></image>
|
||||||
|
<label>联系用户</label>
|
||||||
|
</button>
|
||||||
|
<button type="primary" class="confirm-send-btn"
|
||||||
|
capture-catch:tap="confirmSend" data-item="{{item}}">我已送达</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns" wx:if="{{item.status==orderStatus.created}}">
|
<view class="list-empty" wx:if="{{list.length==0&&pager.loadAll}}">
|
||||||
<button disabled="{{item.receiving}}" class="button refund-btn" plain
|
<image class="icon" src="/assets/icon/list-empty.png"/>
|
||||||
capture-catch:tap="refund" data-item="{{item}}" data-index="{{index}}">退单</button>
|
<view class="title">暂无跑腿订单</view>
|
||||||
<swipe-button class="swipe-button" loading="{{item.receiving}}" bind:done="getOrder"
|
|
||||||
data-item="{{item}}" data-index="{{index}}" button-text="我要接单"
|
|
||||||
button-loading-text="接单中..." capture-catch:tap="emptyFun"/>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btns" wx:if="{{item.status==orderStatus.received}}">
|
</list-view>
|
||||||
<button disabled="{{item.receiving}}" class="button refund-btn" capture-catch:tap="refund"
|
</view>
|
||||||
plain data-index="{{index}}" data-item="{{item}}">退单</button>
|
|
||||||
<swipe-button class="swipe-button" loading="{{item.receiving}}" bind:done="receivedOrder"
|
|
||||||
data-item="{{item}}" data-index="{{index}}" button-text="我已取货"
|
|
||||||
button-loading-text="取货中..." capture-catch:tap="emptyFun"/>
|
|
||||||
</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" data-item="{{item}}">我已送达</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<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>
|
|
||||||
</list-view>
|
|
||||||
|
|
||||||
<page-container show="{{isShowConfirm}}" position="bottom"
|
<page-container wx:if="{{isShowConfirm}}" show="{{isShowConfirm}}" position="bottom"
|
||||||
round class="confirm-sending" close-on-slide-down>
|
round class="confirm-sending" close-on-slide-down>
|
||||||
<view class="content" wx:if="{{isShowConfirm}}">
|
<view class="content" wx:if="{{isShowConfirm}}">
|
||||||
<view class="title">拍照留证</view>
|
<view class="title">拍照留证</view>
|
||||||
@ -176,3 +179,6 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</movable-view>
|
</movable-view>
|
||||||
</movable-area>
|
</movable-area>
|
||||||
|
|
||||||
|
|
||||||
|
<modal-view titleText="取消订单需联系客户说明原因" editable content-placeholder="请输入退款原因" bind:ok="refund" show="{{isShowRefundConfirm}}" wx:if="{{isShowRefundConfirm}}" titleTextCenter="{{false}}" editRequired/>
|
||||||
@ -55,6 +55,9 @@
|
|||||||
margin:20rpx 16rpx;
|
margin:20rpx 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.building::-webkit-scrollbar{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.building.loading{
|
.building.loading{
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@ -78,7 +81,6 @@
|
|||||||
|
|
||||||
|
|
||||||
.package-list{
|
.package-list{
|
||||||
margin-top:30rpx;
|
|
||||||
}
|
}
|
||||||
.package-list .item{
|
.package-list .item{
|
||||||
margin:30rpx 16rpx;
|
margin:30rpx 16rpx;
|
||||||
@ -99,6 +101,19 @@
|
|||||||
left:38.5rpx;top:90rpx;
|
left:38.5rpx;top:90rpx;
|
||||||
bottom:250rpx;
|
bottom:250rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.package-list .item.is-new-order::after{
|
||||||
|
content:'新';
|
||||||
|
position: absolute;
|
||||||
|
right:24rpx;top:0;
|
||||||
|
width:58rpx;height:58rpx;
|
||||||
|
line-height: 52rpx;
|
||||||
|
background-color: #FF0000;
|
||||||
|
border-radius: 0px 0px 40rpx 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
.package-list .item.no-btns::before{
|
.package-list .item.no-btns::before{
|
||||||
bottom:100rpx;
|
bottom:100rpx;
|
||||||
}
|
}
|
||||||
@ -200,7 +215,6 @@
|
|||||||
}
|
}
|
||||||
.concat-user-btn .icon{
|
.concat-user-btn .icon{
|
||||||
width:28rpx;height:28rpx;
|
width:28rpx;height:28rpx;
|
||||||
border: 1.2rpx solid rgba(85, 85, 85, 0.5);
|
|
||||||
}
|
}
|
||||||
.confirm-send-btn{
|
.confirm-send-btn{
|
||||||
flex:1;
|
flex:1;
|
||||||
|
|||||||
@ -19,34 +19,29 @@ Page({
|
|||||||
|
|
||||||
genderKV:userApi.genderKV,
|
genderKV:userApi.genderKV,
|
||||||
|
|
||||||
orderStep:0,
|
orderStep:0
|
||||||
scrollViewHeight:0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const windowInfo = wx.getWindowInfo();
|
|
||||||
this.setData({
|
|
||||||
scrollViewHeight:windowInfo.windowHeight
|
|
||||||
});
|
|
||||||
this.orderId = options.id;
|
this.orderId = options.id;
|
||||||
this.getOrderDetail();
|
this.getOrderDetail();
|
||||||
},
|
},
|
||||||
getOrderDetail(){
|
getOrderDetail(){
|
||||||
orderApi.detail(this.orderId).then((data)=>{
|
orderApi.detail(this.orderId).then((data)=>{
|
||||||
let orderStep = 0;
|
let orderStep = 0;
|
||||||
if(data.order.status==this.data.orderStatus.received){
|
if(data.status==this.data.orderStatus.received){
|
||||||
orderStep = 1;
|
orderStep = 1;
|
||||||
}else if(data.order.status==this.data.orderStatus.delivering){
|
}else if(data.status==this.data.orderStatus.delivering){
|
||||||
orderStep = 2;
|
orderStep = 2;
|
||||||
}else if(data.order.status==this.data.orderStatus.unpaid||data.order.status==this.data.orderStatus.completed){
|
}else if(data.status==this.data.orderStatus.unpaid||data.status==this.data.orderStatus.completed){
|
||||||
orderStep = 3;
|
orderStep = 3;
|
||||||
}
|
}
|
||||||
data.order.complete_time = this.formatTime(data.order.complete_time);
|
data.complete_time = this.formatTime(data.complete_time);
|
||||||
data.order.pickup_time = this.formatTime(data.order.pickup_time);
|
data.pickup_time = this.formatTime(data.pickup_time);
|
||||||
data.order.received_time = this.formatTime(data.order.received_time);
|
data.received_time = this.formatTime(data.received_time);
|
||||||
data.packages.map((item)=>{
|
data.packages.map((item)=>{
|
||||||
item.pickup_codes = item.pickup_codes.split(',')
|
item.pickup_codes = item.pickup_codes.split(',')
|
||||||
})
|
})
|
||||||
@ -63,7 +58,7 @@ Page({
|
|||||||
},
|
},
|
||||||
copyOrderId(){
|
copyOrderId(){
|
||||||
wx.setClipboardData({
|
wx.setClipboardData({
|
||||||
data: this.data.orderDetail.order.orderid,
|
data: this.data.orderDetail.orderid,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
formatTime(time){
|
formatTime(time){
|
||||||
@ -73,7 +68,7 @@ Page({
|
|||||||
const current = event.currentTarget.dataset.url;
|
const current = event.currentTarget.dataset.url;
|
||||||
wx.previewImage({
|
wx.previewImage({
|
||||||
current:current,
|
current:current,
|
||||||
urls: this.data.orderDetail.order.complete_images,
|
urls: this.data.orderDetail.complete_images,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<scroll-view refresher-triggered="{{refreshTrigger}}" bindrefresherrefresh="getOrderDetail"
|
<scroll-view refresher-triggered="{{refreshTrigger}}" bindrefresherrefresh="getOrderDetail"
|
||||||
refresher-enabled scroll-y style="height:{{scrollViewHeight*2}}rpx;">
|
refresher-enabled scroll-y class="order-detail">
|
||||||
<view class="page-container package-info">
|
<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">
|
||||||
@ -8,7 +8,7 @@
|
|||||||
<view class="key">{{item.pickup_codes.length}} 件包裹:</view>
|
<view class="key">{{item.pickup_codes.length}} 件包裹:</view>
|
||||||
<view class="value">
|
<view class="value">
|
||||||
<label wx:for="{{item.pickup_codes}}" wx:key="index" wx:for-item="code">
|
<label wx:for="{{item.pickup_codes}}" wx:key="index" wx:for-item="code">
|
||||||
{{orderDetail.order.status==orderStatus.created?'******':code}}
|
{{orderDetail.status==orderStatus.created?'******':code}}
|
||||||
</label>
|
</label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -16,13 +16,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="address">
|
<view class="address">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{orderDetail.order.community_name}}
|
{{orderDetail.community_name}}
|
||||||
{{orderDetail.order.building_name}}
|
{{orderDetail.building_name}}
|
||||||
{{orderDetail.order.address_detail}}
|
{{orderDetail.address_detail}}
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-title">
|
<view class="sub-title">
|
||||||
{{orderDetail.order.address_name}}
|
{{orderDetail.address_name}}
|
||||||
{{genderKV[orderDetail.order.address_gender]}}:{{orderDetail.order.address_phone}}丨{{deliverStatusKV[orderDetail.order.delivery_method]}}
|
{{genderKV[orderDetail.address_gender]}}:{{orderDetail.address_phone}}丨{{deliverStatusKV[orderDetail.delivery_method]}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -30,43 +30,43 @@
|
|||||||
<view class="item {{orderStep>0?'night':''}}">
|
<view class="item {{orderStep>0?'night':''}}">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="name">接单</view>
|
<view class="name">接单</view>
|
||||||
<view class="time">{{orderDetail.order.received_time}}</view>
|
<view class="time">{{orderDetail.received_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item {{orderStep>1?'night':(orderStep==1?'half-night':'')}}">
|
<view class="item {{orderStep>1?'night':''}}">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="name">取货</view>
|
<view class="name">取货</view>
|
||||||
<view class="time">{{orderDetail.order.pickup_time}}</view>
|
<view class="time">{{orderDetail.pickup_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item {{orderStep>2?'night':(orderStep==2?'half-night':'')}}">
|
<view class="item {{orderStep>2?'night':''}}">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="name">送达</view>
|
<view class="name">送达</view>
|
||||||
<view class="time">{{orderDetail.order.complete_time}}</view>
|
<view class="time">{{orderDetail.complete_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="page-container photos" wx:if="{{orderDetail.order.complete_images&&orderDetail.order.complete_images.length>0}}">
|
<view class="page-container photos" wx:if="{{orderDetail.complete_images&&orderDetail.complete_images.length>0}}">
|
||||||
<view class="title">拍照留证</view>
|
<view class="title">拍照留证</view>
|
||||||
<view class="imgs">
|
<view class="imgs">
|
||||||
<image class="image" src="{{item}}" wx:for="{{orderDetail.order.complete_images}}" wx:key="index" bind:tap="preview" data-url="{{item}}"/>
|
<image class="image" src="{{item}}" wx:for="{{orderDetail.complete_images}}" wx:key="index" bind:tap="preview" data-url="{{item}}"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="page-container income">
|
<view class="page-container income">
|
||||||
<label>订单收益:</label>
|
<label>订单收益:</label>
|
||||||
<label class="money">{{orderDetail.order.deliveryman_share}}</label>
|
<label class="money">{{orderDetail.deliveryman_share}}</label>
|
||||||
</view>
|
</view>
|
||||||
<view class="page-container order-info">
|
<view class="page-container order-info">
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="key">订单编号</view>
|
<view class="key">订单编号</view>
|
||||||
<view class="value">{{orderDetail.order.orderid}}</view>
|
<view class="value">{{orderDetail.orderid}}</view>
|
||||||
<view class="copy-area" bind:tap="copyOrderId">
|
<view class="copy-area" bind:tap="copyOrderId">
|
||||||
<view class="copy-btn">复制</view>
|
<view class="copy-btn">复制</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="key">下单时间</view>
|
<view class="key">下单时间</view>
|
||||||
<view class="value">{{orderDetail.order.create_time}}</view>
|
<view class="value">{{orderDetail.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
.order-detail{
|
||||||
|
height:100vh;
|
||||||
|
}
|
||||||
|
|
||||||
.package-info{
|
.package-info{
|
||||||
padding:56rpx 20rpx 40rpx 20rpx;
|
padding:56rpx 20rpx 40rpx 20rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@ -7,7 +7,8 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
cardList:[],
|
cardList:[],
|
||||||
listLoading:false
|
listLoading:false,
|
||||||
|
isShowConfirm:false
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,24 +21,21 @@ Page({
|
|||||||
url: '/pages/user/bank/editor/index',
|
url: '/pages/user/bank/editor/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deleteCard(event){
|
showConfirm(event){
|
||||||
const card = event.currentTarget.dataset.item;
|
const card = event.currentTarget.dataset.item;
|
||||||
const endNumber = card.card_number.substr(card.card_number.length-4,card.card_number.length);
|
this.currentCard = card;
|
||||||
wx.showModal({
|
this.setData({
|
||||||
title: '是否确认删除此银行卡',
|
isShowConfirm:true
|
||||||
content: `尾号(${endNumber})`,
|
});
|
||||||
complete: (res) => {
|
},
|
||||||
if (res.confirm) {
|
deleteCard(){
|
||||||
userApi.cardList.delete(card.id).then((data)=>{
|
userApi.cardList.delete(this.currentCard.id).then((data)=>{
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
icon:'success',
|
icon:'success',
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
})
|
})
|
||||||
this.getCardList();
|
this.getCardList();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {},
|
"usingComponents": {
|
||||||
|
"modal-view":"/components/modalView"
|
||||||
|
},
|
||||||
"navigationBarTitleText": "银行卡管理"
|
"navigationBarTitleText": "银行卡管理"
|
||||||
}
|
}
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<view class="head">
|
<view class="head">
|
||||||
<image class="icon-card" src="/assets/icon/card.png"/>
|
<image class="icon-card" src="/assets/icon/card.png"/>
|
||||||
<view class="name">{{item.bank_name}}</view>
|
<view class="name">{{item.bank_name}}</view>
|
||||||
<image class="icon-delete" src="/assets/icon/delete.png" bind:tap="deleteCard" data-item="{{item}}"/>
|
<image class="icon-delete" src="/assets/icon/delete.png" bind:tap="showConfirm" data-item="{{item}}"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
@ -24,4 +24,6 @@
|
|||||||
<view class="title">暂无银行卡</view>
|
<view class="title">暂无银行卡</view>
|
||||||
</view>
|
</view>
|
||||||
<button bind:tap="navToAdd" class="add-card-btn">添加银行卡</button>
|
<button bind:tap="navToAdd" class="add-card-btn">添加银行卡</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<modal-view show="{{isShowConfirm}}" titleText="是否确认删除此银行卡" bind:ok="deleteCard"/>
|
||||||
@ -16,10 +16,6 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const windowInfo = wx.getWindowInfo();
|
|
||||||
this.setData({
|
|
||||||
scrollViewHeight:windowInfo.windowHeight
|
|
||||||
})
|
|
||||||
this.loadList();
|
this.loadList();
|
||||||
},
|
},
|
||||||
refreshList(){
|
refreshList(){
|
||||||
@ -38,7 +34,10 @@ Page({
|
|||||||
"pager.loading":true
|
"pager.loading":true
|
||||||
})
|
})
|
||||||
|
|
||||||
userApi.incomeList().then((data)=>{
|
userApi.incomeList({
|
||||||
|
skip:this.data.pager.limit*this.data.pager.pageIndex,
|
||||||
|
limit:this.data.pager.limit
|
||||||
|
}).then((data)=>{
|
||||||
if(this.data.pager.pageIndex==0){
|
if(this.data.pager.pageIndex==0){
|
||||||
this.data.list = data.items;
|
this.data.list = data.items;
|
||||||
}else{
|
}else{
|
||||||
@ -61,14 +60,12 @@ Page({
|
|||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
onReady() {
|
onReady() {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,15 +1,12 @@
|
|||||||
<list-view bind:refresh="refreshList"
|
<list-view bind:refresh="refreshList" bind:loadMore="loadList"
|
||||||
bind:loadMore="loadList" height="{{scrollViewHeight}}"
|
refresher-triggered="{{pager.refreshTrigger}}" class="income-list"
|
||||||
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 class="income-list">
|
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||||
<view class="item" wx:for="{{list}}">
|
<view class="content">
|
||||||
<view class="content">
|
<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 class="money">{{item.amount}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="money">{{item.amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
</list-view>
|
</list-view>
|
||||||
@ -1,8 +1,11 @@
|
|||||||
.income-list{
|
.income-list{
|
||||||
background-color: #ffffff;
|
height:100vh;
|
||||||
margin-top:20rpx;
|
}
|
||||||
|
.income-list .scroll-view-content{
|
||||||
|
padding-top:20rpx;
|
||||||
}
|
}
|
||||||
.income-list .item{
|
.income-list .item{
|
||||||
|
background-color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding:40rpx 30rpx;
|
padding:40rpx 30rpx;
|
||||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
||||||
|
|||||||
@ -117,6 +117,11 @@ Page({
|
|||||||
url: '/pages/user/bank/editor/index',
|
url: '/pages/user/bank/editor/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
bankChange(event){
|
||||||
|
this.setData({
|
||||||
|
bank:event.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<view class="page-container banks">
|
<view class="page-container banks">
|
||||||
<view class="head">提现方式</view>
|
<view class="head">提现方式</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<radio-group class="bank-list" model:value="{{bank}}">
|
<radio-group bindchange="bankChange" class="bank-list">
|
||||||
<label class="item" wx:for="{{bankList}}" wx:key="index">
|
<label class="item" wx:for="{{bankList}}" wx:key="index">
|
||||||
<image class="icon" src="/assets/icon/card.png"/>
|
<image class="icon" src="/assets/icon/card.png"/>
|
||||||
<view class="name">{{item.bank_name}}({{item.endNumber}})</view>
|
<view class="name">{{item.bank_name}}({{item.endNumber}})</view>
|
||||||
|
|||||||
@ -7,20 +7,15 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
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:[],
|
||||||
|
statusKV:userApi.withdraw.statusKV
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const windowInfo = wx.getWindowInfo();
|
|
||||||
console.log(windowInfo);
|
|
||||||
this.setData({
|
|
||||||
scrollViewHeight:windowInfo.windowHeight - windowInfo.statusBarHeight - 44
|
|
||||||
})
|
|
||||||
this.loadList();
|
this.loadList();
|
||||||
},
|
},
|
||||||
refreshList(){
|
refreshList(){
|
||||||
@ -39,14 +34,14 @@ Page({
|
|||||||
"pager.loading":true
|
"pager.loading":true
|
||||||
})
|
})
|
||||||
|
|
||||||
userApi.withdraw.list().then((data)=>{
|
userApi.withdraw.list({
|
||||||
this.data.pager.loadAll = true;
|
skip:this.data.pager.pageIndex*this.data.pager.limit,
|
||||||
this.data.pager.loading = false;
|
limit:this.data.pager.limit
|
||||||
this.setData({
|
}).then((data)=>{
|
||||||
list:data,
|
data.items.map((item)=>{
|
||||||
pager:this.data.pager
|
item.displayName = `${item.bank_name}(${item.bank_card_number.substr(item.bank_card_number.length-4,4)})`;
|
||||||
});
|
})
|
||||||
return;
|
|
||||||
if(this.data.pager.pageIndex==0){
|
if(this.data.pager.pageIndex==0){
|
||||||
this.data.list = data.items;
|
this.data.list = data.items;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -1,18 +1,16 @@
|
|||||||
<list-view bind:refresh="refreshList"
|
<list-view bind:refresh="refreshList"
|
||||||
bind:loadMore="loadList" height="{{scrollViewHeight}}"
|
bind:loadMore="loadList" class="withdraw-list"
|
||||||
refresher-triggered="{{pager.refreshTrigger}}"
|
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 class="withdraw-list">
|
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||||
<view class="item" wx:for="{{list}}" wx:key="index">
|
<view class="title">
|
||||||
<view class="title">
|
<view class="left">{{item.displayName}}</view>
|
||||||
<view class="left">{{item.description||"招商银行"}}</view>
|
<view class="right money">{{item.amount}}</view>
|
||||||
<view class="right money">{{item.amount}}</view>
|
</view>
|
||||||
</view>
|
<view class="sub-title">
|
||||||
<view class="sub-title">
|
<view class="left">{{item.create_time}}</view>
|
||||||
<view class="left">{{item.create_time}}</view>
|
<view class="status {{item.status}}">{{statusKV[item.status]}}</view>
|
||||||
<view class="status {{item.status}}">平台受理成功</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</list-view>
|
</list-view>
|
||||||
@ -1,9 +1,12 @@
|
|||||||
.withdraw-list{
|
.withdraw-list{
|
||||||
background-color: #ffffff;
|
height:100vh;
|
||||||
margin-top:20rpx;
|
}
|
||||||
|
.withdraw-list .scroll-view-content{
|
||||||
|
padding-top:20rpx;
|
||||||
}
|
}
|
||||||
.withdraw-list .item{
|
.withdraw-list .item{
|
||||||
padding:40rpx 30rpx;
|
padding:40rpx 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
border-bottom: 1rpx solid rgba(153, 153, 153, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,4 +32,7 @@
|
|||||||
}
|
}
|
||||||
.withdraw-list .item .status.PENDING{
|
.withdraw-list .item .status.PENDING{
|
||||||
color:var(--main-color);
|
color:var(--main-color);
|
||||||
|
}
|
||||||
|
.withdraw-list .item .status.APPROVED{
|
||||||
|
color: #00A643;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user