1.提交代码

yj-dev
杨杰 3 years ago
parent 279ec09635
commit a0f8b254a2
  1. 5
      Utils/Api.js
  2. 8
      pages/qianZhuPay/qianZhuPay.vue
  3. 70
      pages/tabBar/home/home.vue
  4. 12
      pages/tabBar/order/order.vue
  5. 20
      pages/tabBar/order/webUrl/webUrl.vue

@ -160,9 +160,14 @@ export const getTPigKFCToken = params => {
export const getTPigCinemaToken = params => {
return POST('GET', `${base}/tPig/getTPigCinemaToken`, params).then(res => res.data);
}
export const qzOrderToPay = params => {
return POST('POST', `${base}/order/qzOrderToPay`, params).then(res => res.data);
}
//电话费
export const getGatewayToken = params => {
return POST('GET', `${base}/tPig/getGatewayToken`, params).then(res => res.data);
}
//取消订单
export const cancelOrderByOrderNo = params => {
return POST('GET', `${base}/highOrder/cancelOrderByOrderNo`, params).then(res => res.data);

@ -59,11 +59,11 @@
});
},
fail: function(err) {
that.cancelOrderByOrderNo();
// that.cancelOrderByOrderNo();
uni.hideLoading();
uni.redirectTo({
url: '../tabBar/order/webUrl/webUrl?url=' + that
.orderInfoUrl
.orderInfoUrl+'&orderid='+that.orderNo
})
},
});
@ -75,13 +75,13 @@
// #endif
} else {
that.cancelOrderByOrderNo();
// that.cancelOrderByOrderNo();
uni.showToast({
title: res.return_msg,
icon: 'none'
})
uni.redirectTo({
url: '../tabBar/order/webUrl/webUrl?url=' + that.orderInfoUrl
url: '../tabBar/order/webUrl/webUrl?url=' + that.orderInfoUrl + '&orderid='+that.orderNo
})
}
})

@ -54,11 +54,12 @@
<view class="text">{{ row.name }}</view>
</view>
</view>
<image v-if='productList.length == 0' mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" @click="jumpTyou" :src="imagewxUrl+imgadres4"></image>
<!-- 赠券 -->
<view style="width: 91%;margin-left: 5%;" @click="goGoodsList(1)">
<view style="width: 91%;margin-left: 5%;" v-if='productList.length != 0' @click="goGoodsList(1)">
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres"></image>
</view>
<swiper class="orange-content" style="border: 2px solid #ff5836;" :display-multiple-items="productListleg">
<swiper class="orange-content" style="border: 2px solid #ff5836;" v-if='productList.length != 0' :display-multiple-items="productListleg">
<swiper-item class="swiper-hed" v-for="pro in productList" :key="pro.id" @click="toGoods(pro.id)">
<view class="swiper-item" :data-id="pro.id">
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
@ -68,13 +69,14 @@
</view>
</swiper-item>
</swiper>
<image v-if='goldproductList.length == 0' mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" @click="jumphuafei" :src="imagewxUrl+imgadres5"></image>
<!-- 金币 -->
<view style="width: 90%;margin-left: 5%;" @click="goGoodsList(2)">
<view style="width: 90%;margin-left: 5%;" v-if='goldproductList.length != 0' @click="goGoodsList(2)">
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres1"></image>
</view>
<!-- v-if="goldproductList&&goldproductList.length>0" -->
<swiper class="orange-content" :display-multiple-items="goldproductListleg" next-margin="50rpx">
<swiper class="orange-content" :display-multiple-items="goldproductListleg" v-if='goldproductList.length != 0' next-margin="50rpx">
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index"
@click="toGoods(item.id)">
<view class="swiper-item" :data-id="item.id">
@ -226,6 +228,8 @@
imgadres1: 'jbhed.png',
imgadres2: 'jt.png',
imgadres3: '',
imgadres4:'homet.png',
imgadres5:'homeh.png',
webUrl:'',
//
swiperList: [{
@ -359,7 +363,7 @@
categoryCode: 'CMS_WX_APPLETS_HOME_ACTIVITY'
}
getCmsContent(params).then(res => {
if (res.return_code == '000000' && res.return_data) {
if (res.return_code == '000000' && res.return_data !='') {
//广
this.showPopup();
this.imgadres3 = res.return_data[0].imgData;
@ -582,7 +586,7 @@
displayArea: 1
}
getCouponList(params).then(res => {
if (res.return_code == '000000') {
if (res.return_code == '000000' && res.return_data.list) {
this.productList = res.return_data.list;
if (res.return_data.total > 4) {
this.productListleg = 4;
@ -601,7 +605,7 @@
displayArea: 2
}
getCouponList(params).then(res => {
if (res.return_code == '000000') {
if (res.return_code == '000000' && res.return_data.list) {
this.goldproductList = res.return_data.list;
this.goldproductListleg = res.return_data.total;
if (res.return_data.total > 4) {
@ -692,6 +696,12 @@
}
})
},
//
jumpTyou(){
uni.navigateTo({
url: '/pages/goods/refuel/refuel'
})
},
//
toCategory(item) {
if (item.name == '团油') {
@ -712,14 +722,33 @@
})
} else if (item.name == '电影票') {
if (app.globalData.userInfo) {
uni.navigateTo({
url: '/pages/tabBar/order/order?id=2'
})
} else {
if (!app.globalData.userInfo) {
this.getuserinfos();
return false;
}
if(!app.globalData.userInfo.phone){
this.isShowAuth = true;
return false;
}
uni.navigateTo({
url: '/pages/tabBar/order/order?id=2'
})
} else if (item.name == '话费充值') {
if (!app.globalData.userInfo) {
this.getuserinfos();
return false;
}
if(!app.globalData.userInfo.phone){
this.isShowAuth = true;
return false;
}
uni.navigateTo({
url: '/pages/tabBar/order/order?id=3'
})
} else {
uni.showToast({
title: '暂未开通',
@ -727,6 +756,21 @@
duration: 2000
})
}
},
//
jumphuafei(){
if (!app.globalData.userInfo) {
this.getuserinfos();
return false;
}
if(!app.globalData.userInfo.phone){
this.isShowAuth = true;
return false;
}
uni.navigateTo({
url: '/pages/tabBar/order/order?id=3'
})
}
},

@ -7,7 +7,8 @@
<script>
import {
getTPigKFCToken,
getTPigCinemaToken
getTPigCinemaToken,
getGatewayToken
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@ -41,6 +42,15 @@
this.url = res.return_data;
}
})
} else if (this.typeId == 3) {
let params = {
userId: app.globalData.userInfo.id
}
getGatewayToken(params).then(res => {
if (res.return_code == '000000') {
this.url = res.return_data;
}
})
}
}
}

@ -5,17 +5,33 @@
</template>
<script>
import {
cancelOrderByOrderNo
} from '../../../../Utils/Api.js'
export default {
data() {
return {
url: ''
url: '',
orderNo:''
}
},
onLoad(options) {
this.url = decodeURIComponent(options.url);
this.orderNo= options.orderid;
},
onUnload() {
this.cancelOrderByOrderNo();
},
methods: {
//
cancelOrderByOrderNo() {
let that = this;
let params = {
orderNo: this.orderNo,
}
cancelOrderByOrderNo(params).then(res => {
})
},
}
}
</script>

Loading…
Cancel
Save