Commit eda47d95 authored by IvyXia123's avatar IvyXia123

支付

parent af8786c0
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
</ul> </ul>
</div> </div>
<footer> <footer>
<div class="sub-block"> <div class="sub-block">
<span v-if="groupDetail.goods_desc">{{priceTotal}}</span> <span v-if="groupDetail.goods_desc">{{priceTotal}}</span>
...@@ -91,11 +92,11 @@ ...@@ -91,11 +92,11 @@
class="tips-price" class="tips-price"
v-if="groupDetail.goods_desc" v-if="groupDetail.goods_desc"
>{{groupDetail.goods_desc.tips?groupDetail.goods_desc.tips:''}}</span> >{{groupDetail.goods_desc.tips?groupDetail.goods_desc.tips:''}}</span>
<div class="pay-btn" @click="payOrder(orderFlag)">提交订单</div> <!-- <div class="pay-btn" @click="payOrder(orderFlag)">提交订单</div>-->
<!--<div class="pay-btn" @click="payOrder(orderFlag)" <div class="pay-btn" @click="payOrder(orderFlag)"
v-clipboard:copy="payIndex !== 0 ? payUrl : ''" v-clipboard:copy="payUrl"
v-clipboard:success="copy" v-clipboard:success="copy"
v-clipboard:error="onError">提交订单</div>--> v-clipboard:error="onError">提交订单</div>
</div> </div>
</footer> </footer>
<transition name="slide-fade"> <transition name="slide-fade">
...@@ -213,7 +214,8 @@ export default { ...@@ -213,7 +214,8 @@ export default {
{ icon: zhifubao, title: '支付宝支付', value: 1 } { icon: zhifubao, title: '支付宝支付', value: 1 }
], ],
payIndex: 0, payIndex: 0,
payUrl: '' payUrl: '',
ui: ''
}; };
}, },
mounted() { mounted() {
...@@ -248,8 +250,6 @@ export default { ...@@ -248,8 +250,6 @@ export default {
copy(e) { copy(e) {
if(this.payIndex === 1) { if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里"); Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}else if(this.payIndex === 2) {
Toast("信用卡支付获取成功");
} }
}, },
onError() { onError() {
...@@ -259,7 +259,11 @@ export default { ...@@ -259,7 +259,11 @@ export default {
}, },
// 支付方式 // 支付方式
payListClick(val) { payListClick(val) {
this.orderFlag = true;
this.payIndex = val this.payIndex = val
/* if(val === 1) {
this.payOrder(true)
}*/
}, },
recursion() { recursion() {
getCourseInfoApi().then(res => { getCourseInfoApi().then(res => {
...@@ -328,6 +332,7 @@ export default { ...@@ -328,6 +332,7 @@ export default {
this.bindMobile.show = false; this.bindMobile.show = false;
}, },
payOrder(flag) { payOrder(flag) {
console.log(flag)
let type = this.type ? 0 : 1; let type = this.type ? 0 : 1;
let that = this; let that = this;
this.orderCancel = false; this.orderCancel = false;
...@@ -377,7 +382,7 @@ export default { ...@@ -377,7 +382,7 @@ export default {
json.group_order_id = this.$route.query.group_order_id; json.group_order_id = this.$route.query.group_order_id;
} }
this.orderFlag = false; this.orderFlag = false;
console.log(this.payIndex)
if(this.payIndex === 0) { if(this.payIndex === 0) {
payApi(json).then(res => { payApi(json).then(res => {
this.orderNo = res.out_trade_no; this.orderNo = res.out_trade_no;
...@@ -429,8 +434,7 @@ export default { ...@@ -429,8 +434,7 @@ export default {
let data = { pay_type: 'ALI', return_url: window.location.href, buy_type: this.groupDetail.goods_type } let data = { pay_type: 'ALI', return_url: window.location.href, buy_type: this.groupDetail.goods_type }
let dataObj = Object.assign({}, data, json) let dataObj = Object.assign({}, data, json)
postPayBillApi(dataObj).then(res => { postPayBillApi(dataObj).then(res => {
location.href = res.pay_url; this.payUrl = res.pay_url
}) })
} }
return ; return ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment