混合支付
This commit is contained in:
@@ -27,7 +27,8 @@ const log = data => {
|
|||||||
// 业绩账户
|
// 业绩账户
|
||||||
const cash = data => {
|
const cash = data => {
|
||||||
return request({
|
return request({
|
||||||
url: "perf/lists",
|
// 1.3.5^ 版本废弃 url: "perf/lists",
|
||||||
|
url: "perf/new_lists",
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ const umsPay = (orderId, data) => {
|
|||||||
|
|
||||||
// 银联支付补差价
|
// 银联支付补差价
|
||||||
const diffUmsPay = (orderId, data) => {
|
const diffUmsPay = (orderId, data) => {
|
||||||
|
console.log(data)
|
||||||
return request({
|
return request({
|
||||||
url: 'pay/diff/' + orderId + '/ums',
|
url: 'pay/diff/' + orderId + '/ums',
|
||||||
data
|
data
|
||||||
|
|||||||
@@ -599,11 +599,6 @@
|
|||||||
"selectedIconPath": "static/icons/tabs_show_02.png",
|
"selectedIconPath": "static/icons/tabs_show_02.png",
|
||||||
"pagePath": "pages/work/index",
|
"pagePath": "pages/work/index",
|
||||||
"text": "工作台"
|
"text": "工作台"
|
||||||
}, {
|
|
||||||
"iconPath": "static/icons/tabs_icon_04.png",
|
|
||||||
"selectedIconPath": "static/icons/tabs_show_04.png",
|
|
||||||
"pagePath": "pages/im/msg",
|
|
||||||
"text": "消息"
|
|
||||||
}, {
|
}, {
|
||||||
"iconPath": "static/icons/tabs_icon_03.png",
|
"iconPath": "static/icons/tabs_icon_03.png",
|
||||||
"selectedIconPath": "static/icons/tabs_show_03.png",
|
"selectedIconPath": "static/icons/tabs_show_03.png",
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<view class="total-btn" @click="$Router.push({name: 'Withdraws'})">提现</view>
|
<view class="total-btn" @click="$Router.push({name: 'Withdraws'})">提现</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="total-item-2">
|
<view class="total-item-2">
|
||||||
<view> 已发放 :¥<span>{{sended}}</span></view>
|
<view>已发放 :¥<span>{{sended}}</span></view>
|
||||||
<view> 待发放 :¥<span>{{frozen}}</span></view>
|
<view>待发放 :¥<span>{{frozen}}</span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 账户记录 -->
|
<!-- 账户记录 -->
|
||||||
|
|||||||
@@ -8,21 +8,25 @@
|
|||||||
</u-sticky>
|
</u-sticky>
|
||||||
<!-- 账户余额 -->
|
<!-- 账户余额 -->
|
||||||
<view class="total" :style="'background-image: url(' + require('@/static/imgs/cash_back.png') + ');'">
|
<view class="total" :style="'background-image: url(' + require('@/static/imgs/cash_back.png') + ');'">
|
||||||
<view class="total-value nowrap">{{total}}</view>
|
<view class="total-value nowrap">{{count}}</view>
|
||||||
<view class="total-text">{{type == 'self' ? '个人总业绩': '团队总业绩'}}</view>
|
<view class="total-text">{{type == 'self' ? '个人总业绩': '团队总业绩'}}</view>
|
||||||
|
<view class="total-total">筛选区间业绩:{{total}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 账户记录 -->
|
<!-- 账户记录 -->
|
||||||
<view class="logs">
|
<view class="logs">
|
||||||
<view class="log-item">
|
<view class="log-item">
|
||||||
<view class="tabs">
|
<view class="log-header">
|
||||||
<u-tabs
|
<view class="log-header-data" @click="dayShow = true">
|
||||||
:list="tabs"
|
<label>筛选:</label>
|
||||||
:activeStyle="{'color': '#446EFE'}"
|
<view class="log-header-data-q">
|
||||||
lineColor="#446EFE"
|
<view :class="{'show': dayTime.start_at != ''}">{{dayTime.start_at || "开始日期"}}</view>
|
||||||
:scrollable="false"
|
<view :class="{'show': dayTime.end_at != ''}">{{dayTime.end_at || "结束日期"}}</view>
|
||||||
@click="onDayTab"
|
|
||||||
></u-tabs>
|
|
||||||
</view>
|
</view>
|
||||||
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="log-header-title" @click="onDefaultLog">默认</view>
|
||||||
|
</view>
|
||||||
|
<!-- -->
|
||||||
<block v-if="list.length > 0">
|
<block v-if="list.length > 0">
|
||||||
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
||||||
<view class="log-flex-item">
|
<view class="log-flex-item">
|
||||||
@@ -60,7 +64,21 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-loadmore v-if="pagesShow" :status="status" />
|
<u-loadmore v-if="pagesShow" :status="status" />
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 筛选时间 -->
|
||||||
|
<u-calendar
|
||||||
|
v-if="maxDate != ''"
|
||||||
|
:show="dayShow"
|
||||||
|
mode="range"
|
||||||
|
color="#446EFE"
|
||||||
|
:minDate="minDate"
|
||||||
|
:maxDate="maxDate"
|
||||||
|
monthNum="36"
|
||||||
|
title="选择筛选区间"
|
||||||
|
maxRange="90"
|
||||||
|
rangePrompt="最大筛选天数不能超过90天"
|
||||||
|
@close="dayShow = false"
|
||||||
|
@confirm="onDay"
|
||||||
|
></u-calendar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -69,14 +87,16 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabs : [
|
dayShow : false,
|
||||||
{ name: '全部业绩', value: 'all'},
|
minDate : '',
|
||||||
{ name: '当月业绩', value: 'month'},
|
maxDate : '',
|
||||||
{ name: '当年业绩', value: 'year'}
|
dayTime : {
|
||||||
],
|
start_at: '',
|
||||||
dayType : 'all',
|
end_at : ''
|
||||||
|
},
|
||||||
type : 'self',
|
type : 'self',
|
||||||
total : '0.00',
|
total : '0.00',
|
||||||
|
count : '0.00',
|
||||||
list : [],
|
list : [],
|
||||||
page : {
|
page : {
|
||||||
current : 1,
|
current : 1,
|
||||||
@@ -88,6 +108,12 @@
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getLog()
|
this.getLog()
|
||||||
|
// 获取当天前日期
|
||||||
|
let date = new Date()
|
||||||
|
let year = date.getFullYear()
|
||||||
|
let month = date.getMonth() + 1
|
||||||
|
let day = date.getDate() + 1
|
||||||
|
this.maxDate = year + '-' + month + '-' + day
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTabs(e){
|
onTabs(e){
|
||||||
@@ -96,27 +122,45 @@
|
|||||||
this.page.current = 1
|
this.page.current = 1
|
||||||
this.getLog()
|
this.getLog()
|
||||||
},
|
},
|
||||||
|
// 默认日期
|
||||||
|
onDefaultLog(){
|
||||||
|
this.dayTime = {
|
||||||
|
start_at: '',
|
||||||
|
end_at : ''
|
||||||
|
}
|
||||||
|
this.page.current = 1
|
||||||
|
this.getLog()
|
||||||
|
},
|
||||||
// 选择日期
|
// 选择日期
|
||||||
onDayTab(e){
|
onDay(e){
|
||||||
if(this.dayType === e.value) return
|
this.dayTime = {
|
||||||
this.dayType = e.value
|
start_at: e[0],
|
||||||
|
end_at : e[e.length - 1]
|
||||||
|
}
|
||||||
|
this.dayShow = false
|
||||||
this.page.current = 1
|
this.page.current = 1
|
||||||
this.getLog()
|
this.getLog()
|
||||||
},
|
},
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getLog(){
|
getLog(){
|
||||||
cash({
|
cash({
|
||||||
day : this.dayType,
|
start_at: this.dayTime.start_at,
|
||||||
type: this.type,
|
end_at : this.dayTime.end_at,
|
||||||
page: this.page.current
|
type : this.type,
|
||||||
|
page : this.page.current
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
let { total, lists } = res;
|
let { total, lists, start, now, count } = res;
|
||||||
let atList = lists.page.current == 1 ? [] : this.list
|
let atList = lists.page.current == 1 ? [] : this.list
|
||||||
|
if(this.minDate == '') this.minDate = start
|
||||||
this.list = atList.concat(lists.data)
|
this.list = atList.concat(lists.data)
|
||||||
this.total = total
|
this.total = total
|
||||||
|
this.count = count
|
||||||
this.page = lists.page
|
this.page = lists.page
|
||||||
this.pagesShow = false
|
this.pagesShow = false
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|
||||||
|
console.log(err)
|
||||||
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon : 'none'
|
icon : 'none'
|
||||||
@@ -172,6 +216,13 @@
|
|||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
}
|
}
|
||||||
|
.total-total{
|
||||||
|
margin-top: 30rpx;
|
||||||
|
border-top: solid 1px rgba(255, 255, 255, .7);
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 记录空
|
// 记录空
|
||||||
.list-null{
|
.list-null{
|
||||||
@@ -184,6 +235,35 @@
|
|||||||
.logs{
|
.logs{
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
// 记录筛选
|
||||||
|
.log-header{
|
||||||
|
border-bottom: solid 1rpx #ddd;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
.log-header-title{
|
||||||
|
line-height: 70rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
.log-header-data{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
label{
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.log-header-data-q{
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
.show{ color: $main-color; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 记录
|
||||||
.log-item{
|
.log-item{
|
||||||
background: white;
|
background: white;
|
||||||
padding: 10rpx 30rpx;
|
padding: 10rpx 30rpx;
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="block" v-if="banks.length > 0">
|
<view class="block" v-if="banks.length > 0">
|
||||||
<view class="bank">
|
<view class="bank">
|
||||||
<view class="block-title">到账银行卡</view>
|
<!-- <view class="block-title">到账<text>{{type == 1 ? '本人': '非本人'}}</text>银行卡</view> -->
|
||||||
|
<view class="bank-tabs">
|
||||||
|
<view class="item" :class="{'active': type == 1}" @click="onTypeTab(1)">本人银行卡</view>
|
||||||
|
<view class="item" :class="{'active': type == 2}" @click="onTypeTab(2)">非本人银行卡</view>
|
||||||
|
</view>
|
||||||
<view class="bank-input">
|
<view class="bank-input">
|
||||||
<label>开户银行</label>
|
<label>开户银行</label>
|
||||||
<picker class="banks-picker" :range="banks" range-key="name" :value="bankVal" @change="bankVal = $event.detail.value" :disabled="isDisabled" >
|
<picker class="banks-picker" :range="banks" range-key="name" :value="bankVal" @change="bankVal = $event.detail.value" :disabled="isDisabled" >
|
||||||
@@ -19,9 +23,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bank-input">
|
<view class="bank-input">
|
||||||
<label>持卡人姓名</label>
|
<label>持卡人姓名</label>
|
||||||
<input type="text" placeholder="输入开户人真实姓名" maxlength="15" disabled v-model="name">
|
<input type="text" placeholder="输入开户人真实姓名" maxlength="15" :disabled="isDisabled || type == 1" v-model="name">
|
||||||
</view>
|
</view>
|
||||||
<view class="bank-input">
|
<view class="bank-input" v-if="type === 2">
|
||||||
<label>身份证号</label>
|
<label>身份证号</label>
|
||||||
<input type="idcard" placeholder="输入开户人身份证号" maxlength="18" v-model="idcard" :disabled="isDisabled">
|
<input type="idcard" placeholder="输入开户人身份证号" maxlength="18" v-model="idcard" :disabled="isDisabled">
|
||||||
</view>
|
</view>
|
||||||
@@ -40,6 +44,8 @@
|
|||||||
<button class="cny-btn" :disabled="greater" @click="onSubmit">申请提现</button>
|
<button class="cny-btn" :disabled="greater" @click="onSubmit">申请提现</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 提现提醒 -->
|
||||||
|
<view class="withdraws-hint">后台提现管理时间 上午11:00-12:00 下午17:00-18:00</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -48,17 +54,22 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
type : 1,
|
||||||
banks : [],
|
banks : [],
|
||||||
bankVal : 0,
|
bankVal : 0,
|
||||||
bankNo : '',
|
bankNo : '',
|
||||||
mobile : '',
|
mobile : '',
|
||||||
name : '',
|
name : '',
|
||||||
idcard : '',
|
idcard : '',
|
||||||
|
identity : {
|
||||||
|
name : '',
|
||||||
|
id_card_no : ''
|
||||||
|
},
|
||||||
amount : '',
|
amount : '',
|
||||||
min : 0,
|
min : 0,
|
||||||
rate : 0,
|
rate : 0,
|
||||||
balance : '0.00',
|
balance : '0.00',
|
||||||
isDisabled : false
|
isDisabled : false,
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -73,29 +84,62 @@
|
|||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
withdrawsCreate().then(res => {
|
withdrawsCreate().then(res => {
|
||||||
let { bank, tax, min, balance, banks} = res;
|
let { bank, tax, min, balance, banks, id_card, has_bank} = res;
|
||||||
let bankIndex
|
|
||||||
this.rate = tax
|
this.rate = tax
|
||||||
this.min = min
|
this.min = min
|
||||||
this.balance = balance
|
this.balance = balance
|
||||||
this.banks = [ { id: '', name: '请选择开户银行'}, ...banks ]
|
this.banks = [ { id: '', name: '请选择开户银行'}, ...banks ]
|
||||||
this.name = bank.name
|
this.identity = id_card
|
||||||
if(bank.bank_no){
|
this.type = bank.message_type
|
||||||
bankIndex = this.banks.findIndex(val => val.name === bank.bank_name)
|
this.isDisabled = has_bank
|
||||||
|
|
||||||
|
this.name = id_card.name
|
||||||
|
this.idcard = id_card.id_card_no
|
||||||
|
if(has_bank){
|
||||||
|
let bankIndex = this.banks.findIndex(val => val.name === bank.bank_name)
|
||||||
|
|
||||||
this.bankNo = bank.bank_no
|
this.bankNo = bank.bank_no
|
||||||
this.mobile = bank.mobile
|
this.mobile = bank.mobile
|
||||||
this.bankVal = bankIndex >= 0 ? bankIndex : 0
|
this.bankVal = bankIndex >= 0 ? bankIndex : 0
|
||||||
this.isDisabled = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
|
||||||
title: err.message,
|
console.log(err)
|
||||||
icon : 'none'
|
|
||||||
|
uni.showModal({
|
||||||
|
content : err.message,
|
||||||
|
showCancel : false,
|
||||||
|
success : ModalRes => {
|
||||||
|
if(ModalRes.confirm){
|
||||||
|
this.$Router.back()
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onTypeTab(type){
|
||||||
|
if(type == this.type) return
|
||||||
|
if(this.isDisabled){
|
||||||
|
uni.showToast({
|
||||||
|
title: "银行卡信息已绑定,如需变更请联系系统管理员",
|
||||||
|
icon : "none"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if(type == 1){
|
||||||
|
this.name = this.identity.name
|
||||||
|
this.idcard = this.identity.id_card_no
|
||||||
|
}else{
|
||||||
|
this.name = ''
|
||||||
|
this.idcard = ''
|
||||||
|
}
|
||||||
|
this.type = type
|
||||||
|
},
|
||||||
onSubmit(){
|
onSubmit(){
|
||||||
if(this.bankVal === 0){
|
if(this.bankVal === 0){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -114,6 +158,8 @@
|
|||||||
name : this.name,
|
name : this.name,
|
||||||
mobileNo : this.mobile,
|
mobileNo : this.mobile,
|
||||||
bank_no : this.bankNo,
|
bank_no : this.bankNo,
|
||||||
|
id_card : this.idcard,
|
||||||
|
message_type: this.type,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title : '提示',
|
title : '提示',
|
||||||
@@ -141,16 +187,40 @@
|
|||||||
.content{
|
.content{
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
}
|
}
|
||||||
|
.withdraws-hint{
|
||||||
|
padding: 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
.block{
|
.block{
|
||||||
background: white;
|
background: white;
|
||||||
.block-title{
|
.block-title{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: gray;
|
color: gray;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
|
text{
|
||||||
|
color: $main-color;
|
||||||
|
margin: 0 5rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.bank{
|
.bank{
|
||||||
background: #fdfdfd;
|
background: #fdfdfd;
|
||||||
padding: 50rpx;
|
padding: 50rpx;
|
||||||
|
.bank-tabs{
|
||||||
|
@extend .border-solid;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 100rpx;
|
||||||
|
.item{
|
||||||
|
width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
&.active{
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.bank-input{
|
.bank-input{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="chat">
|
<view class="chat">
|
||||||
<view class="chat-soll">
|
<list>
|
||||||
|
<cell v-for="(item, index) in 99" :key="index">消息{{index}}</cell>
|
||||||
|
</list>
|
||||||
|
<!-- <view class="chat-soll">
|
||||||
<view v-for="(item, index) in 50" :key="index">{{item}}滚动的聊天记录</view>
|
<view v-for="(item, index) in 50" :key="index">{{item}}滚动的聊天记录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="chat-footer">
|
<view class="chat-footer">
|
||||||
@@ -16,7 +19,7 @@
|
|||||||
<image src="@/static/im/icon_00.png" mode="widthFix"></image>
|
<image src="@/static/im/icon_00.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -39,6 +39,26 @@
|
|||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="deduction" v-if="(payMethod == 'wx' || payMethod == 'ali') && payType != 'free'">
|
||||||
|
<view class="deduction-item">
|
||||||
|
<view class="deduction-label">
|
||||||
|
<view class="title">使用火力值抵扣</view>
|
||||||
|
<view class="balance">余额:{{balance}}</view>
|
||||||
|
</view>
|
||||||
|
<u-switch
|
||||||
|
activeColor="#446EFE"
|
||||||
|
size="20"
|
||||||
|
v-model="isDeduction"
|
||||||
|
@change="onDeductionSwitch"
|
||||||
|
></u-switch>
|
||||||
|
</view>
|
||||||
|
<view class="deduction-item" v-if="isDeduction">
|
||||||
|
<view class="deduction-label">
|
||||||
|
<view class="title">使用数量</view>
|
||||||
|
</view>
|
||||||
|
<input class="deduction-input" type="number" placeholder="输入火力值" v-model="deductionVal" @blur="blurDeductionVal">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<!-- 确认支付 -->
|
<!-- 确认支付 -->
|
||||||
<view class="payBtn">
|
<view class="payBtn">
|
||||||
<button size="default" @click="onPay">支付</button>
|
<button size="default" @click="onPay">支付</button>
|
||||||
@@ -49,6 +69,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { info } from '@/apis/interfaces/order.js'
|
import { info } from '@/apis/interfaces/order.js'
|
||||||
import { coinPay, diffCoinPay, umsPay, umsState, diffUmsPay, umsFree, umsFreeInfo } from '@/apis/interfaces/pay.js'
|
import { coinPay, diffCoinPay, umsPay, umsState, diffUmsPay, umsFree, umsFreeInfo } from '@/apis/interfaces/pay.js'
|
||||||
|
import mixin from 'uview-ui/libs/mixin/mixin';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -60,6 +81,9 @@
|
|||||||
payType : 'price',
|
payType : 'price',
|
||||||
total : '0.00',
|
total : '0.00',
|
||||||
orderNo : '',
|
orderNo : '',
|
||||||
|
balance : 0,
|
||||||
|
isDeduction : false,
|
||||||
|
deductionVal: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -109,6 +133,7 @@
|
|||||||
title: '获取订单信息...',
|
title: '获取订单信息...',
|
||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
|
// 自由服务包订单信息
|
||||||
if(this.$Route.query.paytype === 'free'){
|
if(this.$Route.query.paytype === 'free'){
|
||||||
this.payMethod = "wx"
|
this.payMethod = "wx"
|
||||||
umsFreeInfo(this.$Route.query.serviceId).then(res => {
|
umsFreeInfo(this.$Route.query.serviceId).then(res => {
|
||||||
@@ -126,13 +151,15 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 其他支付方式订单信息
|
||||||
info(this.$Route.query.orderId).then(res => {
|
info(this.$Route.query.orderId).then(res => {
|
||||||
let { total, order_no, business_order_id, diff_prices, diff } = res
|
let { total, order_no, business_order_id, diff_prices, diff, score } = res
|
||||||
this.orderId = business_order_id
|
this.orderId = business_order_id
|
||||||
this.diffId = diff.business_order_diff_price_id
|
this.diffId = diff.business_order_diff_price_id
|
||||||
this.payType = this.$Route.query.paytype
|
this.payType = this.$Route.query.paytype
|
||||||
this.total = this.payType === 'diff' ? diff_prices: total
|
this.total = this.payType === 'diff' ? diff_prices: total
|
||||||
this.orderNo = order_no
|
this.orderNo = order_no
|
||||||
|
this.balance = score
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -142,6 +169,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 抵扣金额
|
||||||
|
onDeductionSwitch(e){
|
||||||
|
this.deductionVal = ''
|
||||||
|
},
|
||||||
|
// 抵扣金额
|
||||||
|
blurDeductionVal(e){
|
||||||
|
let { value } = e.target
|
||||||
|
let maxVal = Math.min(this.balance, this.total)
|
||||||
|
if(value > maxVal){
|
||||||
|
this.deductionVal = maxVal
|
||||||
|
}
|
||||||
|
},
|
||||||
// 支付方式
|
// 支付方式
|
||||||
onPay(){
|
onPay(){
|
||||||
switch(this.payMethod){
|
switch(this.payMethod){
|
||||||
@@ -156,32 +195,38 @@
|
|||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 'wx':
|
case 'wx':
|
||||||
if(this.payType == 'price') this.onUmsPay('mp')
|
if(this.payType == 'price') this.onUmsPay('app')
|
||||||
if(this.payType == 'diff') this.onDiffUmsPay('mp')
|
if(this.payType == 'diff') this.onDiffUmsPay('app')
|
||||||
if(this.payType == 'free') this.onFreePay('mp')
|
if(this.payType == 'free') this.onFreePay('mp')
|
||||||
break;
|
break;
|
||||||
case 'ali':
|
case 'ali':
|
||||||
if(this.payType == 'price') this.onUmsPay('mp_alipay')
|
if(this.payType == 'price') this.onUmsPay('app_alipay')
|
||||||
if(this.payType == 'diff') this.onDiffUmsPay('mp_alipay')
|
if(this.payType == 'diff') this.onDiffUmsPay('app_alipay')
|
||||||
if(this.payType == 'free') this.onFreePay('mp_alipay')
|
if(this.payType == 'free') this.onFreePay('mp_alipay')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 混合支付
|
||||||
|
|
||||||
// 银联三方支付
|
// 银联三方支付
|
||||||
onUmsPay(type){
|
onUmsPay(type){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
umsPay(this.orderId, { type }).then(res => {
|
umsPay(this.orderId, {
|
||||||
|
type,
|
||||||
|
use_fire: this.isDeduction ? 1 : 0,
|
||||||
|
fire : this.deductionVal || 0,
|
||||||
|
}).then(res => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.getState = true
|
this.getState = true
|
||||||
this.trade_id = res.trade_id
|
this.trade_id = res.trade_id
|
||||||
switch (type){
|
switch (type){
|
||||||
case 'mp':
|
case 'app':
|
||||||
this.onMiniWx()
|
this.onMiniWx()
|
||||||
break;
|
break;
|
||||||
case 'mp_alipay':
|
case 'app_alipay':
|
||||||
plus.runtime.openURL(res.alipay)
|
plus.runtime.openURL(res.alipay)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -198,15 +243,19 @@
|
|||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
diffUmsPay(this.diffId, {type}).then(res => {
|
diffUmsPay(this.diffId, {
|
||||||
|
type,
|
||||||
|
use_fire: this.isDeduction ? 1 : 0,
|
||||||
|
fire : this.deductionVal || 0
|
||||||
|
}).then(res => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.getState = true
|
this.getState = true
|
||||||
this.trade_id = res.trade_id
|
this.trade_id = res.trade_id
|
||||||
switch (type){
|
switch (type){
|
||||||
case 'mp':
|
case 'app':
|
||||||
this.onMiniWx()
|
this.onMiniWx()
|
||||||
break;
|
break;
|
||||||
case 'mp_alipay':
|
case 'app_alipay':
|
||||||
plus.runtime.openURL(res.alipay)
|
plus.runtime.openURL(res.alipay)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -228,10 +277,10 @@
|
|||||||
this.getState = true
|
this.getState = true
|
||||||
this.trade_id = res.trade_id
|
this.trade_id = res.trade_id
|
||||||
switch (type){
|
switch (type){
|
||||||
case 'mp':
|
case 'app':
|
||||||
this.onMiniWx()
|
this.onMiniWx()
|
||||||
break;
|
break;
|
||||||
case 'mp_alipay':
|
case 'app_alipay':
|
||||||
plus.runtime.openURL(res.alipay)
|
plus.runtime.openURL(res.alipay)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -340,6 +389,33 @@
|
|||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 支付抵扣
|
||||||
|
.deduction{
|
||||||
|
background: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
.deduction-item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
.deduction-label{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
width: 300rpx;
|
||||||
|
.title{ font-size: 32rpx; line-height: 40rpx; }
|
||||||
|
.balance{ font-size: 26rpx; color: gray; line-height: 30rpx; margin-top: 5rpx; }
|
||||||
|
}
|
||||||
|
.deduction-input{
|
||||||
|
height: 85rpx;
|
||||||
|
width: calc(100% - 300rpx);
|
||||||
|
text-align: right;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 选择支付方式
|
// 选择支付方式
|
||||||
.choose{
|
.choose{
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content" v-if="!loding">
|
||||||
<block v-if="!eSign">
|
<block v-if="!eSign">
|
||||||
<!-- 上传身份证 -->
|
<!-- 上传身份证 -->
|
||||||
<view class="identity-from">
|
<view class="identity-from">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<view class="identity-from" v-if="eSign">
|
<view class="identity-from" v-if="eSign">
|
||||||
<view class="identity-inpus">
|
<view class="identity-inpus">
|
||||||
<label>经营城市</label>
|
<label>经营城市</label>
|
||||||
<view class="identity-inpus-text">{{province}} {{city}}</view>
|
<view class="identity-inpus-text">{{province}} {{city || '-'}}</view>
|
||||||
<!-- <input type="text" placeholder="-" v-model="city" disabled> -->
|
<!-- <input type="text" placeholder="-" v-model="city" disabled> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loding : true,
|
||||||
idCard : false,
|
idCard : false,
|
||||||
eSign : false,
|
eSign : false,
|
||||||
isPathChange: false,
|
isPathChange: false,
|
||||||
@@ -124,6 +125,7 @@
|
|||||||
let { id_card, e_sign } = res;
|
let { id_card, e_sign } = res;
|
||||||
this.idCard = id_card;
|
this.idCard = id_card;
|
||||||
this.eSign = e_sign;
|
this.eSign = e_sign;
|
||||||
|
this.loding = false
|
||||||
if(this.idCard){
|
if(this.idCard){
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
return
|
return
|
||||||
@@ -187,6 +189,7 @@
|
|||||||
showpath: res.back_card,
|
showpath: res.back_card,
|
||||||
path : res.back_card_path
|
path : res.back_card_path
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.province.id != 0){
|
if(res.province.id != 0){
|
||||||
this.province = res.province.name
|
this.province = res.province.name
|
||||||
this.provincesVal = this.provinces.findIndex(val => val.id === res.province.id)
|
this.provincesVal = this.provinces.findIndex(val => val.id === res.province.id)
|
||||||
|
|||||||
0
uni_modules/oct-im/changelog.md
Normal file
0
uni_modules/oct-im/changelog.md
Normal file
9
uni_modules/oct-im/components/oct-im/oct-im.vue
Normal file
9
uni_modules/oct-im/components/oct-im/oct-im.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<list></list>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
81
uni_modules/oct-im/package.json
Normal file
81
uni_modules/oct-im/package.json
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"id": "oct-im",
|
||||||
|
"displayName": "oct-im",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "oct-im",
|
||||||
|
"keywords": [
|
||||||
|
"oct-im"
|
||||||
|
],
|
||||||
|
"repository": "",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.0"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"type": "component-vue",
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "",
|
||||||
|
"data": "",
|
||||||
|
"permissions": ""
|
||||||
|
},
|
||||||
|
"npmurl": ""
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "u",
|
||||||
|
"aliyun": "u"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "u",
|
||||||
|
"vue3": "u"
|
||||||
|
},
|
||||||
|
"App": {
|
||||||
|
"app-vue": "u",
|
||||||
|
"app-nvue": "u"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "u",
|
||||||
|
"Android Browser": "u",
|
||||||
|
"微信浏览器(Android)": "u",
|
||||||
|
"QQ浏览器(Android)": "u"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "u",
|
||||||
|
"IE": "u",
|
||||||
|
"Edge": "u",
|
||||||
|
"Firefox": "u",
|
||||||
|
"Safari": "u"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "u",
|
||||||
|
"阿里": "u",
|
||||||
|
"百度": "u",
|
||||||
|
"字节跳动": "u",
|
||||||
|
"QQ": "u",
|
||||||
|
"钉钉": "u",
|
||||||
|
"快手": "u",
|
||||||
|
"飞书": "u",
|
||||||
|
"京东": "u"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
uni_modules/oct-im/readme.md
Normal file
1
uni_modules/oct-im/readme.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# oct-im
|
||||||
Reference in New Issue
Block a user