Commit 46a08f3e authored by IvyXia123's avatar IvyXia123

支付成功修改4

parent 66283267
...@@ -90,7 +90,10 @@ ...@@ -90,7 +90,10 @@
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)"
v-clipboard:copy="payIndex !== 0 ? payUrl : ''"
v-clipboard:success="copy"
v-clipboard:error="onError">提交订单</div>
</div> </div>
</footer> </footer>
<transition name="slide-fade"> <transition name="slide-fade">
...@@ -209,7 +212,8 @@ export default { ...@@ -209,7 +212,8 @@ export default {
{ icon: xinyongka,title: '信用卡分期', value: 2 }, { icon: xinyongka,title: '信用卡分期', value: 2 },
{ icon: fenqi, title: '其他分期', value: 3 }, { icon: fenqi, title: '其他分期', value: 3 },
], ],
payIndex: 0 payIndex: 0,
payUrl: ''
}; };
}, },
mounted() { mounted() {
...@@ -241,6 +245,16 @@ export default { ...@@ -241,6 +245,16 @@ export default {
} }
}, },
methods: { methods: {
copy(e) {
if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}
},
onError() {
if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}
},
// 支付方式 // 支付方式
payListClick(val) { payListClick(val) {
this.payIndex = val this.payIndex = val
...@@ -312,7 +326,6 @@ export default { ...@@ -312,7 +326,6 @@ 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;
...@@ -362,9 +375,8 @@ export default { ...@@ -362,9 +375,8 @@ export default {
} }
this.orderFlag = false; this.orderFlag = false;
/* let payTypeArr = ['WX', 'ALI', '卡分期'] let payTypeArr = ['WX', 'ALI', '卡分期']
let data = { pay_type: payTypeArr[this.payIndex], return_url: window.location.href, goods_id: json.goods_id, buy_type: this.groupDetail.goods_type, group_order_id: json.group_order_id, order_coupon_id:json.order_coupon_id } let data = { pay_type: payTypeArr[this.payIndex], return_url: window.location.href, goods_id: json.goods_id, buy_type: this.groupDetail.goods_type, group_order_id: json.group_order_id, order_coupon_id:json.order_coupon_id }
console.log(data)
postPayBillApi(data).then(res => { postPayBillApi(data).then(res => {
if(this.payIndex === 0) { if(this.payIndex === 0) {
this.orderNo = res.out_trade_no; this.orderNo = res.out_trade_no;
...@@ -407,10 +419,10 @@ export default { ...@@ -407,10 +419,10 @@ export default {
}); });
} }
}else if(this.payIndex === 1){ }else if(this.payIndex === 1){
var clipboard = new Clipboard('.tag-read') this.payUrl = res.pay_url;
} }
}) })
return false*/ return false
payApi(json) payApi(json)
.then(res => { .then(res => {
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
/> />
<div class="unit-block"> <div class="unit-block">
<div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i> <div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i>
<!--<router-link :to="{path: '/promptTime', query: { periods_id: secActions.id }}"> <router-link :to="{path: '/promptTime', query: { periods_id: secActions.id }}">
<div class="zhongbian-kuang"> <div class="zhongbian-kuang">
<img class="zhongbian" :src="zhong" alt=""> <img class="zhongbian" :src="zhong" alt="">
</div> </div>
</router-link>--> </router-link>
</div> </div>
<!--竖屏 主题栏--> <!--竖屏 主题栏-->
<swiper :options="swiperOption" class="banner" v-if="shopType==0&&unitList.length>0" ref="mySwiper"> <swiper :options="swiperOption" class="banner" v-if="shopType==0&&unitList.length>0" ref="mySwiper">
......
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