消费者分销
This commit is contained in:
parent
53bf50ba3f
commit
12221e22fe
|
|
@ -10,9 +10,9 @@ export default {
|
||||||
title: '加载中'
|
title: '加载中'
|
||||||
})
|
})
|
||||||
// request 触发前拼接 url
|
// request 触发前拼接 url
|
||||||
args.url = 'https://www.opsoul.com' + args.url;
|
// args.url = 'https://www.opsoul.com' + args.url;
|
||||||
// args.url = 'http://192.168.2.42:80' + args.url;
|
// args.url = 'http://192.168.2.42:80' + args.url;
|
||||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
args.url = 'http://127.0.0.1:80' + args.url;
|
||||||
if (args.data) {
|
if (args.data) {
|
||||||
args.data.deptId = globalData.deptId;
|
args.data.deptId = globalData.deptId;
|
||||||
args.data.from = globalData.from;
|
args.data.from = globalData.from;
|
||||||
|
|
@ -43,36 +43,50 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkAndAuth() {
|
authAndGetLocation() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
// 通过 wx.getSetting 先查询一下用户是否授权了 "scope.userInfo" 这个 scope
|
// 通过 wx.getSetting 先查询一下用户是否授权了 "scope.userLocation" 这个 scope
|
||||||
wx.getSetting({
|
wx.getSetting({
|
||||||
success(res) {
|
success(res) {
|
||||||
if (!res.authSetting['scope.userInfo']) {
|
if (!res.authSetting['scope.userLocation']) {
|
||||||
// 用户授权
|
// 用户授权
|
||||||
wx.authorize({
|
wx.authorize({
|
||||||
scope: 'scope.userInfo',
|
scope: 'scope.userLocation',
|
||||||
success() {
|
success() {
|
||||||
// 用户已经同意, 后续调用此接口不会弹窗询问
|
// 用户已经同意, 后续调用此接口不会弹窗询问
|
||||||
_this.login();
|
_this.wxGetLocation();
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
// 用户已经拒绝过授权
|
// 用户已经拒绝过授权
|
||||||
wx.openSetting({
|
wx.openSetting({
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res['scope.userInfo']) {
|
if (res['scope.userLocation']) {
|
||||||
_this.checkAndAuth();
|
_this.wxGetLocation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
_this.login();
|
_this.wxGetLocation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
wxGetLocation() {
|
||||||
|
wx.getLocation({
|
||||||
|
type: 'gcj02',
|
||||||
|
success(res) {
|
||||||
|
const latitude = res.latitude
|
||||||
|
const longitude = res.longitude
|
||||||
|
console.log(res)
|
||||||
|
// uni.setStorageSync('userLocation', res);
|
||||||
|
},
|
||||||
|
complete(res) {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
async login() {
|
async login() {
|
||||||
let userInfo = await wx.getUserProfile({
|
let userInfo = await wx.getUserProfile({
|
||||||
desc: '用于小程序登录'
|
desc: '用于小程序登录'
|
||||||
|
|
@ -189,7 +203,6 @@ export default {
|
||||||
wxLoginCode: userInfo.wxLoginCode
|
wxLoginCode: userInfo.wxLoginCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(newUserInfo)
|
|
||||||
uni.setStorageSync('userProfile', newUserInfo);
|
uni.setStorageSync('userProfile', newUserInfo);
|
||||||
}
|
}
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
|
|
@ -307,7 +320,9 @@ export default {
|
||||||
})
|
})
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
},
|
},
|
||||||
async areaListByStep(params = { parentCode: null }) {
|
async areaListByStep(params = {
|
||||||
|
parentCode: null
|
||||||
|
}) {
|
||||||
let res = await uni.request({
|
let res = await uni.request({
|
||||||
url: '/system/area/app/list',
|
url: '/system/area/app/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
@ -315,7 +330,9 @@ export default {
|
||||||
})
|
})
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
},
|
},
|
||||||
async listByStep(params = {goodsCategoryId : null}) {
|
async listByStep(params = {
|
||||||
|
goodsCategoryId: null
|
||||||
|
}) {
|
||||||
let res = await uni.request({
|
let res = await uni.request({
|
||||||
url: '/goods/deptcategory/listByStep',
|
url: '/goods/deptcategory/listByStep',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,281 @@
|
||||||
|
<template>
|
||||||
|
<view class="uni-combox" :class="border ? '' : 'uni-combox__no-border'">
|
||||||
|
<view v-if="label" class="uni-combox__label" :style="labelStyle">
|
||||||
|
<text>{{label}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__input-box">
|
||||||
|
<input class="uni-combox__input" type="text" :placeholder="placeholder" @click="toggleSelector" disabled
|
||||||
|
placeholder-class="uni-combox__input-plac" v-model="inputVal[showField]" @input="onInput" @focus="onFocus"
|
||||||
|
@blur="onBlur" />
|
||||||
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
|
||||||
|
</uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__selector" v-if="showSelector">
|
||||||
|
<view class="uni-popper__arrow"></view>
|
||||||
|
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
|
||||||
|
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0">
|
||||||
|
<text>{{emptyTips}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index"
|
||||||
|
@click="onSelectorClick(index)">
|
||||||
|
<text>{{item[showField]}}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Combox 组合输入框
|
||||||
|
* @description 组合输入框一般用于既可以输入也可以选择的场景
|
||||||
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=1261
|
||||||
|
* @property {String} label 左侧文字
|
||||||
|
* @property {String} labelWidth 左侧内容宽度
|
||||||
|
* @property {String} placeholder 输入框占位符
|
||||||
|
* @property {Array} candidates 候选项列表
|
||||||
|
* @property {String} emptyTips 筛选结果为空时显示的文字
|
||||||
|
* @property {String} value 组合框的值
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
name: 'myUniCombox',
|
||||||
|
emits: ['input', 'update:modelValue'],
|
||||||
|
props: {
|
||||||
|
border: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
labelWidth: {
|
||||||
|
type: String,
|
||||||
|
default: 'auto'
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
candidates: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showField: {
|
||||||
|
type: String,
|
||||||
|
default: 'name'
|
||||||
|
},
|
||||||
|
emptyTips: {
|
||||||
|
type: String,
|
||||||
|
default: '无匹配项'
|
||||||
|
},
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
type: [Object, String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
type: [Object, String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSelector: false,
|
||||||
|
inputVal: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
labelStyle() {
|
||||||
|
if (this.labelWidth === 'auto') {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return `width: ${this.labelWidth}`
|
||||||
|
},
|
||||||
|
filterCandidates() {
|
||||||
|
return this.candidates
|
||||||
|
// 不进行数据筛选,每次下拉都展示全部数据
|
||||||
|
// .filter((item) => {
|
||||||
|
// return item.toString().indexOf(this.inputVal) > -1
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
filterCandidatesLength() {
|
||||||
|
return this.filterCandidates.length
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
// #ifndef VUE3
|
||||||
|
value: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.inputVal = newVal
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSelector() {
|
||||||
|
this.showSelector = !this.showSelector
|
||||||
|
},
|
||||||
|
onFocus() {
|
||||||
|
this.showSelector = true
|
||||||
|
},
|
||||||
|
onBlur() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showSelector = false
|
||||||
|
}, 153)
|
||||||
|
},
|
||||||
|
onSelectorClick(index) {
|
||||||
|
this.inputVal = this.filterCandidates[index]
|
||||||
|
this.showSelector = false
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal[this.showField])
|
||||||
|
},
|
||||||
|
onInput() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$emit('input', this.inputVal)
|
||||||
|
this.$emit('update:modelValue', this.inputVal)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" >
|
||||||
|
.uni-combox {
|
||||||
|
font-size: 14px;
|
||||||
|
border: 1px solid #DCDFE6;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
// height: 40px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__label {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__input-box {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__input {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 28rpx;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__input-plac {
|
||||||
|
font-size: 28rpx;
|
||||||
|
// color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 12px);
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 1px solid #EBEEF5;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 3;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-scroll {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
max-height: 200px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-empty,
|
||||||
|
.uni-combox__selector-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
/* #endif */
|
||||||
|
line-height: 36px;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
// border-bottom: solid 1px #DDDDDD;
|
||||||
|
padding: 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-item:hover {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__selector-empty:last-child,
|
||||||
|
.uni-combox__selector-item:last-child {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
border-bottom: none;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
// picker 弹出层通用的指示小三角
|
||||||
|
.uni-popper__arrow,
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow {
|
||||||
|
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||||
|
top: -6px;
|
||||||
|
left: 10%;
|
||||||
|
margin-right: 3px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #EBEEF5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-popper__arrow::after {
|
||||||
|
content: " ";
|
||||||
|
top: 1px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-combox__no-border {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -56,6 +56,10 @@
|
||||||
"es6" : false
|
"es6" : false
|
||||||
},
|
},
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"permission" : {}
|
"permission" : {
|
||||||
|
"scope.userLocation" : {
|
||||||
|
"desc" : "因涉及上门家政服务,需获取地理位置"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,10 @@
|
||||||
"path": "serv-detail"
|
"path": "serv-detail"
|
||||||
}, {
|
}, {
|
||||||
"path": "statement-desc"
|
"path": "statement-desc"
|
||||||
|
}, {
|
||||||
|
"path": "withdraw"
|
||||||
|
}, {
|
||||||
|
"path": "b-account-bind"
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
"root":"pages/publish/",
|
"root":"pages/publish/",
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,9 @@
|
||||||
this.inParam = option;
|
this.inParam = option;
|
||||||
this.loadData(option);
|
this.loadData(option);
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.$request.authAndGetLocation();
|
||||||
|
},
|
||||||
onShareAppMessage(e) {
|
onShareAppMessage(e) {
|
||||||
let shareInfo = null;
|
let shareInfo = null;
|
||||||
if (e && e.target && e.target.dataset) {
|
if (e && e.target && e.target.dataset) {
|
||||||
|
|
|
||||||
|
|
@ -213,10 +213,10 @@
|
||||||
<view class="cuIcon-qr_code text-green"></view>
|
<view class="cuIcon-qr_code text-green"></view>
|
||||||
<text>二维码分享</text>
|
<text>二维码分享</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="cu-item">
|
<view class="cu-item" v-if="curUserInfo.placeStatus == 2" @click="showPage('/pages/my/withdraw')">
|
||||||
<view class="cuIcon-moneybagfill text-cyan"></view>
|
<view class="cuIcon-moneybagfill text-cyan"></view>
|
||||||
<text>钱包</text>
|
<text>钱包</text>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- <view class="cu-item">
|
<!-- <view class="cu-item">
|
||||||
<view class="cuIcon-friendaddfill text-blue"></view>
|
<view class="cuIcon-friendaddfill text-blue"></view>
|
||||||
<text>加盟项目</text>
|
<text>加盟项目</text>
|
||||||
|
|
@ -372,11 +372,41 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async showAppInviteQrcode() {
|
async showAppInviteQrcode() {
|
||||||
let res = await this.$request.getUnlimitedWxacode({
|
// 判断当前用户的是否已通过分销资格审核
|
||||||
scene: "distributor=" + this.curUserInfo.customerId
|
if (this.curUserInfo.placeStatus == 1) {
|
||||||
});
|
uni.showToast({
|
||||||
this.appQrcode = res.data;
|
icon: 'none',
|
||||||
this.appShareQrcodeModal = true;
|
title: '审核中'
|
||||||
|
})
|
||||||
|
} else if (this.curUserInfo.placeStatus != 2) {
|
||||||
|
await this.$request.updateUser({
|
||||||
|
customerId: this.curUserInfo.customerId,
|
||||||
|
placeStatus: 1
|
||||||
|
});
|
||||||
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '已提交进行分销审核'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 判断是否有绑定银行信息
|
||||||
|
let res = await this.$request.getBindBankCardByCustomerId({
|
||||||
|
customerId: this.curUserInfo.customerId
|
||||||
|
});
|
||||||
|
let bindBankCardInfo = res.data;
|
||||||
|
if (bindBankCardInfo && bindBankCardInfo.bankNum) {
|
||||||
|
// 分销资格审核通过,可进行二维码分享
|
||||||
|
let res = await this.$request.getUnlimitedWxacode({
|
||||||
|
scene: "distributor=" + this.curUserInfo.customerId
|
||||||
|
});
|
||||||
|
this.appQrcode = res.data;
|
||||||
|
this.appShareQrcodeModal = true;
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/my/withdraw'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
showPage(pageUrl) {
|
showPage(pageUrl) {
|
||||||
if (pageUrl) {
|
if (pageUrl) {
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@
|
||||||
<block slot="content">帐号绑定/修改</block>
|
<block slot="content">帐号绑定/修改</block>
|
||||||
</cu-custom>
|
</cu-custom>
|
||||||
<view class="margin-lr-sm margin-tb-lg shadow-warp">
|
<view class="margin-lr-sm margin-tb-lg shadow-warp">
|
||||||
<!-- <view class="bg-gray flex justify-start align-center text-xl padding-lr padding-top-xs">
|
<view class="bg-gray flex justify-start align-center text-xl padding-lr padding-top-xs">
|
||||||
<view class="padding-lr padding-tb-sm" :class="curAccountType === '0' ? 'curTab' : ''" data-type="0" @click="changAccountType">支付宝</view>
|
<view class="padding-lr padding-tb-sm" :class="curAccountType === '0' ? 'curTab' : ''" data-type="0" @click="changAccountType">支付宝</view>
|
||||||
<view class="padding-lr padding-tb-sm" :class="curAccountType === '1' ? 'curTab' : ''" data-type="1" @click="changAccountType">银行卡</view>
|
<view class="padding-lr padding-tb-sm" :class="curAccountType === '1' ? 'curTab' : ''" data-type="1" @click="changAccountType">银行卡</view>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- 支付宝 -->
|
<!-- 支付宝 -->
|
||||||
<!-- <view v-if="curAccountType == '0'" class="bg-white padding text-lg">
|
<view v-if="curAccountType == '0'" class="bg-white padding text-lg">
|
||||||
<view>
|
<view>
|
||||||
<view class="margin-bottom-sm">开户人姓名</view>
|
<view class="margin-bottom-sm">开户人姓名</view>
|
||||||
<input type="digit" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
<input type="digit" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
||||||
|
|
@ -20,9 +20,9 @@
|
||||||
<view class="margin-bottom-sm">支付宝账户</view>
|
<view class="margin-bottom-sm">支付宝账户</view>
|
||||||
<input type="digit" placeholder="请输入支付宝账户" placeholder-style="color:#989898" v-model="formData.account">
|
<input type="digit" placeholder="请输入支付宝账户" placeholder-style="color:#989898" v-model="formData.account">
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- 银行卡 -->
|
<!-- 银行卡 -->
|
||||||
<!-- <view v-else-if="curAccountType === '1'" class="bg-white padding text-lg">
|
<view v-else-if="curAccountType === '1'" class="bg-white padding text-lg">
|
||||||
<view>
|
<view>
|
||||||
<view class="margin-bottom-sm">开户人姓名</view>
|
<view class="margin-bottom-sm">开户人姓名</view>
|
||||||
<input type="text" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
<input type="text" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
||||||
|
|
@ -39,22 +39,32 @@
|
||||||
<view class="margin-bottom-sm">银行卡号</view>
|
<view class="margin-bottom-sm">银行卡号</view>
|
||||||
<input type="text" placeholder="请输入银行卡号" placeholder-style="color:#989898" v-model="formData.bankNum">
|
<input type="text" placeholder="请输入银行卡号" placeholder-style="color:#989898" v-model="formData.bankNum">
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
<!-- <view class="margin-top">
|
||||||
|
<view class="margin-bottom-sm">银行卡号开户城市</view>
|
||||||
|
<view class="flex">
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="provinceList"
|
||||||
|
:showField="'areaName'" placeholder="选择省份" v-model="formData.provinceObj"
|
||||||
|
@input="chooseRegion($event)"></my-uni-combox>
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="cityList"
|
||||||
|
:showField="'areaName'" placeholder="选择城市" v-model="formData.cityObj"></my-uni-combox>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<!-- <view class="margin-lr">
|
<view class="margin-lr">
|
||||||
<button class="cu-btn lg bg-main-color long-btn shadow-blur" @click="submit">提交</button>
|
<button class="cu-btn lg bg-main-color long-btn shadow-blur" @click="submit">提交</button>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// components: {
|
components: {
|
||||||
// myUniCombox
|
myUniCombox
|
||||||
// },
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
curAccountType: '0',
|
curAccountType: '0',
|
||||||
|
|
@ -67,7 +77,7 @@
|
||||||
curUserInfo: {}
|
curUserInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(options) {
|
||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -0,0 +1,151 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 顶部操作条 -->
|
||||||
|
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">提现账户</block>
|
||||||
|
</cu-custom>
|
||||||
|
<!-- <view class="margin-lr-sm margin-tb-lg shadow-warp">
|
||||||
|
<view @click="bindAccount">
|
||||||
|
<view v-if="bindBankCard && bindBankCard.bankNum" class="bg-gray flex justify-between align-center text-xl padding">
|
||||||
|
<view>
|
||||||
|
<text class="cu-tag bg-main-color light margin-right-sm">已绑定</text>
|
||||||
|
<text>{{bindBankCard.encodeBankNum}}</text>
|
||||||
|
</view>
|
||||||
|
<view>帐号另绑<text class="cuIcon-right"></text></view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="bg-gray flex justify-between align-center text-xl padding">
|
||||||
|
<view>提现帐号绑定</view>
|
||||||
|
<view><text class="cuIcon-right"></text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bg-white padding solid-bottom">
|
||||||
|
<view class="text-right text-lg">
|
||||||
|
<text>可提现金额:</text>
|
||||||
|
<text class="text-red text-price">{{balance}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="text-lg margin-bottom-sm">提现金额</view>
|
||||||
|
<view class="text-xxl solid-bottom flex justify-start align-baseline">
|
||||||
|
<text class="margin-right-xs text-bold">¥</text>
|
||||||
|
<input type="digit" placeholder="请输入金额" placeholder-style="color:#989898" style="height: 80rpx;">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bg-white padding">
|
||||||
|
<view class="text-lg margin-bottom-sm">发票凭证(电子票)</view>
|
||||||
|
<view class="grid col-3 grid-square flex-sub">
|
||||||
|
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
||||||
|
@tap="viewImage($event)" :data-url="item">
|
||||||
|
<image :src="item" mode="aspectFill"></image>
|
||||||
|
<view class="cu-tag bg-red" @tap.stop="delImg($event)" :data-index="index">
|
||||||
|
<text class='cuIcon-close'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="solids" @tap="chooseImage" v-if="imgList.length < 9">
|
||||||
|
<text class='cuIcon-cameraadd'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="margin-sm shadow-warp">
|
||||||
|
<view class="padding-tb-lg padding-lr bg-gradual-color light" v-if="bindBankCard && bindBankCard.bankNum">
|
||||||
|
<view>提现账户</view>
|
||||||
|
<view class="flex justify-between margin-top-sm">
|
||||||
|
<!-- <text class="cu-tag bg-white radius margin-right-sm">已绑定</text> -->
|
||||||
|
<text class="text-xxl">{{bindBankCard.encodeBankNum}}</text>
|
||||||
|
<view class="cu-btn bg-white radius" @click="bindAccount">帐号另绑</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="padding-tb-lg padding-lr bg-gradual-color light" v-else>
|
||||||
|
<view class="padding-bottom">提现帐号未绑定</view>
|
||||||
|
<view class="cu-btn bg-white radius" @click="bindAccount">前往绑定</view>
|
||||||
|
</view>
|
||||||
|
<view class="padding bg-white flex justify-between">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 操作按钮 -->
|
||||||
|
<!-- <view class="margin-lr">
|
||||||
|
<button class="cu-btn lg bg-main-color long-btn shadow-blur" @click="withdraw">提现</button>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
balance: '0.00',
|
||||||
|
imgList: [],
|
||||||
|
curUserInfo: {},
|
||||||
|
bindBankCard: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.reloadData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async loadData() {
|
||||||
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
|
this.loadBindBankCard();
|
||||||
|
},
|
||||||
|
async reloadData() {
|
||||||
|
this.loadBindBankCard();
|
||||||
|
},
|
||||||
|
async loadBindBankCard() {
|
||||||
|
let res = await this.$request.getBindBankCardByCustomerId({
|
||||||
|
customerId: this.curUserInfo.customerId
|
||||||
|
});
|
||||||
|
this.bindBankCard = res.data;
|
||||||
|
if (this.bindBankCard && this.bindBankCard.bankNum) {
|
||||||
|
this.bindBankCard.encodeBankNum = '****' + this.bindBankCard.bankNum.substring(this.bindBankCard.bankNum.length - 4);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
bindAccount() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/my/b-account-bind'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
chooseImage(e) {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 9, //默认9
|
||||||
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
|
sourceType: ['album'], //从相册选择
|
||||||
|
success: (res) => {
|
||||||
|
if (this.imgList.length != 0) {
|
||||||
|
this.imgList = this.imgList.concat(res.tempFilePaths)
|
||||||
|
} else {
|
||||||
|
this.imgList = res.tempFilePaths
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
viewImage(e) {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: this.imgList,
|
||||||
|
current: e.currentTarget.dataset.url
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delImg(e) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '',
|
||||||
|
content: '确定要删除这张图片吗?',
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确定',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.imgList.splice(e.currentTarget.dataset.index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
withdraw() {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue