优化:弹框式支付组件的支付类型配置全部融合到组件内,不在每个页面单独配置。

增加:会员卡中心 - 会员卡续费支持余额支付
修改:会员卡中心 - 会员卡开通页面样式修改,权益根据会员卡同步改变
This commit is contained in:
wuhui_zzw 2024-06-24 17:52:40 +08:00
parent 6c2ff63405
commit e11b24eaaa
13 changed files with 587 additions and 796 deletions

View File

@ -4,13 +4,13 @@
<view class="title acea-row row-center-wrapper">
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view>
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode" :key="index" v-if="item.payStatus==1">
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in pay_list" :key="index" v-if="item.payStatus==1">
<view class="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view>
<view class="text">
<view class="name">{{item.name}}</view>
<view class="info" v-if="item.number">
{{item.title}} <span class="money">{{ item.number }}</span>
<view class="info" v-if="item.value === 'balance'">
{{item.title}} <span class="money">{{ item.number || '0.00' }}</span>
</view>
<view class="info" v-else>{{item.title}}</view>
</view>
@ -24,11 +24,9 @@
<script>
import {
orderPay,
integralOrderPay,
presellOrderPay
} from '@/api/order.js';
import {orderPay, integralOrderPay, presellOrderPay} from '@/api/order.js';
import {getUserInfo} from "@/api/user";
export default {
props: {
payMode: {
@ -60,23 +58,88 @@
returnUrl: {
type: String,
default: ''
}
},
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
},
}
};
},
mounted:function(){
watch: {
payMode: {
handler() {
this.pay_list = this.payMode
},
deep: true
},
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: {
close: function() {
//
close () {
this.$emit('onChangeFun', {
action: 'payClose'
});
},
goPay: function(number, paytype) {
//
goPay (number, paytype) {
if (this.isCall) {
return this.$emit('onChangeFun', {
action: 'payCheck',
@ -358,8 +421,21 @@
title: err
});
})
},
//
getUserBalance(){
let _this = this;
if(_this.pay_list.balance){
getUserInfo().then(res => {
_this.pay_list.balance.number = res.data.now_money || '0.00';
});
}
}
}
}
</script>

View File

@ -51,14 +51,8 @@
<!-- 授权登录 -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
<!-- 支付弹框 -->
<payment
:payMode='pay_list'
:pay_close="pay_close"
@onChangeFun='onChangeFun'
:order_id="pay_order_id"
:totalPrice='totalPrice'
:returnUrl="return_url">
</payment>
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :returnUrl="return_url"></payment>
</view>
</template>
@ -92,30 +86,6 @@ export default {
//
tab_active: 'all',
//
pay_list: [
{
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: '',
totalPrice: 0,
@ -162,9 +132,6 @@ export default {
//
init () {
this.getList();
getUserInfo().then(res => {
this.pay_list[2].number = res.data.now_money;
});
},
//
changeTab(type){

View File

@ -31,7 +31,6 @@
<!-- 支付弹框 -->
<payment
:payMode='pay_list'
:pay_close="pay_close"
@onChangeFun='onChangeFun'
:order_id="pay_order_id"
@ -68,30 +67,6 @@ export default {
isAuto: false, //
isShowAuth: false,//
//
pay_list: [
{
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: '',
totalPrice: 0,
@ -128,9 +103,6 @@ export default {
//
init () {
this.getRecordList();
getUserInfo().then(res => {
this.pay_list[2].number = res.data.now_money;
});
},
//
getRecordList() {

View File

@ -119,8 +119,10 @@
</view>
</view>
</view>
<payment :payMode="payMode" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
:order_id="pay_order_id" :totalPrice="totalPrice"></payment>
<!--支付组件-->
<payment :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun" :order_id="pay_order_id" :totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<view v-show="false" v-html="formContent"></view>
</view>
@ -136,13 +138,10 @@
memberCard,
memberEquity,
memberCouponLst,
memberCardDraw,
memberCardCreate,
groomList,
getAgreementApi,
receiveMemberCoupon
} from '@/api/user.js';
import { toLogin } from '@/libs/login.js';
import { openPaySubscribe } from '@/utils/SubscribeMessage.js';
import dayjs from '@/plugin/dayjs/dayjs.min.js';
import { HTTP_REQUEST_URL } from '@/config/app';
@ -176,37 +175,6 @@
password: '',
goodsList: [],
pay_order_id: '',
payMode: [{
name: '微信支付',
icon: 'icon-weixinzhifu',
// #ifdef H5
value: this.$wechat.isWeixin() ? 'weixin' : 'h5',
// #endif
// #ifdef MP
value: 'routine',
// #endif
// #ifdef APP-PLUS
value: 'weixin',
// #endif
title: '微信快捷支付',
payStatus: true
}
// #ifdef H5 ||APP-PLUS
,
{
name: '支付宝支付',
icon: 'icon-zhifubao',
// #ifdef H5 || APP-PLUS
value: 'alipay',
// #endif
// #ifdef MP
value: 'alipayQr',
// #endif
title: '支付宝支付',
payStatus: true
}
// #endif
],
pay_close: false,
totalPrice: '0',
formContent: '',
@ -233,9 +201,7 @@
title_right: '',
}
},
watch: {
},
watch: {},
computed: mapGetters(['isLogin','uid']),
onReady() {
this.title_left = `${HTTP_REQUEST_URL}/static/images/icon/title_left.png`;
@ -247,7 +213,7 @@
if(options.scene){
console.log("接收参数 - 未转义",options.scene)
var scene = this.$util.getUrlParams(decodeURIComponent(options.scene));
console.log("接收参数 - 转义后",scene)
// console.log(" - ",scene)
this.bind_mer_id = scene.mid || 0;
this.bind_staff_id = scene.suid || 0;
//
@ -267,9 +233,7 @@
this.isShowAuth = true
}
},
onShow(){
},
onShow(){},
onReachBottom() {
this.groomList();
},
@ -286,6 +250,10 @@
authColse(e) {
this.isShowAuth = e
},
onLunch() {
this.getMemberCard();
this.getCouponLst();
},
goUrl(url){
if(url.indexOf("http") != -1){
// #ifdef H5
@ -318,6 +286,7 @@
this.pay_order_id = res.data.def.group_data_id.toString();
this.svip_type = res.data.def.svip_type;
this.currentType = Object.assign({}, this.memberType[0]);
this.type = 0;
this.memberEquity();
}).catch(err => {
uni.showToast({
@ -448,10 +417,9 @@
orderId = res.data.result.order_id,
callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config,
// goPages = '/pages/annx/vip_center/index'
goPages = '/pages/users/user_coupon/index';
console.log('支付成功', status)
// console.log('', status)
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
@ -466,6 +434,8 @@
case 'success':
uni.hideLoading();
that.payClose();
that.getMemberCard();
return that.$util.Tips({
title: res.message,
icon: 'success'

View File

@ -1,5 +1,4 @@
<template>
<!-- svip会员模块 -->
<view class="">
<view class="card-section">
<view class="header-card">
@ -11,7 +10,7 @@
</view>
</view>
</view>
<view class="right-section">
<!-- <view class="right-section">
<view class="section-hd acea-row row-center-wrapper">
<view class="title acea-row row-center row-bottom">开通会员尊享权</view>
</view>
@ -24,11 +23,14 @@
</view>
</view>
</view>
</view>
</view>-->
</view>
<view class="type-section" id="card">
<view class="title_bd">
<view class="bold">会员套餐</view>
<!-- 会员等级 -->
<view class="block-title">
<image class="title-image" :src="title_left" mode="heightFix"></image>
<view class="title-text">会员等级</view>
<image class="title-image" :src="title_right" mode="heightFix"></image>
</view>
<scroll-view class="scroll" scroll-x="true">
<view v-for="(item,index) in memberType" :key="item.group_data_id" class="item" :class="{on: index === type}"
@ -38,6 +40,23 @@
<view class="old">{{item.value.cost_price | moneyFormat}}</view>
</view>
</scroll-view>
<!--会员权益-->
<view class="block-title" v-if="Object.values(memberRights).length > 0">
<image class="title-image" :src="title_left" mode="heightFix"></image>
<view class="title-text">会员权益</view>
<image class="title-image" :src="title_right" mode="heightFix"></image>
</view>
<view class="save_list acea-row" v-if="Object.values(memberRights).length > 0">
<view v-for="(item,index) in memberRights" :key="index" class='interests-item' @click="goUrl(item.link)">
<image class="pic" :src="item.on_pic"></image>
<view class="text">
<view class="name">{{item.name}}</view>
<view class="info line1">{{item.info}}</view>
</view>
</view>
</view>
<!--开通按钮-->
<view class="buy" @click="pay">{{svip_type == 1 ? '立即体验' : '立即开通'}}</view>
<!--<view v-if="memberExplain" class="agree">-->
<!-- <navigator class="link" url="/pages/annex/vip_clause/index" hover-class="none">购买即视为同意<text-->
@ -57,8 +76,9 @@
</view>
</view>
</view>
<payment :payMode="payMode" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
:order_id="pay_order_id" :totalPrice="totalPrice"></payment>
<!--支付组件-->
<payment :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun" :order_id="pay_order_id" :totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<view v-show="false" v-html="formContent"></view>
</view>
@ -70,23 +90,13 @@
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import authorize from '@/components/Authorize';
import { mapGetters } from "vuex";
import {
memberCard,
memberEquity,
memberCardCreate,
groomList,
} from '@/api/user.js';
import {
orderOfflinePayType
} from '@/api/order.js';
import {
toLogin
} from '@/libs/login.js';
import {
openPaySubscribe
} from '@/utils/SubscribeMessage.js';
import {memberCard, memberEquity, memberCardCreate, groomList} from '@/api/user.js';
import { HTTP_REQUEST_URL } from '@/config/app';
import {openPaySubscribe} from '@/utils/SubscribeMessage.js';
import dayjs from '@/plugin/dayjs/dayjs.min.js';
import spread from "../../../libs/spread";
export default {
components: {
payment,
@ -113,37 +123,6 @@
password: '',
goodsList: [],
pay_order_id: '',
payMode: [{
name: '微信支付',
icon: 'icon-weixinzhifu',
// #ifdef H5
value: this.$wechat.isWeixin() ? 'weixin' : 'h5',
// #endif
// #ifdef MP
value: 'routine',
// #endif
// #ifdef APP-PLUS
value: 'weixin',
// #endif
title: '微信快捷支付',
payStatus: true
}
// #ifdef H5 ||APP-PLUS
,
{
name: '支付宝支付',
icon: 'icon-zhifubao',
// #ifdef H5 || APP-PLUS
value: 'alipay',
// #endif
// #ifdef MP
value: 'alipayQr',
// #endif
title: '支付宝支付',
payStatus: true
}
// #endif
],
pay_close: false,
totalPrice: '0',
formContent: '',
@ -159,14 +138,24 @@
svipDef: null,
isAuto: false, //
isShowAuth: false, //
svip_type: 0
svip_type: 0,
//
bind_mer_id: 0,
bind_staff_id: 0,
currentType: {},
title_left: '',
title_right: '',
}
},
watch: {},
computed: mapGetters(['isLogin','uid']),
onReady() {
this.title_left = `${HTTP_REQUEST_URL}/static/images/icon/title_left.png`;
this.title_right = `${HTTP_REQUEST_URL}/static/images/icon/title_right.png`;
},
onLoad(options) {
if (this.isLogin) {
this.memberEquity();
this.getMemberCard();
this.groomList();
} else {
@ -185,7 +174,7 @@
},
methods: {
totalNumber(num){
console.log(num)
// console.log(num)
let num_text = {
1: '一',
2: '二',
@ -245,7 +234,11 @@
},
//
memberEquity() {
memberEquity().then(res => {
let memberType = Object.assign({}, this.currentType);
let interests = memberType.value.interests || {};
let interestsId = Object.values(interests).toString();
memberEquity({ interests_id: interestsId,is_appoint: 1 }).then(res => {
this.memberRights = res.data.interests;
this.userInfo = res.data.user;
if(res.data.user.is_svip > 0){
@ -272,6 +265,10 @@
this.svip_type = res.data.def.svip_type;
this.totalPrice = res.data.def.price.toString();
this.pay_order_id = res.data.def.group_data_id.toString();
this.currentType = Object.assign({}, this.memberType[0]);
this.type = 0;
this.memberEquity();
}).catch(err => {
uni.hideLoading();
uni.showToast({
@ -293,9 +290,7 @@
this.finished = res.data.list.length < this.limit;
this.loading = false;
this.page += 1;
}).catch(err => {
});
}).catch(err => {});
},
checkType(svip,index) {
this.type = index;
@ -303,6 +298,9 @@
this.svip_type = svip.value.svip_type;
this.pay_order_id = svip.group_data_id;
this.totalPrice = svip.value.price.toString();
this.currentType = Object.assign({}, svip);
this.memberEquity();
},
payCheck: function(type) {
this.createMemberCard(type);
@ -375,7 +373,7 @@
orderId = res.data.result.order_id,
callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config,
goPages = '/pages/annx/vip_center/index'
goPages = '/pages/annex/vip_center/index'
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
@ -393,6 +391,9 @@
return that.$util.Tips({
title: res.message,
icon: 'success'
}, {
tab: 5,
url: goPages
});
break;
case 'alipay':
@ -860,4 +861,58 @@
}
}
}
.block-title{
width: 100%;
display: inline-flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex-wrap: nowrap;
height: 100rpx;
.title-image{
height: 20rpx!important;
}
.title-text{
padding: 0 30rpx;
font-size: 30rpx;
font-weight: bold;
}
}
.save_list{
width: 100%;
display: inline-flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
align-content: flex-start;
.interests-item{
width: calc(100% / 4) !important;
display: inline-block;
text-align: center;
padding: 30rpx 0;
&:last-child{
margin-right: 0;
}
.pic{
width: 80rpx;
height: 80rpx;
border-radius: 100%;
}
.text{
margin-top: 10rpx;
color: #282828;
.name{
font-size: 26rpx;
font-weight: bold;
}
.info{
max-width: 100%;
color: #666666;
font-size: 18rpx;
margin-top: 4rpx;
}
}
}
}
</style>

View File

@ -286,7 +286,7 @@
</view>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :order_type='1'></payment>
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :order_type='1'></payment>
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
<!--核销码弹窗-->
<uni-popup ref="cancellPoupon" type="bottom">
@ -353,29 +353,6 @@
isGoodsReturn: false, //退
status: {}, //
isClose: false,
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: '',
totalPrice: '0',
@ -712,9 +689,6 @@
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
})
},
getOrderCode(){
verifyCode(this.order_id).then(res=>{

View File

@ -169,7 +169,7 @@
</view>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>
</template>
@ -671,29 +671,6 @@
isGoodsReturn: false, //退
status: {}, //
isClose: false,
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: '',
totalPrice: '0',
@ -706,14 +683,7 @@
}
};
},
watch: {
alipay_open(n){
this.payMode[1].payStatus = n
},
yue_pay_status(n){
this.payMode[2].payStatus = n
}
},
watch: {},
computed: configMap({hide_mer_status:0,alipay_open:0,yue_pay_status:0},
mapGetters(['isLogin','uid','viewColor','keyColor'])),
onLoad: function(options) {
@ -872,10 +842,6 @@
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
that.$set(that, 'payMode', that.payMode);
})
},
/**
* 获取订单详细信息

View File

@ -50,7 +50,7 @@
<emptyPage title="暂无兑换记录~"></emptyPage>
</block>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :order_type="2" :pay_close="pay_close" :returnUrl="'/pages/points_mall/integral_order_details?order_id='+order_id" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<payment :order_type="2" :pay_close="pay_close" :returnUrl="'/pages/points_mall/integral_order_details?order_id='+order_id" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>
</template>
<script>
@ -74,29 +74,6 @@
data: function() {
return {
exchangeList: [],
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
}
],
isAuto: false, //
isShowAuth: false, //
loadend: false,
@ -116,14 +93,7 @@
...mapGetters(['isLogin','viewColor']),
...configMap(['alipay_open', 'yue_pay_status']),
},
watch: {
alipay_open(n){
this.payMode[1].payStatus = n
},
yue_pay_status(n){
this.payMode[2].payStatus = n
}
},
watch: {},
onLoad: function(option) {
this.delta = option.delta || 0;
},
@ -153,9 +123,6 @@
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
})
},
onLoadFun() {
this.isShowAuth = false;

View File

@ -128,7 +128,7 @@
<!-- #ifdef MP -->
<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<!-- #endif -->
<payment :payMode='payMode' :pay_close="pay_close" :returnUrl="'/pages/points_mall/integral_order_details?order_id='+order_id" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<payment :pay_close="pay_close" :returnUrl="'/pages/points_mall/integral_order_details?order_id='+order_id" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>
</template>
@ -160,29 +160,6 @@
isGoodsReturn: false, //退
status: {}, //
isClose: false,
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: '',
totalPrice: '0',
@ -194,14 +171,7 @@
isShowAuth: false, //
};
},
watch: {
alipay_open(n){
this.payMode[1].payStatus = n
},
yue_pay_status(n){
this.payMode[2].payStatus = n
}
},
watch: {},
computed: {
...mapGetters(['isLogin','viewColor']),
...configMap(['alipay_open', 'yue_pay_status']),
@ -319,9 +289,6 @@
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
})
},
/**
* 获取订单详细信息

View File

@ -245,7 +245,7 @@
</view>
<home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :useBalance="use_balance"></payment>
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
</view>
</template>
@ -300,29 +300,6 @@
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: '',
@ -337,6 +314,7 @@
//
user_balance: 0.00,
mer_balance: 0.00,
use_balance: 0.00,
is_with_goods: 0,
};
},
@ -349,14 +327,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;
@ -412,7 +383,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 => {
@ -475,8 +445,8 @@
//
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;
if(item.activity_type == 35) this.use_balance = this.mer_balance || 0.00;
else this.use_balance = this.user_balance || 0.00;
//
this.$set(this, 'pay_close', true);
this.order_id = item.group_order_id;

View File

@ -198,7 +198,7 @@
</view>
<home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>
</template>
@ -247,29 +247,6 @@
page: 1,
limit: 20,
focus: true,
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: '',
totalPrice: '0',
@ -283,14 +260,7 @@
...mapGetters(['isLogin','viewColor']),
...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;
@ -340,10 +310,6 @@
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
// that.$set(that, 'payMode', that.payMode);
});
},
/**
* 关闭支付组件

View File

@ -63,7 +63,7 @@
</view>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :order_type='1'></payment>
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :order_type='1'></payment>
</view>
</template>
@ -110,29 +110,6 @@
orderStatus: 0, //
page: 1,
limit: 20,
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: '',
totalPrice: '0',
@ -191,10 +168,6 @@
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
// that.$set(that, 'payMode', that.payMode);
});
},
/**
* 关闭支付组件

View File

@ -47,8 +47,7 @@
<button class='but' formType="submit"> {{active ? '立即转入': '立即充值' }}</button>
</view>
</form>
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
:totalPrice="totalPrice"></payment>
<payment :isBalance="false" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun" :totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view>
</template>
@ -99,37 +98,6 @@
statusBarHeight: statusBarHeight,
pay_close: false,
totalPrice: '0',
payMode: [{
name: '微信支付',
icon: 'icon-weixinzhifu',
// #ifdef H5
value: this.$wechat.isWeixin() ? 'weixin' : 'h5',
// #endif
// #ifdef MP
value: 'routine',
// #endif
// #ifdef APP-PLUS
value: 'weixin',
// #endif
title: '微信快捷支付',
payStatus: true
}
// #ifdef H5 ||APP-PLUS
,
{
name: '支付宝支付',
icon: 'icon-zhifubao',
// #ifdef H5 || APP-PLUS
value: 'alipay',
// #endif
// #ifdef MP
value: 'alipayQr',
// #endif
title: '支付宝支付',
payStatus: true
}
// #endif
],
};
},
computed: mapGetters(['viewColor','isLogin','uid']),