|
|
@@ -336,24 +336,29 @@
|
|
|
this.$cache.put('orderResult', this.orderResult, 1 * 60 * 60)
|
|
|
}
|
|
|
this.selectGoods = item
|
|
|
- if (item.point == 0) {
|
|
|
- //免费投票
|
|
|
- this.freeVote()
|
|
|
- return
|
|
|
- }
|
|
|
- this.$refs.votePopup.hideVote()
|
|
|
- //移动积分投票,创建订单
|
|
|
- if (this.$cache.get('orderResult')) {
|
|
|
- this.createOrder()
|
|
|
- return
|
|
|
- }
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- let params = {
|
|
|
- url: 'https://vote.guosen-fumao.cn/order.html',
|
|
|
- goodsId: this.selectGoods.id
|
|
|
+ //移动积分礼物
|
|
|
+ if(item.payType === 'POINT_EXCHANGE_GOODS'){
|
|
|
+ if (item.point == 0 ) {
|
|
|
+ //免费投票
|
|
|
+ this.freeVote()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.votePopup.hideVote()
|
|
|
+ //移动积分投票,创建订单
|
|
|
+ if (this.$cache.get('orderResult')) {
|
|
|
+ this.createOrder()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ let params = {
|
|
|
+ url: 'https://vote.guosen-fumao.cn/order.html',
|
|
|
+ goodsId: this.selectGoods.id
|
|
|
+ }
|
|
|
+ this.$jump('/pages/webview/createOrder' + this.$u.queryParams(params))
|
|
|
+ // #endif
|
|
|
+ }else{
|
|
|
+ this.cashCreateOrder();
|
|
|
}
|
|
|
- this.$jump('/pages/webview/createOrder' + this.$u.queryParams(params))
|
|
|
- // #endif
|
|
|
},
|
|
|
//移动积分创建订单
|
|
|
async createOrder() {
|
|
|
@@ -381,6 +386,23 @@
|
|
|
this.$refs.toast.error(res.data.msg)
|
|
|
}
|
|
|
},
|
|
|
+ //现金投票创建订单
|
|
|
+ async cashCreateOrder() {
|
|
|
+ let params = {
|
|
|
+ helpGoodsId: this.orderResult.goodsId,
|
|
|
+ num: 1,
|
|
|
+ phone: this.vuex_phone,
|
|
|
+ productId: this.id,
|
|
|
+ userId: this.vuex_userId
|
|
|
+ }
|
|
|
+ let res = await this.$api.order.cashExchange(params)
|
|
|
+ if (res.data.success) {
|
|
|
+ console.log("res", res);
|
|
|
+ } else {
|
|
|
+ this.$refs.toast.error(res.data.msg)
|
|
|
+ }
|
|
|
+ this.$refs.votePopup.hideVote();
|
|
|
+ },
|
|
|
async cmccVote(item) {
|
|
|
this.$refs.smsAlert.hideSms()
|
|
|
let params = {
|