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

增加:会员卡中心 - 会员卡续费支持余额支付
修改:会员卡中心 - 会员卡开通页面样式修改,权益根据会员卡同步改变
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"> <view class="title acea-row row-center-wrapper">
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text> 选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view> </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="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view> <view class="iconfont" :class="item.icon"></view>
<view class="text"> <view class="text">
<view class="name">{{item.name}}</view> <view class="name">{{item.name}}</view>
<view class="info" v-if="item.number"> <view class="info" v-if="item.value === 'balance'">
{{item.title}} <span class="money">{{ item.number }}</span> {{item.title}} <span class="money">{{ item.number || '0.00' }}</span>
</view> </view>
<view class="info" v-else>{{item.title}}</view> <view class="info" v-else>{{item.title}}</view>
</view> </view>
@ -24,343 +24,419 @@
<script> <script>
import { import {orderPay, integralOrderPay, presellOrderPay} from '@/api/order.js';
orderPay, import {getUserInfo} from "@/api/user";
integralOrderPay,
presellOrderPay
} from '@/api/order.js';
export default {
props: {
payMode: {
type: Array,
default: function() {
return [];
}
},
pay_close: {
type: Boolean,
default: false,
},
order_id: {
type: String,
default: ''
},
totalPrice: {
type: String,
default: '0'
},
order_type: {
type: Number,
default: 0,
},
isCall: {
type: Boolean,
default: false
},
returnUrl: {
type: String,
default: ''
}
},
data() {
return {
}; export default {
}, props: {
mounted:function(){ payMode: {
type: Array,
default: function () {
return [];
}
},
pay_close: {
type: Boolean,
default: false,
},
order_id: {
type: String,
default: ''
},
totalPrice: {
type: String,
default: '0'
},
order_type: {
type: Number,
default: 0,
},
isCall: {
type: Boolean,
default: false
},
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
},
}
},
methods: {
close: function() {
this.$emit('onChangeFun', {
action: 'payClose'
});
},
goPay: function(number, paytype) {
if (this.isCall) {
return this.$emit('onChangeFun', {
action: 'payCheck',
value: paytype
});
}
let that = this;
let type = ''
if (paytype == 'wechat') {
// #ifdef H5
type = this.$wechat.isWeixin() ? 'weixin' : 'h5';
// #endif
// #ifdef APP-PLUS
type = 'weixin';
// #endif
// #ifdef MP
type = 'routine';
// #endif
} else if (paytype == 'balance') {
type = 'balance';
}else if(paytype == 'alipay'){
// #ifndef MP
type = 'alipay';
// #endif
// #ifdef MP
type = 'alipayQr';
// #endif
}
if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单'
});
if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({
title: '余额不足!'
});
uni.showLoading({
title: '支付中'
});
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay : orderPay
orderApi(that.order_id, {
type: type,
// #ifdef H5
return_url: that.returnUrl!=='' ? 'http://'+window.location.host+that.returnUrl : 'http://'+window.location.host+'/pages/users/order_list/index',
// #endif
}).then(res => {
let status = res.data.status,
orderId = res.data.result.order_id,
jsConfig = res.data.result.config,
callback_key = res.data.result.pay_key,
goPages = that.returnUrl ? that.returnUrl : '/pages/users/order_list/index';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
case 'error':
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: res.message
});
break;
case 'success':
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=1'
});
break;
case 'alipay':
case 'alipayQr':
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig,
})
return
break;
// #ifndef MP
case "wechat":
case "weixin":
case "weixinApp":
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
console.log('测试支付数据无效的success'+res.data)
this.$emit('onChangeFun', {
action: 'payClose'
});
uni.hideLoading();
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=1'
});
}).catch(res => {
console.log('测试支付数据无效的catch'+res.data)
if (res.errMsg == 'chooseWXPay:cancel'){
if(that.isCall){
return that.$util.Tips({
title: '取消支付'
});
}else{
return that.$util.Tips({
title: '取消支付'
}, {
tab: 5,
url: goPages + '?status=0'
});
}
}
})
// #endif
// #ifdef APP-PLUS
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
this.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=1'
});
},
fail: (e) => {
if(that.isCall){
return that.$util.Tips({
title: '取消支付'
});
}else{
return that.$util.Tips({
title: '取消支付'
}, {
tab: 5,
url: goPages + '?status=0'
});
}
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
// #endif
// #ifdef MP
case "routine":
jsConfig.timeStamp = jsConfig.timestamp;
that.toPay = true;
let mp_pay_name=''
if(uni.requestOrderPayment){
mp_pay_name='requestOrderPayment'
}else{
mp_pay_name='requestPayment'
}
uni[mp_pay_name]({
...jsConfig,
success: function(res) {
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=1'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=1'
});
},
fail: function(e) {
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: '取消支付'
});
},
complete: function(e) {
uni.hideLoading();
//
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
title: '取消支付'
});
that.$emit('onChangeFun', {
action: 'payClose'
});
},
})
break;
// #endif
case "balance":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
//
return that.$util.Tips({
title: res.message
});
break;
// #ifdef H5
case 'h5':
let host = window.location.protocol+"//"+window.location.host;
let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
setTimeout(() => {
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS };
case 'alipayApp': },
uni.requestPayment({ watch: {
provider: 'alipay', payMode: {
orderInfo: jsConfig, handler() {
success: (e) => { this.pay_list = this.payMode
that.$emit('onChangeFun', { },
action: 'payClose' deep: true
}); },
return that.$util.Tips({ useBalance: {
title: '支付成功', handler() {
icon: 'success' let useBalance = Number(this.useBalance || 0).toFixed(2);
}, { if(useBalance > 0) this.pay_list.balance.number = useBalance || '0.00';
tab: 5, },
url: goPages + 'status=1' deep: true
}); },
},
mounted() {
this.getUserBalance();
},
fail: (e) => {
return that.$util.Tips({ },
title: '取消支付' methods: {
}); //
}, close () {
complete: () => { this.$emit('onChangeFun', {
uni.hideLoading(); action: 'payClose'
}, });
}); },
break; //
// #endif goPay (number, paytype) {
} if (this.isCall) {
}).catch(err => { return this.$emit('onChangeFun', {
uni.hideLoading(); action: 'payCheck',
return that.$util.Tips({ value: paytype
title: err });
}); }
}) let that = this;
} let type = ''
} if (paytype == 'wechat') {
} // #ifdef H5
type = this.$wechat.isWeixin() ? 'weixin' : 'h5';
// #endif
// #ifdef APP-PLUS
type = 'weixin';
// #endif
// #ifdef MP
type = 'routine';
// #endif
} else if (paytype == 'balance') {
type = 'balance';
} else if (paytype == 'alipay') {
// #ifndef MP
type = 'alipay';
// #endif
// #ifdef MP
type = 'alipayQr';
// #endif
}
if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单'
});
if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({
title: '余额不足!'
});
uni.showLoading({
title: '支付中'
});
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay : orderPay
orderApi(that.order_id, {
type: type,
// #ifdef H5
return_url: that.returnUrl !== '' ? 'http://' + window.location.host + that.returnUrl : 'http://' + window.location.host + '/pages/users/order_list/index',
// #endif
}).then(res => {
let status = res.data.status,
orderId = res.data.result.order_id,
jsConfig = res.data.result.config,
callback_key = res.data.result.pay_key,
goPages = that.returnUrl ? that.returnUrl : '/pages/users/order_list/index';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
case 'PAY_ERROR':
case 'error':
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: res.message
});
break;
case 'success':
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=1'
});
break;
case 'alipay':
case 'alipayQr':
uni.hideLoading();
this.$emit('onChangeFun', {
action: 'payClose'
});
uni.navigateTo({
url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' + jsConfig,
})
return
break;
// #ifndef MP
case "wechat":
case "weixin":
case "weixinApp":
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
console.log('测试支付数据无效的success' + res.data)
this.$emit('onChangeFun', {
action: 'payClose'
});
uni.hideLoading();
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=1'
});
}).catch(res => {
console.log('测试支付数据无效的catch' + res.data)
if (res.errMsg == 'chooseWXPay:cancel') {
if (that.isCall) {
return that.$util.Tips({
title: '取消支付'
});
} else {
return that.$util.Tips({
title: '取消支付'
}, {
tab: 5,
url: goPages + '?status=0'
});
}
}
})
// #endif
// #ifdef APP-PLUS
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
}
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
this.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=1'
});
},
fail: (e) => {
if (that.isCall) {
return that.$util.Tips({
title: '取消支付'
});
} else {
return that.$util.Tips({
title: '取消支付'
}, {
tab: 5,
url: goPages + '?status=0'
});
}
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
// #endif
// #ifdef MP
case "routine":
jsConfig.timeStamp = jsConfig.timestamp;
that.toPay = true;
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
}
uni[mp_pay_name]({
...jsConfig,
success: function (res) {
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
if (that.BargainId || that.combinationId || that.pinkId || that.seckillId)
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=1'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=1'
});
},
fail: function (e) {
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: '取消支付'
});
},
complete: function (e) {
uni.hideLoading();
//
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
title: '取消支付'
});
that.$emit('onChangeFun', {
action: 'payClose'
});
},
})
break;
// #endif
case "balance":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
//
return that.$util.Tips({
title: res.message
});
break;
// #ifdef H5
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
let eUrl = encodeURIComponent(url)
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
let locations = `${jsurl}&redirect_url=${eUrl}`
setTimeout(() => {
location.href = locations;
}, 100);
break;
// #endif
// #ifdef APP-PLUS
case 'alipayApp':
uni.requestPayment({
provider: 'alipay',
orderInfo: jsConfig,
success: (e) => {
that.$emit('onChangeFun', {
action: 'payClose'
});
return that.$util.Tips({
title: '支付成功',
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=1'
});
},
fail: (e) => {
return that.$util.Tips({
title: '取消支付'
});
},
complete: () => {
uni.hideLoading();
},
});
break;
// #endif
}
}).catch(err => {
uni.hideLoading();
return that.$util.Tips({
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> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
<template> <template>
<!-- svip会员模块 -->
<view class=""> <view class="">
<view class="card-section"> <view class="card-section">
<view class="header-card"> <view class="header-card">
@ -11,7 +10,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="right-section"> <!-- <view class="right-section">
<view class="section-hd acea-row row-center-wrapper"> <view class="section-hd acea-row row-center-wrapper">
<view class="title acea-row row-center row-bottom">开通会员尊享权</view> <view class="title acea-row row-center row-bottom">开通会员尊享权</view>
</view> </view>
@ -24,12 +23,15 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>-->
</view> </view>
<view class="type-section" id="card"> <view class="type-section" id="card">
<view class="title_bd"> <!-- 会员等级 -->
<view class="bold">会员套餐</view> <view class="block-title">
</view> <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"> <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}" <view v-for="(item,index) in memberType" :key="item.group_data_id" class="item" :class="{on: index === type}"
@click="checkType(item,index)"> @click="checkType(item,index)">
@ -38,6 +40,23 @@
<view class="old">{{item.value.cost_price | moneyFormat}}</view> <view class="old">{{item.value.cost_price | moneyFormat}}</view>
</view> </view>
</scroll-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 class="buy" @click="pay">{{svip_type == 1 ? '立即体验' : '立即开通'}}</view>
<!--<view v-if="memberExplain" class="agree">--> <!--<view v-if="memberExplain" class="agree">-->
<!-- <navigator class="link" url="/pages/annex/vip_clause/index" hover-class="none">购买即视为同意<text--> <!-- <navigator class="link" url="/pages/annex/vip_clause/index" hover-class="none">购买即视为同意<text-->
@ -57,8 +76,9 @@
</view> </view>
</view> </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> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<view v-show="false" v-html="formContent"></view> <view v-show="false" v-html="formContent"></view>
</view> </view>
@ -70,23 +90,13 @@
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'; import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { import {memberCard, memberEquity, memberCardCreate, groomList} from '@/api/user.js';
memberCard, import { HTTP_REQUEST_URL } from '@/config/app';
memberEquity, import {openPaySubscribe} from '@/utils/SubscribeMessage.js';
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 dayjs from '@/plugin/dayjs/dayjs.min.js'; import dayjs from '@/plugin/dayjs/dayjs.min.js';
import spread from "../../../libs/spread"; import spread from "../../../libs/spread";
export default { export default {
components: { components: {
payment, payment,
@ -113,37 +123,6 @@
password: '', password: '',
goodsList: [], goodsList: [],
pay_order_id: '', 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, pay_close: false,
totalPrice: '0', totalPrice: '0',
formContent: '', formContent: '',
@ -159,14 +138,24 @@
svipDef: null, svipDef: null,
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
svip_type: 0 svip_type: 0,
//
bind_mer_id: 0,
bind_staff_id: 0,
currentType: {},
title_left: '',
title_right: '',
} }
}, },
watch: {}, watch: {},
computed: mapGetters(['isLogin','uid']), 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) { onLoad(options) {
if (this.isLogin) { if (this.isLogin) {
this.memberEquity();
this.getMemberCard(); this.getMemberCard();
this.groomList(); this.groomList();
} else { } else {
@ -185,7 +174,7 @@
}, },
methods: { methods: {
totalNumber(num){ totalNumber(num){
console.log(num) // console.log(num)
let num_text = { let num_text = {
1: '一', 1: '一',
2: '二', 2: '二',
@ -245,7 +234,11 @@
}, },
// //
memberEquity() { 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.memberRights = res.data.interests;
this.userInfo = res.data.user; this.userInfo = res.data.user;
if(res.data.user.is_svip > 0){ if(res.data.user.is_svip > 0){
@ -272,6 +265,10 @@
this.svip_type = res.data.def.svip_type; this.svip_type = res.data.def.svip_type;
this.totalPrice = res.data.def.price.toString(); this.totalPrice = res.data.def.price.toString();
this.pay_order_id = res.data.def.group_data_id.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 => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
@ -293,9 +290,7 @@
this.finished = res.data.list.length < this.limit; this.finished = res.data.list.length < this.limit;
this.loading = false; this.loading = false;
this.page += 1; this.page += 1;
}).catch(err => { }).catch(err => {});
});
}, },
checkType(svip,index) { checkType(svip,index) {
this.type = index; this.type = index;
@ -303,6 +298,9 @@
this.svip_type = svip.value.svip_type; this.svip_type = svip.value.svip_type;
this.pay_order_id = svip.group_data_id; this.pay_order_id = svip.group_data_id;
this.totalPrice = svip.value.price.toString(); this.totalPrice = svip.value.price.toString();
this.currentType = Object.assign({}, svip);
this.memberEquity();
}, },
payCheck: function(type) { payCheck: function(type) {
this.createMemberCard(type); this.createMemberCard(type);
@ -375,7 +373,7 @@
orderId = res.data.result.order_id, orderId = res.data.result.order_id,
callback_key = res.data.result.pay_key, callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config, jsConfig = res.data.result.config,
goPages = '/pages/annx/vip_center/index' goPages = '/pages/annex/vip_center/index'
switch (status) { switch (status) {
case 'ORDER_EXIST': case 'ORDER_EXIST':
case 'EXTEND_ORDER': case 'EXTEND_ORDER':
@ -393,7 +391,10 @@
return that.$util.Tips({ return that.$util.Tips({
title: res.message, title: res.message,
icon: 'success' icon: 'success'
}); }, {
tab: 5,
url: goPages
});
break; break;
case 'alipay': case 'alipay':
case "alipayQr": case "alipayQr":
@ -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> </style>

View File

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

View File

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

View File

@ -50,16 +50,16 @@
<emptyPage title="暂无兑换记录~"></emptyPage> <emptyPage title="暂无兑换记录~"></emptyPage>
</block> </block>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <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> </view>
</template> </template>
<script> <script>
import emptyPage from '@/components/emptyPage.vue'; import emptyPage from '@/components/emptyPage.vue';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { integralOrderList, integralOrderDelete } from "@/api/points_mall.js"; import { integralOrderList, integralOrderDelete } from "@/api/points_mall.js";
import { getUserInfo } from "@/api/user.js"; import { getUserInfo } from "@/api/user.js";
import payment from '@/components/payment'; import payment from '@/components/payment';
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { configMap } from '@/utils'; import { configMap } from '@/utils';
@ -74,29 +74,6 @@
data: function() { data: function() {
return { return {
exchangeList: [], 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, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
loadend: false, loadend: false,
@ -116,14 +93,7 @@
...mapGetters(['isLogin','viewColor']), ...mapGetters(['isLogin','viewColor']),
...configMap(['alipay_open', 'yue_pay_status']), ...configMap(['alipay_open', 'yue_pay_status']),
}, },
watch: { watch: {},
alipay_open(n){
this.payMode[1].payStatus = n
},
yue_pay_status(n){
this.payMode[2].payStatus = n
}
},
onLoad: function(option) { onLoad: function(option) {
this.delta = option.delta || 0; this.delta = option.delta || 0;
}, },
@ -153,9 +123,6 @@
*/ */
getUserInfo: function() { getUserInfo: function() {
let that = this; let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
})
}, },
onLoadFun() { onLoadFun() {
this.isShowAuth = false; this.isShowAuth = false;
@ -270,7 +237,7 @@
that.exchangeList[index]['orderProduct'].splice(idx,1); that.exchangeList[index]['orderProduct'].splice(idx,1);
that.$util.Tips({ that.$util.Tips({
title: '删除成功' title: '删除成功'
}); });
}).catch(err => { }).catch(err => {
return that.$util.Tips({ return that.$util.Tips({
title: err title: err

View File

@ -119,7 +119,7 @@
:url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流 :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流
</navigator> </navigator>
<view v-if="orderInfo.status == 3 && orderInfo.paid == 1" class="bnt cancel" @click="delOrder(orderInfo.order_id)">删除</view> <view v-if="orderInfo.status == 3 && orderInfo.paid == 1" class="bnt cancel" @click="delOrder(orderInfo.order_id)">删除</view>
<view class='bnt bg-colort' v-if="orderInfo.status==1 && orderInfo.paid==1" @click='confirmOrder'>确认收货</view> <view class='bnt bg-colort' v-if="orderInfo.status==1 && orderInfo.paid==1" @click='confirmOrder'>确认收货</view>
</view> </view>
<view v-else-if="orderInfo.status==0 && orderInfo.paid==0" class='footer acea-row row-right row-middle'> <view v-else-if="orderInfo.status==0 && orderInfo.paid==0" class='footer acea-row row-right row-middle'>
<view class='bnt bg-colort' @click='pay_open()'>立即付款</view> <view class='bnt bg-colort' @click='pay_open()'>立即付款</view>
@ -128,7 +128,7 @@
<!-- #ifdef MP --> <!-- #ifdef MP -->
<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<!-- #endif --> <!-- #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> </view>
</template> </template>
@ -153,36 +153,13 @@
return { return {
order_id: '', order_id: '',
evaluate: 0, evaluate: 0,
orderInfo: { orderInfo: {
}, // }, //
isGoodsReturn: false, //退 isGoodsReturn: false, //退
status: {}, // status: {}, //
isClose: false, 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_close: false,
pay_order_id: '', pay_order_id: '',
totalPrice: '0', totalPrice: '0',
@ -194,14 +171,7 @@
isShowAuth: false, // isShowAuth: false, //
}; };
}, },
watch: { watch: {},
alipay_open(n){
this.payMode[1].payStatus = n
},
yue_pay_status(n){
this.payMode[2].payStatus = n
}
},
computed: { computed: {
...mapGetters(['isLogin','viewColor']), ...mapGetters(['isLogin','viewColor']),
...configMap(['alipay_open', 'yue_pay_status']), ...configMap(['alipay_open', 'yue_pay_status']),
@ -243,7 +213,7 @@
methods: { methods: {
/** /**
* 登录授权回调 * 登录授权回调
* *
*/ */
onLoadFun: function() { onLoadFun: function() {
this.getOrderInfo(); this.getOrderInfo();
@ -305,7 +275,7 @@
}, },
/** /**
* 事件回调 * 事件回调
* *
*/ */
onChangeFun: function(e) { onChangeFun: function(e) {
let opt = e; let opt = e;
@ -319,13 +289,10 @@
*/ */
getUserInfo: function() { getUserInfo: function() {
let that = this; let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
})
}, },
/** /**
* 获取订单详细信息 * 获取订单详细信息
* *
*/ */
getOrderInfo: function() { getOrderInfo: function() {
let that = this; let that = this;
@ -343,7 +310,7 @@
}); });
}, },
/** /**
* *
* 剪切订单号 * 剪切订单号
*/ */
// #ifndef H5 // #ifndef H5
@ -353,7 +320,7 @@
data: that.orderInfo.order_sn, data: that.orderInfo.order_sn,
success: function(res){ success: function(res){
} }
}); });
}, },
// #endif // #endif
@ -364,7 +331,7 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/points_mall/integral_goods_details?id=' + item.cart_info.product.product_id url: '/pages/points_mall/integral_goods_details?id=' + item.cart_info.product.product_id
}) })
}, },
confirmOrder: function() { confirmOrder: function() {
let that = this; let that = this;
uni.showModal({ uni.showModal({
@ -418,7 +385,7 @@
} }
}); });
}, },
} }
} }
</script> </script>
@ -604,7 +571,7 @@
} }
.order-details .wrapper .actualPay .money { .order-details .wrapper .actualPay .money {
font-weight: bold; font-weight: bold;
font-size: 30rpx; font-size: 30rpx;
} }
.order-details .footer { .order-details .footer {
width: 100%; width: 100%;

View File

@ -245,7 +245,7 @@
</view> </view>
<home></home> <home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <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> <addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
</view> </view>
</template> </template>
@ -300,29 +300,6 @@
page: 1, page: 1,
limit: 20, limit: 20,
domain: HTTP_REQUEST_URL, 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_close: false,
pay_order_id: '', pay_order_id: '',
invoice_order_id: '', invoice_order_id: '',
@ -337,6 +314,7 @@
// //
user_balance: 0.00, user_balance: 0.00,
mer_balance: 0.00, mer_balance: 0.00,
use_balance: 0.00,
is_with_goods: 0, is_with_goods: 0,
}; };
}, },
@ -349,14 +327,7 @@
...mapGetters(['isLogin','uid','viewColor', 'shopIsLogin', 'shopMerId']), ...mapGetters(['isLogin','uid','viewColor', 'shopIsLogin', 'shopMerId']),
...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']), ...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']),
}, },
watch: { watch: {},
alipay_open(n){
this.payMode[1].payStatus = n
},
yue_pay_status(n){
this.payMode[2].payStatus = n
}
},
onShow() { onShow() {
if (this.isLogin) { if (this.isLogin) {
this.page = 1; this.page = 1;
@ -412,7 +383,6 @@
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
that.user_balance = res.data.now_money || 0.00; that.user_balance = res.data.now_money || 0.00;
that.payMode[2].number = res.data.now_money;
}); });
if(that.shopIsLogin){ if(that.shopIsLogin){
getStoreDetail(that.shopMerId).then(res => { getStoreDetail(that.shopMerId).then(res => {
@ -475,8 +445,8 @@
// //
goPay: function(item) { goPay: function(item) {
// //
if(item.activity_type == 35) this.payMode[2].number = this.mer_balance || 0.00; if(item.activity_type == 35) this.use_balance = this.mer_balance || 0.00;
else this.payMode[2].number = this.user_balance || 0.00; else this.use_balance = this.user_balance || 0.00;
// //
this.$set(this, 'pay_close', true); this.$set(this, 'pay_close', true);
this.order_id = item.group_order_id; this.order_id = item.group_order_id;

View File

@ -53,15 +53,15 @@
</view> </view>
<view v-else> <view v-else>
<block v-for="(goods,g) in order.orderProduct"> <block v-for="(goods,g) in order.orderProduct">
<view class='item-info acea-row row-between row-top'> <view class='item-info acea-row row-between row-top'>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image> <image :src='(goods.cart_info.productAttr && goods.cart_info.productAttr.image) || goods.cart_info.product.image'></image>
</view> </view>
<view class='text acea-row row-between'> <view class='text acea-row row-between'>
<view class='name line2'>{{goods.cart_info.product.store_name}}</view> <view class='name line2'>{{goods.cart_info.product.store_name}}</view>
<view class='money' v-if="item.orderList[0].activity_type == 4"> <view class='money' v-if="item.orderList[0].activity_type == 4">
<view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view> <view v-if="goods.cart_info.activeSku">{{goods.cart_info.activeSku.active_price}}</view>
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
@ -71,7 +71,7 @@
<view>x{{goods.product_num}}</view> <view>x{{goods.product_num}}</view>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
@ -198,7 +198,7 @@
</view> </view>
<home></home> <home></home>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <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> </view>
</template> </template>
@ -247,29 +247,6 @@
page: 1, page: 1,
limit: 20, limit: 20,
focus: true, 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_close: false,
pay_order_id: '', pay_order_id: '',
totalPrice: '0', totalPrice: '0',
@ -283,14 +260,7 @@
...mapGetters(['isLogin','viewColor']), ...mapGetters(['isLogin','viewColor']),
...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']), ...configMap(['hide_mer_status', 'community_status', 'alipay_open', 'yue_pay_status']),
}, },
watch: { watch: {},
alipay_open(n){
this.payMode[1].payStatus = n
},
yue_pay_status(n){
this.payMode[2].payStatus = n
}
},
onShow() { onShow() {
if (this.isLogin) { if (this.isLogin) {
this.page = 1; this.page = 1;
@ -340,10 +310,6 @@
*/ */
getUserInfo: function() { getUserInfo: function() {
let that = this; let that = this;
getUserInfo().then(res => {
that.payMode[2].number = res.data.now_money;
// that.$set(that, 'payMode', that.payMode);
});
}, },
/** /**
* 关闭支付组件 * 关闭支付组件
@ -632,7 +598,7 @@
onReachBottom: function() { onReachBottom: function() {
this.getOrderList(); this.getOrderList();
}, },
} }
</script> </script>
@ -897,25 +863,25 @@
} }
} }
} }
.search { .search {
height: 60rpx; height: 60rpx;
padding: 0 30rpx; padding: 0 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
font-size: 26rpx; font-size: 26rpx;
.iconfont { .iconfont {
margin-right: 10rpx; margin-right: 10rpx;
font-size: 26rpx; font-size: 26rpx;
color: #999999; color: #999999;
} }
.input-placeholder { .input-placeholder {
font-size: 26rpx; font-size: 26rpx;
color: #999999; color: #999999;
} }
.input { .input {
flex: 1; flex: 1;
} }

View File

@ -15,7 +15,7 @@
<view v-if="item.presellOrder.activeStatus === 1" class='t-color'>等待买家付尾款</view> <view v-if="item.presellOrder.activeStatus === 1" class='t-color'>等待买家付尾款</view>
<view v-if="item.presellOrder.activeStatus === 0" class='t-color'>未开始</view> <view v-if="item.presellOrder.activeStatus === 0" class='t-color'>未开始</view>
<view v-if="item.presellOrder.activeStatus === 2" class='t-color'>交易已关闭</view> <view v-if="item.presellOrder.activeStatus === 2" class='t-color'>交易已关闭</view>
</block> </block>
</view> </view>
<block v-for="(goods,g) in item.orderProduct"> <block v-for="(goods,g) in item.orderProduct">
<!--预售--> <!--预售-->
@ -63,7 +63,7 @@
</view> </view>
</view> </view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <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> </view>
</template> </template>
@ -110,29 +110,6 @@
orderStatus: 0, // orderStatus: 0, //
page: 1, page: 1,
limit: 20, 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_close: false,
pay_order_id: '', pay_order_id: '',
totalPrice: '0', totalPrice: '0',
@ -191,10 +168,6 @@
*/ */
getUserInfo: function() { getUserInfo: function() {
let that = this; 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> <button class='but' formType="submit"> {{active ? '立即转入': '立即充值' }}</button>
</view> </view>
</form> </form>
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun" <payment :isBalance="false" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun" :totalPrice="totalPrice"></payment>
:totalPrice="totalPrice"></payment>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
</view> </view>
</template> </template>
@ -99,37 +98,6 @@
statusBarHeight: statusBarHeight, statusBarHeight: statusBarHeight,
pay_close: false, pay_close: false,
totalPrice: '0', 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']), computed: mapGetters(['viewColor','isLogin','uid']),