1.优化2.0删除多余的代码

yj-dev
杨杰 2 years ago
parent b701fc0057
commit 53680cef7c
  1. 2
      Utils/Api.js
  2. 9
      pages.json
  3. 15
      pages/goods/refuel-confirm/refuel-confirm.vue
  4. 74
      pages/order/confirmation.vue
  5. 87
      qianzhu-KFC/confirmOrder/confirmOrder.vue
  6. 22
      qianzhu-KFC/kfc-details/kfc-details.vue
  7. 117
      qianzhu-KFC/kfc-menu-list/kfc-menu-list.vue
  8. 4
      qianzhu-KFC/order-details/order-details.vue
  9. 3
      subPages/unionComfirmation/unionComfirmation.vue

@ -172,7 +172,7 @@ export const getDiscountByCode = params => {
//站内信列表 //站内信列表
export const getMsgByList = params => { export const getMsgByList = params => {
return POST('GET', `${base}//bsMsg/getMsgByList`, params).then(res => res.data); return POST('GET', `${base}/bsMsg/getMsgByList`, params).then(res => res.data);
} }
// 根据优惠券查卡券 // 根据优惠券查卡券
export const getCouponByDiscount = params => { export const getCouponByDiscount = params => {

@ -874,14 +874,7 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, { },{
"path": "kfc-details/kfc-details",
"style": {
"navigationBarTitleText": "详情",
"enablePullDownRefresh": false
}
}, {
"path": "kfc-menu-list/kfc-menu-list", "path": "kfc-menu-list/kfc-menu-list",
"style": { "style": {
"navigationBarTitleText": "菜单", "navigationBarTitleText": "菜单",

@ -275,9 +275,7 @@
wechatPay, wechatPay,
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
cardPay, cardPay,
orderToGoldPay,
findUser, findUser,
oilCardPay,
getUserOrderPreList, getUserOrderPreList,
canUseDiscount, canUseDiscount,
create, create,
@ -311,8 +309,6 @@
user: '', user: '',
paytype: 'weixin', paytype: 'weixin',
PaymentPassword: '', PaymentPassword: '',
// timedeductionPrice: '0', //
orderPrice: '', // orderPrice: '', //
deductionPrice: '0.00', // deductionPrice: '0.00', //
OrderPreList: [], // OrderPreList: [], //
@ -348,7 +344,6 @@
}, },
onShow() { onShow() {
let that = this; let that = this;
// that.paytype = '';
that.findUser(); that.findUser();
this.priceValue[1] = 0; this.priceValue[1] = 0;
this.reload(); this.reload();
@ -488,14 +483,6 @@
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.orderList = res.return_data; this.orderList = res.return_data;
this.payPrice = res.return_data.payPrice; this.payPrice = res.return_data.payPrice;
// let payprice = parseFloat(this.payPrice * 100).toFixed(
// 0);
// if (payprice > this.user.gold) {
// this.availIntegal = this.user.gold;
// } else {
// this.availIntegal = payprice;
// }
this.getRebateIntegral(); this.getRebateIntegral();
this.getThirdPartyByDetail(); this.getThirdPartyByDetail();
} }
@ -831,7 +818,7 @@
"payGold": this.priceValue[1], "payGold": this.priceValue[1],
"promoteCode": this.identificationCode, "promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword, "payPwd": this.PaymentPassword,
memDiscountId: this.memDiscountId "memDiscountId": this.memDiscountId
} }
create(goods).then(res => { create(goods).then(res => {

@ -69,6 +69,22 @@
</view> </view>
</view> </view>
<!-- // -->
<view class="width94 backcorfff mart10" v-if="couponList.wherePost">
<view class="width94 alijusstart height50 font14 fcor666 bor-botm1">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">联系人</view>
<input class="width60 fotrt font15" v-model="contactPepole" placeholder="请输入联系人" />
</view>
<view class="width94 alijusstart height50 font14 fcor666 bor-botm1">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">联系电话</view>
<input class="width60 fotrt font15" v-model="contactPhone" placeholder="请输入联系电话" />
</view>
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">联系地址</view>
<input class="width60 fotrt font15" v-model="contactAddress" placeholder="请输入联系地址" />
</view>
</view>
<view class="width94 comorder mart10"> <view class="width94 comorder mart10">
<view class="width92 alijusstart paddtop20"> <view class="width92 alijusstart paddtop20">
@ -102,28 +118,28 @@
v-if="couponList.payType == 1 || couponList.payType == 2 || couponList.payType==3">积分充值</text> --> v-if="couponList.payType == 1 || couponList.payType == 2 || couponList.payType==3">积分充值</text> -->
</view> </view>
</view> </view>
</view> </view>
<view class="width100" v-for="(item,index) in paytypeList" :key="index"> <view class="width100" v-for="(item,index) in paytypeList" :key="index">
<view class="width94 line1 mart5 marb5" v-if="item == 2"></view> <view class="width94 line1 mart5 marb5" v-if="item == 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='2'" v-if="item == 2"> <view class="height50 width100 backcorfff" @tap="paytype='2'" v-if="item == 2">
<view class="width50 flleft fcor333 font16" style="padding-left: 4%;"> <view class="width50 flleft fcor333 font16" style="padding-left: 4%;">
微信支付 微信支付
</view> </view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" <view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse"> style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='2'" color="#0083f5" /> <radio :checked="paytype=='2'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5" v-if="item == 3"></view> <view class="width94 line1 mart5 marb5" v-if="item == 3"></view>
<view class="height50 width100 backcorfff" @tap="paytype='3'" v-if="item == 3"> <view class="height50 width100 backcorfff" @tap="paytype='3'" v-if="item == 3">
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;"> <view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text> 汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view> </view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" <view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse"> style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> <radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="width100 height110"></view> <view class="width100 height110"></view>
@ -656,12 +672,12 @@
}) })
} }
}) })
} else if (that.paytype == '3') { } else if (that.paytype == '3') {
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../login/updatePas/updatePas' url: '../login/updatePas/updatePas'
}) })
return; return;
} }
if (that.tongCardPrice < that.paytheprice) { if (that.tongCardPrice < that.paytheprice) {
uni.showToast({ uni.showToast({
@ -671,7 +687,7 @@
}); });
return; return;
} }
if (!that.user.isSetHltCard) { if (!that.user.isSetHltCard) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',

@ -69,15 +69,15 @@
style="text-decoration: line-through;"> ¥{{orderPrice}}</text> style="text-decoration: line-through;"> ¥{{orderPrice}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="width94 backcorfff mart10"> <view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666"> <view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view> <view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" /> <input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view> </view>
</view> </view>
<view class="width94 concont mart10 backcorfff"> <view class="width94 concont mart10 backcorfff">
<view class="height50 width100 paddtop5 backcorfff" @click="showPopup()"> <view class="height50 width100 paddtop5 backcorfff" @click="showPopup()">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
@ -340,7 +340,7 @@
orderPrice: 0, // orderPrice: 0, //
rechargeDes: '', // rechargeDes: '', //
rebateIntegral: '', // rebateIntegral: '', //
Integrastu: 1 ,// Integrastu: 1, //
identificationCode: '', // identificationCode: '', //
} }
}, },
@ -453,12 +453,12 @@
let resul2 = 0; let resul2 = 0;
let result3 = 0; let result3 = 0;
this.orderList.forEach((good) => { this.orderList.forEach((good) => {
resul2 += this.accMul(good.num, good.oldprice); resul2 += this.accMul(good.num, good.oldprice);
result3 = resul2.toFixed(2); result3 = resul2.toFixed(2);
this.disconutprice = (result3 - result).toFixed(2); this.disconutprice = (result3 - result).toFixed(2);
}) })
this.orderPrice = result3; this.orderPrice = result3;
this.totalprice = result; this.totalprice = result;
this.payPrice = result; this.payPrice = result;
}, },
@ -597,8 +597,8 @@
datas = { datas = {
"childOrderList": [{ "childOrderList": [{
"goodsId": 9999, "goodsId": 9999,
"customerMobile": this.customerMobile, "customerMobile": this.customerMobile,
"storeCode":this.storeCode, "storeCode": this.storeCode,
"platformId": this.showType, "platformId": this.showType,
"productType": this.productType, "productType": this.productType,
"orderItems": data2, "orderItems": data2,
@ -610,14 +610,14 @@
"companyId": app.globalData.companyId, "companyId": app.globalData.companyId,
"promoteCode": this.identificationCode, "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
} }
} }
if (this.typeid == 2) { if (this.typeid == 2) {
datas = { datas = {
"childOrderList": [{ "childOrderList": [{
"goodsId": 9999, "goodsId": 9999,
"customerMobile": this.customerMobile, "customerMobile": this.customerMobile,
"storeCode":this.storeCode, "storeCode": this.storeCode,
"platformId": this.showType, "platformId": this.showType,
"productType": this.productType, "productType": this.productType,
"orderItems": this.orderList, "orderItems": this.orderList,
@ -808,24 +808,7 @@
}) })
} }
}) })
} else if (that.paytype == '3') { } else if (that.paytype == '3') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../pages/login/updatePas/updatePas'
})
that.thirdCancelOrder();
return;
}
if (that.tongCardPrice < that.payPrice) {
uni.showToast({
icon: 'none',
title: '工会卡余额不足',
duration: 2000,
});
that.thirdCancelOrder();
return;
}
if (!that.user.isSetHltCard) { if (!that.user.isSetHltCard) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -842,6 +825,24 @@
that.thirdCancelOrder(); that.thirdCancelOrder();
return; return;
} }
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../pages/login/updatePas/updatePas'
})
that.thirdCancelOrder();
return;
}
if (that.tongCardPrice < that.payPrice) {
uni.showToast({
icon: 'none',
title: '工会卡余额不足',
duration: 2000,
});
that.thirdCancelOrder();
return;
}
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} else { } else {
uni.showToast({ uni.showToast({
@ -878,8 +879,8 @@
datas = { datas = {
"childOrderList": [{ "childOrderList": [{
"goodsId": 9999, "goodsId": 9999,
"customerMobile": this.customerMobile, "customerMobile": this.customerMobile,
"storeCode":this.storeCode, "storeCode": this.storeCode,
"platformId": this.showType, "platformId": this.showType,
"productType": this.productType, "productType": this.productType,
"orderItems": data2, "orderItems": data2,
@ -892,17 +893,17 @@
"promoteCode": this.identificationCode, "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword "payPwd": this.PaymentPassword
} }
} }
if (this.typeid == 2) { if (this.typeid == 2) {
datas = { datas = {
"childOrderList": [{ "childOrderList": [{
"goodsId": 9999, "goodsId": 9999,
"customerMobile": this.customerMobile, "customerMobile": this.customerMobile,
"storeCode":this.storeCode, "storeCode": this.storeCode,
"platformId": this.showType, "platformId": this.showType,
"productType": this.productType, "productType": this.productType,
"orderItems": this.orderList, "orderItems": this.orderList,
"goodsType": 9, "goodsType": 9,
"saleCount": 1, "saleCount": 1,
}], }],
@ -911,8 +912,8 @@
"promoteCode": this.identificationCode, "promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword "payPwd": this.PaymentPassword
} }
} }
create(datas).then(res => { create(datas).then(res => {

@ -1,22 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

@ -65,14 +65,16 @@
</view> </view>
<image class="btn-plus" mode="widthFix" src="../static/imgs/plus.png" <image class="btn-plus" mode="widthFix" src="../static/imgs/plus.png"
@click="showPopups(titem)"></image> @click="showPopups(titem)"></image>
</view> </view>
<view class="mart10 icon-click fotrt alijusend" v-else> <view class="mart10 icon-click fotrt alijusend" v-else>
<view class="num fcorfff font14" style="background: #d90209;" @click="showPopups(titem)"> <view class="num fcorfff font14" style="background: #d90209;"
选规格 @click="showPopups(titem)">
</view> 选规格
<view class="unibadge" v-if="titem.count > 0"> </view>
{{titem.count}}</view> <view class="unibadge" v-if="titem.count > 0">
{{titem.count}}
</view>
</view> </view>
</view> </view>
@ -82,8 +84,7 @@
</view> </view>
</scroll-view> </scroll-view>
<shopcart v-if="flist !='' " :goods="shoppingcart" @add="addCart" @dec="decreaseCart" <shopcart v-if="flist !='' " :goods="shoppingcart" @add="addCart" @dec="decreaseCart" @delAll="delAll">
@delAll="delAll">
</shopcart> </shopcart>
@ -185,7 +186,7 @@
this.tlist.push(items); this.tlist.push(items);
}) })
}) })
this.currentId = res.return_data[0].name; this.currentId = res.return_data[0].name;
} }
}) })
}, },
@ -425,16 +426,16 @@
"price": this.kfcprice, "price": this.kfcprice,
"oldprice": this.kfcoldprice "oldprice": this.kfcoldprice
} }
this.shoppingcart.push(datas); this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) { for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) { if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) { for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) { if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums this.tlist[i].count = this.tlist[i].count + this.nums
} }
} }
} }
} }
this.$refs.popup.hide(); this.$refs.popup.hide();
return; return;
@ -443,16 +444,16 @@
for (var i = 0; i < this.shoppingcart.length; i++) { for (var i = 0; i < this.shoppingcart.length; i++) {
if (this.shoppingcart[i].name == this.kfcname) { if (this.shoppingcart[i].name == this.kfcname) {
indexs = 0; indexs = 0;
this.shoppingcart[i].num = this.shoppingcart[i].num + this.nums; this.shoppingcart[i].num = this.shoppingcart[i].num + this.nums;
for (var i = 0; i < this.tlist.length; i++) { for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) { if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) { for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) { if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums this.tlist[i].count = this.tlist[i].count + this.nums
} }
} }
} }
} }
} }
} }
@ -466,16 +467,16 @@
"price": this.kfcprice, "price": this.kfcprice,
"oldprice": this.kfcoldprice "oldprice": this.kfcoldprice
} }
this.shoppingcart.push(datas); this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) { for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) { if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) { for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) { if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums this.tlist[i].count = this.tlist[i].count + this.nums
} }
} }
} }
} }
} }
this.$refs.popup.hide(); this.$refs.popup.hide();
@ -499,12 +500,6 @@
return true; return true;
},
//
navToList() {
uni.navigateTo({
url: '../kfc-details/kfc-details'
})
} }
} }
} }
@ -666,19 +661,19 @@
.wybfot { .wybfot {
position: fixed; position: fixed;
bottom: 0px; bottom: 0px;
} }
.unibadge { .unibadge {
background: #000; background: #000;
width: 20px; width: 20px;
height: 20px; height: 20px;
border-radius: 50%; border-radius: 50%;
font-size: 9px; font-size: 9px;
color: #fff; color: #fff;
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
position: absolute; position: absolute;
margin-top: -25px; margin-top: -25px;
margin-right: -5px; margin-right: -5px;
} }
</style> </style>

@ -113,8 +113,8 @@
</view> </view>
<view class="width94 backcorfff marb20"> <view class="width94 backcorfff marb20">
<view class="width100" style="height: 10px;"> <view class="width100" style="height: 10px;">
<view class=".cro_left_top flleft"></view> <view class="cro_left_top flleft"></view>
<view class=".cro_right_top flright"></view> <view class="cro_right_top flright"></view>
</view> </view>
<view class="width94 alijusstart paddtop10 "> <view class="width94 alijusstart paddtop10 ">
<view class="font15 fcor333 fontwig6 width50">商品小计</view> <view class="font15 fcor333 fontwig6 width50">商品小计</view>

@ -353,9 +353,6 @@
// //
// //
getHuiLianTongCardBalance() { getHuiLianTongCardBalance() {
if (!this.user.hltCardNo) {
return;
}
let params = { let params = {
cardNo: this.user.hltCardNo.cardNo cardNo: this.user.hltCardNo.cardNo
} }

Loading…
Cancel
Save