tmp: 部分代码与UnishopV5结合,但是代码有严重缺陷
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<mescroll-uni @getData="getData" class="member-point">
|
||||
<mescroll-uni @getData="getData" ref="mescroll" class="member-point">
|
||||
<view slot="list">
|
||||
<block v-if="dataList.length">
|
||||
<view class="detailed-wrap">
|
||||
@@ -15,8 +15,29 @@
|
||||
</view>
|
||||
<view class="right-wrap">
|
||||
<view class="num color-base-text">¥{{ item.apply_money }}</view>
|
||||
<view class="status-name">{{ item.status_name }}</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="actions" v-if="$util.isWeiXin() && isWithdrawWechat && item.transfer_type == 'wechatpay' && item.status == 1" @click.stop="toTransfer(item.id)">
|
||||
<view class="act-btn">收款</view>
|
||||
</view>
|
||||
<view class="status-name" v-else :style="item.status == -1 || item.status == -2 ? 'color:red;' : ''">{{ item.status_name }}</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="actions" v-if="isWithdrawWechat && item.transfer_type == 'wechatpay' && item.status == 1" @click.stop="toTransfer(item.id)">
|
||||
<view class="act-btn">收款</view>
|
||||
</view>
|
||||
<view class="status-name" v-else :style="item.status == -1 || item.status == -2 ? 'color:red;' : ''">{{ item.status_name }}</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view v-if="item.status == -1" class="fail-reason">
|
||||
拒绝原因:{{ item.refuse_reason }}
|
||||
</view>
|
||||
<view v-if="item.status == -2" class="fail-reason">
|
||||
失败原因:{{ item.fail_reason }}
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -34,21 +55,36 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: []
|
||||
dataList: [],
|
||||
isWithdrawWechat: 0
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login',
|
||||
{
|
||||
back: '/pages_tool/member/point'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_tool/member/point'
|
||||
}, 'redirectTo');
|
||||
}
|
||||
if(this.$refs.mescroll) this.$refs.mescroll.refresh();
|
||||
this.getWithdrawConfig()
|
||||
},
|
||||
methods: {
|
||||
toTransfer(id) {
|
||||
this.$util.redirectTo('/pages_tool/member/withdrawal_detail', {
|
||||
id: id,
|
||||
action: 'transfer'
|
||||
});
|
||||
},
|
||||
getWithdrawConfig() {
|
||||
this.$api.sendRequest({
|
||||
url: '/wechatpay/api/transfer/getWithdrawConfig',
|
||||
success: res => {
|
||||
if (res.code == 0){
|
||||
this.isWithdrawWechat = res.data.transfer_type;
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
//获得列表数据
|
||||
getData(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
@@ -165,6 +201,22 @@ export default {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
}
|
||||
.fail-reason{
|
||||
font-size: $font-size-base;
|
||||
color:$color-tip;
|
||||
}
|
||||
.actions{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
.act-btn{
|
||||
color: #fff;
|
||||
background-color: $base-color;
|
||||
font-size: $font-size-base;
|
||||
line-height: 1;
|
||||
padding: 10rpx $padding;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user