修改:分销佣金提现修改 - 银行卡分为个人账户和企业账户

This commit is contained in:
wuhui_zzw 2024-03-29 17:17:19 +08:00
parent a32e8ff742
commit dfb23a432a
15 changed files with 556 additions and 391 deletions

View File

@ -101,7 +101,13 @@
url: `/pages/annex/web_view/index?url=${url}`
});
} else {
if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index', '/pages/index/index', '/pages/plant_grass/index'].indexOf(url) == -1) {
if ([
'/pages/goods_cate/goods_cate',
'/pages/order_addcart/order_addcart',
'/pages/user/index',
'/pages/index/index',
// '/pages/plant_grass/index'
].indexOf(url) == -1) {
uni.navigateTo({
url: url
})
@ -189,4 +195,4 @@
height: 100%;
}
}
</style>
</style>

View File

@ -30,13 +30,13 @@
"navigationBarTitleText": "购物车"
}
},
{
"path": "pages/plant_grass/index",
"style": {
// "navigationStyle": "custom",
"navigationBarTitleText": "种草社区"
}
},
// {
// "path": "pages/plant_grass/index",
// "style": {
// // "navigationStyle": "custom",
// "navigationBarTitleText": "种草社区"
// }
// },
{
"path": "pages/user/index",
"style": {
@ -910,12 +910,12 @@
"navigationBarTitleText": "内容发布"
}
},
{
"path": "plant_show/index",
"style": {
"navigationBarTitleText": "种草秀"
}
},
// {
// "path": "plant_show/index",
// "style": {
// "navigationBarTitleText": "种草秀"
// }
// },
{
"path": "plant_topic/index",
"style": {
@ -1052,13 +1052,13 @@
"navigationStyle": "custom"
}
},
{
"path": "liveBroadcast/index",
"style": {
"navigationBarTitleText": "直播列表",
"navigationBarBackgroundColor": "#F2F2F2"
}
},
// {
// "path": "liveBroadcast/index",
// "style": {
// "navigationBarTitleText": "直播列表",
// "navigationBarBackgroundColor": "#F2F2F2"
// }
// },
{
"path": "presell/index",
"style": {
@ -1492,12 +1492,12 @@
"selectedIconPath": "static/images/2-002.png",
"text": "分类"
},
{
"pagePath": "pages/plant_grass/index",
"iconPath": "static/images/5-001.png",
"selectedIconPath": "static/images/5-002.png",
"text": "逛逛"
},
// {
// "pagePath": "pages/plant_grass/index",
// "iconPath": "static/images/5-001.png",
// "selectedIconPath": "static/images/5-002.png",
// "text": "逛逛"
// },
{
"pagePath": "pages/order_addcart/order_addcart",
"iconPath": "static/images/3-001.png",

View File

@ -688,8 +688,11 @@
},
//
linkPage(url) {
if (['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/user/index', '/pages/plant_grass/index'
if ([
'/pages/index/index',
'/pages/order_addcart/order_addcart',
'/pages/user/index',
// '/pages/plant_grass/index'
].indexOf(url) > -1) {
uni.switchTab({
url

View File

@ -594,7 +594,8 @@
//
linkPage(url) {
if (['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/user/index', '/pages/plant_grass/index'
'/pages/user/index',
// '/pages/plant_grass/index'
].indexOf(url) > -1) {
uni.switchTab({
url

View File

@ -667,7 +667,8 @@
//
linkPage(url) {
if (['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/user/index', '/pages/plant_grass/index'
'/pages/user/index',
// '/pages/plant_grass/index'
].indexOf(url) > -1) {
uni.switchTab({
url

View File

@ -275,7 +275,9 @@
location.href = url
// #endif
}else{
if(['/pages/goods_cate/goods_cate','/pages/order_addcart/order_addcart','/pages/user/index','/pages/plant_grass/index'].indexOf(url) == -1){
if(['/pages/goods_cate/goods_cate','/pages/order_addcart/order_addcart','/pages/user/index',
// '/pages/plant_grass/index'
].indexOf(url) == -1){
uni.navigateTo({
url:url
})

View File

@ -221,10 +221,12 @@
location.href = url
// #endif
}else{
if(['/pages/goods_cate/goods_cate','/pages/order_addcart/order_addcart','/pages/user/index','/pages/plant_grass/index'].indexOf(url) == -1){
if(['/pages/goods_cate/goods_cate','/pages/order_addcart/order_addcart','/pages/user/index',
// '/pages/plant_grass/index'
].indexOf(url) == -1){
uni.navigateTo({
url:url
})
})
}else{
uni.switchTab({
url:url
@ -292,7 +294,7 @@
this.loading = false;
this.page += 1;
}).catch(err => {
});
},
checkType(svip,index) {
@ -399,7 +401,7 @@
that.payClose();
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig,
})
})
return;
break;
// #ifndef MP
@ -491,7 +493,7 @@
},
fail: function(e) {
uni.hideLoading();
that.payClose();
that.payClose();
return that.$util.Tips({
title: '取消支付'
});
@ -648,7 +650,7 @@
margin-top: -60rpx;
.section-hd {
padding-top: 34rpx;
padding-bottom: 34rpx;
padding-bottom: 34rpx;
.title {
width: 543rpx;
font-size: 28rpx;

View File

@ -781,7 +781,8 @@
//
linkPage(url) {
if (['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/user/index', '/pages/plant_grass/index'
'/pages/user/index',
// '/pages/plant_grass/index'
].indexOf(url) > -1) {
uni.switchTab({
url

View File

@ -4,17 +4,17 @@
<block v-if="community_status">
<view class="spike-bd plant_bg" :style="{ 'background-image': `url(${domain}/static/images/plant_bg.png)`}">
<view class="title line1"><image class="title-img" :src="`${domain}/static/images/plant_title.png`"></image></view>
<navigator v-if="!merId" :open-type="open_grass ? 'switchTab' : 'navigate'" url="/pages/plant_grass/index" class="more-btn" hover-class="none">
好物分享
<text class="iconfont icon-jiantou" hover-class="none"></text>
</navigator>
<!--<navigator v-if="!merId" :open-type="open_grass ? 'switchTab' : 'navigate'" url="/pages/plant_grass/index" class="more-btn" hover-class="none">-->
<!-- 好物分享-->
<!-- <text class="iconfont icon-jiantou" hover-class="none"></text>-->
<!--</navigator>-->
</view>
<view class="live-wrapper plant" style="border-radius: 0;">
<scroll-view :class="'colum'+styleType" :scroll-x="styleType == 0 ? true : false" >
<view
v-for="(item, index) in plantList"
:key="index"
class="item"
<view
v-for="(item, index) in plantList"
:key="index"
class="item"
:class="'plant-item'+styleType"
:style="'border-radius:'+conStyle+'rpx'"
@click="goDetail(item)"
@ -43,8 +43,8 @@
<script>
import { HTTP_REQUEST_URL } from '@/config/app';
import { HTTP_REQUEST_URL } from '@/config/app';
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import { graphicLstData } from '@/api/api.js';
import { openPlantGrass } from "@/config/app.js";

View File

@ -158,7 +158,7 @@
<view class="count">
<image src="../static/images/no_content.png"></image>
<text>内容不存在可能被删除了哦~</text>
<navigator class="btn" :open-type="open_grass ? 'switchTab' : 'navigate'" url="/pages/plant_grass/index">返回首页</navigator>
<!--<navigator class="btn" :open-type="open_grass ? 'switchTab' : 'navigate'" url="/pages/plant_grass/index">返回首页</navigator>-->
</view>
</view>
<!-- 他提到的宝贝弹窗 -->
@ -298,7 +298,7 @@
scene: scene,
type: 0,
href: `${HTTP_REQUEST_URL}${curRoute}`,
title: data.title || '',
summary: data.content || '',
imageUrl: data.image[0] || '',
@ -307,10 +307,10 @@
title: '分享成功',
icon: 'success'
})
uni.hideLoading();
uni.hideLoading();
},
fail: function(err) {
uni.hideLoading();
uni.hideLoading();
uni.showToast({
title: '分享失败',
icon: 'none',

View File

@ -43,7 +43,7 @@
<view class="longItem" :data-index="index" :class="index===tabClick?'click':''"
v-for="(item,index) in tabTitle" :key="index" :id="'id'+index" @click="longClick(index,item)">{{item.title}}
</view>
</scroll-view>
</scroll-view>
</view>
</view>
</view>
@ -68,11 +68,11 @@
<view v-else-if="!loading" class="no-goods">
<image :src="`${domain}/static/images/noCart.png`"></image>
<view class="fontimg">暂无商品去看点别的吧</view>
</view>
</view>
<view v-if="loading" class='loadingicon acea-row row-center-wrapper'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
<!-- #ifdef MP -->
<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
@ -124,7 +124,7 @@
if(options.spread) spread(options.spread, this.isLogin)
},
watch: {
},
onShow(){
@ -222,7 +222,9 @@
location.href = url
// #endif
} else {
if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index', '/pages/index/index','/pages/plant_grass/index']
if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index', '/pages/index/index',
// '/pages/plant_grass/index'
]
.indexOf(url) == -1) {
uni.navigateTo({
url: url +'?delta=0'
@ -358,7 +360,7 @@
.body-title {
.navTabBox {
color: #282828;
position: relative;
position: relative;
.longTab {
display: flex;
.longItem {
@ -384,7 +386,7 @@
font-weight: bold;
color: var(--view-theme);
}
}
}
}
}
}
@ -428,7 +430,7 @@
top: 5rpx;
left: 5rpx;
}
}
}
image {

View File

@ -603,7 +603,9 @@
location.href = url
// #endif
}else{
if(['/pages/goods_cate/goods_cate','/pages/order_addcart/order_addcart','/pages/user/index','/pages/plant_grass/index'].indexOf(url) == -1){
if(['/pages/goods_cate/goods_cate','/pages/order_addcart/order_addcart','/pages/user/index',
// '/pages/plant_grass/index'
].indexOf(url) == -1){
uni.navigateTo({
url:url
})

View File

@ -66,7 +66,7 @@
<div class="tip">
没有账号?
<span @click="formItem = 2" class="font-color-red">立即注册</span>
</div>
</div>
<!-- #ifdef MP -->
<view v-if="wechat_phone_switch == 1" class="appLogin">
<view class="hds">
@ -136,11 +136,11 @@
<div class="protocol acea-row row-between-wrapper">
<checkbox-group class="checkgroup" @change='isAgree=!isAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />
<text class="protocol_text">我已同意<text @click="userAgree" class="font_pro">用户协议</text><text @click="userPrivacyAgree" class="font_pro">隐私政策</text></text>
<text class="protocol_text">我已同意<text @click="userAgree" class="font_pro">用户协议</text><text @click="userPrivacyAgree" class="font_pro">隐私政策</text></text>
</checkbox-group>
</div>
<div class="logon" @click="register">注册</div>
<div class="tip">
<div class="tip">
已有账号?
<span @click="formItem = 1" class="font-color-red">立即登录</span>
</div>
@ -160,7 +160,7 @@
</view>
</view>
</view>
<!-- #endif -->
<!-- #endif -->
</div>
<div class="bottom"></div>
<view class="settlementAgreement" v-if="showAgreement">
@ -169,7 +169,7 @@
<div class="title">用户协议与隐私政策</div>
<view class="content">
<jyf-parser :html="agreement" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
</view>
</view>
</div>
@ -191,7 +191,7 @@
<view class="protocol acea-row row-between-wrapper">
<checkbox-group class="checkgroup" @change='isAgree=!isAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />
<text class="protocol_text">我已同意<text @click="userAgree" class="font_pro">用户协议</text><text @click="userPrivacyAgree" class="font_pro">隐私政策</text></text>
<text class="protocol_text">我已同意<text @click="userAgree" class="font_pro">用户协议</text><text @click="userPrivacyAgree" class="font_pro">隐私政策</text></text>
</checkbox-group>
</view>
</view>
@ -293,7 +293,7 @@
let copy = this.copyright.status == -1 ? this.copyright.year+" "+this.copyright.url : this.copyright.Copyright
return copy;
}
},
},
watch: {
formItem: function(nval, oVal) {
if (nval == 1) {
@ -315,7 +315,7 @@
},
mounted: function() {
this.getVersion();
},
onReady(){
let that = this
@ -333,7 +333,7 @@
},
methods: {
// #ifdef MP
getPhoneNumber(e) {
getPhoneNumber(e) {
let that = this;
if(!that.isAgree){
return that.$util.Tips({
@ -356,10 +356,11 @@
});
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', '/pages/goods_cate/goods_cate',
'/pages/user/index','/pages/plant_grass/index'
'/pages/user/index',
// '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
@ -382,7 +383,7 @@
});
});
}
},
// #endif
goCopyUrl() {
@ -479,10 +480,11 @@
});
that.$store.commit("SETUID", data.result.user.uid);
that.$store.commit('UPDATE_USERINFO', data.result.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', '/pages/goods_cate/goods_cate',
'/pages/user/index','/pages/plant_grass/index'
'/pages/user/index',
// '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
@ -568,7 +570,8 @@
that.$store.commit('UPDATE_USERINFO', data.result.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart', '/pages/goods_cate/goods_cate',
'/pages/user/index','/pages/plant_grass/index'
'/pages/user/index',
// '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
@ -634,7 +637,7 @@
if (!that.isAgree) return that.$util.Tips({
title: '请勾选用户协议与隐私政策'
});
loginMobile({
auth_token: uni.getStorageSync('auth_token'),
phone: that.account,
@ -728,10 +731,10 @@
'time': res.data.exp
});
that.$store.commit("SETUID", res.data.user.uid);
that.$store.commit('UPDATE_USERINFO', res.data.user);
that.$store.commit('UPDATE_USERINFO', res.data.user);
uni.switchTab({
url: '/pages/user/index'
})
})
})
.catch(res => {
that.$util.Tips({
@ -836,7 +839,7 @@
}
uni[method]({
url: backUrl
});
});
})
.catch(e => {
that.$util.Tips({
@ -882,31 +885,31 @@
text-align: center;
margin-top: 55rpx;
}
.ChangePassword .list {
width: 580rpx;
margin: 53rpx auto 0 auto;
}
.ChangePassword .list .item {
width: 100%;
height: 110rpx;
border-bottom: 2rpx solid #f0f0f0;
}
.ChangePassword .list .item input {
width: 100%;
height: 100%;
font-size: 32rpx;
}
.ChangePassword .list .item .placeholder {
color: #b9b9bc;
}
.ChangePassword .list .item input.codeIput {
width: 240rpx;
}
/deep/.uni-input-wrapper,/deep/.uni-input-input{
// width: 240rpx;
@ -916,11 +919,11 @@
background-color: #fff;
color: var(--view-theme);
}
.ChangePassword .list .item .code.on {
color: #b9b9bc;
}
.ChangePassword .confirmBnt {
font-size: 32rpx;
width: 580rpx;
@ -932,14 +935,14 @@
line-height: 90rpx;
background-color: var(--view-theme);
}
.ChangePassword .confirmBnt.back{
background-color: #FFFFFF;
border: 1px solid var(--view-theme);
color: var(--view-theme);
margin-top: 30rpx;
}
.getPhoneBtn{
font-size: 32rpx;
width: 580rpx;
@ -995,12 +998,12 @@
.content {
height: 900rpx;
overflow-y: scroll;
/deep/ p {
font-size: 13px;
line-height: 22px;
}
/deep/ img {
max-width: 100%;
}
@ -1012,7 +1015,7 @@
position: absolute;
top: 15rpx;
right: 15rpx;
}
.settlementAgreement .setAgCount .title {
color: #333;
@ -1044,22 +1047,22 @@
justify-content: center;
align-items: center;
font-size: 24rpx;
color: #B4B4B4;
color: #B4B4B4;
.line {
width: 68rpx;
height: 1rpx;
background: #CCCCCC;
}
}
p {
margin: 0 20rpx;
}
}
}
.btn-wrapper {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30rpx;
.btn {
display: flex;
align-items: center;
@ -1067,12 +1070,12 @@
width: 68rpx;
height: 68rpx;
border-radius: 50%;
+ .btn {
margin-left: 30rpx;
}
}
.apple-btn {
display: flex;
align-items: center;
@ -1083,19 +1086,19 @@
background: #EAEAEA;
border-radius: 34rpx;
font-size: 24rpx;
.icon-s-pingguo {
color: #333;
margin-right: 10rpx;
font-size: 34rpx;
}
}
.iconfont {
font-size: 40rpx;
color: #fff;
}
.wx {
// margin-right: 30rpx;
background-color: #61C64F;
@ -1104,33 +1107,33 @@
background-color: #333;
}
}
.mima {
background-color: #28B3E9;
}
.yanzheng {
background-color: #F89C23;
}
}
}
.code img {
width: 100%;
height: 100%;
}
.acea-row.row-middle {
input {
margin-left: 20rpx;
display: block;
}
}
.login-wrapper {
padding: 30rpx;
.shading {
display: flex;
align-items: center;
@ -1140,38 +1143,38 @@
margin-top: 50rpx;
/* #endif */
/* #ifndef APP-VUE */
margin-top: 200rpx;
/* #endif */
image {
width: 180rpx;
height: 180rpx;
}
}
.whiteBg {
margin-top: 100rpx;
.list {
border-radius: 16rpx;
overflow: hidden;
.item {
border-bottom: 1px solid #F0F0F0;
background: #fff;
.row-middle {
position: relative;
padding: 16rpx 45rpx;
input {
flex: 1;
font-size: 28rpx;
height: 80rpx;
}
.code {
color: #E93323;
font-size: 26rpx;
@ -1180,7 +1183,7 @@
}
}
}
.logon {
display: flex;
align-items: center;
@ -1193,7 +1196,7 @@
color: #FFFFFF;
font-size: 30rpx;
}
.tips {
margin: 30rpx;
text-align: center;
@ -1210,7 +1213,7 @@
font-size: 20rpx;
line-height: 28rpx;
color: #FFFFFF;
.cell {
// margin-left: 6rpx;
font-size: 20rpx;

View File

@ -18,7 +18,7 @@
</view>
</view>
<view class='wrapper'>
<view :hidden='currentTab != 0' class='list'>
<!--<view :hidden='currentTab != 0' class='list'>
<form @submit="subCash" report-submit='true'>
<view class='item acea-row row-between-wrapper'>
<view class='name'>持卡人</view>
@ -52,6 +52,83 @@
<view class='tip'>
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
</view>
<view class="btn-submit">
<button formType="submit" :disabled="load" class='bnt b-color' :class="load ? 'disabled' : ''" >提现</button>
</view>
</form>
</view>-->
<view :hidden='currentTab != 0' class='list bank-list'>
<!--选项卡-->
<view class="bank-tabs">
<view :class="['bank-tab',{'bank-tab-active': bank_type == 0}]" @click="changeTab(0)">个人账户</view>
<view :class="['bank-tab',{'bank-tab-active': bank_type == 1}]" @click="changeTab(1)">企业账户</view>
</view>
<!--表单-->
<form @submit="subCash" report-submit='true'>
<template v-if="bank_type == 0">
<view class='item acea-row row-between-wrapper'>
<view class='name'>持卡人</view>
<view class='input'><input placeholder='请输入持卡人姓名' placeholder-class='placeholder' name="real_name" v-model="real_name"></input></view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>卡号</view>
<view class='input'><input type='number' placeholder='请填写卡号' placeholder-class='placeholder' name="bank_code" v-model="bank_code"></input></view>
</view>
<view class='item acea-row row-between-wrapper' v-if="array.length>0">
<view class='name'>银行</view>
<view class='input'>
<picker @change="bindPickerChange" :value="index" :range="array" range-key="name">
<text class='Bank'>{{array[index]["name"]}}</text>
<text class='iconfont icon-qiepian38'></text>
</picker>
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>支行信息</view>
<view class='input'><input placeholder='请输入支行信息' placeholder-class='placeholder' name="bank_address" v-model="bank_address"></input></view>
</view>
</template>
<template v-if="bank_type == 1">
<view class='item acea-row row-between-wrapper'>
<view class='name'>开户名称</view>
<view class='input'>
<input placeholder='请输入开户名称' placeholder-class='placeholder' name="real_name" v-model="real_name" />
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>开户行</view>
<view class='input'>
<input placeholder='请输入开户行信息' placeholder-class='placeholder' name="bank_address" v-model="bank_address" />
</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'>账号</view>
<view class='input'>
<input type='number' placeholder='请填账号' placeholder-class='placeholder' name="bank_code" v-model="bank_code" />
</view>
</view>
</template>
<!--公共内容-->
<view class='item acea-row row-between-wrapper'>
<view class='name'>提现</view>
<view class='input'>
<input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="extract_price" type='digit' v-model="extract_price" />
</view>
</view>
<view class='tip mt25'>
当前可提现金额: <text class="price">{{userInfo.brokerage_price}},</text>冻结佣金{{userInfo.lock_brokerage}}
</view>
<view class='tip'>
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
</view>
<view class='tip mt25' v-if="Number(withdraw_commission) > 0">
提现手续费为: <text class="price">{{ withdraw_commission.toFixed(2) }}%</text>
</view>
<view class='tip mt25' v-if="Number(extract_price) > 0">
实际到账<text class="price">{{ (extract_price - (extract_price * withdraw_commission / 100)).toFixed(2) }}</text>
手续费: <text class="price">{{ (extract_price * withdraw_commission / 100).toFixed(2) }}</text>
</view>
<view class="btn-submit">
<button formType="submit" :disabled="load" class='bnt b-color' :class="load ? 'disabled' : ''" >提现</button>
</view>
@ -97,11 +174,17 @@
<view class='input'><input placeholder-class='placeholder1' name="extract_price"
type='digit' :placeholder="placeholderValue" @focus="placeholderValue = ''" v-model="extract_price"></input>
</view>
<view class='tip mt25' v-if="Number(withdraw_commission) > 0">
提现手续费为: <text class="price">{{ withdraw_commission.toFixed(2) }}%</text>
</view>
<view class='tip mt25' v-if="Number(extract_price) > 0">
实际到账<text class="price">{{ (extract_price - (extract_price * withdraw_commission / 100)).toFixed(2) }}</text>
手续费: <text class="price">{{ (extract_price * withdraw_commission / 100).toFixed(2) }}</text>
</view>
<view class="btn-submit">
<button formType="submit" :disabled="load" class='bnt b-color' :class="load ? 'disabled' : ''" >提现</button>
</view>
</view>
</form>
</view>
<view :hidden='currentTab != 2' class='list'>
@ -134,6 +217,13 @@
<view class='tip' v-if="userInfo.broken_day>0">
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}到期后可提现
</view>
<view class='tip mt25' v-if="Number(withdraw_commission) > 0">
提现手续费为: <text class="price">{{ withdraw_commission.toFixed(2) }}%</text>
</view>
<view class='tip mt25' v-if="Number(extract_price) > 0">
实际到账<text class="price">{{ (extract_price - (extract_price * withdraw_commission / 100)).toFixed(2) }}</text>
手续费: <text class="price">{{ (extract_price * withdraw_commission / 100).toFixed(2) }}</text>
</view>
<view class="btn-submit">
<button formType="submit" :disabled="load" class='bnt b-color' :class="load ? 'disabled' : ''" >提现</button>
</view>
@ -148,13 +238,7 @@
<script>
import {
extractCash,
extractBank,
getUserInfo,
spreadInfo,
getBankInfo
} from '@/api/user.js';
import {extractCash, extractBank, spreadInfo, getBankInfo} from '@/api/user.js';
import { mapGetters } from "vuex";
import authorize from '@/components/Authorize';
import cash from '@/components/cash';
@ -208,7 +292,12 @@
real_name: '',
bank_address: '',
bank_code: '',
pay_type: []
pay_type: [],
withdraw_commission: 0,//
//
bank_type: 0,
historyBankInfo: {},
};
},
computed: {
@ -223,7 +312,7 @@
immediate: true
}
},
onLoad() {
onLoad(options) {
if (this.isLogin) {
this.getUserInfo();
this.getUserExtractBank();
@ -264,13 +353,8 @@
getBankInfo(){
let that = this;
getBankInfo().then(res => {
let info = res.data;
console.log(info)
that.real_name = info.real_name;
that.bank_name = info.bank_name;
that.bank_code = info.bank_code;
that.bank_address = info.bank_address;
that.historyBankInfo = res.data || {};
that.historyBankChange();
});
},
getUserExtractBank: function() {
@ -287,6 +371,7 @@
let that = this;
spreadInfo().then(res => {
that.userInfo = res.data;
that.withdraw_commission = res.data.withdraw_commission || 0;
that.minPrice = res.data.user_extract_min;
});
},
@ -344,6 +429,7 @@
// });
value.extract_type = 'bank';
value.bank_name = (that.array && that.array.length) ? that.array[that.index].name : '';
value.bank_type = that.bank_type || 0;
} else if (that.currentTab == 1) { //
value.extract_type = 'weixin';
if(!this.sys_extension_type){
@ -375,7 +461,10 @@
console.log(value, 'value')
that.load = true;
if(that.sys_extension_type && that.currentTab == 1)
value = {extract_price: e.detail.value.extract_price, extract_type: 3}
value = {
extract_price: e.detail.value.extract_price,
extract_type: 3
}
extractCash(value).then(res => {
that.getUserInfo();
that.load = false;
@ -421,6 +510,22 @@
(action && this[action]) && this[action](value);
this.currentTab = opt.type
},
//
changeTab(tabIndex){
this.bank_type = tabIndex || 0;
this.historyBankChange();
},
//
historyBankChange(){
let info = this.historyBankInfo[this.bank_type] || {};
this.real_name = info.real_name || '';
this.bank_name = info.bank_name || '';
this.bank_code = info.bank_code || '';
this.bank_address = info.bank_address || '';
}
},
// #ifdef MP
//
@ -452,225 +557,260 @@
</script>
<style lang="scss" scoped>
page {
background-color: #F5F5F5 !important;
}
.mt25{
margin-top: 25rpx;
}
.cash-withdrawal .nav {
height: 130rpx;
padding: 0 30rpx;
font-size: 30rpx;
margin-bottom: 20rpx;
background-color: #fff;
}
.b-color{background-color: var(--view-theme);}
.cash-withdrawal .nav .input {
width: 505rpx;
.more-content{
display: flex;
align-items: center;
.more-content-left{
width: 90%;
.type-icon{
display: inline-block;
width: 56rpx;
height: 56rpx;
text-align: center;
line-height: 56rpx;
background-color: #FE960F;
margin-right: 20rpx;
border-radius: 50%;
.bankicon{
font-size: 36rpx;
color: #FFFFFF;
}
}
}
.moreicon{
width: 10%;
text-align: right;
}
}
}
.cash-withdrawal .nav .item {
font-size: 26rpx;
flex: 1;
text-align: center;
}
.cash-withdrawal .nav .item~.item {
border-left: 1px solid #f0f0f0;
}
.cash-withdrawal .nav .item .iconfont {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 2rpx solid #e93323;
text-align: center;
line-height: 37rpx;
margin: 0 auto 6rpx auto;
font-size: 22rpx;
box-sizing: border-box;
}
.cash-withdrawal .nav .item .iconfont.on {
background-color: #e93323;
color: #fff;
border-color: #e93323;
}
.cash-withdrawal .nav .item .line {
width: 2rpx;
height: 20rpx;
margin: 0 auto;
transition: height 0.3s;
}
.cash-withdrawal .nav .item .line.on {
height: 39rpx;
}
.cash-withdrawal .wrapper .list {
padding: 0 30rpx;
background-color: #fff;
}
.cash-withdrawal .wrapper .list .item {
border-bottom: 1px solid #eee;
height: 107rpx;
font-size: 30rpx;
color: #333;
&.uploadItem {
border-bottom: none;
height: auto;
.name {
height: 107rpx;
;
}
}
}
.picture {
width: 70px;
height: 70px;
margin: 0 0 17px 0;
position: relative;
font-size: 11px;
color: #bbb;
border: 0.5px solid #ddd;
box-sizing: border-box;
margin-top: 40rpx;
uni-image,image {
width: 100%;
height: 100%;
border-radius: 1px;
}
.icon-guanbi1 {
font-size: 22px;
position: absolute;
top: -10px;
right: -10px;
color: #fc4141;
}
}
.cash-withdrawal .wrapper .list .item .name {
width: 130rpx;
}
.cash-withdrawal .wrapper .list .item .input {
width: 505rpx;
}
.cash-withdrawal .wrapper .list .item .input .placeholder {
color: #bbb;
}
.cash-withdrawal .placeholder1 {
font-size: 46rpx;
}
.cash-withdrawal .wrapper .list .tip {
font-size: 26rpx;
color: #999;
margin-bottom: 25rpx;
}
.cash-withdrawal .wrapper .list .btn-submit{
background-color: #F5F5F5;
margin: 0 -30rpx;
padding: 64rpx 30rpx;
}
.cash-withdrawal .wrapper .list .bnt {
font-size: 32rpx;
color: #fff;
width: 690rpx;
height: 90rpx;
text-align: center;
border-radius: 50rpx;
line-height: 90rpx;
/deep/ &.disabled {
background: #E3E3E3!important;
pointer-events: none;
}
}
.bank-list{
padding-top: 30rpx!important;
.bank-tabs{
display: inline-flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
width: 100%;
background: #f9f9f9;
border-radius: 15rpx;
.bank-tab{
width: 50%;
text-align: center;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
font-weight: bold
}
.bank-tab-active{
position: relative;
}
.bank-tab-active{
color: #87171c;
}
.bank-tab-active:after{
content: "";
position: absolute;
bottom: 8rpx;
left: calc((100% - 100rpx) / 2 );
background: #87171c;
width: 100rpx;
height: 6rpx;
}
}
.cash-withdrawal .wrapper .list .tip2 {
font-size: 26rpx;
color: #999;
text-align: center;
margin: 44rpx 0 20rpx 0;
}
}
.cash-withdrawal .wrapper .list .value {
height: 135rpx;
line-height: 135rpx;
border-bottom: 1px solid #eee;
width: 690rpx;
margin: 0 auto;
}
.cash-withdrawal .wrapper .list .value input {
font-size: 80rpx;
color: #282828;
height: 135rpx;
text-align: center;
}
.cash-withdrawal .wrapper .list .value .placeholder2 {
color: #bbb;
}
.price {
color: var(--view-priceColor);
}
.Bank {
display: block;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.auto_arrival{
text-align: center;
padding: 20rpx 0 0 0;
.input{
width: 100%;
border-bottom: 1px solid #eee;
margin-top: 10rpx;
color: #999;
height: 120rpx;
/deep/uni-input,input{
height: 120rpx;
font-size: 40rpx;
}
}
}
uni-toast.uni-mask{
background-color: rgba(0,0,0,0.5) !important;
}
page {
background-color: #F5F5F5 !important;
}
.mt25 {
margin-top: 25rpx;
}
.cash-withdrawal .nav {
height: 130rpx;
padding: 0 30rpx;
font-size: 30rpx;
margin-bottom: 20rpx;
background-color: #fff;
}
.b-color {
background-color: var(--view-theme);
}
.cash-withdrawal .nav .input {
width: 505rpx;
.more-content {
display: flex;
align-items: center;
.more-content-left {
width: 90%;
.type-icon {
display: inline-block;
width: 56rpx;
height: 56rpx;
text-align: center;
line-height: 56rpx;
background-color: #FE960F;
margin-right: 20rpx;
border-radius: 50%;
.bankicon {
font-size: 36rpx;
color: #FFFFFF;
}
}
}
.moreicon {
width: 10%;
text-align: right;
}
}
}
.cash-withdrawal .nav .item {
font-size: 26rpx;
flex: 1;
text-align: center;
}
.cash-withdrawal .nav .item ~ .item {
border-left: 1px solid #f0f0f0;
}
.cash-withdrawal .nav .item .iconfont {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 2rpx solid #e93323;
text-align: center;
line-height: 37rpx;
margin: 0 auto 6rpx auto;
font-size: 22rpx;
box-sizing: border-box;
}
.cash-withdrawal .nav .item .iconfont.on {
background-color: #e93323;
color: #fff;
border-color: #e93323;
}
.cash-withdrawal .nav .item .line {
width: 2rpx;
height: 20rpx;
margin: 0 auto;
transition: height 0.3s;
}
.cash-withdrawal .nav .item .line.on {
height: 39rpx;
}
.cash-withdrawal .wrapper .list {
padding: 0 30rpx;
background-color: #fff;
}
.cash-withdrawal .wrapper .list .item {
border-bottom: 1px solid #eee;
height: 107rpx;
font-size: 30rpx;
color: #333;
&.uploadItem {
border-bottom: none;
height: auto;
.name {
height: 107rpx;;
}
}
}
.picture {
width: 70px;
height: 70px;
margin: 0 0 17px 0;
position: relative;
font-size: 11px;
color: #bbb;
border: 0.5px solid #ddd;
box-sizing: border-box;
margin-top: 40rpx;
uni-image, image {
width: 100%;
height: 100%;
border-radius: 1px;
}
.icon-guanbi1 {
font-size: 22px;
position: absolute;
top: -10px;
right: -10px;
color: #fc4141;
}
}
.cash-withdrawal .wrapper .list .item .name {
width: 130rpx;
}
.cash-withdrawal .wrapper .list .item .input {
width: 505rpx;
}
.cash-withdrawal .wrapper .list .item .input .placeholder {
color: #bbb;
}
.cash-withdrawal .placeholder1 {
font-size: 46rpx;
}
.cash-withdrawal .wrapper .list .tip {
font-size: 26rpx;
color: #999;
margin-bottom: 25rpx;
}
.cash-withdrawal .wrapper .list .btn-submit {
background-color: #F5F5F5;
margin: 0 -30rpx;
padding: 64rpx 30rpx;
}
.cash-withdrawal .wrapper .list .bnt {
font-size: 32rpx;
color: #fff;
width: 690rpx;
height: 90rpx;
text-align: center;
border-radius: 50rpx;
line-height: 90rpx;
/deep/ &.disabled {
background: #E3E3E3 !important;
pointer-events: none;
}
}
.cash-withdrawal .wrapper .list .tip2 {
font-size: 26rpx;
color: #999;
text-align: center;
margin: 44rpx 0 20rpx 0;
}
.cash-withdrawal .wrapper .list .value {
height: 135rpx;
line-height: 135rpx;
border-bottom: 1px solid #eee;
width: 690rpx;
margin: 0 auto;
}
.cash-withdrawal .wrapper .list .value input {
font-size: 80rpx;
color: #282828;
height: 135rpx;
text-align: center;
}
.cash-withdrawal .wrapper .list .value .placeholder2 {
color: #bbb;
}
.price {
color: var(--view-priceColor);
}
.Bank {
display: block;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.auto_arrival {
text-align: center;
padding: 20rpx 0 0 0;
.input {
width: 100%;
border-bottom: 1px solid #eee;
margin-top: 10rpx;
color: #999;
height: 120rpx;
/deep/ uni-input, input {
height: 120rpx;
font-size: 40rpx;
}
}
}
uni-toast.uni-mask {
background-color: rgba(0, 0, 0, 0.5) !important;
}
</style>

View File

@ -15,7 +15,7 @@ export default {
* 字符串截取
* @obj 传入的数据
* @state 0 某个参数之前 1某个参数之后
*
*
*
* **/
stringIntercept: function(obj, state, type) {
@ -127,7 +127,7 @@ export default {
* @param int index 需要移除的数组的键值
* @param string | int
* @return array
*
*
*/
ArrayRemove: function(array, index, value) {
const valueArray = [];
@ -146,7 +146,7 @@ export default {
* 生成海报获取文字
* @param string text 为传入的文本
* @param int num 为单行显示的字节长度
* @return array
* @return array
*/
textByteLength: function(text, num) {
let strLength = 0;
@ -180,8 +180,8 @@ export default {
* @param string store_name 素材文字
* @param string price 价格
* @param function successFn 回调函数
*
*
*
*
*/
PosterCanvas: function(arr2, store_name, price, successFn, errFun) {
let that = this;
@ -189,9 +189,9 @@ export default {
ctx.clearRect(0, 0, 0, 0);
/**
* 只能获取合法域名下的图片信息,本地调试无法获取
*
*
*/
uni.getImageInfo({
uni.getImageInfo({
src: arr2[0],
success: function(res) {
console.log(res, 'getImageInfo')
@ -258,8 +258,8 @@ export default {
* @param string store_name 素材文字
* @param string price 价格
* @param function successFn 回调函数
*
*
*
*
*/
goodsPosterCanvas: function(arr2, store_name, price, site_name, ot_price, successFn, errFun) {
let that = this;
@ -267,9 +267,9 @@ export default {
ctx.clearRect(0, 0, 0, 0);
/**
* 只能获取合法域名下的图片信息,本地调试无法获取
*
*
*/
uni.getImageInfo({
uni.getImageInfo({
src: arr2[0],
success: function(res) {
console.log(res, 'getImageInfo')
@ -282,7 +282,7 @@ export default {
let cx = 555;
let cy = 910;
let ux = 50;
let uy = 50;
let uy = 50;
ctx.arc(cx + r, cy + r, r, 0, 2 * Math.PI);
that.handleBorderRect(ctx, 30, 30, 50, 50, 25);
ctx.clip();
@ -301,7 +301,7 @@ export default {
contentRows = 2;
let textArray = contentArray.slice(0, 2);
textArray[textArray.length - 1] = textArray[textArray.length - 1].slice(0,textArray[textArray.length - 1].length-1)
textArray[textArray.length - 1] += '…';
textArray[textArray.length - 1] += '…';
contentArray = textArray;
}
ctx.setFontSize(32);
@ -359,8 +359,8 @@ export default {
* @param string store_name 素材文字
* @param string price 价格
* @param function successFn 回调函数
*
*
*
*
*/
videoPosterCanvas: function(arr2, content, nickname, successFn, errFun) {
let that = this;
@ -368,9 +368,9 @@ export default {
ctx.clearRect(0, 0, 0, 0);
/**
* 只能获取合法域名下的图片信息,本地调试无法获取
*
*
*/
uni.getImageInfo({
uni.getImageInfo({
src: arr2[0],
success: function(res) {
const WIDTH = res.width;
@ -408,11 +408,11 @@ export default {
contentArray = textArray;
}
ctx.setTextAlign('left');
ctx.font = 'bold 32px Arial';
ctx.font = 'bold 32px Arial';
let contentHh = 32 * 1.3;
for (let m = 0; m < contentArray.length; m++) {
ctx.fillText(contentArray[m], 55, 850 + contentHh * m);
}
}
ctx.draw(true, function() {
uni.canvasToTempFilePath({
canvasId: 'myCanvas',
@ -466,7 +466,7 @@ export default {
ctx.arc(x + r, y + h - r, r, 0.5 * Math.PI, Math.PI);
ctx.lineTo(x, y + r);
ctx.lineTo(x + r, y);
ctx.fill();
ctx.closePath();
},
@ -476,8 +476,8 @@ export default {
* @param string nickname 昵称
* @param string sitename 价格
* @param function successFn 回调函数
*
*
*
*
*/
userPosterCanvas: function(arr2, nickname, sitename, index, w, h, successFn) {
let that = this;
@ -485,7 +485,7 @@ export default {
ctx.clearRect(0, 0, 0, 0);
/**
* 只能获取合法域名下的图片信息,本地调试无法获取
*
*
*/
uni.getImageInfo({
src: arr2[1],
@ -532,7 +532,7 @@ export default {
fail: function(err) {
console.log(err)
uni.hideLoading();
}
})
},1000))
@ -550,8 +550,8 @@ export default {
/*
* 单图上传
* @param object opt
* @param callable successCallback 成功执行方法 data
* @param callable errorCallback 失败执行方法
* @param callable successCallback 成功执行方法 data
* @param callable errorCallback 失败执行方法
*/
uploadImageOne: function(opt, successCallback, errorCallback) {
let that = this;
@ -567,9 +567,9 @@ export default {
uploadUrl = opt.url || '',
inputName = opt.name || 'field';
uni.chooseImage({
count: count, //最多可以选择的图片总数
sizeType: sizeType, // 可以指定是原图还是压缩图,默认二者都有
sourceType: sourceType, // 可以指定来源是相册还是相机,默认二者都有
count: count, //最多可以选择的图片总数
sizeType: sizeType, // 可以指定是原图还是压缩图,默认二者都有
sourceType: sourceType, // 可以指定来源是相册还是相机,默认二者都有
success: async (res)=> {
let image = [];
let filesLen = res.tempFiles.length;
@ -655,8 +655,8 @@ export default {
/**
* 小程序头像获取上传
* @param uploadUrl 上传接口地址
* @param filePath 上传文件路径
* @param successCallback success回调
* @param filePath 上传文件路径
* @param successCallback success回调
* @param errorCallback err回调
*/
uploadImgs(uploadUrl, filePath, successCallback, errorCallback) {
@ -726,7 +726,7 @@ export default {
* @param string k 整体分割符 默认为&
* @param string p 单个分隔符 默认为=
* @return object
*
*
*/
// #ifdef MP
getUrlParams: function(param, k, p) {
@ -982,7 +982,9 @@ export default {
url: `/pages/annex/web_view/index?url=${url}`
});
} else {
if (['/pages/goods_cate/goods_cate','/pages/plant_grass/index','/pages/order_addcart/order_addcart','/pages/user/index'
if (['/pages/goods_cate/goods_cate',
// '/pages/plant_grass/index',
'/pages/order_addcart/order_addcart','/pages/user/index'
]
.indexOf(url) == -1) {
uni.navigateTo({