diff --git a/App.vue b/App.vue
index f8a2e7f..750f205 100644
--- a/App.vue
+++ b/App.vue
@@ -27,7 +27,9 @@
latitude: '',
balancePrice: '',
balanceCardNo: '',
- identificationCode: '',
+ identificationCode: '',
+ //公司id
+ companyId:'',
// h5获取信息
h5code: '',
//门店ID
@@ -84,7 +86,75 @@
that.globalData.token = e.data;
}
}
- })
+ })
+
+
+
+ uni.getStorage({
+ key: 'accountId',
+ success(e) {
+ if (e.data) {
+ that.globalData.accountId = e.data;
+ that.globalData.accountType = e.data;
+ }
+ }
+ })
+ uni.getStorage({
+ key: 'gasKey',
+ success(e) {
+ if (e.data) {
+ that.globalData.gasKey = e.data;
+ }
+ }
+ })
+ uni.getStorage({
+ key: 'staffCode',
+ success(e) {
+ if (e.data) {
+ if (that.globalData.accountId == '000001&key' || that.globalData.accountId ==
+ '000000&gasKey' || that.globalData.accountId == '000009&key' || that.globalData.accountId == '0000010&key') {
+ that.globalData.staffCode = e.data;
+ } else {
+ that.globalData.mchId = e.data;
+ }
+ }
+ }
+ })
+
+ uni.getStorage({
+ key: 'cityId',
+ success(e) {
+ if (e.data) {
+ that.globalData.cityId = e.data;
+ }
+ }
+ })
+
+ uni.getStorage({
+ key: 'companyId',
+ success(e) {
+ if (e.data) {
+ that.globalData.companyId = e.data;
+ }
+ }
+ })
+
+ uni.getStorage({
+ key: 'latitude',
+ success(e) {
+ if (e.data) {
+ that.globalData.latitude = e.data;
+ }
+ }
+ })
+ uni.getStorage({
+ key: 'longitude',
+ success(e) {
+ if (e.data) {
+ that.globalData.longitude = e.data;
+ }
+ }
+ })
},
onHide: function() {}
}
diff --git a/Utils/Api.js b/Utils/Api.js
index 5e6e2b0..43094d4 100644
--- a/Utils/Api.js
+++ b/Utils/Api.js
@@ -594,3 +594,8 @@ export const czhltUnionCardPay = params => {
export const getUserOrderListhuafei = params => {
return POST('GET', `${base}/outRechargeOrder/getUserOrderList`, params).then(res => res.data);
}
+
+//肯德基返利
+export const getRebateIntegral = params => {
+ return POST('POST', `${base}/common/getRebateIntegral`, params).then(res => res.data);
+}
diff --git a/manifest.json b/manifest.json
index 348d218..5c09ace 100644
--- a/manifest.json
+++ b/manifest.json
@@ -86,7 +86,7 @@
},
"devServer" : {
"port" : "",
- "https" : true
+ "https" : false
},
"domain" : "https://hsgcs.dctpay.com",
"template" : "index.html"
diff --git a/member-Recharge/rec-confirmation/rec-confirmation.vue b/member-Recharge/rec-confirmation/rec-confirmation.vue
index 66e3c46..7ff891b 100644
--- a/member-Recharge/rec-confirmation/rec-confirmation.vue
+++ b/member-Recharge/rec-confirmation/rec-confirmation.vue
@@ -72,7 +72,27 @@
¥{{priceValue[1] / 100}}
-
+
+
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
+
支付方式
@@ -116,17 +136,17 @@
优惠券选择
-
-
-
-
- {{items.discountName}}
+
+
+
+ {{items.discountName}}
有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
-
-
+
+
{
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ }else{
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
},
//查询工会卡详情
getHuiLianTongCardBalance() {
@@ -298,7 +340,8 @@
this.paytype = '';
} else {
this.isUse = true;
- }
+ }
+ this.getRebateIntegral();
},
//获取选择支付方式
changeRiado() {
@@ -462,7 +505,8 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
- }
+ }
+ this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@@ -802,10 +846,10 @@
border-radius: 8px;
image {
- float: left;
- width: 170rpx;
- max-height: 170rpx;
- margin-left: 10px;
+ // float: left;
+ width: 160rpx;
+ max-height: 160rpx;
+ // margin-left: 10px;
}
}
diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue
index a78e6b3..35b1b2c 100644
--- a/pages/goods/refuel-confirm/refuel-confirm.vue
+++ b/pages/goods/refuel-confirm/refuel-confirm.vue
@@ -120,6 +120,25 @@
¥{{priceValue[1] / 100}}
+
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
@@ -176,18 +195,18 @@
优惠券选择
-
-
-
-
- {{items.highDiscount.discountName}}
+
+
+
+ {{items.highDiscount.discountName}}
有效期:{{items.highDiscount.salesEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
-
-
+
+
@@ -219,7 +238,8 @@
canUseDiscount,
addOrder,
cancelOrder,
- oilPriceDiscountCompute
+ oilPriceDiscountCompute,
+ getRebateIntegral
} from '../../../Utils/Api.js';
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
@@ -256,7 +276,9 @@
memDiscountId: '', //优惠券id
priceValue: [0, 0], // 积分可以指定默认值
availIntegal: 0, // 可用积分
- gasOrderList: '' //存的订单信息
+ gasOrderList: '', //存的订单信息
+ rebateIntegral: '', //返回积分
+ Integrastu: 1 //返积分状态
}
},
onLoad(e) {
@@ -266,9 +288,9 @@
onShow() {
let that = this;
// that.paytype = '';
- that.findUser();
- this.priceValue[1] = 0;
- this.reload();
+ that.findUser();
+ this.priceValue[1] = 0;
+ this.reload();
this.calculatepayPrice();
},
methods: {
@@ -290,6 +312,24 @@
}
});
},
+ //支付返利积分
+ getRebateIntegral() {
+ let datas = {
+ "companyId": app.globalData.companyId,
+ "price": this.payPrice,
+ "productId": 1,
+ "type": 3,
+ }
+ getRebateIntegral(datas).then(res => {
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ } else {
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
+ },
//查询优惠券
canUseDiscount() {
let params = {
@@ -323,6 +363,8 @@
} else {
this.availIntegal = payprice;
}
+
+ this.getRebateIntegral();
}
})
},
@@ -385,7 +427,7 @@
} else {
this.availIntegal = payprice;
this.priceValue[1] = 0;
- }
+ }
this.reload();
this.calculatepayPrice();
},
@@ -400,7 +442,8 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
- }
+ }
+ this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@@ -433,7 +476,8 @@
this.paytype = '';
} else {
this.isUse = true;
- }
+ }
+ this.getRebateIntegral();
},
//密码支付完成
@@ -1034,10 +1078,10 @@
border-radius: 8px;
image {
- float: left;
- width: 170rpx;
- max-height: 170rpx;
- margin-left: 10px;
+ // float: left;
+ width: 160rpx;
+ max-height: 160rpx;
+ // margin-left: 10px;
}
}
diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue
index b083c97..cbfee48 100644
--- a/pages/goods/refuel-details/refuel-details.vue
+++ b/pages/goods/refuel-details/refuel-details.vue
@@ -76,8 +76,11 @@
- {{amount.codeValue}}元
- 最高优惠¥{{amount.codeName}}
+
+ {{amount.codeValue}}元
+
+
+ 最高优惠¥{{amount.codeName}}
@@ -156,7 +159,7 @@
-
+
提示: {{showtoastdes}}
立即登录
@@ -175,7 +178,7 @@
oilPriceDiscountCompute,
recentGasStation,
sendSmsCodeByHw,
- H5login,
+ H5login,
getDictionaryByCodeType
} from '../../../Utils/Api.js';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
@@ -194,7 +197,7 @@
detailList: [],
gunnumber: [],
user: '',
- amountList: [
+ amountList: [
// {
// id: '1',
// price: '200'
@@ -244,39 +247,52 @@
code: '',
getCodeText: '获取验证码',
getCodeBtnColor: "#ffffff",
- getCodeisWaiting: false,
- showtoastdes:'' // 未登陆错误
+ getCodeisWaiting: false,
+ showtoastdes: '' // 未登陆错误
}
},
onLoad(options) {
- this.store_key = options.id;
- this.counId = options.desId;
- this.oilNo = options.oilNo;
+ let that = this;
+ // #ifdef MP
+ that.store_key = options.id;
+ // #endif
+ // #ifdef H5
+ uni.getStorage({
+ key: 'store_key',
+ success(e) {
+ if (e.data) {
+ that.store_key = e.data;
+ }
+ }
+ })
+ // #endif
+ that.counId = options.desId;
+ that.oilNo = options.oilNo;
if (app.globalData.accountId) {
- this.isTyAgent = true;
+ that.isTyAgent = true;
}
if (app.globalData.gasKey && app.globalData.accountType == '000000&gasKey') {
- this.store_key = app.globalData.gasKey;
+ that.store_key = app.globalData.gasKey;
} else {
app.globalData.staffCode = '';
}
- // #ifdef H5
- if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
- this.recentGasStation();
+ // #ifdef H5
+ if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
+ that.recentGasStation();
} else {
- this.getGasDetailByStoreKey();
+ that.getGasDetailByStoreKey();
}
// #endif
// #ifdef MP
- this.getGasDetailByStoreKey();
+ that.getGasDetailByStoreKey();
// #endif
- this.getDictionaryByCodeTypeOl();
- this.getDictionaryByCodeTypeMoney();
- this.getDictionaryByCodeType();
+ that.getDictionaryByCodeTypeOl();
+ that.getDictionaryByCodeTypeMoney();
+ that.getDictionaryByCodeType();
},
onShow() {
- this.user = app.globalData.userInfo;
+ this.user = app.globalData.userInfo;
},
onUnload() {
if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
@@ -286,18 +302,18 @@
app.globalData.accountType = '';
}
},
- methods: {
- //价格
- //查询油品
- getDictionaryByCodeType() {
- let datas = {
- codeType: 'REFUEL_PRICE'
- }
- getDictionaryByCodeType(datas).then(res => {
- if (res.return_code == '000000') {
- this.amountList = res.return_data;
- }
- })
+ methods: {
+ //价格
+ //查询油品
+ getDictionaryByCodeType() {
+ let datas = {
+ codeType: 'REFUEL_PRICE'
+ }
+ getDictionaryByCodeType(datas).then(res => {
+ if (res.return_code == '000000') {
+ this.amountList = res.return_data;
+ }
+ })
},
//一键加油登陆
//跳转协议
@@ -409,12 +425,12 @@
})
this.$refs.popups.hide();
this.postionIng();
- } else {
+ } else {
this.showtoastdes = res.return_msg;
- uni.showToast({
+ uni.showToast({
title: res.return_msg,
- icon: "none",
- duration:2000
+ icon: "none",
+ duration: 2000
});
}
})
@@ -424,6 +440,11 @@
//前往导航
seeloaction() {
+ // #ifdef H5
+ window.open(
+ `//uri.amap.com/navigation?from=${app.globalData.longitude},${app.globalData.latitude},我的位置&to=${this.storeList.gasAddressLongitude},${this.storeList.gasAddressLatitude},${this.storeList.gasAddress}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
+ )
+ // #endif
// #ifdef MP
uni.openLocation({
latitude: Number(this.storeList.gasAddressLatitude), //目的地的定位
@@ -442,7 +463,7 @@
this.$refs.popups.show();
},
//一键加油
- recentGasStation() {
+ recentGasStation() {
this.gunnumber = [];
uni.showLoading({
title: '加载中...'
@@ -454,24 +475,53 @@
}
recentGasStation(params).then(res => {
uni.hideLoading();
- if (res.return_code == '000000') {
+ if (res.return_code == '000000') {
this.storeList = res.return_data;
- if (!this.oilNo) {
- this.oilNo = res.return_data.oilPriceList[0].oilNoName;
- this.priceVip = res.return_data.oilPriceList[0].priceVip;
- this.priceGun = res.return_data.oilPriceList[0].priceGun;
- this.priceOfficial = res.return_data.oilPriceList[0].priceOfficial;
- this.detailList = res.return_data.oilPriceList;
- this.oilType = res.return_data.oilPriceList[0].oilType;
- this.gasGunList = res.return_data.gasGunList;
- this.counId = res.return_data.goodsId;
- for (var i = 0; i < res.return_data.gasGunList.length; i++) {
- if (this.oilNo == res.return_data.gasGunList[i].oilNoName) {
- this.gunnumber.push(res.return_data.gasGunList[i])
- // this.gunNo = res.return_data.gasGunList[i].gunNo;
- this.gasOilNo = res.return_data.gasGunList[i].oilNo;
- }
- }
+ // if (!this.oilNo) {
+ // this.oilNo = res.return_data.oilPriceList[0].oilNoName;
+ // this.priceVip = res.return_data.oilPriceList[0].priceVip;
+ // this.priceGun = res.return_data.oilPriceList[0].priceGun;
+ // this.priceOfficial = res.return_data.oilPriceList[0].priceOfficial;
+ // this.detailList = res.return_data.oilPriceList;
+ // this.oilType = res.return_data.oilPriceList[0].oilType;
+ // this.gasGunList = res.return_data.gasGunList;
+ // this.counId = res.return_data.goodsId;
+ // for (var i = 0; i < res.return_data.gasGunList.length; i++) {
+ // if (this.oilNo == res.return_data.gasGunList[i].oilNoName) {
+ // this.gunnumber.push(res.return_data.gasGunList[i])
+ // // this.gunNo = res.return_data.gasGunList[i].gunNo;
+ // this.gasOilNo = res.return_data.gasGunList[i].oilNo;
+ // }
+ // }
+ // }
+
+ if (!this.oilNo || this.oilNo == undefined) {
+ this.oilNo = res.return_data.oilPriceList[0].oilNoName;
+ this.priceVip = res.return_data.oilPriceList[0].priceVip;
+ this.priceGun = res.return_data.oilPriceList[0].priceGun;
+ this.priceOfficial = res.return_data.oilPriceList[0].priceOfficial;
+ this.oilType = res.return_data.oilPriceList[0].oilType;
+ } else {
+ let oillist = res.return_data.oilPriceList;
+ for (var i = 0; i < oillist.length; i++) {
+ if (this.oilNo == oillist[i].oilNoName) {
+ this.priceVip = oillist[i].priceVip;
+ this.priceGun = oillist[i].priceGun;
+ this.priceOfficial = oillist[i].priceOfficial;
+ this.oilType = oillist[i].oilType;
+ }
+ }
+ }
+
+ this.detailList = res.return_data.oilPriceList;
+ this.counId = res.return_data.goodsId;
+ this.gasGunList = res.return_data.gasGunList;
+ for (var i = 0; i < res.return_data.gasGunList.length; i++) {
+ if (this.oilNo == res.return_data.gasGunList[i].oilNoName) {
+ this.gunnumber.push(res.return_data.gasGunList[i])
+ // this.gunNo = res.return_data.gasGunList[i].gunNo;
+ this.gasOilNo = res.return_data.gasGunList[i].oilNo;
+ }
}
} else {
uni.showToast({
@@ -483,7 +533,7 @@
})
},
//查询详情
- getGasDetailByStoreKey() {
+ getGasDetailByStoreKey() {
this.gunnumber = [];
uni.showLoading({
title: '加载中...'
@@ -496,7 +546,7 @@
}
getGasDetailByStoreKey(params).then(res => {
uni.hideLoading();
- if (res.return_code == '000000') {
+ if (res.return_code == '000000') {
this.storeList = res.return_data;
if (!this.oilNo || this.oilNo == undefined) {
this.oilNo = res.return_data.oilPriceList[0].oilNoName;
@@ -1096,9 +1146,11 @@
font-size: 12px;
}
}
- .colorfe80{
- color: #089bf5;
+
+ .colorfe80 {
+ color: #089bf5;
}
+
.footer {
position: fixed;
bottom: 0upx;
diff --git a/pages/goods/refuel/refuel.vue b/pages/goods/refuel/refuel.vue
index fb00bf3..bb66e3e 100644
--- a/pages/goods/refuel/refuel.vue
+++ b/pages/goods/refuel/refuel.vue
@@ -156,13 +156,21 @@
}
},
onLoad() {
+ // let that = this;
+ // that.getDictionaryByCodeType();
+ // if (app.globalData.accountId) {
+ // that.isTyAgent = true;
+ // }
+ // that.getGasStoreList();
+
+ },
+ onShow() {
let that = this;
that.getDictionaryByCodeType();
if (app.globalData.accountId) {
that.isTyAgent = true;
}
that.getGasStoreList();
-
},
onReachBottom() {
this.getGasStoreList();
@@ -192,8 +200,8 @@
seeloaction(item) {
// #ifdef H5
- // window.location.href =
- // `http://apis.map.qq.com/uri/v1/marker?marker=coord:(${item.latitude},${item.longitude})&addr:${item.address}`;
+ window.location.href =
+ `http://apis.map.qq.com/uri/v1/marker?marker=coord:(${item.latitude},${item.longitude})&addr:${item.address}`;
// #endif
// #ifdef MP
uni.openLocation({
@@ -260,6 +268,7 @@
pageSize: this.pageSize,
isTyAgent: this.isTyAgent
}
+
getGasStoreList(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
@@ -281,6 +290,10 @@
url: '../refuel-details/refuel-details?id=' + items + '&desId=' + itemId + '&oilNo=' + this
.onilName
})
+ uni.setStorage({
+ key: "store_key",
+ data: items
+ })
},
result(val) {
console.log('filter_result:' + JSON.stringify(val));
diff --git a/pages/goods/store-list/store-details.vue b/pages/goods/store-list/store-details.vue
index 30720e3..9d5d595 100644
--- a/pages/goods/store-list/store-details.vue
+++ b/pages/goods/store-list/store-details.vue
@@ -3,16 +3,17 @@
-
+
+
{{merchanList.storeName}}
-
+
{{merchanList.address}}
营业时间: 00:00-23:59
-
+
{{distance}}km
@@ -20,14 +21,16 @@
-
+
{{mers.highCouponModel.couponName}}
有效期至:{{mers.useEndTime | formatDate('-')}}
-
- 查看详情
+
+ 查看详情
+
@@ -88,8 +91,25 @@
}
},
onLoad(option) {
- this.merchanId = option.id;
- this.distance = option.juli;
+ let that = this;
+ that.merchanId = option.id;
+ that.distance = option.juli;
+ uni.getStorage({
+ key: 'store_id',
+ success(e) {
+ if (e.data) {
+ that.merchanId = e.data;
+ }
+ }
+ })
+ uni.getStorage({
+ key: 'store_juli',
+ success(e) {
+ if (e.data) {
+ that.distance = e.data;
+ }
+ }
+ })
},
onShow() {
this.user = app.globalData.userInfo;
@@ -105,7 +125,7 @@
//获取登陆信息
getuserinfo() {
uni.navigateTo({
- url:'../../userLogin/userLogin'
+ url: '../../userLogin/userLogin'
})
},
//查询门店详情
@@ -133,12 +153,20 @@
},
//前往导航
seeloaction() {
- uni.openLocation({
- latitude: Number(this.merchanList.latitude), //目的地的定位
- longitude: Number(this.merchanList.longitude), //目的地的定位
- name: this.merchanList.storeName,
- address: this.merchanList.address
- })
+ // #ifdef H5
+ window.open(
+ `//uri.amap.com/navigation?from=${app.globalData.longitude},${app.globalData.latitude},我的位置&to=${this.merchanList.longitude},${this.merchanList.latitude},${this.merchanList.address}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
+ )
+ // #endif
+ // #ifdef MP
+ uni.openLocation({
+ latitude: Number(this.merchanList.latitude), //目的地的定位
+ longitude: Number(this.merchanList.longitude), //目的地的定位
+ name: this.merchanList.storeName,
+ address: this.merchanList.address
+ })
+
+ // #endif
},
//查询门店对应的卡券
getCouponListByStoreId() {
@@ -190,26 +218,29 @@
.headimg {
width: 160rpx;
max-height: 160rpx;
- margin-top: -40px;
- margin-left: 20px;
+ margin-top: -40px;
+ margin-left: 20px;
}
- .store_rig{
+
+ .store_rig {
margin-left: 210rpx;
}
- .store_zp{
+
+ .store_zp {
background: #e6f2fe;
color: #0084f5;
padding-left: 4px;
padding-right: 4px;
}
}
- .store_btn{
- border: 2px solid #0084f5;
- color: #0084f5;
- width: 150rpx;
- padding: 6px;
- text-align: center;
- border-radius: 5px;
+
+ .store_btn {
+ border: 2px solid #0084f5;
+ color: #0084f5;
+ width: 150rpx;
+ padding: 6px;
+ text-align: center;
+ border-radius: 5px;
}
diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue
index 4eef259..5903071 100644
--- a/pages/order/confirmation.vue
+++ b/pages/order/confirmation.vue
@@ -960,8 +960,8 @@
display: flex;
image {
- width: 170rpx;
- max-height: 170rpx;
+ width: 160rpx;
+ max-height: 160rpx;
}
}
diff --git a/pages/tabBar/category/category.vue b/pages/tabBar/category/category.vue
index b91bd27..0870663 100644
--- a/pages/tabBar/category/category.vue
+++ b/pages/tabBar/category/category.vue
@@ -261,7 +261,15 @@
})
// uni.navigateTo({
// url: '../../goods/goods?id=' + e
- // });
+ // });
+ uni.setStorage({
+ key: "store_id",
+ data: e.id
+ })
+ uni.setStorage({
+ key: "store_juli",
+ data: e.distance
+ })
},
//搜索跳转
toSearch() {
diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index 7dd8350..3ca70d3 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -223,7 +223,8 @@
success(e) {
if (e.data) {
if (app.globalData.accountId == '000001&key' || app.globalData.accountId ==
- '000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData.accountId == '0000010&key') {
+ '000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData
+ .accountId == '0000010&key') {
app.globalData.staffCode = e.data;
} else {
app.globalData.mchId = e.data;
@@ -234,7 +235,7 @@
// #endif
},
onLoad(options) {
- let that = this;
+ let that = this;
// #ifdef MP
// 1.wx获取登录用户code
uni.login({
@@ -269,6 +270,16 @@
uni.hideLoading();
app.globalData.latitude = res.lat;
app.globalData.longitude = res.lng;
+
+ uni.setStorage({
+ key: "latitude",
+ data: res.lat
+ })
+
+ uni.setStorage({
+ key: "longitude",
+ data: res.lng
+ })
that.findByLatAndLng(res.lng, res.lat);
},
err => {
@@ -323,9 +334,16 @@
},
//获取首页功能
getCmsContentcmsContent() {
+ let code;
+ // #ifdef H5
+ code = 'CMS_H5_IMG'
+ // #endif
+ // #ifdef MP
+ code = 'CMS_HOME_CONTENT'
+ // #endif
let params = {
regionId: app.globalData.cityId,
- categoryCode: 'CMS_HOME_CONTENT'
+ categoryCode: code
}
getCmsContent(params).then(res => {
if (res.return_code == '000000') {
@@ -343,9 +361,16 @@
},
//获取首页菜单
getCmsContentcmshome() {
+ let code;
+ // #ifdef H5
+ code = 'CMS_H5_FAST'
+ // #endif
+ // #ifdef MP
+ code = 'CMS_HOME_NAV'
+ // #endif
let params = {
regionId: app.globalData.cityId,
- categoryCode: 'CMS_HOME_NAV'
+ categoryCode: code
}
getCmsContent(params).then(res => {
if (res.return_code == '000000') {
@@ -367,9 +392,16 @@
});
},
getCmsAactibity() {
+ let code;
+ // #ifdef H5
+ code = 'CMS_H5_ALERT'
+ // #endif
+ // #ifdef MP
+ code = 'CMS_WX_APPLETS_HOME_ACTIVITY'
+ // #endif
let params = {
regionId: app.globalData.cityId,
- categoryCode: 'CMS_WX_APPLETS_HOME_ACTIVITY'
+ categoryCode: code
}
getCmsContent(params).then(res => {
if (res.return_code == '000000' && res.return_data != '') {
@@ -466,6 +498,15 @@
app.globalData.cityName = res.return_data.provinceName;
app.globalData.qianzhuCityName = res.return_data.cityName;
app.globalData.cityId = res.return_data.regionId;
+ app.globalData.companyId = res.return_data.companyId;
+ uni.setStorage({
+ key: "cityId",
+ data: res.return_data.regionId
+ })
+ uni.setStorage({
+ key: "companyId",
+ data: res.return_data.companyId
+ })
// app.globalData.cityId = '500103';
if (res.return_data.regionId) {
that.getCouponListArea();
@@ -475,7 +516,7 @@
that.getCmsAactibity();
that.getCmsContentcmshome();
that.getCmsContentcmsContent();
- }
+ }
uni.getStorage({
key: 'accountType',
success(e) {
@@ -492,7 +533,7 @@
// 006 话费充值
// 007 在线加油
// 008 工会卡卡券
- // 009 分销推广优选商品
+ // 009 分销推广优选商品
// 0010 只跳首页
if (e.data == '000000#/' && app.globalData.h5code) {
uni.navigateTo({
@@ -553,12 +594,12 @@
}
}
})
- }else{
- uni.showToast({
- title: res.return_msg,
- icon: 'none',
- duration: 2000
- })
+ } else {
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none',
+ duration: 2000
+ })
}
});
},
diff --git a/pages/user/bindingCard/bindingCard.vue b/pages/user/bindingCard/bindingCard.vue
index bdcd3c3..d09bd26 100644
--- a/pages/user/bindingCard/bindingCard.vue
+++ b/pages/user/bindingCard/bindingCard.vue
@@ -10,15 +10,15 @@
-
+
-
+
@@ -32,11 +32,11 @@
绑定卡号
获取预留手机号
-
+
@@ -70,7 +70,6 @@
},
onLoad(options) {
this.user = app.globalData.userInfo;
- // this.getHuiLianTongCardByPhone();
this.getDictionaryByCodeType();
},
@@ -84,13 +83,16 @@
if (res.return_code == '000000') {
this.cardList = res.return_data;
this.type = res.return_data[0].codeValue;
+ if (this.type == 1) {
+ this.getHuiLianTongCardByPhone();
+ }
this.typeName = res.return_data[0].codeName;
}
})
},
//查询我的卡号列表
getHuiLianTongCardByPhone() {
- let params = {
+ let params = {
phone: this.user.phone
}
uni.showLoading();
@@ -98,7 +100,11 @@
uni.hideLoading();
if (res.return_code == '000000' && res.return_data != '') {
this.UserCard = res.return_data;
- this.cardNoNumber = res.return_data[0].cardNo;
+ this.cardNoNumber = res.return_data[0].cardNo;
+ let params = {
+ cardNo: this.cardNoNumber
+ }
+ this.getHuiLianTongCardByCardNo(params);
return;
}
this.UserCard = '';
@@ -106,15 +112,22 @@
},
//选择卡类型
changeUserCard(e) {
- this.type = this.cardList[e.target.value].codeValue;
- this.typeName = this.cardList[e.target.value].codeName;
- this.cardNoNumber = '';
- this.phoneNumber = '';
+ this.type = this.cardList[e.target.value].codeValue;
+ if(this.type == 1){
+ this.getHuiLianTongCardByPhone();
+ }
+ this.typeName = this.cardList[e.target.value].codeName;
+ this.cardNoNumber = '';
+ this.phoneNumber = '';
this.disStute = false;
},
//选择卡号
bindUserCard(e) {
- this.cardNoNumber = this.UserCard[e.target.value].cardNo;
+ this.cardNoNumber = this.UserCard[e.target.value].cardNo;
+ let params = {
+ cardNo: this.cardNoNumber
+ }
+ this.getHuiLianTongCardByCardNo(params);
},
getCode() {
uni.hideKeyboard()
@@ -132,8 +145,8 @@
title: '发送中...'
})
let params = {
- phone: this.phoneNumber,
- HWMSG:1
+ phone: this.phoneNumber,
+ HWMSG: 1
}
sendSmsCodeByHw(params).then(res => {
if (res.return_code == '000000') {
@@ -284,8 +297,7 @@
duration: 2000,
success() {
setTimeout(() => {
- uni.navigateBack({
- })
+ uni.navigateBack({})
}, 1000)
}
});
diff --git a/pages/user/positioning/positioning.vue b/pages/user/positioning/positioning.vue
index 93acd45..6cdede3 100644
--- a/pages/user/positioning/positioning.vue
+++ b/pages/user/positioning/positioning.vue
@@ -109,7 +109,8 @@
if (res.return_code == '000000') {
app.globalData.cityName = res.return_data.provinceName;
app.globalData.qianzhuCityName = res.return_data.cityName;
- app.globalData.cityId = res.return_data.regionId;
+ app.globalData.cityId = res.return_data.regionId;
+ app.globalData.companyId = res.return_data.companyId;
uni.navigateBack({})
} else {
uni.showToast({
diff --git a/qianzhu-KFC/buffet-order/buffet-order.vue b/qianzhu-KFC/buffet-order/buffet-order.vue
index 3bebbb3..10229e8 100644
--- a/qianzhu-KFC/buffet-order/buffet-order.vue
+++ b/qianzhu-KFC/buffet-order/buffet-order.vue
@@ -107,12 +107,14 @@
jumpmenulist(item) {
if (this.typeid == 2) {
uni.navigateTo({
- url: '../menu-list/menu-list?storeCode=' + item.code
+ url: '../menu-list/menu-list?storeCode=' + item.code + '&sttime=' + item.startTime +
+ '&entime=' + item.endTime
})
}
if (this.typeid == 1) {
uni.navigateTo({
- url: '../kfc-menu-list/kfc-menu-list?storeCode=' + item.storeCode
+ url: '../kfc-menu-list/kfc-menu-list?storeCode=' + item.storeCode + '&sttime=' + item
+ .startTime + '&entime=' + item.endTime
})
}
},
@@ -126,8 +128,8 @@
lon: app.globalData.longitude
}
getStarbucksStore(datas).then(res => {
- setTimeout(() => {
- uni.hideLoading();
+ setTimeout(() => {
+ uni.hideLoading();
}, 1000);
if (res.return_code == '000000') {
this.kcfShopList = res.return_data;
@@ -146,8 +148,8 @@
lon: app.globalData.longitude
}
getKfcStoresList(datas).then(res => {
- setTimeout(() => {
- uni.hideLoading();
+ setTimeout(() => {
+ uni.hideLoading();
}, 1000);
if (res.return_code == '000000') {
this.kcfShopList = res.return_data;
diff --git a/qianzhu-KFC/confirmOrder/confirmOrder.vue b/qianzhu-KFC/confirmOrder/confirmOrder.vue
index 4cb27b2..9511c41 100644
--- a/qianzhu-KFC/confirmOrder/confirmOrder.vue
+++ b/qianzhu-KFC/confirmOrder/confirmOrder.vue
@@ -114,6 +114,28 @@
¥{{priceValue[1] / 100}}
+
+
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
+
+
支付方式
@@ -214,17 +236,17 @@
优惠券选择
-
-
-
-
- {{items.discountName}}
+
+
+
+ {{items.discountName}}
有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
-
-
+
+
@@ -265,7 +287,8 @@
qianzhuorderToPayByWx,
czhltUnionCardPay,
getUserOrderPreList,
- thirdCancelOrder
+ thirdCancelOrder,
+ getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
@@ -281,7 +304,7 @@
return {
orderList: [],
sttypeid: 1,
- paytype: '', //支付方式
+ paytype: '2', //支付方式
typeid: app.globalData.distinguishid, //类型区分
priceValue: [0, 0], // 积分可以指定默认值
availIntegal: 0, // 可用积分
@@ -308,6 +331,8 @@
imageUrl: app.globalData.imgUrl, //图片地址
orderPrice: 0, //订单价格
rechargeDes: '', // 支付详情
+ rebateIntegral: '', //返回积分
+ Integrastu: 1 //返积分状态
}
},
onLoad() {
@@ -358,6 +383,24 @@
}
});
},
+ //支付返利积分
+ getRebateIntegral() {
+ let datas = {
+ "companyId": app.globalData.companyId,
+ "price": this.payPrice,
+ "productId": this.productType,
+ "type": 4,
+ }
+ getRebateIntegral(datas).then(res => {
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ } else {
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
+ },
//查询积分
findUser() {
findUser().then(res => {
@@ -367,6 +410,7 @@
this.getHuiLianTongCardBalance();
this.getThirdPartyByDetail();
this.getUserOrderPreList();
+ this.getRebateIntegral();
uni.setStorage({
key: "user",
data: res.return_data
@@ -462,6 +506,7 @@
} else {
this.isUse = true;
}
+ this.getRebateIntegral();
},
//获取选择支付方式
changeRiado() {
@@ -682,7 +727,8 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
- }
+ }
+ this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@@ -746,14 +792,14 @@
icon: 'none',
title: '工会卡余额不足',
duration: 2000,
- });
+ });
that.thirdCancelOrder();
return;
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../pages/login/updatePas/updatePas'
- })
+ })
that.thirdCancelOrder();
return;
}
@@ -769,7 +815,7 @@
})
}, 1000)
}
- });
+ });
that.thirdCancelOrder();
return;
}
@@ -842,12 +888,12 @@
})
return;
}
- if (res.return_code == '102130') {
+ if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
- }
+ }
this.thirdCancelOrder();
uni.showToast({
title: res.return_msg,
@@ -1037,10 +1083,10 @@
border-radius: 8px;
image {
- float: left;
- width: 170rpx;
- max-height: 170rpx;
- margin-left: 10px;
+ // float: left;
+ width: 160rpx;
+ max-height: 160rpx;
+ // margin-left: 10px;
}
}
diff --git a/qianzhu-KFC/kfc-menu-list/kfc-menu-list.vue b/qianzhu-KFC/kfc-menu-list/kfc-menu-list.vue
index 59706d4..b9c79fc 100644
--- a/qianzhu-KFC/kfc-menu-list/kfc-menu-list.vue
+++ b/qianzhu-KFC/kfc-menu-list/kfc-menu-list.vue
@@ -1,19 +1,17 @@
-
+
-
+
@@ -26,8 +24,8 @@
-
+
@@ -36,7 +34,7 @@
{{item.name}}
+ :key="index">
{{titem.productName}}
@@ -59,10 +57,22 @@
v-if="titem.originalPrice == titem.salePrice" style="text-decoration: line-through;">
-
-
-
-
+
+
+
+ {{titem.count}}
+
+
+
+
+
+
+ 选规格
+
+
+ {{titem.count}}
@@ -72,12 +82,13 @@
-
+
-
+
{{kfcname}}
@@ -139,11 +150,17 @@
kfcname: '', // 名字
kfcimgs: '', //图片
kfcprice: '', //价格
- kfcoldprice: '' //原价
+ kfcoldprice: '', //原价
+ starttime: '', //开始时间
+ endtime: '', //结束时间
+ imagewxUrl: app.globalData.imageWxImg,
+ imgadres: 'storeClose.png',
}
},
onLoad(options) {
this.storeCode = options.storeCode;
+ this.starttime = options.sttime;
+ this.endtime = options.entime;
this.listByStoreCode();
},
methods: {
@@ -168,7 +185,7 @@
this.tlist.push(items);
})
})
- this.currentId = res.return_data[0].name;
+ this.currentId = res.return_data[0].name;
}
})
},
@@ -232,6 +249,21 @@
addCart: function(item) {
if (item.num >= 0) {
item.num++
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (this.tlist[i].productId && item.productId == this.tlist[i].productId) {
+ this.tlist[i].count = item.num;
+ }
+
+ if (!this.tlist[i].productId) {
+ for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
+ if (item.productId == this.tlist[i].specGroups[k].productId) {
+ this.tlist[i].count = item.num
+ }
+ }
+ }
+
+ }
+
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
good.num = item.num
@@ -248,27 +280,25 @@
decreaseCart(item) {
if (item.num) {
item.num--
- this.shoppingcart.forEach((good) => {
- if (item.name == good.name)
- good.num = item.num
- })
- }
- },
- inputCart: function(item) {
- if (item.num >= 0) {
- item.num++
- this.shoppingcart.forEach((good) => {
- if (item.name == good.name)
- good.num = item.num + -1
- })
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (this.tlist[i].productId && item.productId == this.tlist[i].productId) {
+ this.tlist[i].count = this.tlist[i].count - 1;
+ }
- } else {
+ if (!this.tlist[i].productId) {
+ for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
+ if (item.productId == this.tlist[i].specGroups[k].productId) {
+ this.tlist[i].count = this.tlist[i].count - 1;
+ }
+ }
+ }
+
+ }
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
- Vue.set(good, 'count', 1)
+ good.num = item.num
})
}
-
},
// 清空购物车
delAll() {
@@ -276,13 +306,34 @@
if (good.num) {
good.num = 0
}
- })
+ })
+
+ for (var i = 0; i < this.tlist.length; i++) {
+ this.tlist[i].count = 0;
+ }
+ this.shoppingcart = [];
app.globalData.qianzhulist = '';
},
+
+ //商品减
+ deletenums(item) {
+ if (item.count) {
+ item.count--
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (this.tlist[i].productId && item.productId == this.tlist[i].productId) {
+ this.tlist[i].count = item.count;
+ }
+ }
+ this.shoppingcart.forEach((good) => {
+ if (item.productName == good.name)
+ good.num = item.count
+ })
+ }
+ },
//弹出弹窗
showPopups(item) {
let that = this;
- that.nums = 1;
+ that.nums = 1;
if (item.productId) {
that.productId = item.productId;
// that.kdjchangelist = item;
@@ -299,7 +350,7 @@
"imgs": that.kfcimgs,
"price": that.kfcprice,
"oldprice": that.kfcoldprice
- }
+ }
that.shoppingcart.push(datas);
uni.showLoading({
title: '添加中...'
@@ -311,12 +362,12 @@
} else {
let indexs = 1;
for (var i = 0; i < that.shoppingcart.length; i++) {
- if (that.shoppingcart[i].name == that.kfcname) {
- indexs = 0;
+ if (that.shoppingcart[i].name == that.kfcname) {
+ indexs = 0;
that.shoppingcart[i].num = that.shoppingcart[i].num + 1;
}
}
- if (indexs != 0) {
+ if (indexs != 0) {
let datas = {
"num": 1,
"storeCode": that.storeCode,
@@ -325,8 +376,8 @@
"imgs": that.kfcimgs,
"price": that.kfcprice,
"oldprice": that.kfcoldprice
- }
- that.shoppingcart.push(datas);
+ }
+ that.shoppingcart.push(datas);
uni.showLoading({
title: '添加中...'
})
@@ -335,17 +386,24 @@
}, 1000);
}
}
- }else{
- that.kdjchangelist = item.specGroups;
- that.kfcimgs = item.specGroups[0].productImageUrl;
- that.productId = item.specGroups[0].productId;
- that.kfcprice = item.specGroups[0].salePrice;
- that.kfcname = item.specGroups[0].productName;
- that.kfcoldprice = item.specGroups[0].originalPrice;
- that.$refs.popup.show();
- }
-
+
+ for (var i = 0; i < that.tlist.length; i++) {
+ if (that.tlist[i].productId && item.productId == that.tlist[i].productId) {
+ that.tlist[i].count = that.tlist[i].count + 1
+ }
+ }
+ } else {
+ that.kdjchangelist = item.specGroups;
+ that.kfcimgs = item.specGroups[0].productImageUrl;
+ that.productId = item.specGroups[0].productId;
+ that.kfcprice = item.specGroups[0].salePrice;
+ that.kfcname = item.specGroups[0].productName;
+ that.kfcoldprice = item.specGroups[0].originalPrice;
+ that.$refs.popup.show();
+ }
+
},
+
//选择类型
changetype(item) {
this.productId = item.productId;
@@ -367,7 +425,17 @@
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
- this.shoppingcart.push(datas);
+ 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;
}
@@ -375,7 +443,17 @@
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;
+ 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
+ }
+ }
+
+ }
+ }
}
}
if (indexs != 0) {
@@ -388,29 +466,39 @@
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
- this.shoppingcart.push(datas);
+ 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();
- },
- //排除key对比
- checinfo(item, item1) {
- const keys1 = Object.keys(item);
- const keys2 = Object.keys(item1);
- if (keys1.length !== keys2.length) {
- return false;
- }
- for (let index = 0; index < keys1.length; index++) {
- const val1 = item[keys1[index]];
- const val2 = item1[keys2[index]];
- if (keys2[index] !== 'num') {
- if (val1 !== val2) {
- return false;
- }
- }
- }
-
- return true;
-
+ },
+ //排除key对比
+ checinfo(item, item1) {
+ const keys1 = Object.keys(item);
+ const keys2 = Object.keys(item1);
+ if (keys1.length !== keys2.length) {
+ return false;
+ }
+ for (let index = 0; index < keys1.length; index++) {
+ const val1 = item[keys1[index]];
+ const val2 = item1[keys2[index]];
+ if (keys2[index] !== 'num') {
+ if (val1 !== val2) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+
},
//跳转详情
navToList() {
@@ -509,6 +597,7 @@
border-radius: 15px;
background: #fff;
min-height: 150px;
+
&:after {
content: '';
flex: 99;
@@ -518,7 +607,7 @@
}
.qzgoodsimg {
- margin-top: -10px;
+ margin-top: -10px;
min-height: 100px;
width: 120px;
}
@@ -577,5 +666,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;
}
diff --git a/qianzhu-KFC/menu-list/menu-list.vue b/qianzhu-KFC/menu-list/menu-list.vue
index 97208e6..1ad94b2 100644
--- a/qianzhu-KFC/menu-list/menu-list.vue
+++ b/qianzhu-KFC/menu-list/menu-list.vue
@@ -1,19 +1,17 @@
-
+
-
+
@@ -26,8 +24,8 @@
-
+
@@ -36,7 +34,7 @@
{{item.name}}
+ :key="titem.id">
{{titem.name}}
@@ -44,7 +42,7 @@
¥{{titem.salesTallPrice}}
+ class="font18 fontwig6 margle">{{titem.showPrice}}
@@ -62,10 +60,16 @@
style="text-decoration: line-through;">
-
-
-
-
+
+
+
+ 选规格
+
+
+ {{titem.count}}
+
@@ -74,7 +78,7 @@
-
+
@@ -199,11 +203,17 @@
shoppingcart: [], //购物车
productId: '', //商品id
salesTallPrice: '', //新价格
- marketTallPrice: '' // 老价格
+ marketTallPrice: '', // 老价格
+ starttime: '', //开始时间
+ endtime: '', //结束时间
+ imagewxUrl: app.globalData.imageWxImg,
+ imgadres: 'storeClose.png',
}
},
onLoad(options) {
this.storeCode = options.storeCode;
+ this.starttime = options.sttime;
+ this.endtime = options.entime;
this.getStarbucksProducts();
},
methods: {
@@ -290,6 +300,12 @@
//购物车
addCart: function(item) {
if (item.num >= 0) {
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (item.productId == this.tlist[i].goodsId) {
+ this.tlist[i].count = this.tlist[i].count + 1;
+ }
+ }
+
this.shoppingcart.forEach((good) => {
if (JSON.stringify(item) == JSON.stringify(good)) {
item.num++
@@ -303,11 +319,16 @@
Vue.set(good, 'count', 1)
})
}
-
},
decreaseCart(item) {
if (item.num) {
item.num--
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (item.productId == this.tlist[i].goodsId) {
+ this.tlist[i].count = this.tlist[i].count - 1;
+ }
+ }
+
this.shoppingcart.forEach((good) => {
if (this.checinfo(good, item) === true) {
good.num = item.num
@@ -315,24 +336,17 @@
})
}
},
- inputCart: function(item) {
- if (item.num >= 0) {
- item.num++
- this.shoppingcart.forEach((good) => {
- if (item.name == good.name)
- good.num = item.num + -1
- })
-
- } else {
- this.shoppingcart.forEach((good) => {
- if (item.name == good.name)
- Vue.set(good, 'count', 1)
- })
- }
-
- },
// 清空购物车
delAll() {
+ this.shoppingcart.forEach((good) => {
+ if (good.num) {
+ good.num = 0
+ }
+ })
+
+ for (var i = 0; i < this.tlist.length; i++) {
+ this.tlist[i].count = 0;
+ }
this.shoppingcart = [];
},
//弹出弹窗
@@ -427,15 +441,31 @@
this.shoppingcart.forEach((good) => {
if (this.checinfo(good, datas) === true) {
good.num = good.num + this.nums;
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (this.cbkchangelist.goodsId == this.tlist[i].goodsId) {
+ this.tlist[i].count = this.tlist[i].count + this.nums
+ }
+ }
istue = 1;
}
})
if (istue == 0) {
this.shoppingcart.push(datas);
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (this.cbkchangelist.goodsId == this.tlist[i].goodsId) {
+ this.tlist[i].count = this.tlist[i].count + this.nums
+ }
+ }
}
} else {
+ for (var i = 0; i < this.tlist.length; i++) {
+ if (this.cbkchangelist.goodsId == this.tlist[i].goodsId) {
+ this.tlist[i].count = this.tlist[i].count + this.nums
+ }
+ }
this.shoppingcart.push(datas);
- }
+ }
+
this.$refs.popup.hide();
},
//排除key对比
@@ -619,4 +649,18 @@
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;
+ }
diff --git a/qianzhu-KFC/order-details/order-details.vue b/qianzhu-KFC/order-details/order-details.vue
index 87e111c..63082b0 100644
--- a/qianzhu-KFC/order-details/order-details.vue
+++ b/qianzhu-KFC/order-details/order-details.vue
@@ -29,28 +29,37 @@
您的取餐码为
-
-
+
+
取餐号: {{item.code}}
- 手机尾号: {{item.phone}}
+ 手机尾号:
+ {{item.phone}}
+
+
+ 取餐号: {{item.code}}
+
+
+
+ 请取餐
+ 查看手机号
{{item.code}}
- 请取餐
{{orderList.statusDesc}}
- 请取餐
{{orderList.statusDesc}}
请至柜台凭取餐码取餐
如有询问手机号尾号请告知
+ 注:平台取餐手机号皆为虚拟号码
+ 请取餐
@@ -76,9 +85,11 @@
{{item.goodsName}}
x{{item.saleCount}}
- ¥{{item.goodsActualPrice}}
+ ¥{{item.goodsActualPrice}}
-
+
¥{{item.goodsPrice}}
@@ -125,10 +136,10 @@
积分抵扣
¥ {{(orderList.payGold / 100).toFixed(2)}}
-
-
- 优惠券抵扣
- ¥ {{orderList.deductionPrice}}
+
+
+ 优惠券抵扣
+ ¥ {{orderList.deductionPrice}}
支付方式
@@ -190,6 +201,7 @@
6: '退款中',
7: '退款失败'
},
+ phonestu: 1 // 手机号查看状态
}
},
onLoad(options) {
@@ -200,9 +212,14 @@
},
onUnload() {
clearInterval(this.timer);
- clearInterval(this.timerdjs);
+ clearInterval(this.timerdjs);
+ console.log('')
},
methods: {
+ //修改状态
+ updatestu() {
+ this.phonestu = 2
+ },
getAllCount() {
this.orderList.highChildOrderList.forEach((food) => {
this.coutnums += food.saleCount
@@ -210,14 +227,14 @@
},
//查询订单详情
getThirdOrderByOrderId() {
- uni.showLoading({
- title: '加载中...'
- })
+ // uni.showLoading({
+ // title: '加载中...'
+ // })
let datas = {
orderId: this.orderId
}
getThirdOrderByOrderId(datas).then(res => {
- uni.hideLoading();
+ // uni.hideLoading();
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
@@ -228,7 +245,7 @@
}
if (this.orderList.orderStatus == 2) {
this.setTimer();
- }
+ }
this.coutnums = 0;
this.getAllCount();
} else {
@@ -298,8 +315,8 @@
let holdTime = 10;
this.timerdjs = setInterval(() => {
if (holdTime <= 0) {
- clearInterval(this.timerdjs);
- this.getThirdOrderByOrderId();
+ clearInterval(this.timerdjs);
+ this.getThirdOrderByOrderId();
holdTime = 10;
return;
}
@@ -374,6 +391,18 @@
color: #c72a20;
}
+ .phoneck {
+ height: 35px;
+ width: 120px;
+ line-height: 35px;
+ font-size: 14px;
+ border-radius: 39px;
+ border: 1px solid #CD2314;
+ box-sizing: border-box;
+ color: #CD2314;
+ margin: 10px auto;
+ }
+
.headsbg {
border-radius: 0 0 30px 30px;
}
diff --git a/qianzhu-KFC/static/imgs/horn.png b/qianzhu-KFC/static/imgs/horn.png
new file mode 100644
index 0000000..d4a862d
Binary files /dev/null and b/qianzhu-KFC/static/imgs/horn.png differ
diff --git a/static/img/rebate.png b/static/img/rebate.png
new file mode 100644
index 0000000..ccd3c8a
Binary files /dev/null and b/static/img/rebate.png differ
diff --git a/static/img/sigh.png b/static/img/sigh.png
new file mode 100644
index 0000000..0befd32
Binary files /dev/null and b/static/img/sigh.png differ
diff --git a/subPages/unionComfirmation/unionComfirmation.vue b/subPages/unionComfirmation/unionComfirmation.vue
index 2120b8d..5e3f6d4 100644
--- a/subPages/unionComfirmation/unionComfirmation.vue
+++ b/subPages/unionComfirmation/unionComfirmation.vue
@@ -81,6 +81,27 @@
+
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
+
+
支付方式:
@@ -135,16 +156,16 @@
优惠券选择
-
-
-
-
- {{items.discountName}}
+
+
+
+ {{items.discountName}}
有效期至:{{items.useEndTime | timeFormat('yyyy-mm-dd')}}
-
-
+
+
@@ -172,7 +193,8 @@
getHuiLianTongCardBalance,
loginByPhone,
getUserOrderPreList,
- findById
+ findById,
+ getRebateIntegral
} from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '../../components/cj-slider/cj-slider.vue';
@@ -197,7 +219,7 @@
radioStatus: true,
memDiscountId: '',
user: '',
- paytype: '',
+ paytype: '2',
PaymentPassword: '',
orderId: '',
jumpType: '',
@@ -218,7 +240,9 @@
changePrice: '', //滑动值
isDiscount: true,
availIntegal: '', // 可用积分
- isUse: true // 是否禁用状态
+ isUse: true, // 是否禁用状态
+ rebateIntegral: '', //返回积分
+ Integrastu: 1 //返积分状态
};
},
@@ -283,6 +307,7 @@
this.user = res.return_data;
this.findById();
this.getHuiLianTongCardBalance();
+ this.getRebateIntegral();
uni.setStorage({
key: "user",
data: res.return_data
@@ -290,6 +315,24 @@
}
});
},
+ //支付返利积分
+ getRebateIntegral() {
+ let datas = {
+ "companyId": app.globalData.companyId,
+ "price": this.payPrice,
+ "productId": this.rechargeModel,
+ "type": 3,
+ }
+ getRebateIntegral(datas).then(res => {
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ } else {
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
+ },
//查询优惠券
getUserOrderPreList() {
let params = {
@@ -398,7 +441,8 @@
} else {
this.payPrice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this
.deductionPrice).toFixed(2);
- }
+ }
+ this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@@ -794,6 +838,7 @@
} else {
this.isUse = true;
}
+ this.getRebateIntegral();
},
}
@@ -916,10 +961,10 @@
border-radius: 8px;
image {
- float: left;
- width: 170rpx;
- max-height: 170rpx;
- margin-left: 10px;
+ // float: left;
+ width: 160rpx;
+ max-height: 160rpx;
+ // margin-left: 10px;
}
}
diff --git a/uni.scss b/uni.scss
index aa78efa..d1dc83d 100644
--- a/uni.scss
+++ b/uni.scss
@@ -228,6 +228,10 @@ $uni-font-size-paragraph:30upx;
.colorc3 {
color: #c32b21;
}
+
+.colore95{
+ color: #e95845;
+}
.fcorred{
color: red;