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 => {
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 => {

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

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

@ -69,6 +69,22 @@
</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="width92 alijusstart paddtop20">
@ -102,28 +118,28 @@
v-if="couponList.payType == 1 || couponList.payType == 2 || couponList.payType==3">积分充值</text> -->
</view>
</view>
</view>
<view class="width100" v-for="(item,index) in paytypeList" :key="index">
<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="width50 flleft fcor333 font16" style="padding-left: 4%;">
微信支付
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='2'" color="#0083f5" />
</view>
</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="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
</view>
<view class="width100" v-for="(item,index) in paytypeList" :key="index">
<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="width50 flleft fcor333 font16" style="padding-left: 4%;">
微信支付
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='2'" color="#0083f5" />
</view>
</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="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
</view>
</view>
<view class="width100 height110"></view>
@ -656,12 +672,12 @@
})
}
})
} else if (that.paytype == '3') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../login/updatePas/updatePas'
})
return;
} else if (that.paytype == '3') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../login/updatePas/updatePas'
})
return;
}
if (that.tongCardPrice < that.paytheprice) {
uni.showToast({
@ -671,7 +687,7 @@
});
return;
}
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',

@ -69,15 +69,15 @@
style="text-decoration: line-through;"> ¥{{orderPrice}}</text>
</view>
</view>
</view>
<view class="width94 backcorfff mart10">
<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="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
</view>
<view class="width94 backcorfff mart10">
<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="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<view class="width94 concont mart10 backcorfff">
<view class="height50 width100 paddtop5 backcorfff" @click="showPopup()">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
@ -340,7 +340,7 @@
orderPrice: 0, //
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 ,//
Integrastu: 1, //
identificationCode: '', //
}
},
@ -453,12 +453,12 @@
let resul2 = 0;
let result3 = 0;
this.orderList.forEach((good) => {
resul2 += this.accMul(good.num, good.oldprice);
resul2 += this.accMul(good.num, good.oldprice);
result3 = resul2.toFixed(2);
this.disconutprice = (result3 - result).toFixed(2);
})
this.orderPrice = result3;
this.orderPrice = result3;
this.totalprice = result;
this.payPrice = result;
},
@ -597,8 +597,8 @@
datas = {
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
@ -610,14 +610,14 @@
"companyId": app.globalData.companyId,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
}
}
}
if (this.typeid == 2) {
datas = {
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": this.orderList,
@ -808,24 +808,7 @@
})
}
})
} 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;
}
} else if (that.paytype == '3') {
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',
@ -842,6 +825,24 @@
that.thirdCancelOrder();
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');
} else {
uni.showToast({
@ -878,8 +879,8 @@
datas = {
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
@ -892,17 +893,17 @@
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
}
}
}
if (this.typeid == 2) {
datas = {
"childOrderList": [{
"goodsId": 9999,
"customerMobile": this.customerMobile,
"storeCode":this.storeCode,
"customerMobile": this.customerMobile,
"storeCode": this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": this.orderList,
"orderItems": this.orderList,
"goodsType": 9,
"saleCount": 1,
}],
@ -911,8 +912,8 @@
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
}
}
}
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>
<image class="btn-plus" mode="widthFix" src="../static/imgs/plus.png"
@click="showPopups(titem)"></image>
</view>
<view class="mart10 icon-click fotrt alijusend" v-else>
<view class="num fcorfff font14" style="background: #d90209;" @click="showPopups(titem)">
选规格
</view>
<view class="unibadge" v-if="titem.count > 0">
{{titem.count}}</view>
</view>
<view class="mart10 icon-click fotrt alijusend" v-else>
<view class="num fcorfff font14" style="background: #d90209;"
@click="showPopups(titem)">
选规格
</view>
<view class="unibadge" v-if="titem.count > 0">
{{titem.count}}
</view>
</view>
</view>
@ -82,8 +84,7 @@
</view>
</scroll-view>
<shopcart v-if="flist !='' " :goods="shoppingcart" @add="addCart" @dec="decreaseCart"
@delAll="delAll">
<shopcart v-if="flist !='' " :goods="shoppingcart" @add="addCart" @dec="decreaseCart" @delAll="delAll">
</shopcart>
@ -185,7 +186,7 @@
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,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
}
this.$refs.popup.hide();
return;
@ -443,16 +444,16 @@
for (var i = 0; i < this.shoppingcart.length; i++) {
if (this.shoppingcart[i].name == this.kfcname) {
indexs = 0;
this.shoppingcart[i].num = this.shoppingcart[i].num + this.nums;
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
this.shoppingcart[i].num = this.shoppingcart[i].num + this.nums;
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
}
}
}
@ -466,16 +467,16 @@
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
}
}
this.$refs.popup.hide();
@ -499,12 +500,6 @@
return true;
},
//
navToList() {
uni.navigateTo({
url: '../kfc-details/kfc-details'
})
}
}
}
@ -666,19 +661,19 @@
.wybfot {
position: fixed;
bottom: 0px;
}
.unibadge {
background: #000;
width: 20px;
height: 20px;
border-radius: 50%;
font-size: 9px;
color: #fff;
line-height: 20px;
text-align: center;
position: absolute;
margin-top: -25px;
margin-right: -5px;
}
.unibadge {
background: #000;
width: 20px;
height: 20px;
border-radius: 50%;
font-size: 9px;
color: #fff;
line-height: 20px;
text-align: center;
position: absolute;
margin-top: -25px;
margin-right: -5px;
}
</style>

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

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

Loading…
Cancel
Save