1.提交代码

yj-dev
杨杰 3 years ago
parent 279ec09635
commit a0f8b254a2
  1. 5
      Utils/Api.js
  2. 8
      pages/qianZhuPay/qianZhuPay.vue
  3. 68
      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 => { export const getTPigCinemaToken = params => {
return POST('GET', `${base}/tPig/getTPigCinemaToken`, params).then(res => res.data); return POST('GET', `${base}/tPig/getTPigCinemaToken`, params).then(res => res.data);
} }
export const qzOrderToPay = params => { export const qzOrderToPay = params => {
return POST('POST', `${base}/order/qzOrderToPay`, params).then(res => res.data); 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 => { export const cancelOrderByOrderNo = params => {
return POST('GET', `${base}/highOrder/cancelOrderByOrderNo`, params).then(res => res.data); return POST('GET', `${base}/highOrder/cancelOrderByOrderNo`, params).then(res => res.data);

@ -59,11 +59,11 @@
}); });
}, },
fail: function(err) { fail: function(err) {
that.cancelOrderByOrderNo(); // that.cancelOrderByOrderNo();
uni.hideLoading(); uni.hideLoading();
uni.redirectTo({ uni.redirectTo({
url: '../tabBar/order/webUrl/webUrl?url=' + that url: '../tabBar/order/webUrl/webUrl?url=' + that
.orderInfoUrl .orderInfoUrl+'&orderid='+that.orderNo
}) })
}, },
}); });
@ -75,13 +75,13 @@
// #endif // #endif
} else { } else {
that.cancelOrderByOrderNo(); // that.cancelOrderByOrderNo();
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
icon: 'none' icon: 'none'
}) })
uni.redirectTo({ 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 class="text">{{ row.name }}</view>
</view> </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> <image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres"></image>
</view> </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)"> <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"> <view class="swiper-item" :data-id="pro.id">
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit"> <image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
@ -69,12 +70,13 @@
</swiper-item> </swiper-item>
</swiper> </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> <image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres1"></image>
</view> </view>
<!-- v-if="goldproductList&&goldproductList.length>0" --> <!-- 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" <swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index"
@click="toGoods(item.id)"> @click="toGoods(item.id)">
<view class="swiper-item" :data-id="item.id"> <view class="swiper-item" :data-id="item.id">
@ -226,6 +228,8 @@
imgadres1: 'jbhed.png', imgadres1: 'jbhed.png',
imgadres2: 'jt.png', imgadres2: 'jt.png',
imgadres3: '', imgadres3: '',
imgadres4:'homet.png',
imgadres5:'homeh.png',
webUrl:'', webUrl:'',
// //
swiperList: [{ swiperList: [{
@ -359,7 +363,7 @@
categoryCode: 'CMS_WX_APPLETS_HOME_ACTIVITY' categoryCode: 'CMS_WX_APPLETS_HOME_ACTIVITY'
} }
getCmsContent(params).then(res => { getCmsContent(params).then(res => {
if (res.return_code == '000000' && res.return_data) { if (res.return_code == '000000' && res.return_data !='') {
//广 //广
this.showPopup(); this.showPopup();
this.imgadres3 = res.return_data[0].imgData; this.imgadres3 = res.return_data[0].imgData;
@ -582,7 +586,7 @@
displayArea: 1 displayArea: 1
} }
getCouponList(params).then(res => { getCouponList(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000' && res.return_data.list) {
this.productList = res.return_data.list; this.productList = res.return_data.list;
if (res.return_data.total > 4) { if (res.return_data.total > 4) {
this.productListleg = 4; this.productListleg = 4;
@ -601,7 +605,7 @@
displayArea: 2 displayArea: 2
} }
getCouponList(params).then(res => { 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.goldproductList = res.return_data.list;
this.goldproductListleg = res.return_data.total; this.goldproductListleg = res.return_data.total;
if (res.return_data.total > 4) { if (res.return_data.total > 4) {
@ -692,6 +696,12 @@
} }
}) })
}, },
//
jumpTyou(){
uni.navigateTo({
url: '/pages/goods/refuel/refuel'
})
},
// //
toCategory(item) { toCategory(item) {
if (item.name == '团油') { if (item.name == '团油') {
@ -712,13 +722,32 @@
}) })
} else if (item.name == '电影票') { } else if (item.name == '电影票') {
if (app.globalData.userInfo) {
uni.navigateTo({ if (!app.globalData.userInfo) {
url: '/pages/tabBar/order/order?id=2'
})
} else {
this.getuserinfos(); 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 { } else {
uni.showToast({ uni.showToast({
@ -727,6 +756,21 @@
duration: 2000 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> <script>
import { import {
getTPigKFCToken, getTPigKFCToken,
getTPigCinemaToken getTPigCinemaToken,
getGatewayToken
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
@ -41,6 +42,15 @@
this.url = res.return_data; 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> </template>
<script> <script>
import {
cancelOrderByOrderNo
} from '../../../../Utils/Api.js'
export default { export default {
data() { data() {
return { return {
url: '' url: '',
orderNo:''
} }
}, },
onLoad(options) { onLoad(options) {
this.url = decodeURIComponent(options.url); this.url = decodeURIComponent(options.url);
this.orderNo= options.orderid;
},
onUnload() {
this.cancelOrderByOrderNo();
}, },
methods: { methods: {
//
cancelOrderByOrderNo() {
let that = this;
let params = {
orderNo: this.orderNo,
}
cancelOrderByOrderNo(params).then(res => {
})
},
} }
} }
</script> </script>

Loading…
Cancel
Save