diff --git a/App.vue b/App.vue
index c1fbe34..255bb8c 100644
--- a/App.vue
+++ b/App.vue
@@ -39,7 +39,9 @@
//公众号菜单区分
accountType:'',
//区分肯德基 星巴克
- distinguishid:''
+ distinguishid:'',
+ //千猪下单数据
+ qianzhulist:''
},
onLaunch: function() {
},
diff --git a/Utils/Api.js b/Utils/Api.js
index 149c677..e24936a 100644
--- a/Utils/Api.js
+++ b/Utils/Api.js
@@ -26,11 +26,11 @@ export const setUserPayPwd = params => {
// 修改用户积分支付密码
export const updateUserPayPwd = params => {
return POST('POST', `${base}/highUser/updateUserPayPwd`, params).then(res => res.data);
-}
-//经纬度转换
+}
+//经纬度转换
export const findByLatAndLng = params => {
return POST('GET', `${base}/common/findByLatAndLng`, params).then(res => res.data);
-}
+}
//获取用户信息
export const findUser = params => {
@@ -43,11 +43,11 @@ export const loginByPhone = params => {
//微信登录
export const WXlogin = params => {
return POST('GET', `${base}/wechat/login`, params).then(res => res.data);
-};
-//H5 退出登录
+};
+//H5 退出登录
export const loginOut = params => {
return POST('GET', `${base}/user/loginOut`, params).then(res => res.data);
-};
+};
//通过openid获取用户的信息
export const OpenidGetUser = (openId, params) => {
return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data);
@@ -184,27 +184,27 @@ export const getGasStoreList = params => {
//查询团油详情
export const getGasDetailByStoreKey = params => {
return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data);
-}
-//团油一键加油查询详情
+}
+//团油一键加油查询详情
export const recentGasStation = params => {
return POST('GET', `${base}/highGas/recentGasStation`, params).then(res => res.data);
-}
-//团油距离限制
+}
+//团油距离限制
export const getDictionaryByCodeTypeOl = params => {
return POST('GET', `${base}/common/getDictionaryByCodeTypeOl`, params).then(res => res.data);
-}
-//团油计算价格
+}
+//团油计算价格
export const oilPriceCompute = params => {
return POST('GET', `${base}/highGas/oilPriceCompute`, params).then(res => res.data);
-}
-//团油计算新价格
+}
+//团油计算新价格
export const oilPriceDiscountCompute = params => {
return POST('GET', `${base}/highGas/oilPriceDiscountCompute`, params).then(res => res.data);
-}
-//查询卡数据字典
+}
+//查询卡数据字典
export const getDictionaryByCodeType = params => {
return POST('GET', `${base}/common/getDictionaryByCodeType`, params).then(res => res.data);
-}
+}
//获取已开通的省份
export const getDredgeProvince = params => {
return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data);
@@ -220,20 +220,20 @@ export const setCacheParam = params => {
//查询充值话费详情
export const getPhoneOrderById = params => {
return POST('GET', `${base}/outRechargeOrder/getOrderById`, params).then(res => res.data);
-}
-// 取消话费订单
+}
+// 取消话费订单
export const cancelRechargeOrder = params => {
return POST('GET', `${base}/outRechargeOrder/cancelOrder`, params).then(res => res.data);
-}
-//优惠券包列表
+}
+//优惠券包列表
export const getDiscountPackageList = params => {
return POST('GET', `${base}/discountPackage/getDiscountPackageList`, params).then(res => res.data);
-}
-//优惠券包详情
+}
+//优惠券包详情
export const getDiscountPackageDetail = params => {
return POST('GET', `${base}/discountPackage/getDiscountPackageDetail`, params).then(res => res.data);
-}
-
+}
+
/**
* 工会卡
@@ -241,11 +241,11 @@ export const getDiscountPackageDetail = params => {
//根据卡号查询
export const getHuiLianTongCardByCardNo = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardByCardNo`, params).then(res => res.data);
-}
-//查询油卡详情
+}
+//查询油卡详情
export const getDetailByCardNo = params => {
return POST('GET', `${base}/oilCard/getDetailByCardNo`, params).then(res => res.data);
-}
+}
// 获取用户卡号列表
export const getUserCardList = params => {
@@ -254,11 +254,11 @@ export const getUserCardList = params => {
// 根据手机号获取汇联通工会卡列表
export const getHuiLianTongCardByPhone = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardByPhone`, params).then(res => res.data);
-}
-//查询油卡消费
+}
+//查询油卡消费
export const getOilCardRecordList = params => {
return POST('GET', `${base}/oilCard/getOilCardRecordList`, params).then(res => res.data);
-}
+}
// 删除用户卡号
export const delUserCard = params => {
return POST('POST', `${base}/highUserCard/delUserCard`, params).then(res => res.data);
@@ -274,15 +274,15 @@ export const getHuiLianTongCardConsume = params => {
// 汇联通工会卡支付
export const hltUnionCardPay = params => {
return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data);
-}
+}
//绑定卡包
export const bindHuiLianTongCard = params => {
return POST('POST', `${base}/highUserCard/bindCard`, params).then(res => res.data);
-}
-//手机短信登录
+}
+//手机短信登录
export const loginByTel = params => {
return POST('POST', `${base}/wechat/loginByTel`, params).then(res => res.data);
-}
+}
/**
* 工会卡
*/
@@ -314,27 +314,57 @@ export const getWinLotteryList = params => {
//跳转是否赠券
export const getMembershipLevel = params => {
return POST('GET', `${base}/highUser/GetMembershipLevel`, params).then(res => res.data);
-}
+}
+//查询配置方式
+export const getThirdPartyByDetail = params => {
+ return POST('GET', `${base}/highThirdParty/getThirdPartyByDetail`, params).then(res => res.data);
+}
/**
* 肯德基地址
*/
export const getTPigKFCToken = params => {
return POST('GET', `${base}/tPig/getTPigKFCToken`, params).then(res => res.data);
}
+//查询城市列表
+export const getAllCity = params => {
+ return POST('GET', `${base}/highThirdParty/getAllCity`, params).then(res => res.data);
+}
+//查询肯德基门店列表
+export const getKfcStoresList = params => {
+ return POST('GET', `${base}/highThirdParty/getKfcStoresList`, params).then(res => res.data);
+}
+//肯德基商品详情
+export const listByStoreCode = params => {
+ return POST('GET', `${base}/highThirdParty/listByStoreCode`, params).then(res => res.data);
+}
+//肯德基订单详情
+export const getThirdOrderByOrderId = params => {
+ return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderId`, params).then(res => res.data);
+}
+
+
//电影票
export const getTPigCinemaToken = params => {
return POST('GET', `${base}/tPig/getTPigCinemaToken`, params).then(res => res.data);
}
-
-//星巴克
-//门店列表
+
+//星巴克
+//门店列表
export const getStarbucksStore = params => {
return POST('GET', `${base}/highThirdParty/getStarbucksStore`, params).then(res => res.data);
-}
+}
export const getStarbucksProducts = params => {
return POST('GET', `${base}/highThirdParty/getStarbucksProducts`, params).then(res => res.data);
+}
+//微信支付千猪
+export const qianzhuorderToPayByWx = params => {
+ return POST('POST', `${base}/thirdOrder/orderToPayByWx`, params).then(res => res.data);
+}
+//星巴克下单
+export const xbkaddOrder = params => {
+ return POST('POST', `${base}/highThirdParty/addOrder`, params).then(res => res.data);
}
-
+
export const qzOrderToPay = params => {
return POST('POST', `${base}/order/qzOrderToPay`, params).then(res => res.data);
@@ -353,8 +383,8 @@ export const cancelOrderByOrderNo = params => {
*/
export const getH5UserInfo = params => {
return POST('GET', `${base}/wechat/getH5UserInfo`, params).then(res => res.data);
-}
-//获取验证码
+}
+//获取验证码
export const sendSmsCodeByHw = params => {
return POST('GET', `${base}/SendSms/sendSmsCodeByHw`, params).then(res => res.data);
}
@@ -384,11 +414,11 @@ export const useCouponCode = params => {
//**代理商//
export const getAgentCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentCount`, params).then(res => res.data);
-}
-//推送贵州中石化
+}
+//推送贵州中石化
export const pushGzSinopec = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/pushGzSinopec`, params).then(res => res.data);
-}
+}
// 查询销售码
export const getCodeListByAgentCoupon = params => {
@@ -397,15 +427,15 @@ export const getCodeListByAgentCoupon = params => {
// 生成二维码
export const generateCode = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data);
-}
-// 兑换码填写备注
+}
+// 兑换码填写备注
export const highremark = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/remark`, params).then(res => res.data);
-}
-//查询兑换码
+}
+//查询兑换码
export const getAgentConvertCodeCount = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getAgentConvertCodeCount`, params).then(res => res.data);
-}
+}
// 查看二维码
export const getCodeById = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data);
@@ -422,37 +452,37 @@ export const getAgentSalesPriceCount = params => {
export const sendUserPass = params => {
return POSTBREST('POST', `${brestBase}/secUser/sendUserPass`, params).then(res => res.data);
}
-
-//增加子代理商
+
+//增加子代理商
export const insertChildAgent = params => {
return POSTBREST('POST', `${brestBase}/highAgent/insertChildAgent`, params).then(res => res.data);
-}
-
-//变更代理商状态
+}
+
+//变更代理商状态
export const changeAgentStatus = params => {
return POSTBREST('GET', `${brestBase}/highAgent/changeAgentStatus`, params).then(res => res.data);
-}
-
-//查询子级代理商列表
+}
+
+//查询子级代理商列表
export const getChildAgentList = params => {
return POSTBREST('GET', `${brestBase}/highAgent/getChildAgentList`, params).then(res => res.data);
}
-
-//分发给子代理商
+
+//分发给子代理商
export const assignCouponChildAgent = params => {
return POSTBREST('POST', `${brestBase}/highCouponAgent/assignCouponChildAgent`, params).then(res => res.data);
}
-
-//根据代理商 查询卡券
+
+//根据代理商 查询卡券
export const getCouponByAgent = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getCouponByAgent`, params).then(res => res.data);
-}
-
-//根据卡券与代理商关系 查询分发记录
+}
+
+//根据卡券与代理商关系 查询分发记录
export const getRecordByCouponAgentId = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/getRecordByCouponAgentId`, params).then(res => res.data);
}
-
+
// 话费
@@ -464,19 +494,19 @@ export const orderToGoldPayunion = params => {
//提交订单
export const addOrderPay = params => {
return POST('POST', `${base}/outRechargeOrder/addOrder`, params).then(res => res.data);
-}
-//油卡支付
+}
+//油卡支付
export const oilCardPay = params => {
return POST('POST', `${base}/order/oilCardPay`, params).then(res => res.data);
}
//话费充值查询
export const getListOutRechargePrice = params => {
return POST('GET', `${base}/outRechargePrice/getRechargePriceByList`, params).then(res => res.data);
-}
-//查询话费详情
+}
+//查询话费详情
export const findById = params => {
return POST('GET', `${base}/outRechargePrice/findById`, params).then(res => res.data);
-}
+}
//提交订单
export const orderToPayByWx = params => {
return POST('POST', `${base}/czOrder/orderToPayByWx`, params).then(res => res.data);
diff --git a/components/cartcontrol.vue b/components/cartcontrol.vue
index 7605bc5..c401930 100644
--- a/components/cartcontrol.vue
+++ b/components/cartcontrol.vue
@@ -1,12 +1,12 @@
-
+
-
+
@@ -30,20 +30,22 @@
typeid: app.globalData.distinguishid //区分类型
};
},
- onLoad() {
+ onLoad() {
},
methods: {
- addCart: function(item) {
+ addCart: function(item) {
this.$emit('add', item)
},
decreaseCart(item) {
this.$emit('dec', item)
},
inputCart(item) {
- this.fcount = item.count
- if (item.count >= 999) {
+ this.fcount = item.num
+ if (item.num >= 999) {
uni.showToast({
- title: "该宝贝不能购买更多了~"
+ title: "该宝贝不能购买更多了~",
+ duration:2000,
+ icon:'none'
})
return false;
} else {
diff --git a/components/shopcart.vue b/components/shopcart.vue
index c380c73..f9d9d04 100644
--- a/components/shopcart.vue
+++ b/components/shopcart.vue
@@ -4,21 +4,24 @@
- {{getAllCount}}
+ {{getAllCount}}
{{getAllCount}}
-
-
+
+
+
+
¥{{getAllPrice}}
- 免配送费|支持自取
+ 已省:¥{{discountPrice}}
选好了
-
-
- 选好了
+
+
+ 选好了
@@ -33,13 +36,24 @@
-
+
-
-
+
+
{{item.name}}
-
+
+ {{item.cupSize}},{{item.temperature}},{{item.cream}},{{item.espresso}},{{item.milk}},{{item.milkBubble}}
+
+
+ ¥{{item.price}}
+
+
¥{{item.price}}
@@ -67,7 +81,9 @@
data() {
return {
isShowList: false,
- typeid: app.globalData.distinguishid
+ typeid: app.globalData.distinguishid,
+ totalprice: '', //总价
+ yhprice: '' //优惠价格
};
},
components: {
@@ -77,38 +93,44 @@
getList() {
let result = [];
this.goods.forEach((good) => {
- good.foods.forEach((food) => {
- if (food.count) {
- result.push(food)
- // console.log('res', JSON.stringify(result))
- }
- })
+ if (good.num) {
+ result.push(good)
+ // console.log('res', JSON.stringify(result))
+ }
})
return result
},
// 获得购物车所有商品数量
getAllCount() {
let result = 0;
- this.getList.forEach((food) => {
- result += food.count
+ this.goods.forEach((food) => {
+ result += food.num
})
return result
},
-
-
// 总价
getAllPrice() {
let result = 0;
let result1 = 0;
this.goods.forEach((good) => {
- good.foods.forEach((food) => {
- result1 += this.accMul(food.count, food.price)
- result = result1.toFixed(2);
- })
+ result1 += this.accMul(good.num, good.price)
+ result = result1.toFixed(2);
})
+ this.totalprice = result;
return result
- }
+ },
+ //优惠价格
+ discountPrice() {
+ let result = 0;
+ let result1 = 0;
+ this.goods.forEach((good) => {
+ result1 += this.accMul(good.num, good.oldprice)
+ result = (result1 - this.totalprice).toFixed(2);
+ })
+ return result
+ },
+
},
methods: {
// 解决浮点数 运算出现多位小数
@@ -139,7 +161,7 @@
},
buyList() {
// if (this.getList.length) {
- // console.log("getAllPrice:" + this.getAllPrice)
+ // console.log("==========" + JSON.stringify(this.goods));
// console.log('buyList:' + JSON.stringify(this.getList))
// uni.showToast({
// title: "总价格:" + this.getAllPrice
@@ -148,9 +170,18 @@
// } else {
// }
+ if (this.goods.length == 0) {
+ uni.showToast({
+ title: '请选择购买的商品',
+ duration: 2000,
+ icon: 'none'
+ })
+ return;
+ }
+ app.globalData.qianzhulist = this.goods;
uni.navigateTo({
- // url:'/qianzhu-KFC/confirmOrder/confirmOrder'
- url: '/qianzhu-KFC/order-details/order-details'
+ url: '/qianzhu-KFC/confirmOrder/confirmOrder'
+ // url: '/qianzhu-KFC/order-details/order-details'
})
},
delShopcart() {
diff --git a/member-Recharge/choicepage/choicepage.vue b/member-Recharge/choicepage/choicepage.vue
new file mode 100644
index 0000000..494f8cd
--- /dev/null
+++ b/member-Recharge/choicepage/choicepage.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/member-Recharge/home/home.vue b/member-Recharge/home/home.vue
index 62f2da7..802e3eb 100644
--- a/member-Recharge/home/home.vue
+++ b/member-Recharge/home/home.vue
@@ -89,7 +89,7 @@
SwiperChange: function(e) {
//console.log(e)
//console.log(e.detail)
- console.log(e.detail.current);
+ // console.log(e.detail.current);
this.swiperTabIdx = e.detail.current;
this.scrollIntoView = Math.max(0, e.detail.current - 1);
},
diff --git a/member-Recharge/static/union5.jpg b/member-Recharge/static/union5.jpg
new file mode 100644
index 0000000..9150905
Binary files /dev/null and b/member-Recharge/static/union5.jpg differ
diff --git a/pages.json b/pages.json
index c0f7ec4..0f7d7b1 100644
--- a/pages.json
+++ b/pages.json
@@ -814,8 +814,15 @@
"enablePullDownRefresh": false
}
- }
- ]
+ },{
+ "path" : "kfc-menu-list/kfc-menu-list",
+ "style" :
+ {
+ "navigationBarTitleText": "菜单",
+ "enablePullDownRefresh": false
+ }
+
+ }]
}, {
"root": "qianzhu-Starbucks",
"pages": [{
@@ -835,29 +842,34 @@
"enablePullDownRefresh": false
}
}]
- },{
- "root": "member-Recharge",
- "pages": [{
- "path": "home/home",
- "style": {
- "enablePullDownRefresh": false,
- "navigationBarTitleText": "会员充值",
- "backgroundTextStyle": "light",
- "navigationBarBackgroundColor": "#ffffff",
- "navigationBarTextStyle": "black"
- }
-
- },{
- "path" : "rec-confirmation/rec-confirmation",
- "style" :
- {
- "navigationBarTitleText": "确认订单",
- "enablePullDownRefresh": false
- }
-
- }]
- }
- ],
+ }, {
+ "root": "member-Recharge",
+ "pages": [{
+ "path": "home/home",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "会员充值",
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#ffffff",
+ "navigationBarTextStyle": "black"
+ }
+
+ }, {
+ "path": "rec-confirmation/rec-confirmation",
+ "style": {
+ "navigationBarTitleText": "确认订单",
+ "enablePullDownRefresh": false
+ }
+
+ }, {
+ "path": "choicepage/choicepage",
+ "style": {
+ "navigationBarTitleText": "选择",
+ "enablePullDownRefresh": false
+ }
+
+ }]
+ }],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue
index 5b52fc9..ab61864 100644
--- a/pages/goods/refuel-details/refuel-details.vue
+++ b/pages/goods/refuel-details/refuel-details.vue
@@ -137,6 +137,9 @@
+
+
+
@@ -149,10 +152,12 @@
recentGasStation
} from '../../../Utils/Api.js';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
+ import mumuGetlocation from '@/uni_modules/mumu-getlocation/components/mumu-getlocation/mumu-getlocation.vue'
let app = getApp();
export default {
components: {
- wybPopup
+ wybPopup,
+ mumuGetlocation
},
data() {
return {
@@ -207,7 +212,7 @@
litersPreferences: '0', //每升优惠
pricePreferences: '0', //优惠价格
totalPreferences: '0', //本次优惠
-
+ locationRef: null, // 用于接收定位对象
}
},
onLoad(options) {
@@ -446,16 +451,16 @@
title: '加油金额不能超过' + this.xzMoney + '元',
icon: "none",
duration: 2000
- });
- this.totalPrice = '0.00';
- this.discountPrice = '0.00';
- this.litre = '';
- this.inputMoney = '';
- this.oilLiters = '0';
- this.discount = '0';
- this.oilSubsidy = '0';
- this.litersPreferences = '0';
- this.pricePreferences = '0';
+ });
+ this.totalPrice = '0.00';
+ this.discountPrice = '0.00';
+ this.litre = '';
+ this.inputMoney = '';
+ this.oilLiters = '0';
+ this.discount = '0';
+ this.oilSubsidy = '0';
+ this.litersPreferences = '0';
+ this.pricePreferences = '0';
this.totalPreferences = '0';
return;
}
@@ -520,50 +525,63 @@
duration: 2000
});
return;
- }
-
- // #ifdef H5
- let data = {
- key: "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB" //腾讯地图申请的密钥
- };
- let url = "https://apis.map.qq.com/ws/location/v1/ip"; //这个就是地理位置信息的接口
- data.output = "jsonp";
- this.$jsonp(url, data)
- .then(res => {
- app.globalData.latitude = res.result.location.lat;
- app.globalData.longitude = res.result.location.lng;
- if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
- that.recentGasStation();
- } else {
- that.getGasDetailByStoreKey();
- }
- setTimeout(() => {
- that.toPay();
- }, 500);
- }).catch(error => {
- if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
- that.recentGasStation();
- } else {
- that.getGasDetailByStoreKey();
- }
- setTimeout(() => {
- that.toPay();
- }, 500);
- });
- // #endif
+ }
+
+ // #ifdef H5
+ // let data = {
+ // key: "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB" //腾讯地图申请的密钥
+ // };
+ // let url = "https://apis.map.qq.com/ws/location/v1/ip"; //这个就是地理位置信息的接口
+ // data.output = "jsonp";
+ // this.$jsonp(url, data)
+ // .then(res => {
+ // app.globalData.latitude = res.result.location.lat;
+ // app.globalData.longitude = res.result.location.lng;
+ // if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
+ // that.recentGasStation();
+ // } else {
+ // that.getGasDetailByStoreKey();
+ // }
+ // setTimeout(() => {
+ // that.toPay();
+ // }, 500);
+ // }).catch(error => {
+ // if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
+ // that.recentGasStation();
+ // } else {
+ // that.getGasDetailByStoreKey();
+ // }
+ // setTimeout(() => {
+ // that.toPay();
+ // }, 500);
+ // });
+
+
+ this.$nextTick(() => {
+ // 在检测用户是否开启定位权限需要一个过程,推荐使用 login 提示一下
+ // 初始化组件,并且检测是否开启与授权定位
+ this.$refs.muLocation.__init().then(location => {
+ // 用户授权了和开启了定位,把定位对象保存到 data 中
+ this.locationRef = location;
+ this.getLocation();
+ }, err => {
+ if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
+ that.recentGasStation();
+ } else {
+ that.getGasDetailByStoreKey();
+ }
+ setTimeout(() => {
+ that.toPay();
+ }, 500);
+ });
+ })
+ // #endif
// #ifdef MP
uni.getLocation({
type: 'wgs84',
success: function(res) {
app.globalData.latitude = res.latitude;
app.globalData.longitude = res.longitude;
- // #ifdef H5
- // if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
- // that.recentGasStation();
- // } else {
- // that.getGasDetailByStoreKey();
- // }
- // #endif
that.getGasDetailByStoreKey();
setTimeout(() => {
that.toPay();
@@ -576,11 +594,33 @@
duration: 2000
});
}
- })
+ })
// #endif
},
+ // 获取精准定位
+ getLocation() {
+ uni.showLoading({
+ title: '加载中'
+ })
+ let that = this;
+ that.locationRef.getLocation() // 调用 getLocation 方法获取精准定位
+ .then(res => {
+ uni.hideLoading();
+ // res 就是返回的数据
+ app.globalData.latitude = res.lat;
+ app.globalData.longitude = res.lng;
+ if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
+ that.recentGasStation();
+ } else {
+ that.getGasDetailByStoreKey();
+ }
+ setTimeout(() => {
+ that.toPay();
+ }, 500);
+ })
+ },
//去支付
- toPay() {
+ toPay() {
if (this.storeList.distance > this.distance && this.storeList.distance != null) {
uni.showToast({
title: '请在' + this.distance + '公里内进行下单',
diff --git a/pages/pay/payment/payment.vue b/pages/pay/payment/payment.vue
index 7cb5c4c..690bb66 100644
--- a/pages/pay/payment/payment.vue
+++ b/pages/pay/payment/payment.vue
@@ -135,7 +135,6 @@
onShow() {
let that = this;
that.user = app.globalData.userInfo;
- that.getHuiLianTongCardBalance();
if (app.globalData.userInfo) {
this.findUser();
}
@@ -146,10 +145,13 @@
findUser(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
- this.user = res.return_data;
+ this.user = res.return_data;
+ if (res.return_data.hltCardNo) {
+ this.getHuiLianTongCardBalance();
+ }
if (res.return_data.oilCard) {
this.oilPirce = res.return_data.oilCard.amount;
- }
+ }
uni.setStorage({
key: "user",
data: res.return_data
diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue
index a7edd2a..9fee46c 100644
--- a/pages/tabBar/user/user.vue
+++ b/pages/tabBar/user/user.vue
@@ -243,12 +243,13 @@
url: '../../login/login?id=2',
text: '代理商登录',
img: 'user/renw.png'
- },
- {
- url: '/member-Recharge/home/home',
- text: '充值会员',
- img: 'user/bank.png'
- }
+ }
+ // ,
+ // {
+ // url: '/member-Recharge/choicepage/choicepage',
+ // text: '充值会员',
+ // img: 'user/bank.png'
+ // }
// ,
// {
// url: '/pages/user/Charge/Charge',
diff --git a/pages/user/order_list/order_list.vue b/pages/user/order_list/order_list.vue
index ec9b48c..3ea05e6 100644
--- a/pages/user/order_list/order_list.vue
+++ b/pages/user/order_list/order_list.vue
@@ -13,7 +13,7 @@
-
+
KFC
+
+
+ 星巴克
+
-
+
{{row.highChildOrderList[0].goodsName}}
@@ -84,10 +91,10 @@
+ v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
+ v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
取消订单
付款
@@ -229,7 +236,13 @@
},
//跳转详情
- jumpDetails(e) {
+ jumpDetails(item, e) {
+ if (item == 4 || item == 9) {
+ uni.navigateTo({
+ url: '/qianzhu-KFC/order-details/order-details?id=' + e
+ })
+ return;
+ }
uni.navigateTo({
url: '../order_details/order_details?id=' + e
})
diff --git a/qianzhu-KFC/buffet-order/buffet-order.vue b/qianzhu-KFC/buffet-order/buffet-order.vue
index a4147a7..cbe32cf 100644
--- a/qianzhu-KFC/buffet-order/buffet-order.vue
+++ b/qianzhu-KFC/buffet-order/buffet-order.vue
@@ -8,10 +8,12 @@
- 上海
+
+ {{cityName}}
-
+
@@ -25,7 +27,8 @@
-->
-
+
+
+ @click="jumpmenulist(item)">
- {{item.name}}
+ {{item.name}}
+ {{item.storeName}}
注:约5分钟后取餐,请尽快到餐厅取餐哦
-
-
+
+
餐品详情
@@ -18,8 +18,8 @@
3-10分钟出单,请凭取餐口令到店取餐
-
-
+
+
餐品详情
@@ -28,179 +28,702 @@
-
+
+
+
+ {{item.name}}
+
+ {{item.cupSize}},{{item.temperature}},{{item.cream}},{{item.espresso}},{{item.milk}},{{item.milkBubble}}
+
- 香辣鸡腿堡
- x1
+ x{{item.num}}
- ¥16.8
- ¥17.8
+ ¥{{item.price}}
+
+ ¥{{item.oldprice}}
+
- 共 1 件 小计:
- ¥16.8
- ¥16.8
+ 共 {{totalnum}} 件 小计:
+ ¥{{totalprice}}
+ ¥{{totalprice}}
-
-
-
- 积分抵扣
-
-
- 0
-
- {{availIntegal}}
-
-
-
-
-
- 抵扣金额
-
-
- ¥{{priceValue[1] / 100}}
-
-
-
-
- 支付方式
-
-
-
-
-
-
- 微信支付
-
-
-
-
-
-
-
-
- 汇联通工会卡可用余额: 13.1元
-
-
-
-
-
-
+
+
+
+ 积分抵扣
+
+
+ 0
+
+ {{availIntegal}}
+
+
+
+
+
+ 抵扣金额
+
+
+ ¥{{priceValue[1] / 100}}
+
+
+
+
+ 支付方式
+
+
+
+
+
+
+
+ 微信支付
+
+
+
+
+
+
+
+
+
+ 汇联通工会卡可用余额: {{tongCardPrice}}元
+
+
+
+
+
+
+
联系电话
-
+
经用于接收取餐码,请正确填写
-
+
-
+
就餐方式
-
-
-
-
- 店内就餐
-
-
-
- 打包带走
-
-
-
-
- 购买须知
-
-
-
-
- 已读
-
-
-
-
- 1.本平台商品为折扣商品,付款后订单不可取消!!!不可退换!!!请准确核对信息,确认后购买。
-
-
- 2.出餐是由平台入驻的商家提供咖啡代点服务,若出餐失败,将会在两小时内自动退款。
-
-
- 3.购买成功后,将会以推送消息的方式提醒您购买成功,请查看短信或者到订单详情页查看取餐口令,凭取餐口令可到门店取餐。
-
-
- 4.如遇出餐失败,配送失败等任何平台方原因导致的订单异常,请及时联系在线客服处理。
-
-
-
-
-
+
+
+ 购买须知
+
+
+
+
+ 已读
+
+
+
+
+ 1.本平台商品为折扣商品,付款后订单不可取消!!!不可退换!!!请准确核对信息,确认后购买。
+
+
+ 2.出餐是由平台入驻的商家提供咖啡代点服务,若出餐失败,将会在两小时内自动退款。
+
+
+ 3.购买成功后,将会以推送消息的方式提醒您购买成功,请查看短信或者到订单详情页查看取餐口令,凭取餐口令可到门店取餐。
+
+
+ 4.如遇出餐失败,配送失败等任何平台方原因导致的订单异常,请及时联系在线客服处理。
+
+
+
+
+
-
+
+
diff --git a/qianzhu-KFC/menu-list/menu-list.vue b/qianzhu-KFC/menu-list/menu-list.vue
index 46275b1..71b28d4 100644
--- a/qianzhu-KFC/menu-list/menu-list.vue
+++ b/qianzhu-KFC/menu-list/menu-list.vue
@@ -35,22 +35,18 @@
{{item.name}}
-
+
{{titem.name}}
- ¥¥{{titem.salesTallPrice}}
- ¥{{titem.salesTallPrice}}
-
-
- 已减¥{{(titem.marketTallPrice - titem.salesTallPrice).toFixed(2)}}元
-
+
已减¥{{(titem.marketTallPrice - titem.salesTallPrice).toFixed(2)}}元
原价¥{{titem.marketTallPrice}}
@@ -58,16 +54,8 @@
-
-
+
-
@@ -75,54 +63,86 @@
-
+
+
-
+
- 产品名字
+ {{cbkchangelist.name}}
杯型
-
- 中杯
+
+ {{item}}
温度
-
- 特别热
+
+ {{item}}
-
+
+ 奶油
+
+ {{item}}
+
+
+
+ 浓缩咖啡
+
+ {{item}}
+
+
+
牛奶
-
- 燕麦奶
+
+ {{item}}
+
+
+
+ 奶泡
+
+ {{item}}
-
-
- ¥35.9
+
+
+
+ ¥{{cbkchangelist.salesTallPrice}}
+
+
+ {{cupSizeid}},{{temperatureid}},{{creamid}},{{espressoid}},{{milkid}},{{milkBubbleid}}
+
-
-
- 1
-
-
+
+
+ {{nums}}
+
+
-
- 加入购物车
- 加入购物车
+ 加入购物车
@@ -146,329 +166,43 @@
sizeCalcState: false,
tabScrollTop: 0,
currentId: 1,
- flist: [],
- slist: [],
- tlist: [],
- goods: [{
- "name": "热销",
- "foods": [{
-
- "name": "南瓜粥",
- "price": 9.22,
- "oldPrice": "",
- "description": "食材:大米,南瓜",
- "sellCount": 229,
- "img": '../../static/nanguaz.jpg'
-
- }, {
- "name": "小米粥",
- "price": 9.8,
- "oldPrice": "",
- "description": "食材:小米",
- "sellCount": 239,
- "count": 1,
- "img": '../../static/xiaomi.jpg'
-
- },
- {
- "name": "油条",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "count": 1,
- "img": '../../static/youtiao.jpg'
-
- }
- ]
- },
- {
- "name": "折扣",
- "foods": [{
- "name": "油条1只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "套餐",
- "foods": [{
- "name": "油条2只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥2",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "套餐2",
- "foods": [{
- "name": "油条3只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥3",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "热销2",
- "foods": [{
- "name": "南瓜粥1",
- "price": 9.22,
- "oldPrice": "",
- "description": "食材:大米,南瓜",
- "sellCount": 229,
- "img": '../../static/nanguaz.jpg'
-
- }, {
- "name": "小米粥1",
- "price": 9.8,
- "oldPrice": "",
- "description": "食材:小米",
- "sellCount": 239,
- "img": '../../static/xiaomi.jpg'
-
- }]
- },
- {
- "name": "折扣2",
- "foods": [{
- "name": "油条4只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥4",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "套餐3",
- "foods": [{
- "name": "油条5只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥5",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "套餐4",
- "foods": [{
- "name": "油条6只",
- "price": 1.81,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥6",
- "price": 9.91,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "热销3",
- "foods": [{
- "name": "南瓜粥3",
- "price": 9.21,
- "oldPrice": "",
- "description": "食材:大米,南瓜",
- "sellCount": 229,
- "img": '../../static/nanguaz.jpg'
-
- }, {
- "name": "小米粥3",
- "price": 9.78,
- "oldPrice": "",
- "description": "食材:小米",
- "sellCount": 239,
- "img": '../../static/xiaomi.jpg'
-
- }]
- },
- {
- "name": "折扣3",
- "foods": [{
- "name": "油条7只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥7",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "套餐6",
- "foods": [{
- "name": "油条8只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥8",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "套餐7",
- "foods": [{
- "name": "油条9只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥9",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
- {
- "name": "热销4",
- "foods": [{
- "name": "南瓜粥4",
- "price": 9.22,
- "oldPrice": "",
- "description": "食材:大米,南瓜",
- "sellCount": 229,
- "img": '../../static/nanguaz.jpg'
-
- }, {
- "name": "小米粥4",
- "price": 9.8,
- "oldPrice": "",
- "description": "食材:小米",
- "sellCount": 239,
- "img": '../../static/xiaomi.jpg'
-
- }]
- },
- {
- "name": "折扣4",
- "foods": [{
- "name": "油条10只",
- "price": 1.88,
- "oldPrice": "",
- "description": "食材:油条",
- "sellCount": 229,
- "img": '../../static/youtiao.jpg'
-
- }, {
- "name": "艇仔粥10",
- "price": 9.9,
- "oldPrice": "",
- "description": "食材:瘦肉,干贝,花生等",
- "sellCount": 239,
- "img": '../../static/tingzaiz.jpg'
-
- }],
-
- },
-
- ],
+ flist: [], //一级
+ slist: [], //二级
+ tlist: [], //商品
cateList: [],
- typeid: app.globalData.distinguishid, //区分类型
- list: [1, 2, 3, 4, 5]
+ storeCode: '', //门店编号
+ cupSize: '', //杯型数据
+ cupSizeid: '', //杯型id
+ temperature: '', //温度数据
+ temperatureid: '', //温度id
+ cream: '', //奶油数据
+ creamid: '', //奶油id
+ espresso: '', //浓缩数据
+ espressoid: '', //浓缩id
+ milk: '', //牛奶数据
+ milkid: '', //牛奶id
+ milkBubble: '', //奶泡数据
+ milkBubbleid: '', //奶泡id
+ cbkchangelist: '', //选择的数据
+ nums: 1, //数量
+ shoppingcart: [], //购物车
+ productId: '', //商品id
}
},
- onLoad() {
+ onLoad(options) {
+ this.storeCode = options.storeCode;
this.getStarbucksProducts();
},
methods: {
- //查询商品
+ //星巴克查询商品
getStarbucksProducts() {
uni.showLoading({
title: '加载中...'
})
- getStarbucksProducts().then(res => {
+ let datas = {
+ regionId: app.globalData.cityId
+ }
+ getStarbucksProducts(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.cateList = res.return_data;
@@ -494,15 +228,17 @@
//一级分类点击
tabtap(item) {
+ uni.showLoading({
+ })
if (!this.sizeCalcState) {
this.calcSize();
}
- this.currentId = item.id;
- let index = this.slist.findIndex(sitem => sitem.id == item.id);
- this.tabScrollTop = this.slist[index].top;
- // if(this.tabScrollTop == undefined ){
- // this.tabScrollTop = 1420;
- // }
+ setTimeout(() => {
+ uni.hideLoading();
+ this.currentId = item.id;
+ let index = this.slist.findIndex(sitem => sitem.id == item.id);
+ this.tabScrollTop = this.slist[index].top;
+ }, 200);
},
//右侧栏滚动
asideScroll(e) {
@@ -523,7 +259,6 @@
view.fields({
size: true
}, data => {
- let a = 20;
item.top = h;
h += data.height;
item.bottom = h;
@@ -531,22 +266,137 @@
})
this.sizeCalcState = true;
},
- addCart(item) {
+ // 规格
+ addshopCart() {
+ this.nums = this.nums + 1;
+ },
+ decreaseshopCart() {
+ if (this.nums > 1) {
+ this.nums = this.nums - 1;
+ }
+ },
+ //购物车
+ addCart: function(item) {
+ if (item.num >= 0) {
+ item.num++
+ this.shoppingcart.forEach((good) => {
+ if (item.name == good.name)
+ good.num = item.num
+ })
+
+ } else {
+ this.shoppingcart.forEach((good) => {
+ if (item.name == good.name)
+ Vue.set(good, 'count', 1)
+ })
+ }
},
decreaseCart(item) {
-
+ if (item.num) {
+ item.num--
+ this.shoppingcart.forEach((good) => {
+ if (item.name == good.name)
+ good.num = item.num
+ })
+ }
},
- showPopup() {
- this.$refs.popup.show();
+ 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)
+ })
+ }
+
},
- inputCart(item) {},
// 清空购物车
delAll() {
+ this.shoppingcart.forEach((good) => {
+ if (good.num) {
+ good.num = 0
+ }
+ })
+ },
+ //弹出弹窗
+ showPopup(item) {
+ this.nums = 1;
+ this.cbkchangelist = item;
+ if (item.cupSize) {
+ this.cupSize = item.cupSize.split(',');
+ this.cupSizeid = this.cupSize[0];
+ }
+ if (item.temperature) {
+ this.temperature = item.temperature.split(',');
+ this.temperatureid = this.temperature[0];
+ }
+ if (item.cream) {
+ this.cream = item.cream.split(',');
+ this.creamid = this.cream[0];
+ }
+ if (item.espresso) {
+ this.espresso = item.espresso.split(',');
+ this.espressoid = this.espresso[0];
+ }
+ if (item.milk) {
+ this.milk = item.milk.split(',');
+ this.milkid = this.milk[0];
+ }
+ if (item.milkBubble) {
+ this.milkBubble = item.milkBubble.split(',');
+ this.milkBubbleid = this.milkBubble[0];
+ }
+ this.$refs.popup.show();
},
+ //选择类型
+ changetype(item, item1) {
+ if (item == 1) {
+ this.cupSizeid = item1
+ }
+ if (item == 2) {
+ this.temperatureid = item1
+ }
+ if (item == 3) {
+ this.creamid = item1
+ }
+ if (item == 4) {
+ this.espressoid = item1
+ }
+ if (item == 5) {
+ this.milkid = item1
+ }
+ if (item == 6) {
+ this.milkBubbleid = item1
+ }
+ },
+
//关闭弹窗
close() {
+ let datas = {
+ "num": this.nums,
+ "storeCode": this.storeCode,
+ "productId": this.cbkchangelist.id,
+ "cupSize": this.cupSizeid,
+ "temperature": this.temperatureid,
+ "milk": this.milkid,
+ "cream": this.creamid,
+ "espresso": this.espressoid,
+ "milkBubble": this.milkBubbleid,
+ "name": this.cbkchangelist.name,
+ "imgs": this.cbkchangelist.defaultImage,
+ "price": this.cbkchangelist.salesTallPrice,
+ "oldprice": this.cbkchangelist.marketTallPrice
+ }
+
+ this.shoppingcart.push(datas);
this.$refs.popup.hide();
},
//跳转详情
@@ -654,7 +504,7 @@
}
- .qzgoodsimg {
+ .qzgoodsimg {
margin-top: -10px;
width: 120px;
}
@@ -685,7 +535,7 @@
}
.num {
- padding: 0px 35px;
+ padding: 0px 20px;
height: 28px;
line-height: 28px;
font-weight: 600;
@@ -712,6 +562,11 @@
box-shadow: 0px 5px 20px #333333;
}
+ .bocactive {
+ background-color: #eaf0ec;
+ color: #00713e;
+ }
+
.wybfot {
position: fixed;
bottom: 0px;
diff --git a/qianzhu-KFC/order-details/order-details.vue b/qianzhu-KFC/order-details/order-details.vue
index 168f8c3..a1afb8e 100644
--- a/qianzhu-KFC/order-details/order-details.vue
+++ b/qianzhu-KFC/order-details/order-details.vue
@@ -1,38 +1,57 @@
-
+
{{countdownm}}:{{countdowns}}
- 待支付
- 若超时未支付,订单将自动取消
- 立即支付
+
+
+
+
+ {{typeText[orderList.orderStatus]}}
+ 若超时未支付,订单将自动取消
+ 立即支付
+ 立即支付
+
+
+
+
+
+
+
+ {{typeText[orderList.orderStatus]}}
-
+
餐品明细
-
+
-
+
- 香辣鸡腿堡
- x1
+ {{item.goodsName}}
+ x{{item.saleCount}}
- ¥16.8
- ¥17.8
+ ¥{{item.totalPrice}}
+
+
+ ¥{{item.goodsPrice}}
- 共 1 件 小计: ¥16.8
+ 共 {{coutnums}} 件 小计:
+ ¥{{orderList.payRealPrice}}
+
+ ¥{{orderList.payRealPrice}}
@@ -41,30 +60,31 @@
订单信息
-
+
订单号
- 2901012002828228288482828
+ {{orderList.orderNo}}
-
+
就餐方式
- 店内就餐
+ 店内就餐
+ 打包带走
支付方式
- 未支付
+ {{typeText[orderList.orderStatus]}}
-
+
联系方式
- 15583253627
+ {{orderList.kfcOrderMobileRemark}}
-
+
取消订单
- 联系客服
+
友情提示
@@ -74,34 +94,75 @@
diff --git a/static/img/xbk.png b/static/img/xbk.png
new file mode 100644
index 0000000..f7473af
Binary files /dev/null and b/static/img/xbk.png differ
diff --git a/uni.scss b/uni.scss
index ce86e65..b3beb0f 100644
--- a/uni.scss
+++ b/uni.scss
@@ -543,11 +543,6 @@ $uni-font-size-paragraph:30upx;
height: 25px;
}
-.height20 {
- height: 20px;
- line-height: 20px;
-}
-
.height50 {
height: 50px;