修改:非弹框式支付 合并到一个组件,不在每个页面单独配置
This commit is contained in:
parent
e11b24eaaa
commit
d68baef0d0
|
|
@ -0,0 +1,226 @@
|
|||
<template>
|
||||
<view class="pay-content">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value === 'balance'">{{ item.number || '0.00' }}</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value === payType" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getUserInfo} from "@/api/user";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
// 支付信息
|
||||
payType: {
|
||||
type: String,
|
||||
default () {
|
||||
return 'weixin';
|
||||
}
|
||||
},
|
||||
// 是否使用余额
|
||||
isBalance:{
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// 可用余额数量
|
||||
useBalance: {
|
||||
type: Number || String,
|
||||
default: 0,
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pay_list: {
|
||||
weixin: {
|
||||
name: "微信支付",
|
||||
icon: "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1
|
||||
},
|
||||
// #ifdef H5 || APP-PLUS
|
||||
alipay: {
|
||||
name: "支付宝支付",
|
||||
icon: "icon-zhifubao",
|
||||
value: 'alipay',
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
alipayQr: {
|
||||
name: "支付宝支付",
|
||||
icon: "icon-zhifubao",
|
||||
value: 'alipayQr',
|
||||
title: '支付宝支付二维码',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
// #endif
|
||||
balance: {
|
||||
name: "余额支付",
|
||||
icon: "icon-yuezhifu",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status && this.isBalance,
|
||||
number: 0
|
||||
},
|
||||
hftx_weixin: {
|
||||
name: "微信支付",
|
||||
icon: "icon-yuezhifu",
|
||||
value: 'hftx_weixin',
|
||||
title: '第三方微信支付(汇付)',
|
||||
payStatus: 1
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 存在指定的余额数量 则改变余额数量
|
||||
useBalance: {
|
||||
handler() {
|
||||
let useBalance = Number(this.useBalance || 0).toFixed(2);
|
||||
if(useBalance > 0) this.pay_list.balance.number = useBalance || '0.00';
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getUserBalance();
|
||||
},
|
||||
methods: {
|
||||
// 获取用户余额
|
||||
getUserBalance(){
|
||||
let _this = this;
|
||||
let useBalance = Number(this.useBalance || 0).toFixed(2);
|
||||
if(_this.pay_list.balance && useBalance <= 0){
|
||||
getUserInfo().then(res => {
|
||||
_this.pay_list.balance.number = res.data.now_money || '0.00';
|
||||
});
|
||||
}
|
||||
},
|
||||
// 点击切换支付项
|
||||
changePayType(e){
|
||||
let value = e.detail.value || e.target.value;
|
||||
this.$emit('change', value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pay-content{
|
||||
.box-title{
|
||||
margin: 30rpx 0;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 28rpx;
|
||||
padding-left: 20rpx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
.box-title:after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc((50rpx - 30rpx) / 2);
|
||||
width: 10rpx;
|
||||
height: 30rpx;
|
||||
background: #1777ff;
|
||||
}
|
||||
.box-content{
|
||||
.pay-label:not(:last-child){
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.pay-item{
|
||||
height: 120rpx;
|
||||
padding: 20rpx;
|
||||
width: 100%;
|
||||
border: 2rpx solid #d9dce4;
|
||||
border-radius: 15rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
.left{
|
||||
width: calc(100% - 80rpx);
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
.animated{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
background-color: #fe960f;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.icon-weixin2 {
|
||||
background-color: #41b035;
|
||||
}
|
||||
.icon-icon34 {
|
||||
background-color: #4295D5;
|
||||
}
|
||||
.pay-item-info{
|
||||
.pay-name{
|
||||
text-align: left;
|
||||
border-right: 1px solid #eee;
|
||||
justify-content: left;
|
||||
}
|
||||
.tip{
|
||||
text-align: left;
|
||||
font-size: 26rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right{
|
||||
width: 80rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -27,32 +27,7 @@
|
|||
</view>
|
||||
<!--选择支付方式-->
|
||||
<view class="pay-type" v-if="Number(pay_money) > 0">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--提交按钮-->
|
||||
<view class="group-btn">
|
||||
|
|
@ -86,11 +61,13 @@ import authorize from '@/components/Authorize';
|
|||
import { activityDetail,activityJoin } from "@/api/activity";
|
||||
import {getUserInfo} from "@/api/user";
|
||||
import {searchMer} from '@/api/exchange.js';
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
export default {
|
||||
name: 'business',
|
||||
components: {
|
||||
authorize
|
||||
authorize,
|
||||
pay
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||
|
|
@ -109,42 +86,6 @@ export default {
|
|||
lat: '',
|
||||
lng: '',
|
||||
//支付方式
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
pay_money: 0,// 支付金额
|
||||
pay_info: {
|
||||
pay_type: 'weixin',
|
||||
|
|
@ -197,10 +138,6 @@ export default {
|
|||
// 授权成功 初始化
|
||||
init () {
|
||||
let _this = this;
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
_this.now_money = res.data.now_money
|
||||
});
|
||||
// 定位
|
||||
_this.lat = uni.getStorageSync('user_latitude') || '';
|
||||
_this.lng = uni.getStorageSync('user_longitude') || '';
|
||||
|
|
@ -512,8 +449,8 @@ export default {
|
|||
});
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -62,32 +62,7 @@
|
|||
</view>
|
||||
<!--选择支付方式-->
|
||||
<view class="pay-type" v-if="Number(level_info.price) > 0">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--操作按钮-->
|
||||
<view class="join-btn">
|
||||
|
|
@ -107,12 +82,13 @@ import {mapGetters} from "vuex";
|
|||
import authorize from '@/components/Authorize';
|
||||
import {HTTP_REQUEST_URL} from '@/config/app.js';
|
||||
import {merShareholderLevelInfo, merShareholderMerInfo, merShareholderSubmitJoinInfo, merShareholderGetJoinInfo} from "@/api/store";
|
||||
import {getUserInfo} from "@/api/user";
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
export default {
|
||||
name: 'business',
|
||||
components: {
|
||||
authorize
|
||||
authorize,
|
||||
pay
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor']),
|
||||
|
|
@ -147,42 +123,6 @@ export default {
|
|||
coupon_list: {},
|
||||
join_info: {},
|
||||
//支付方式
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
pay_info: {
|
||||
pay_type: 'weixin',
|
||||
// #ifdef H5
|
||||
|
|
@ -237,10 +177,6 @@ export default {
|
|||
},
|
||||
// 授权成功 初始化
|
||||
init () {
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
this.now_money = res.data.now_money
|
||||
});
|
||||
this.getJoinInfo();
|
||||
this.getMerInfo();
|
||||
this.getLevelInfo();
|
||||
|
|
@ -295,8 +231,8 @@ export default {
|
|||
})
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
// 提交加入申请信息
|
||||
submitJoinApplyInfo(){
|
||||
|
|
|
|||
|
|
@ -24,32 +24,7 @@
|
|||
</view>
|
||||
<!--支付方式-->
|
||||
<view class="pay-type">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--支付按钮-->
|
||||
<view class="pay-btn" v-if="agent_id > 0" @click="confirmPayment">确认支付</view>
|
||||
|
|
@ -82,14 +57,15 @@
|
|||
import {mapGetters} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import {getUserInfo} from "@/api/user";
|
||||
import {deliveryPaymentList, deliveryCreateOrder} from "@/api/agent";
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
emptyPage,
|
||||
pay
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -98,42 +74,6 @@ export default {
|
|||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false,//是否隐藏授权
|
||||
//支付相关
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
pay_info: {
|
||||
money: 0.00,// 买单金额
|
||||
pay_type: 'weixin',
|
||||
|
|
@ -193,11 +133,6 @@ export default {
|
|||
},
|
||||
// 授权成功 获取用户信息
|
||||
init () {
|
||||
let _this = this;
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
_this.now_money = res.data.now_money
|
||||
});
|
||||
// 获取用户缴费列表
|
||||
this.getPaymentList();
|
||||
},
|
||||
|
|
@ -229,8 +164,8 @@ export default {
|
|||
this.$refs.paymentListPopup.close();
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value
|
||||
},
|
||||
// 确认付款
|
||||
confirmPayment(){
|
||||
|
|
@ -585,72 +520,6 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
// 支付方式
|
||||
.pay-type{
|
||||
|
||||
.box-content{
|
||||
.pay-label:not(:last-child){
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.pay-item{
|
||||
height: 120rpx;
|
||||
padding: 20rpx;
|
||||
width: 100%;
|
||||
border: 2rpx solid #d9dce4;
|
||||
border-radius: 15rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
.left{
|
||||
width: calc(100% - 80rpx);
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
.animated{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
background-color: #fe960f;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.icon-weixin2 {
|
||||
background-color: #41b035;
|
||||
}
|
||||
.icon-icon34 {
|
||||
background-color: #4295D5;
|
||||
}
|
||||
.pay-item-info{
|
||||
.pay-name{
|
||||
text-align: left;
|
||||
border-right: 1px solid #eee;
|
||||
justify-content: left;
|
||||
}
|
||||
.tip{
|
||||
text-align: left;
|
||||
font-size: 26rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right{
|
||||
width: 80rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 确认支付
|
||||
.pay-btn{
|
||||
width: calc(100% - (20rpx * 2));
|
||||
|
|
|
|||
|
|
@ -118,36 +118,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
|
||||
<!--选择支付方式-->
|
||||
<view class="pay-type" v-if="Number(pay_money) > 0 && Number(apply_info_id) <= 0">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--提交按钮-->
|
||||
<view class="group-btn">
|
||||
|
|
@ -179,13 +152,14 @@ import authorize from '@/components/Authorize';
|
|||
import areaSelect from '@/components/areaSelect';
|
||||
import {getSingleAgentInfo,getAgentConfig,submitAgentApplyInfo,agentApplyInfo} from "@/api/agent";
|
||||
import { merClassifly,getStoreTypeApi } from '@/api/store.js';
|
||||
import {getUserInfo} from "@/api/user";
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
export default {
|
||||
name: 'business',
|
||||
components: {
|
||||
authorize,
|
||||
areaSelect
|
||||
areaSelect,
|
||||
pay
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||
|
|
@ -225,42 +199,6 @@ export default {
|
|||
mer_type_index: 0,
|
||||
mer_type_name: '',
|
||||
//支付方式
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
pay_info: {
|
||||
pay_type: 'weixin',
|
||||
// #ifdef H5
|
||||
|
|
@ -316,10 +254,6 @@ export default {
|
|||
this.getConfig();
|
||||
this.getMerClass();
|
||||
this.getMerType();
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
this.now_money = res.data.now_money
|
||||
});
|
||||
},
|
||||
// 获取邀请人信息
|
||||
getInviteAgentInfo(){
|
||||
|
|
@ -748,8 +682,8 @@ export default {
|
|||
});
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
// 查看申请记录
|
||||
applyRecord(){
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<view v-if="orderList.length > 0">
|
||||
<block v-if="orderStatus == 0">
|
||||
<view class='item' v-for="(item,index) in orderList" :key="index">
|
||||
<view @click='goOrderDetails(item.group_order_id)'>
|
||||
<view>
|
||||
<view class='title acea-row row-between-wrapper'>
|
||||
<view class="acea-row row-middle left-wrapper">
|
||||
{{item.group_order_sn}}
|
||||
|
|
@ -108,16 +108,13 @@
|
|||
<view class='totalPrice' v-if="item.orderList[0].activity_type !== 2">共{{item.total_num || 0}}件商品,总金额
|
||||
<text class='money p-color'>¥{{item.pay_price}}</text>
|
||||
</view>
|
||||
<!--<view class='bottom acea-row row-right row-middle'>-->
|
||||
<!-- <view class='bnt b-color' @click.stop='goPay(item)'>立即付款</view>-->
|
||||
<!--</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 待发货 待收货 待评价 已完成 -->
|
||||
<block v-else>
|
||||
<view class='item' v-for="(item,index) in orderList" :key="index">
|
||||
<view @click='goOrderDetails(item.order_id)'>
|
||||
<view>
|
||||
<view class='title acea-row row-between-wrapper'>
|
||||
<view class="acea-row row-middle left-wrapper" @click.stop="goMall(item)">
|
||||
<text class="iconfont icon-shangjiadingdan"></text>
|
||||
|
|
@ -193,31 +190,6 @@
|
|||
<text class='money p-color'>¥{{item.pay_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!--<view class='bottom acea-row row-right row-middle'>-->
|
||||
<!-- <view v-if="!item.receipt && item.status != -1 && item.open_receipt == 1" class='bnt cancelBnt' @click.stop='applyInvoice(item.order_id)'>申请开票</view>-->
|
||||
<!-- <block v-if="item.status == 0 || item.status == 9 || item.status == -1">-->
|
||||
<!-- <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>-->
|
||||
<!-- </block>-->
|
||||
<!-- <block v-if="item.status == 1">-->
|
||||
<!-- <view class='bnt cancelBnt' v-if="item.delivery_type == 1 || item.delivery_type == 2" @click='goOrderDetails(item.order_id)'>查看物流</view>-->
|
||||
<!-- <view class='bnt b-color' @tap='confirmOrder(item,index)'>确认收货</view>-->
|
||||
<!-- </block>-->
|
||||
<!-- <block v-if="item.status == 2">-->
|
||||
<!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">-->
|
||||
<!-- <text class="iconfont icon-fabu"></text>-->
|
||||
<!-- 发布种草-->
|
||||
<!-- </navigator>-->
|
||||
<!-- <view class='bnt b-color' @click='goOrderDetails_Evaluation(item.order_id)'>去评价</view>-->
|
||||
<!-- </block>-->
|
||||
<!-- <block v-if="item.status == 3">-->
|
||||
<!-- <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-if="item.activity_type == 2 || item.activity_type == 3 || item.activity_type == 10">查看详情</view>-->
|
||||
<!-- <navigator v-if="community_status == 1 && !item.community_id" :url="'/pages/plantGrass/plant_release/index?order_id='+item.order_id" class='bnt colorBnt' hover-class="none">-->
|
||||
<!-- <text class="iconfont icon-fabu"></text>-->
|
||||
<!-- 发布种草-->
|
||||
<!-- </navigator>-->
|
||||
<!-- <view class='bnt b-color' @click='goOrderDetails(item.order_id)' v-else>再次购买</view>-->
|
||||
<!-- </block>-->
|
||||
<!--</view>-->
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
|
@ -278,30 +250,8 @@
|
|||
page: 1,
|
||||
limit: 20,
|
||||
domain: HTTP_REQUEST_URL,
|
||||
payMode: [{
|
||||
name: "微信支付",
|
||||
icon: "icon-weixinzhifu",
|
||||
value: 'wechat',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-zhifubao",
|
||||
value: 'alipay',
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
name: "余额支付",
|
||||
icon: "icon-yuezhifu",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
number: 0,
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status
|
||||
}
|
||||
],
|
||||
pay_close: false,
|
||||
|
||||
|
||||
pay_order_id: '',
|
||||
invoice_order_id: '',
|
||||
totalPrice: '0',
|
||||
|
|
@ -329,14 +279,7 @@
|
|||
...mapGetters(['isLogin','uid','viewColor', 'shopIsLogin', 'shopMerId']),
|
||||
...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']),
|
||||
},
|
||||
watch: {
|
||||
alipay_open(n){
|
||||
this.payMode[1].payStatus = n
|
||||
},
|
||||
yue_pay_status(n){
|
||||
this.payMode[2].payStatus = n
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
onShow() {
|
||||
if (this.isLogin) {
|
||||
this.page = 1;
|
||||
|
|
@ -417,8 +360,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 去商铺
|
||||
goMall(item){
|
||||
if(this.hide_mer_status == 0){
|
||||
|
|
@ -437,16 +378,7 @@
|
|||
authColse: function(e) {
|
||||
this.isShowAuth = e
|
||||
},
|
||||
/**
|
||||
* 事件回调
|
||||
*
|
||||
*/
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
|
|
@ -455,7 +387,6 @@
|
|||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.user_balance = res.data.now_money || 0.00;
|
||||
that.payMode[2].number = res.data.now_money;
|
||||
});
|
||||
if(that.shopIsLogin){
|
||||
getStoreDetail(that.shopMerId).then(res => {
|
||||
|
|
@ -463,149 +394,7 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 关闭支付组件
|
||||
*
|
||||
*/
|
||||
payClose: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 取消订单
|
||||
*
|
||||
*/
|
||||
cancelOrder: function(index, order_id) {
|
||||
let that = this;
|
||||
if (!order_id) return that.$util.Tips({
|
||||
title: '缺少订单号无法取消订单'
|
||||
});
|
||||
unOrderCancel(order_id).then(res => {
|
||||
return that.$util.Tips({
|
||||
title: res.message,
|
||||
icon: 'success'
|
||||
}, function() {
|
||||
that.orderList.splice(index, 1);
|
||||
that.$set(that, 'orderList', that.orderList);
|
||||
that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
|
||||
that.getOrderData();
|
||||
});
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
});
|
||||
},
|
||||
// 打开支付组件
|
||||
goPay: function(item) {
|
||||
// 根据订单类型 判断显示用户余额还是商户余额
|
||||
if(item.activity_type == 35) this.payMode[2].number = this.mer_balance || 0.00;
|
||||
else this.payMode[2].number = this.user_balance || 0.00;
|
||||
// 显示支付弹框
|
||||
this.$set(this, 'pay_close', true);
|
||||
this.order_id = item.group_order_id;
|
||||
this.pay_order_id = item.group_order_id.toString()
|
||||
this.$set(this, 'totalPrice', item.pay_price);
|
||||
},
|
||||
/**
|
||||
* 支付成功回调
|
||||
*
|
||||
*/
|
||||
pay_complete: function() {
|
||||
this.loadend = false;
|
||||
this.page = 1;
|
||||
this.$set(this, 'orderList', []);
|
||||
this.pay_close = false;
|
||||
this.pay_order_id = '';
|
||||
this.getOrderData();
|
||||
this.getOrderList();
|
||||
},
|
||||
/**
|
||||
* 支付失败回调
|
||||
*
|
||||
*/
|
||||
pay_fail: function() {
|
||||
this.pay_close = false;
|
||||
this.pay_order_id = '';
|
||||
},
|
||||
/**
|
||||
* 去订单详情
|
||||
*/
|
||||
goOrderDetails: function(order_id) {
|
||||
|
||||
|
||||
return false;
|
||||
let self = this
|
||||
if (!order_id) return that.$util.Tips({
|
||||
title: '缺少订单号无法查看订单详情'
|
||||
});
|
||||
// #ifdef MP
|
||||
uni.showLoading({
|
||||
title: '正在加载',
|
||||
})
|
||||
openOrderSubscribe().then(() => {
|
||||
uni.hideLoading();
|
||||
if (self.orderStatus == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/stay?order_id=' + order_id
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/index?order_id=' + order_id
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading();
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
if (self.orderStatus == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/stay?order_id=' + order_id
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/index?order_id=' + order_id
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 点击去评价
|
||||
*/
|
||||
goOrderDetails_Evaluation: function(order_id) {
|
||||
let self = this
|
||||
if (!order_id) return that.$util.Tips({
|
||||
title: '缺少订单号无法查看订单详情和评价'
|
||||
});
|
||||
// #ifdef MP
|
||||
if (self.orderStatus == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/stay?order_id=' + order_id
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/index?order_id=' + order_id
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
// #ifndef MP
|
||||
if (self.orderStatus == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/stay?order_id=' + order_id
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_details/index?order_id=' + order_id
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 切换类型
|
||||
*/
|
||||
// 切换类型
|
||||
statusClick: function(status) {
|
||||
if (status == this.orderStatus) return;
|
||||
this.orderStatus = status;
|
||||
|
|
@ -615,9 +404,7 @@
|
|||
this.$set(this, 'orderList', []);
|
||||
this.getOrderList();
|
||||
},
|
||||
/**
|
||||
* 获取定金预售订单列表
|
||||
*/
|
||||
// 获取定金预售订单列表
|
||||
getpreSellOrderList: function() {
|
||||
let that = this;
|
||||
getOrderList({
|
||||
|
|
@ -630,9 +417,7 @@
|
|||
that.$set(that, 'presellProList', list);
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取单个订单商品数量
|
||||
*/
|
||||
// 获取单个订单商品数量
|
||||
getProductCount: function(){
|
||||
if(this.orderStatus !== 0){
|
||||
this.orderList.forEach((item,i) => {
|
||||
|
|
@ -646,109 +431,11 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
delOrder: function(order_id, index) {
|
||||
let that = this;
|
||||
orderDel(order_id).then(res => {
|
||||
that.orderList.splice(index, 1);
|
||||
that.$set(that, 'orderList', that.orderList);
|
||||
that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
|
||||
that.getOrderData();
|
||||
return that.$util.Tips({
|
||||
title: '删除成功',
|
||||
icon: 'success'
|
||||
});
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
},
|
||||
// 确认收货
|
||||
confirmOrder: function(item, index) {
|
||||
let that = this;
|
||||
uni.showModal({
|
||||
title: '确认收货',
|
||||
content: '为保障权益,请收到货确认无误后,再确认收货',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
orderTake(item.order_id).then(res => {
|
||||
return that.$util.Tips({
|
||||
title: '操作成功',
|
||||
icon: 'success'
|
||||
}, function() {
|
||||
that.orderList.splice(index, 1);
|
||||
that.getOrderData();
|
||||
});
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/*申请开票*/
|
||||
applyInvoice(order_id) {
|
||||
let that = this;
|
||||
that.invoice_order_id = order_id
|
||||
that.invoice.invoice = true;
|
||||
that.$refs.addInvoicing.popupTitle = false;
|
||||
that.$refs.addInvoicing.getInvoiceDefault();
|
||||
that.$refs.addInvoicing.getInvoiceList();
|
||||
},
|
||||
// 关闭发票弹窗
|
||||
changeInvoiceClose: function(data) {
|
||||
if(data)this.getInvoiceData(data);
|
||||
this.$set(this.invoice, 'invoice', false);
|
||||
},
|
||||
// 开票回调
|
||||
getInvoiceData(data) {
|
||||
let that = this
|
||||
applyInvoiceApi(that.invoice_order_id,data).then(res => {
|
||||
return that.$util.Tips({
|
||||
title: res.message,
|
||||
});
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.getOrderList();
|
||||
},
|
||||
|
||||
// #ifdef MP
|
||||
// 分享给好友
|
||||
onShareAppMessage () {
|
||||
let pages = getCurrentPages();
|
||||
let page = pages[pages.length - 1]
|
||||
let shareData = {
|
||||
title: '订单列表',
|
||||
path: page.$page.fullPath || '/' + page.route,
|
||||
};
|
||||
// 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享
|
||||
if (this.isLogin) shareData.path = shareData.path + '?spread=' + this.uid;
|
||||
// 返回最终的分享配置信息
|
||||
return shareData
|
||||
},
|
||||
// 分享到朋友圈
|
||||
onShareTimeline() {
|
||||
let shareData = {
|
||||
title: '订单列表',
|
||||
query: {},
|
||||
};
|
||||
// 判断:用户是否登录 已经登录则添加分享人信息,未登录则正常分享
|
||||
if (this.isLogin) shareData.query.spread = this.uid;
|
||||
// 返回最终的分享配置信息
|
||||
return shareData
|
||||
},
|
||||
// #endif
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -22,32 +22,7 @@
|
|||
<view class="pay-info">
|
||||
<!--支付方式-->
|
||||
<view class="pay-type" v-if="pay_info.money > 0">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--支付按钮-->
|
||||
<view class="pay-btn" v-if="pay_info.money > 0" @click="confirmPayment">确认支付</view>
|
||||
|
|
@ -65,12 +40,14 @@
|
|||
import {mapGetters} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app.js';
|
||||
import {getUserInfo, inviteCodeInfo, inviteCodePayment} from "@/api/user";
|
||||
import { inviteCodeInfo, inviteCodePayment} from "@/api/user";
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
export default {
|
||||
name: 'business',
|
||||
components: {
|
||||
authorize,
|
||||
pay
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||
|
|
@ -91,43 +68,6 @@ export default {
|
|||
return_url: 'http://' + window.location.host + '/pages/users/order_list/index',
|
||||
// #endif
|
||||
},
|
||||
//支付方式
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
|
@ -164,12 +104,6 @@ export default {
|
|||
},
|
||||
// 授权成功 初始化
|
||||
init () {
|
||||
let _this = this;
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
_this.now_money = res.data.now_money
|
||||
});
|
||||
|
||||
this.getInviteCodeInfo();
|
||||
},
|
||||
// 错误提示 并且返回个人中心
|
||||
|
|
@ -210,8 +144,8 @@ export default {
|
|||
});
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
// 确认付款
|
||||
confirmPayment(){
|
||||
|
|
|
|||
|
|
@ -58,32 +58,7 @@
|
|||
<view class="pay-info">
|
||||
<!--支付方式-->
|
||||
<view class="pay-type" v-if="pay_info.money > 0">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--支付按钮-->
|
||||
<view class="pay-btn" v-if="pay_info.money > 0" @click="confirmPayment">确认支付</view>
|
||||
|
|
@ -101,12 +76,14 @@
|
|||
import {mapGetters} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app.js';
|
||||
import {getUserInfo, vipExchangeCodeInfo, vipExchangeCodePayment} from "@/api/user";
|
||||
import { vipExchangeCodeInfo, vipExchangeCodePayment} from "@/api/user";
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
export default {
|
||||
name: 'business',
|
||||
components: {
|
||||
authorize,
|
||||
pay
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||
|
|
@ -128,42 +105,6 @@ export default {
|
|||
return_url: 'http://' + window.location.host + '/pages/users/order_list/index',
|
||||
// #endif
|
||||
},
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
// 图标
|
||||
use_invite_1: '',
|
||||
use_invite_2: '',
|
||||
|
|
@ -209,12 +150,6 @@ export default {
|
|||
},
|
||||
// 授权成功 初始化
|
||||
init () {
|
||||
let _this = this;
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
_this.now_money = res.data.now_money
|
||||
});
|
||||
|
||||
this.getCodeInfo();
|
||||
},
|
||||
// 错误提示 并且返回个人中心
|
||||
|
|
@ -258,8 +193,8 @@ export default {
|
|||
});
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
// 确认付款
|
||||
confirmPayment(){
|
||||
|
|
|
|||
|
|
@ -62,32 +62,7 @@
|
|||
</view>
|
||||
<!--支付方式-->
|
||||
<view class="pay-type" v-if="pay_info.diff_money_pay > 0">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--提交按钮-->
|
||||
<view class="pay-btn" v-if="pay_info.total_money > 0 && point_info.id > 0 && staff_info.uid > 0" @click="confirmPayment">确认兑换</view>
|
||||
|
|
@ -156,8 +131,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -169,12 +142,14 @@ import authorize from '@/components/Authorize';
|
|||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import spread from "@/libs/spread";
|
||||
import {getUserInfo} from "@/api/user";
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
emptyPage,
|
||||
pay
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -215,43 +190,6 @@ export default {
|
|||
return_url: 'http://' + window.location.host + '/pages/users/order_list/index',
|
||||
// #endif
|
||||
},
|
||||
//支付方式
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -259,10 +197,10 @@ export default {
|
|||
},
|
||||
onLoad(options) {
|
||||
if(options.scene){
|
||||
// console.log('转换前参数:',options.scene)
|
||||
console.log('转换前参数:',options.scene)
|
||||
// 由于微信长度限制问题 suid=staff_id;pid=point_id;tmy=total_money
|
||||
var scene = this.$util.getUrlParams(decodeURIComponent(options.scene));
|
||||
console.log("接收参数",scene)
|
||||
// console.log("接收参数",scene)
|
||||
this.point_search.default_point_id = scene.pid || 0;
|
||||
this.consume_search.default_consume_id = scene.consume_uid || 0;
|
||||
this.default_staff_id = scene.suid || 0;
|
||||
|
|
@ -341,10 +279,6 @@ export default {
|
|||
// 提货点选择初始化
|
||||
let pointId = _this.point_info.id || 0;
|
||||
if(pointId <= 0) _this.showPointPopup();
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
_this.now_money = res.data.now_money
|
||||
});
|
||||
},
|
||||
// 获取用户持有信息
|
||||
getUserInfo(){
|
||||
|
|
@ -734,8 +668,8 @@ export default {
|
|||
}
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -46,32 +46,7 @@
|
|||
</view>
|
||||
<!--支付方式-->
|
||||
<view class="pay-type" v-if="pay_info.diff_money_pay > 0">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--提交按钮-->
|
||||
<view class="pay-btn" v-if="pay_info.total_money > 0" @click="confirmPayment">确认兑换</view>
|
||||
|
|
@ -90,12 +65,14 @@ import authorize from '@/components/Authorize';
|
|||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import {getUserInfo} from "@/api/user";
|
||||
import {getStaffInfo} from "@/api/service";
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
emptyPage,
|
||||
pay
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -120,43 +97,6 @@ export default {
|
|||
return_url: 'http://' + window.location.host + '/pages/users/order_list/index',
|
||||
// #endif
|
||||
},
|
||||
//支付方式
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -164,12 +104,18 @@ export default {
|
|||
},
|
||||
onLoad(options) {
|
||||
if(options.scene){
|
||||
// console.log('转换前参数:',options.scene)
|
||||
console.log('转换前参数:',options.scene)
|
||||
var scene = this.$util.getUrlParams(decodeURIComponent(options.scene));
|
||||
// console.log("接收参数",scene)
|
||||
this.service_id = scene.sid || 0;
|
||||
this.default_total_money = Number(scene.tmy) || 0;
|
||||
}
|
||||
// 判断:是否存在指定信息
|
||||
if(Number(this.service_id) <= 0 && Number(this.default_total_money) <= 0){
|
||||
this.$util.Tips({
|
||||
title: '非法访问,信息参数错误!',
|
||||
},{tab:1,url:'/pages/user/index'});
|
||||
}
|
||||
// 判断:是否登录
|
||||
if (!this.isLogin) {
|
||||
// 未登录 授权登录
|
||||
|
|
@ -228,10 +174,6 @@ export default {
|
|||
let _this = this;
|
||||
// 获取持有信息
|
||||
this.getService();
|
||||
// 获取用户余额信息
|
||||
getUserInfo().then(res => {
|
||||
_this.now_money = res.data.now_money
|
||||
});
|
||||
},
|
||||
// 获取用户持有信息
|
||||
getUserInfo(){
|
||||
|
|
@ -514,8 +456,8 @@ export default {
|
|||
}
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
|
||||
},
|
||||
|
|
@ -669,72 +611,6 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
// 支付方式
|
||||
.pay-type{
|
||||
|
||||
.box-content{
|
||||
.pay-label:not(:last-child){
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.pay-item{
|
||||
height: 120rpx;
|
||||
padding: 20rpx;
|
||||
width: 100%;
|
||||
border: 2rpx solid #d9dce4;
|
||||
border-radius: 15rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
.left{
|
||||
width: calc(100% - 80rpx);
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
.animated{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
background-color: #fe960f;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.icon-weixin2 {
|
||||
background-color: #41b035;
|
||||
}
|
||||
.icon-icon34 {
|
||||
background-color: #4295D5;
|
||||
}
|
||||
.pay-item-info{
|
||||
.pay-name{
|
||||
text-align: left;
|
||||
border-right: 1px solid #eee;
|
||||
justify-content: left;
|
||||
}
|
||||
.tip{
|
||||
text-align: left;
|
||||
font-size: 26rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right{
|
||||
width: 80rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 确认支付
|
||||
.pay-btn{
|
||||
width: calc(100% - (20rpx * 2));
|
||||
|
|
|
|||
|
|
@ -39,32 +39,7 @@
|
|||
</view>
|
||||
<!--支付方式-->
|
||||
<view class="pay-type">
|
||||
<view class="box-title">支付方式</view>
|
||||
<view class="box-content">
|
||||
<radio-group name="pay_type" @change="changePayType">
|
||||
<view class="pay-label" v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
|
||||
<label>
|
||||
<view class="pay-item">
|
||||
<view class="left">
|
||||
<view :class="['iconfont','animated',item.icon]"></view>
|
||||
<view class="pay-item-info">
|
||||
<view class="pay-name">{{ item.name }}</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{now_money}}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<radio :value="item.value" :checked="item.value == pay_info.pay_type ? true : false" />
|
||||
</view>
|
||||
</view>
|
||||
</label>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
|
||||
</view>
|
||||
<!--支付按钮-->
|
||||
<view class="pay-btn" v-if="mer_info.mer_id > 0 && pay_info.money > 0" @click="confirmPayment">确认支付</view>
|
||||
|
|
@ -107,13 +82,14 @@ import authorize from '@/components/Authorize';
|
|||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import spread from "@/libs/spread";
|
||||
import {getUserInfo,merShareholdersIntegralStatistics} from "@/api/user";
|
||||
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
emptyPage,
|
||||
pay
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -136,43 +112,6 @@ export default {
|
|||
// #endif
|
||||
},
|
||||
default_mer_id: 0,
|
||||
//支付方式
|
||||
pay_list: [
|
||||
{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
now_money: 0,
|
||||
// 餐费积分
|
||||
integral_surplus: 0,
|
||||
integral_use: '',
|
||||
|
|
@ -239,10 +178,6 @@ export default {
|
|||
// 门店选择初始化
|
||||
let merId = _this.mer_info.mer_id || 0;
|
||||
if(merId <= 0) _this.merShowPopup();
|
||||
// 获取用户信息
|
||||
getUserInfo().then(res => {
|
||||
_this.now_money = res.data.now_money
|
||||
});
|
||||
// 获取用户餐费信息
|
||||
_this.shareholdersIntegralInfo();
|
||||
},
|
||||
|
|
@ -278,8 +213,8 @@ export default {
|
|||
this.merClosePopup();
|
||||
},
|
||||
// 修改支付方式
|
||||
changePayType(e){
|
||||
this.pay_info.pay_type = e.detail.value || e.target.value;
|
||||
changePayType(value){
|
||||
this.pay_info.pay_type = value;
|
||||
},
|
||||
// 确认付款
|
||||
confirmPayment(){
|
||||
|
|
|
|||
|
|
@ -323,41 +323,7 @@
|
|||
</view>
|
||||
<view class='wrapper'>
|
||||
<view class='item'>
|
||||
<view>支付方式</view>
|
||||
<view class='list'>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)'
|
||||
v-for="(item,index) in cartArr" :key='index' v-if="item.payStatus==1">
|
||||
<view class='name acea-row row-center-wrapper'>
|
||||
<view class='iconfont animated'
|
||||
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{ is_with_goods ? (withGoodsMerInfo.mer_money || 0.00) : userInfo.now_money }}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
<view class='payItem acea-row row-middle' :class='active==index ?"on":""' @tap='payItem(index)'
|
||||
v-for="(item,index) in cartArr" :key='index' v-if="item.payStatus==1">
|
||||
<view class='name acea-row row-center-wrapper'>
|
||||
<view class='iconfont animated'
|
||||
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'></view>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class='tip'>
|
||||
{{item.title}}
|
||||
<block v-if="item.value == 'balance'">
|
||||
{{ is_with_goods ? (withGoodsMerInfo.mer_money || 0.00) : userInfo.now_money }}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<pay :payType="payType" @change="payItem"></pay>
|
||||
</view>
|
||||
</view>
|
||||
<view class='moneyList'>
|
||||
|
|
@ -504,6 +470,7 @@
|
|||
import authorize from '@/components/Authorize';
|
||||
import {configMap} from '@/utils';
|
||||
import {HTTP_REQUEST_URL} from '@/config/app';
|
||||
import pay from "@/components/payment/pay";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -515,6 +482,7 @@
|
|||
discountDetails,
|
||||
"jyf-parser": parser,
|
||||
authorize,
|
||||
pay
|
||||
},
|
||||
filters: {
|
||||
filterDay(val) {
|
||||
|
|
@ -531,41 +499,6 @@
|
|||
msgObj: {},
|
||||
textareaStatus: true,
|
||||
deliveryName: '快递配送',
|
||||
//支付方式
|
||||
cartArr: [{
|
||||
"name": "微信支付",
|
||||
"icon": "icon-weixin2",
|
||||
value: 'weixin',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1,
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-icon34",
|
||||
// #ifdef H5 || APP-PLUS
|
||||
value: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
value: 'alipayQr',
|
||||
// #endif
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
"name": "余额支付",
|
||||
"icon": "icon-icon-test",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status,
|
||||
},
|
||||
{
|
||||
"name": "线下支付",
|
||||
"icon": "icon-yinhangqia",
|
||||
value: 'offline',
|
||||
title: '线下支付',
|
||||
payStatus: 2,
|
||||
},
|
||||
],
|
||||
tagStyle: {
|
||||
img: 'width:100%;display:block;',
|
||||
video: 'width:100%;'
|
||||
|
|
@ -759,9 +692,6 @@
|
|||
this.isAuto = true;
|
||||
this.isShowAuth = true
|
||||
}
|
||||
if (this.payType == 'weixin') {
|
||||
this.payType = this.from
|
||||
}
|
||||
let _this = this
|
||||
this.textareaStatus = true;
|
||||
if (this.isLogin && this.toPay == false && !this.orderPay) {
|
||||
|
|
@ -1196,15 +1126,9 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
payItem: function(e) {
|
||||
let that = this;
|
||||
let active = e;
|
||||
that.active = active;
|
||||
that.animated = true;
|
||||
that.payType = that.cartArr[active].value;
|
||||
if (that.payType == 'weixin') {
|
||||
that.payType = that.from
|
||||
}
|
||||
payItem: function(value) {
|
||||
let that = this;
|
||||
that.payType = value;
|
||||
},
|
||||
couponTap: function(item, index) {
|
||||
this.coupon = item
|
||||
|
|
@ -1585,11 +1509,15 @@
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
let payType = that.payType;
|
||||
if (payType === 'weixin') payType = that.from
|
||||
|
||||
data = {
|
||||
cart_id: this.cartId.split(","),
|
||||
address_id: this.addressId,
|
||||
use_coupon: this.subCoupon,
|
||||
pay_type: this.payType,
|
||||
pay_type: payType,
|
||||
mark: this.msgObj,
|
||||
order_type: this.order_type,
|
||||
key: this.order_key,
|
||||
|
|
|
|||
Loading…
Reference in New Issue