1对接肯德基接口

2.对接星巴克接口
yj-dev
杨杰 2 years ago
parent 3fbcbb518c
commit 2f4239aba2
  1. 4
      App.vue
  2. 174
      Utils/Api.js
  3. 18
      components/cartcontrol.vue
  4. 91
      components/shopcart.vue
  5. 28
      member-Recharge/choicepage/choicepage.vue
  6. 2
      member-Recharge/home/home.vue
  7. BIN
      member-Recharge/static/union5.jpg
  8. 62
      pages.json
  9. 144
      pages/goods/refuel-details/refuel-details.vue
  10. 8
      pages/pay/payment/payment.vue
  11. 13
      pages/tabBar/user/user.vue
  12. 23
      pages/user/order_list/order_list.vue
  13. 80
      qianzhu-KFC/buffet-order/buffet-order.vue
  14. 899
      qianzhu-KFC/confirmOrder/confirmOrder.vue
  15. 540
      qianzhu-KFC/kfc-menu-list/kfc-menu-list.vue
  16. 597
      qianzhu-KFC/menu-list/menu-list.vue
  17. 134
      qianzhu-KFC/order-details/order-details.vue
  18. BIN
      qianzhu-KFC/static/imgs/otherstu.png
  19. 89
      qianzhu-Starbucks/changeRegin/changeRegin.vue
  20. BIN
      static/img/xbk.png
  21. 5
      uni.scss

@ -39,7 +39,9 @@
//
accountType:'',
//
distinguishid:''
distinguishid:'',
//
qianzhulist:''
},
onLaunch: function() {
},

@ -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);

@ -1,12 +1,12 @@
<template>
<view style="display: flex;flex-direction: row;height: 27px;">
<view class="food-control">
<view class="cont" style="margin-top: 2px;" @click="decreaseCart(food)" v-show="food.count>0">
<view class="cont" style="margin-top: 2px;" @click="decreaseCart(food)" v-show="food.num>0">
<image src="../qianzhu-KFC/static/imgs/wreduce.png" mode="" style="width: 26px;height: 26px;"></image>
</view>
<!-- <text style="padding: 0 4px;" v-show="food.count>0">{{food.count}}</text> -->
<input type="number" maxlength="3" style="margin: 0 2px;width: 36px;padding: 3px 1px;border-radius: 3px;"
v-show="food.count>0" v-model="food.count" @input="inputCart(food)" />
<input type="number" maxlength="3" disabled="true" style="margin: 0 2px;width: 36px;padding: 3px 1px;border-radius: 3px;"
v-show="food.num>0" v-model="food.num" @input="inputCart(food)" />
</view>
<view style="flex: 1;margin-top: 2px; " class="cont" @click="addCart(food)">
<image src="../qianzhu-KFC/static/imgs/plus.png" v-if="typeid == 1" style="width: 26px;height: 26px;color: #CCCCCC;"></image>
@ -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 {

@ -4,21 +4,24 @@
<view class="cartBottom">
<view class="carIcon" @click="toggleList">
<view class="iconBox" :class="getAllCount ? 'active' : '' ">
<text class="allcount" style="background-color: #f01414;" v-if="getAllCount && typeid == 1">{{getAllCount}}</text>
<text class="allcount" style="background-color: #f01414;"
v-if="getAllCount && typeid == 1">{{getAllCount}}</text>
<text class="allcount backcorf2f6" v-if="getAllCount && typeid == 2">{{getAllCount}}</text>
<image src="../qianzhu-KFC/static/imgs/kfcicon.png" mode="widthFix" v-if="typeid == 1" class="img"></image>
<image src="../qianzhu-KFC/static/imgs/skicon.png" mode="widthFix" v-if="typeid == 2" class="img"></image>
<image src="../qianzhu-KFC/static/imgs/kfcicon.png" mode="widthFix" v-if="typeid == 1" class="img">
</image>
<image src="../qianzhu-KFC/static/imgs/skicon.png" mode="widthFix" v-if="typeid == 2" class="img">
</image>
</view>
</view>
<view class="middle" @click="toggleList">
<text class="price" :class="getAllCount ? 'active': ''">{{getAllPrice}}</text>
<text class="deliveryPrice" style="font-size: 12px;">免配送费|支持自取</text>
<text class="deliveryPrice" style="font-size: 12px;">已省:¥{{discountPrice}}</text>
</view>
<view class="BtnRight" style="background-color: #c72a20;" v-if="typeid == 1" @click="buyList">
选好了
</view>
<view class="BtnRight backcorf2f6" v-if="typeid == 2" @click="buyList">
选好了
</view>
<view class="BtnRight backcorf2f6" v-if="typeid == 2" @click="buyList">
选好了
</view>
</view>
<!-- 选择的商品 -->
@ -33,13 +36,24 @@
<view class="list">
<view class="list-text alijusstart" v-for="(item,index) in getList" :key="index">
<view class="width30">
<image src="../qianzhu-KFC/static/imgs/kfc1.png" mode="widthFix" class="width100"></image>
<image :src="item.imgs" mode="widthFix" class="width100"></image>
</view>
<view class="width30 fotlt">
<view class="width100 fcor999 font14">
<view class="width40 fotlt">
<view class="width100 fcor333 fontwig6 font14">
{{item.name}}
</view>
<view class="width100 fcoreb5 font16 mart10">
<view class="width100 fcor999 font12 mart5">
<text v-if="item.cupSize">{{item.cupSize}}</text><text
v-if="item.temperature">,{{item.temperature}}</text><text
v-if="item.cream">,{{item.cream}}</text><text
v-if="item.espresso">,{{item.espresso}}</text><text
v-if="item.milk">,{{item.milk}}</text><text
v-if="item.milkBubble">,{{item.milkBubble}}</text>
</view>
<view class="width100 color2f6f43 font16 mart5" v-if="typeid == 2">
<text class="fontwig6">{{item.price}}</text>
</view>
<view class="width100 font16 mart5" style="color: #c72a20;" v-else>
<text class="fontwig6">{{item.price}}</text>
</view>
</view>
@ -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() {

@ -0,0 +1,28 @@
<template>
<view>
<image src="../static/union5.jpg" mode="widthFix" class="width90 mart20" v-for="(item,index) in choicelist" :key="index" @click="jumprechangeVip()">
</image>
</view>
</template>
<script>
export default {
data() {
return {
choicelist: [1, 2, 3, 4, 5, 6]
}
},
methods: {
//
jumprechangeVip(){
uni.navigateTo({
url:'../home/home'
})
}
}
}
</script>
<style lang="scss">
</style>

@ -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);
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

@ -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": "",

@ -137,6 +137,9 @@
</view>
</wybPopup>
<view class="height30"></view>
<!-- #ifdef H5 -->
<mumu-getlocation ref='muLocation'></mumu-getlocation>
<!-- #endif -->
</view>
</template>
@ -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 + '公里内进行下单',

@ -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

@ -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',

@ -13,7 +13,7 @@
<image :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in orderList" :key="index">
<view class="width96 height40" @click="jumpDetails(row.id)">
<view class="width96 height40" @click="jumpDetails(row.highChildOrderList[0].goodsType,row.id)">
<view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 1">
<image src="../../../static/img/order2.png" class="marglerig"
@ -50,6 +50,12 @@
style="width: 50rpx;height: 50rpx;"></image>
KFC
</view>
<view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 9">
<image src="../../../static/img/xbk.png" class="marglerig"
style="width: 50rpx;height: 50rpx;"></image>
星巴克
</view>
<view class="width50 flleft aliitem fotlt font16"
v-if="row.highChildOrderList[0].goodsType == 8">
<image src="../../../static/img/ghkpay.png" class="marglerig"
@ -62,7 +68,8 @@
</view>
<view class="width96 line1 mart10"></view>
<view class="width96 height60 mart10" @click="jumpDetails(row.id)">
<view class="width96 height60 mart10"
@click="jumpDetails(row.highChildOrderList[0].goodsType,row.id)">
<view class="width70 flleft fotlt ">
<view class="font16 fontwig6 text1 fcor333">
{{row.highChildOrderList[0].goodsName}}
@ -84,10 +91,10 @@
</view>
</view>
<view class="width96 line1 mart10 marb5"
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5 && row.highChildOrderList[0].goodsType !=4)">
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
</view>
<view class="btns"
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5 && row.highChildOrderList[0].goodsType !=4)">
v-if="(row.orderStatus==1 && row.highChildOrderList[0].goodsType !=6 && row.highChildOrderList[0].goodsType !=5)">
<block>
<view class="default" @tap="cancelOrder(row.id)">取消订单</view>
<view class="pay" @tap="toPayment(row)">付款</view>
@ -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
})

@ -8,10 +8,12 @@
</view>
<view class="input-box mart20 width90" v-if="typeid == 1">
<view class="fcor333 font14 alijusstart" style="width: 100px;padding-left: 10px;" @click="jumpregin()">上海
<view class="fcor333 font14 alijusstart" style="width: 120px;padding-left: 10px;" @click="jumpregin()">
{{cityName}}
<image src="../../static/img/downj.png" mode="widthFix" class="icon12 margle"></image>
</view>
<input placeholder="请输入关键字搜索" placeholder-style="color:#c0c0c0;" />
<input placeholder="请输入关键字搜索" v-model="storeName" @input="getKfcStoresList()"
placeholder-style="color:#c0c0c0;" />
<view class="icon search"></view>
</view>
@ -25,7 +27,8 @@
</view>
</view> -->
<view class="width100 height40"></view>
<view class="width100 height40" v-if="typeid == 2"></view>
<view class="width100 height25" v-else></view>
<!-- <view class="mart20 width80 alijusstart fotct marb20" v-if="typeid == 2">
<view class="width50 fcor333 font16" :class="collection == 1?'color2f6f43':'fcor333'" @click="changestu(1)">
附近餐厅
@ -38,9 +41,10 @@
</view> -->
<view class="mart10 width90 borderrs backcorfff" v-for="(item,index) in kcfShopList" :key="index"
@click="jumpmenulist()">
@click="jumpmenulist(item)">
<view class="paddtop10 width90 alijusstart">
<view class="width80p font16 fcor333 fontwig6">{{item.name}}</view>
<view class="width80p font16 fcor333 fontwig6" v-if="typeid == 2">{{item.name}}</view>
<view class="width80p font16 fcor333 fontwig6" v-else>{{item.storeName}}</view>
<view class="width20 fotrt">
<!-- <image mode="widthFix" class="icon20" src="../static/imgs/nocollection.png"></image> -->
<!-- <image mode="widthFix" class="icon20" v-if="typeid == 1" src="../static/imgs/collection.png">
@ -53,7 +57,8 @@
<view class="width90 mart5 alijusstart paddbotm10">
<image class="icon15" src="../static/imgs/location.png" v-if="typeid == 1" mode="widthFix"></image>
<image class="icon15" src="../static/imgs/locabtn.png" v-if="typeid == 2" mode="widthFix"></image>
<text class="margle font14 fcor666 ">{{(item.distance / 1000).toFixed(2)}}km</text>
<text class="margle font14 fcor666 " v-if="typeid == 2">{{(item.distance / 1000).toFixed(2)}}km</text>
<text class="margle font14 fcor666 " v-else>{{item.distance}}km</text>
</view>
</view>
</view>
@ -61,7 +66,8 @@
<script>
import {
getStarbucksStore
getStarbucksStore,
getKfcStoresList
} from '../../Utils/Api.js';
let app = getApp();
export default {
@ -69,11 +75,22 @@
return {
collection: 1, //
kcfShopList: [], //
typeid: app.globalData.distinguishid //
typeid: app.globalData.distinguishid, //
cityName: '', //
storeName: '' //
}
},
onLoad() {
this.getStarbucksStore();
},
onShow() {
this.cityName = app.globalData.cityName;
if (this.typeid == 2) {
this.getStarbucksStore();
}
if (this.typeid == 1) {
this.getKfcStoresList();
}
},
methods: {
//
@ -87,21 +104,46 @@
})
},
//
jumpmenulist() {
uni.navigateTo({
url: '../menu-list/menu-list'
})
jumpmenulist(item) {
if (this.typeid == 2) {
uni.navigateTo({
url: '../menu-list/menu-list?storeCode=' + item.code
})
}
if (this.typeid == 1) {
uni.navigateTo({
url: '../kfc-menu-list/kfc-menu-list?storeCode=' + item.storeCode
})
}
},
//
getStarbucksStore() {
uni.showLoading({
title:'加载中...'
getStarbucksStore() {
uni.showLoading({
title: '加载中...'
})
let datas = {
lat: app.globalData.latitude,
lon: app.globalData.longitude
}
getStarbucksStore(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.kcfShopList = res.return_data;
}
})
},
//
getKfcStoresList() {
uni.showLoading({
title: '加载中...'
})
let datas = {
cityCode: app.globalData.cityId + '000000',
storeName: this.storeName,
lat: app.globalData.latitude,
lon: app.globalData.longitude
}
getStarbucksStore(datas).then(res => {
getKfcStoresList(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.kcfShopList = res.return_data;
@ -145,7 +187,7 @@
}
.input-box {
height: 70rpx;
height: 80rpx;
background-color: #ffffff;
border-radius: 30rpx;
position: relative;
@ -159,7 +201,7 @@
top: 0;
right: 0;
width: 60upx;
height: 60upx;
height: 80upx;
font-size: 34upx;
color: #c0c0c0;
}

@ -1,16 +1,16 @@
<template>
<view>
<view class="width100 height120 headsbg backcorfff fotct">
<!-- <view class="width100 height120 headsbg backcorfff fotct">
<view class="height20"></view>
<view class="width100 font18 fcor666">时代天街</view>
<image src="../static/imgs/location.png" v-if="typeid == 1" mode="widthFix" class="icon20 mart5"></image>
<image src="../static/imgs/locabtn.png" v-if="typeid == 2" mode="widthFix" class="icon20 mart5"></image>
<view class="width100 mart5 font12 fcor666">时代天街时代天街时代天街时代天街</view>
</view>
</view> -->
<view class="width96 mart20 colorc3 font12 fotct" v-if="typeid == 1">
:约5分钟后取餐,请尽快到餐厅取餐哦
</view>
</view>
<view class="concont width94 mart10 backcorfff height45 alijusstart" v-if="typeid == 2">
<view class="width25 font14 paddleft10 fcor333">
餐品详情
@ -18,8 +18,8 @@
<view class="color2f6f43 font14">
3-10分钟出单请凭取餐口令到店取餐
</view>
</view>
</view>
<view class="concont width94 mart10 backcorfff">
<view class="width94 paddtop10 font14 fcor333">
餐品详情
@ -28,179 +28,702 @@
<view class="width100">
<view class="width100 alijusstart mart10 bor-botm1" v-for="(item,index) in orderList" :key="index">
<view class="width30">
<image src="../static/imgs/kfc2.png" mode="widthFix" class="width100"></image>
<image :src="item.imgs" mode="widthFix" class="width100"></image>
</view>
<view class="width40 ">
<view class="width100 font14 fcor333 fontwig6">{{item.name}}</view>
<view class="width100 font12 fcor999 mart5">
<text v-if="item.cupSize">{{item.cupSize}}</text><text
v-if="item.temperature">,{{item.temperature}}</text><text
v-if="item.cream">,{{item.cream}}</text><text
v-if="item.espresso">,{{item.espresso}}</text><text
v-if="item.milk">,{{item.milk}}</text><text
v-if="item.milkBubble">,{{item.milkBubble}}</text>
</view>
</view>
<view class="width40 font13 fcor666">香辣鸡腿堡</view>
<view class="width10 font12 fcor999">x1</view>
<view class="width10 font12 fcor999">x{{item.num}}</view>
<view class="width20">
<view class="width100 fcor333 font12">¥<text class="fontwig6 font16">16.8</text></view>
<view class="width100 fcor999 font12" style="text-decoration: line-through;">¥17.8</view>
<view class="width100 fcor333 font12">¥<text class="fontwig6 font16">{{item.price}}</text>
</view>
<view class="width100 fcor999 font12" style="text-decoration: line-through;">¥{{item.oldprice}}
</view>
</view>
</view>
<view class="width90 fotrt height50 font13 fcor999">
<text class="fcor333 fontwig6" style="margin: 0px 5px;"> 1 </text> 小计:
<text class="font16 colorc3 fontwig6 margle" v-if="typeid == 1"> ¥16.8</text>
<text class="font16 color2f6f43 fontwig6 margle" v-if="typeid == 2"> ¥16.8</text>
<text class="fcor333 fontwig6" style="margin: 0px 5px;"> {{totalnum}} </text> 小计:
<text class="font16 colorc3 fontwig6 margle" v-if="typeid == 1"> ¥{{totalprice}}</text>
<text class="font16 color2f6f43 fontwig6 margle" v-if="typeid == 2"> ¥{{totalprice}}</text>
</view>
</view>
</view>
<view class="width94 concont mart10 backcorfff">
<view class="width92 alijusstart paddtop20">
<view class="width30 fcor333 fontwig6 font16">
积分抵扣
</view>
<view class="cj-slider">
<view class="flleft fotct font14 fcor666" style="width: 15%;">0</view>
<cj-slider style="width: 60%; float:left;" v-model="priceValue" :min="0"
:max="availIntegal" :step="1" :blockWidth="40"
@end="blockEnd" />
<view class="flright fotrt font14 fcor666" style="width: 25%;">{{availIntegal}}</view>
</view>
</view>
<view class="width94 line1 mart15 marb5"></view>
<view class="height50 width100 backcorfff">
<view class="width70 flleft fcor666 font16 text1" style="padding-left: 4%;">
抵扣金额
</view>
<view class="width20 flright fotrt paddtright10 font15 fcor666 alijun"
style="align-items: center;">
¥{{priceValue[1] / 100}}
</view>
</view>
<view class="height50 width100">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式
<!-- :
<text class="jfrecharge" style="background-color: #c72a20;" v-if="typeid == 1" @click="jumpdeposits">积分充值</text>
<text class="jfrecharge backcorf2f6" v-if="typeid == 2" @click="jumpdeposits">积分充值</text> -->
</view>
</view>
<!-- <view class="height50 width100"
@tap="paytype='jinbi'">
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: 20000</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
<radio :checked="paytype=='jinbi'" v-if="typeid == 1" color="#c72a20" />
<radio :checked="paytype=='jinbi'" v-if="typeid == 2" color="#2f6f43" />
</view>
</view> -->
<view class="height50 width100" @tap="paytype='weixin'">
<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;">
<radio :checked="paytype=='weixin'" v-if="typeid == 1" color="#c72a20" />
<radio :checked="paytype=='weixin'" v-if="typeid == 2" color="#2f6f43" />
</view>
</view>
<view class="height50 width100" @tap="paytype='gonghuika'">
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
汇联通工会卡<text class="font14 fcor666 margle">可用余额: 13.1</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
<radio :checked="paytype=='gonghuika'" v-if="typeid == 1" @click="changeRiado()" color="#c72a20" />
<radio :checked="paytype=='gonghuika'" v-if="typeid == 2" @click="changeRiado()" color="#2f6f43" />
</view>
</view>
<view class="width94 concont mart10 backcorfff">
<view class="width92 alijusstart paddtop20">
<view class="width30 fcor333 fontwig6 font16">
积分抵扣
</view>
<view class="cj-slider">
<view class="flleft fotct font14 fcor666" style="width: 15%;">0</view>
<cj-slider style="width: 60%; float:left;" v-if="isDiscount" v-model="priceValue" :min="0"
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving"
@end="blockEnd" />
<view class="flright fotrt font14 fcor666" style="width: 25%;">{{availIntegal}}</view>
</view>
</view>
<view class="width94 line1 mart15 marb5"></view>
<view class="height50 width100 backcorfff">
<view class="width70 flleft fcor666 font16 text1" style="padding-left: 4%;">
抵扣金额
</view>
<view class="width20 flright fotrt paddtright10 font15 fcor666 alijun" style="align-items: center;">
¥{{priceValue[1] / 100}}
</view>
</view>
<view class="height50 width100">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式
<!-- :
<text class="jfrecharge" style="background-color: #c72a20;" v-if="typeid == 1" @click="jumpdeposits">积分充值</text>
<text class="jfrecharge backcorf2f6" v-if="typeid == 2" @click="jumpdeposits">积分充值</text> -->
</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 fcor666 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'" v-if="typeid == 1" color="#c72a20" />
<radio :checked="paytype=='2'" v-else color="#2f6f43" />
</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 fcor666 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'" v-if="typeid == 1" @click="changeRiado()" color="#c72a20" />
<radio :checked="paytype=='3'" v-else @click="changeRiado()" color="#2f6f43" />
</view>
</view>
</view>
</view>
<view class="concont width94 mart10 backcorfff">
<view class="width94 alijusstart paddtop10 font14 fcor666">
<view class="width40">联系电话</view>
<input class="width60 fotrt" placeholder="请输入联系人手机号"/>
<input class="width60 fotrt" v-model="customerMobile" placeholder="请输入联系人手机号" />
</view>
<view class="width94 font12 fcor999 mart5 paddbotm10">经用于接收取餐码,请正确填写</view>
</view>
<view class="concont width94 mart20 backcorfff marb100" v-if="typeid == 1">
<view class="width94 paddtop10 font14 fcor333 fontwig6">
<view class="width94 paddtop10 font14 fcor333 fontwig6">
就餐方式
</view>
<view class="width94 mart20 paddbotm20 alijusstart">
<view class="takemode height30 alijus fcor999" :class="sttypeid == 1?'aftermode':''" @click="changedissr(1)">
<image src="../static/imgs/menu3.png" mode="widthFix" class="icon20"></image>
<view class="font14 margle10">店内就餐</view>
</view>
<view class="takemode height30 alijus fcor999" style="margin-left: 4%;" :class="sttypeid == 2?'aftermode':''" @click="changedissr(2)">
<image src="../static/imgs/menu2.png" mode="widthFix" class="icon20"></image>
<view class="font14 margle10">打包带走</view>
</view>
</view>
</view>
<view class="concont width94 mart20 backcorfff marb100 font13" v-if="typeid == 2">
<view class="width94 alijusstart paddtop10 font14">
<view class="width50 fcor333">购买须知</view>
<!-- <view ></view> -->
<radio-group class="width50 fotrt alijusend font14" @change="radioChange" style="transform: scale(0.77)">
<radio v-if="typeid == 1" color="#c72a20" />
<radio v-if="typeid == 2" color="#2f6f43" />
<text>已读</text>
<!-- <text>未读</text> -->
</radio-group>
</view>
<view class="fcor666 width94 mart10">
1.本平台商品为折扣商品,<text class="fontwig6 fcoreb5">付款后订单不可取消!!!不可退换!!!</text>请准确核对信息确认后购买
</view>
<view class="fcor666 width94 mart10">
2.出餐是由平台入驻的商家提供咖啡代点服务,若出餐失败,将会在两小时内自动退款
</view>
<view class="fcor666 width94 mart10">
3.购买成功后,将会以推送消息的方式提醒您购买成功,请查看短信或者到订单详情页查看取餐口令,凭取餐口令可到门店取餐
</view>
<view class="fcor666 width94 mart10 paddbotm20">
4.如遇出餐失败配送失败等任何平台方原因导致的订单异常请及时联系在线客服处理
</view>
</view>
<view class="footbtn width100 height50 backcor33">
<view class="width94 alijusstart">
<view class="width70 fcorfff">
合计: ¥<text class="font16 fontwig6" style="margin: 0px 6px;">16.8</text> <text class="font12">已省 ¥1.7</text>
</view>
<view class="width30 fotrt">
<view class="btnpay fotct font13 fcorfff" style="background-color: #c72a20;" v-if="typeid == 1">去支付</view>
<view class="btnpay fotct font13 fcorfff backcorf2f6" v-if="typeid == 2">去支付</view>
</view>
</view>
<view class="width94 mart20 paddbotm20 alijusstart">
<view class="takemode height30 alijus fcor999" :class="sttypeid == '1'?'aftermode':''"
@click="changedissr(1)">
<image src="../static/imgs/menu3.png" mode="widthFix" class="icon20"></image>
<view class="font14 margle10">店内就餐</view>
</view>
<view class="takemode height30 alijus fcor999" style="margin-left: 4%;"
:class="sttypeid == '2'?'aftermode':''" @click="changedissr(2)">
<image src="../static/imgs/menu2.png" mode="widthFix" class="icon20"></image>
<view class="font14 margle10">打包带走</view>
</view>
</view>
</view>
<view class="concont width94 mart20 backcorfff marb100 font13" v-if="typeid == 2">
<view class="width94 alijusstart paddtop10 font14" @click="radioChange()">
<view class="width50 fcor333">购买须知</view>
<!-- <view ></view> -->
<radio-group class="width50 fotrt alijusend font14" style="transform: scale(0.77)">
<radio :checked="radiostu == 1" v-if="typeid == 1" color="#c72a20" />
<radio :checked="radiostu == 1" v-if="typeid == 2" color="#2f6f43" />
<text>已读</text>
<!-- <text>未读</text> -->
</radio-group>
</view>
<view class="fcor666 width94 mart10">
1.本平台商品为折扣商品,<text class="fontwig6 fcoreb5">付款后订单不可取消!!!不可退换!!!</text>请准确核对信息确认后购买
</view>
<view class="fcor666 width94 mart10">
2.出餐是由平台入驻的商家提供咖啡代点服务,若出餐失败,将会在两小时内自动退款
</view>
<view class="fcor666 width94 mart10">
3.购买成功后,将会以推送消息的方式提醒您购买成功,请查看短信或者到订单详情页查看取餐口令,凭取餐口令可到门店取餐
</view>
<view class="fcor666 width94 mart10 paddbotm20">
4.如遇出餐失败配送失败等任何平台方原因导致的订单异常请及时联系在线客服处理
</view>
</view>
<view class="footbtn width100 height50 backcor33">
<view class="width94 alijusstart">
<view class="width70 fcorfff">
合计: ¥<text class="font16 fontwig6" style="margin: 0px 6px;">{{payPrice}}</text> <text
class="font12">已省:¥{{disconutprice}}</text>
</view>
<view class="width30 fotrt" @click="qzaddorder()">
<view class="btnpay fotct font13 fcorfff" style="background-color: #c72a20;" v-if="typeid == 1">去支付
</view>
<view class="btnpay fotct font13 fcorfff backcorf2f6" v-if="typeid == 2">去支付</view>
</view>
</view>
</view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
</view>
</template>
<script>
import cjSlider from '@/components/cj-slider/cj-slider.vue';
<script>
import cjSlider from '@/components/cj-slider/cj-slider.vue';
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'
import {
xbkaddOrder,
getThirdPartyByDetail,
getHuiLianTongCardBalance,
findUser,
qianzhuorderToPayByWx
} from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
let app = getApp();
export default {
components: {
cjSlider
export default {
components: {
cjSlider,
ssPaymentPassword
},
data() {
return {
orderList: [1, 2, 3, 4, 5],
sttypeid:1,
paytype: '', //
typeid: app.globalData.distinguishid ,//
priceValue: [0, 2000], //
availIntegal: '2000', //
orderList: [],
sttypeid: 1,
paytype: '', //
typeid: app.globalData.distinguishid, //
priceValue: [0, 0], //
availIntegal: 0, //
totalprice: 0, //
disconutprice: 0, //
totalnum: '', //
customerMobile: '', //
radiostu: 0, //
storeCode: '', //id
productType: '', //
paytypeList: [], //
tongCardPrice: 0, //
user: '', //
isUse: true, //
payPrice: 0, //
isDiscount: true, //
showType: '', //
memDiscountId: '', //id
PaymentPassword: '', //
}
},
methods: {
onLoad() {
this.orderList = app.globalData.qianzhulist;
this.storeCode = app.globalData.qianzhulist[0].storeCode;
this.customerMobile = app.globalData.userInfo.phone;
this.getAllPrice();
this.getAllCount();
this.getThirdPartyByDetail();
this.findUser();
},
methods: {
//
getThirdPartyByDetail() {
// #ifdef H5
this.showType = 2;
// #endif
// #ifdef MP
this.showType = 1;
// #endif
if (this.typeid == 1) {
this.productType = 2;
}
if (this.typeid == 2) {
this.productType = 1;
}
let datas = {
platformId: this.showType,
regionId: app.globalData.cityId,
productType: this.productType
}
getThirdPartyByDetail(datas).then(res => {
if (res.return_code == '000000') {
this.paytypeList = res.return_data.productPayType.split(',');
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1);
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2);
let pprice = parseFloat(this.totalprice * 100).toFixed(0)
let payprice = parseFloat(this.totalprice * 100 * zkprice).toFixed(
0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
} else {
this.availIntegal = payprice;
}
}
});
},
//
findUser() {
findUser().then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
this.getHuiLianTongCardBalance();
uni.setStorage({
key: "user",
data: res.return_data
})
}
});
},
//
getHuiLianTongCardBalance() {
if (!this.user.hltCardNo) {
return;
}
let params = {
cardNo: this.user.hltCardNo.cardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
//
getAllPrice() {
let result = 0;
let result1 = 0;
this.orderList.forEach((good) => {
result1 += this.accMul(good.num, good.price)
result = result1.toFixed(2);
})
// let resul2 = 0;
let result3 = 0;
this.orderList.forEach((good) => {
result3 += this.accMul(good.num, good.oldprice)
this.disconutprice = (result3 - result).toFixed(2);
})
this.totalprice = result;
this.payPrice = result;
},
//
getAllCount() {
let result = 0;
this.orderList.forEach((food) => {
result += food.num
})
this.totalnum = result;
},
accMul(arg1, arg2) {
let m = 0,
s1 = '',
s2 = '';
if (arg1 && arg1 != null)
s1 = arg1.toString();
if (arg2 && arg2 != null)
s2 = arg2.toString();
// console.log('m1',s2.replace('.',''))
try {
m += s1.split('.')[1].length
} catch (e) {}
try {
m += s2.split('.')[1].length
} catch (e) {}
return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m);
},
//
changedissr(item){
this.sttypeid = item;
},
//
blockEnd() {
this.payPrice = this.priceValue[1];
if (this.payPrice == 0) {
this.isUse = false;
this.paytype = '';
} else {
this.isUse = true;
}
changedissr(item) {
this.sttypeid = item;
},
//
reload() {
this.isDiscount = false;
this.$nextTick(() => (this.isDiscount = true))
},
//
blockStart() {},
blockMoving() {
// console.log('')
},
//
blockEnd() {
this.payPrice = parseFloat(this.totalprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed(2);
if (this.payPrice == 0) {
this.isUse = false;
this.paytype = '';
} else {
this.isUse = true;
}
},
//
changeRiado() {
if (!this.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '/pages/user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
},
//
radioChange() {
if (this.radiostu == 1) {
this.radiostu = '';
} else {
this.radiostu = 1;
}
},
//
qzaddorder() {
if (this.customerMobile == '') {
uni.showToast({
title: '请输入联系电话',
icon: 'none',
duration: 2000
})
return;
}
if (this.payPrice == 0) {
if (this.radiostu != 1 && this.typeid == 2) {
uni.showToast({
title: '请勾选协议表示同意',
icon: 'none',
duration: 2000
})
return;
}
if (!this.user.isSetPayPwd) {
uni.navigateTo({
url: '../../pages/login/updatePas/updatePas'
})
return;
}
this.$refs.paymentPassword.modalFun('show');
return;
}
uni.showLoading({
title: '提交订单中...'
})
let datas;
if (this.typeid == 1) {
let data1 = [];
let data2 = '';
this.orderList.forEach((good) => {
let sj = good.productId + '|' + good.num;
data1.push(sj);
})
data2 = data1.join(',');
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: data2,
eatType: this.sttypeid
}
}
if (this.typeid == 2) {
if (this.radiostu != 1) {
uni.showToast({
title: '请勾选协议表示同意',
icon: 'none',
duration: 2000
})
return;
}
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: this.orderList
}
}
xbkaddOrder(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"openIdType": this.showType
}
this.qianzhuorderToPayByWx(params);
}
})
},
//
qianzhuorderToPayByWx(item) {
let that = this;
if (that.paytype == '2') {
qianzhuorderToPayByWx(item).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
title: '支付中...'
})
uni.requestPayment({
"appId": res.return_data.appId,
"nonceStr": res.return_data.nonceStr,
"package": res.return_data.package,
"paySign": res.return_data.sign,
"signType": "MD5",
"timeStamp": res.return_data.timeStamp,
success: function(res) {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../Phone-recharge-details/Phone-recharge-details?id=' +
that.orderId
})
},
fail: function(err) {
uni.hideLoading();
uni.navigateBack({})
},
});
// #endif
//
// #ifdef H5
that.payRequest(res);
// #endif
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
})
} else if (that.paytype == '3') {
if (that.tongCardPrice < that.payPrice) {
uni.showToast({
icon: 'none',
title: '工会卡余额不足',
duration: 2000,
});
return;
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../pages/login/updatePas/updatePas'
})
return;
}
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../pages/user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.$refs.paymentPassword.modalFun('show');
} else {
uni.showToast({
title: '请选择支付方式',
icon: 'none',
duration: 2000
})
}
},
submitHandle(e) {
uni.showLoading({
title: '支付中...'
})
this.PaymentPassword = e.value;
if (this.PaymentPassword == '') {
uni.showToast({
title: '请勿手动关闭弹窗',
icon: 'none',
duration: 2000
})
uni.hideLoading();
return;
}
let datas;
if (this.payPrice == 0) {
if (this.typeid == 1) {
let data1 = [];
let data2 = '';
this.orderList.forEach((good) => {
let sj = good.productId + '|' + good.num;
data1.push(sj);
})
data2 = data1.join(',');
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: data2,
eatType: this.sttypeid,
password: this.PaymentPassword,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
}
}
if (this.typeid == 2) {
datas = {
customerMobile: this.customerMobile,
regionId: app.globalData.cityId,
storeCode: this.storeCode,
productType: this.productType,
platformId: this.showType,
orderItems: this.orderList,
password: this.PaymentPassword,
integralNum: this.priceValue[1],
memDiscountId: this.memDiscountId
}
}
xbkaddOrder(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
})
return;
}
let params = {
"orderId": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
hltUnionCardPayghk(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
})
},
payRequest: function(self) {
let that = this;
uni.showLoading({
title: '支付中...'
})
jweixin.config({
// debug: false, // ,apialertpclogpc
appId: self.return_data.appId, //
timestamp: self.return_data.timeStamp, //
nonceStr: self.return_data.nonceStr, //
signature: self.return_data.sign, // 1
jsApiList: ['chooseWXPay'] // 使JSJS2
});
uni.hideLoading();
jweixin.ready(function() {
jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) {},
fail: function(res) {}
});
jweixin.chooseWXPay({
appId: self.return_data.appId,
timestamp: self.return_data
.timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.return_data.nonceStr, // 32
package: self.return_data
.package, // prepay_idprepay_id=***
signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.return_data.sign, //
success: function(res) {
//
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../Phone-recharge-details/Phone-recharge-details?id=' +
that.orderId
})
},
cancel: function(r) {
uni.navigateBack({})
},
fail: function(res) {
uni.navigateBack({})
}
});
});
jweixin.error(function(res) {
uni.showToast({
icon: 'none',
title: '支付失败了',
duration: 4000
});
});
},
}
}
@ -217,40 +740,44 @@
.concont {
border-radius: 12px;
}
.jfrecharge {
padding: 3px 20rpx;
color: #fff;
margin-left: 50%;
justify-content: center;
align-items: center;
font-size: 30rpx;
border-radius: 40rpx;
}
.footbtn{
bottom: 0px;
position: fixed;
}
.btnpay{
width: 90px;
border-radius: 22px;
height: 36px;
line-height: 36px;
}
.takemode{
width: 48%;
border-radius: 5px;
border: 1px solid #999999;
}
.aftermode{
background-color: #faf1f1;
color: #c72a20;
}
.cj-slider {
width: 100%;
align-items: center;
display: flex;
}
}
.jfrecharge {
padding: 3px 20rpx;
color: #fff;
margin-left: 50%;
justify-content: center;
align-items: center;
font-size: 30rpx;
border-radius: 40rpx;
}
.footbtn {
bottom: 0px;
position: fixed;
}
.btnpay {
width: 90px;
border-radius: 22px;
height: 36px;
line-height: 36px;
}
.takemode {
width: 48%;
border-radius: 5px;
border: 1px solid #999999;
}
.aftermode {
background-color: #faf1f1;
color: #c72a20;
}
.cj-slider {
width: 100%;
align-items: center;
display: flex;
}
</style>

@ -0,0 +1,540 @@
<template>
<view class="content">
<!-- <view class="width100 height85 backcorfff heads">
<view class="paddtop10 width90 alijusstart">
<view class="width80p font16 fcor333 fontwig6">
<image mode="widthFix" class="icon15 marRight10" src="../static/imgs/shop.png"></image>时代天街
</view>
<view class="width20 fotrt">
<image mode="widthFix" class="icon20" src="../static/imgs/nocollection.png"></image>
<image mode="widthFix" class="icon20" src="../static/imgs/collection.png"></image>
</view>
</view>
<view class="width90 mart5 font12 fcor999">前门西大街正阳市场1号楼中部</view>
</view> -->
<scroll-view scroll-y class="left-aside">
<view v-for="(item,index) in flist" :key="index" class="f-item" :class="{active: item.name == currentId}"
@click="tabtap(item)">
<view class="width100 fotct">
<image :src="item.imageUrl" mode="widthFix" class="icon45"></image>
</view>
<view class="width100 fotct" style="margin-top: -30px;">
{{item.name}}
</view>
</view>
</scroll-view>
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll"
:scroll-top="tabScrollTop">
<view v-for="(item,index) in slist" :key="index" :id="'main-'+item.kfcId">
<view class="s-item width90">
<text class="promotion_mixg1 backcor99" style="margin-right: -3px;"></text>
<text class="promotion_mixg1 backcor66" style="margin-right: -3px;"></text>
<text class="promotion_mixg1 backcor33 marglerig"></text>
{{item.name}}
</view>
<view v-if="titem.cateName == item.name" class="t-list mart10 paddbotm10" v-for="(titem,index) in tlist"
:key="index" @click="showPopups(titem)">
<view class="paddtop10 width94 font16 fcor333 fotrt fontwig6 text2">
{{titem.productName}}
</view>
<view class="width94 alijun mart5">
<image :src="titem.productImageUrl" mode="widthFix" class="qzgoodsimg"></image>
<view class="width50 fotrt">
<view class="width100 font12 colorc3">¥<text
class="font18 fontwig6 margle">{{titem.salePrice}}</text>
</view>
<view class="width100 font14 mart5 colorc3">
已减¥{{(titem.originalPrice - titem.salePrice).toFixed(2)}}</view>
<view class="width100 font14 mart5 fcor999" style="text-decoration: line-through;">
原价¥{{titem.originalPrice}}
</view>
<view class="mart10 icon-click fotrt">
<!-- <image class="btn-reduce" mode="widthFix" src="../static/imgs/reduce.png"></image> -->
<!-- <view class="num fcorfff" style="background: #d90209;">1</view> -->
<image class="btn-plus" mode="widthFix" src="../static/imgs/plus.png"></image>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<shopcart :goods="shoppingcart" @add="addCart" @dec="decreaseCart" @input="inputCart" @delAll="delAll">
</shopcart>
<!-- 弹窗选择规格 -->
<wybPopup ref="popup" type="bottom" width="500" height="1000" scrollY="true" radius="6" :showCloseIcon="true">
<image mode="widthFix" class="width40w mart40" :src="kfcimgs"></image>
<view class="width100 line1 mart10"></view>
<view class="mart20 width90 font18 fontwig6 fcor333">{{kfcname}}</view>
<view class="width90 mart10">
<view class="fcor333 font16 fontwig6">可选套餐</view>
<view class="mart10 paddleft10 paddtright10 fotct height30 fcor666 font12 typecage"
v-for="(item,index) in kdjchangelist" :class="[productId == item.productId ? 'bocactive' : '']"
:key="index" @click="changetype(item)">
{{item.productName}}
</view>
</view>
<view class="height30"></view>
<view class="wybfot width100">
<view class="height50 pricefot alijusstart ">
<view class="width60 margle10">
¥<text class="font24 fontwig6 fcor333 margle">{{kfcprice}}</text>
</view>
<view class="icon-click alijusstart">
<image class="btn-reduce" mode="widthFix" @click="decreaseshopCart()"
src="../static/imgs/wreduce.png"></image>
<view class="num fcor333">{{nums}}</view>
<image class="btn-plus" mode="widthFix" @click="addshopCart()" src="../static/imgs/plus.png">
</image>
</view>
</view>
<view class="width100 height50 fotct fcorfff" style="background-color: #c72a20;" @click="close()">
加入购物车</view>
</view>
</wybPopup>
</view>
</template>
<script>
import shopcart from '../../components/shopcart.vue';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import {
listByStoreCode
} from '../../Utils/Api.js';
let app = getApp();
export default {
components: {
shopcart,
wybPopup
},
data() {
return {
sizeCalcState: false,
tabScrollTop: 0,
currentId: '',
flist: [],
slist: [],
tlist: [],
list: [],
storeCode: '', //
kdjchangelist: '', //
nums: 1, //
shoppingcart: [], //
productId: '', //id
kfcname: '', //
kfcimgs: '', //
kfcprice: '', //
kfcoldprice: '' //
}
},
onLoad(options) {
this.storeCode = options.storeCode;
this.listByStoreCode();
},
methods: {
//
listByStoreCode() {
uni.showLoading({
title: '加载中...'
})
let datas = {
storeCode: this.storeCode,
regionId: app.globalData.cityId
}
listByStoreCode(datas).then(res => {
setTimeout(() => {
uni.hideLoading();
}, 1000);
if (res.return_code == '000000') {
this.flist = res.return_data;
this.slist = res.return_data;
res.return_data.forEach(item => {
item.products.forEach(items => {
this.tlist.push(items);
})
})
this.currentId = res.return_data[0].name;
}
})
},
async loadData() {
this.flist.forEach(item => {
item.products.forEach(items => {
this.tlist.push(items);
})
})
},
//
tabtap(item) {
uni.showLoading({
})
if (!this.sizeCalcState) {
this.calcSize();
}
setTimeout(() => {
uni.hideLoading();
this.currentId = item.name;
let index = this.slist.findIndex(sitem => sitem.name == item.name);
this.tabScrollTop = this.slist[index].top;
}, 200);
},
//
asideScroll(e) {
if (!this.sizeCalcState) {
this.calcSize();
}
let scrollTop = e.detail.scrollTop;
let tabs = this.slist.filter(item => item.top <= scrollTop).reverse();
if (tabs.length > 0) {
this.currentId = tabs[0].name;
}
},
//tab
calcSize() {
let h = 0;
this.slist.forEach(item => {
let view = uni.createSelectorQuery().select("#main-" + item.kfcId);
view.fields({
size: true
}, data => {
item.top = h;
h += data.height;
item.bottom = h;
}).exec();
})
this.sizeCalcState = true;
},
//
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
})
}
},
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
}
})
},
//
showPopups(item) {
this.nums = 1;
if (item.productId) {
this.productId = item.productId;
this.kdjchangelist = item;
this.kfcimgs = item.productImageUrl;
this.kfcname = item.productName;
this.kfcprice = item.salePrice;
this.kfcoldprice = item.originalPrice;
if (this.shoppingcart.length == 0) {
let datas = {
"num": 1,
"storeCode": this.storeCode,
"productId": this.productId,
"name": this.kfcname,
"imgs": this.kfcimgs,
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
this.$refs.popup.hide();
} else {
this.shoppingcart.forEach((good) => {
if (this.kfcname == good.name) {
good.num = good.num + this.nums;
} else {
let datas = {
"num": 1,
"storeCode": this.storeCode,
"productId": this.productId,
"name": this.kfcname,
"imgs": this.kfcimgs,
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
}
})
}
return;
}
this.kdjchangelist = item.specGroups;
this.kfcimgs = item.specGroups[0].productImageUrl;
this.productId = item.specGroups[0].productId;
this.kfcprice = item.specGroups[0].salePrice;
this.kfcname = item.specGroups[0].productName;
this.kfcoldprice = item.specGroups[0].originalPrice;
this.$refs.popup.show();
},
//
changetype(item) {
this.productId = item.productId;
this.kfcimgs = item.productImageUrl;
this.kfcname = item.productName;
this.kfcoldprice = item.originalPrice;
this.kfcprice = item.salePrice;
},
//
close() {
if (this.shoppingcart.length == 0) {
let datas = {
"num": this.nums,
"storeCode": this.storeCode,
"productId": this.productId,
"name": this.kfcname,
"imgs": this.kfcimgs,
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
this.$refs.popup.hide();
return;
}
this.shoppingcart.forEach((good) => {
if (this.kfcname == good.name) {
good.num = good.num + this.nums;
} else {
let datas = {
"num": this.nums,
"storeCode": this.storeCode,
"productId": this.productId,
"name": this.kfcname,
"imgs": this.kfcimgs,
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
}
})
this.$refs.popup.hide();
},
//
navToList() {
uni.navigateTo({
url: '../kfc-details/kfc-details'
})
}
}
}
</script>
<style lang="scss">
page,
.content {
height: 100%;
background-color: #f8f8f8;
}
.content {
display: flex;
bottom: 55px;
}
.heads {
position: absolute;
}
.icon20 {
width: 20px;
}
.icon15 {
width: 15px;
}
.icon45 {
width: 45px;
}
.left-aside {
flex-shrink: 0;
width: 80px;
height: 100%;
// margin-top: 85px;
margin-bottom: 55px;
background-color: #fff;
}
.f-item {
display: grid;
align-items: center;
justify-content: center;
width: 100%;
height: 180upx;
padding: 10px 0px;
font-size: 24upx;
color: #666666;
position: relative;
&.active {
background: #f8f8f8;
}
}
.right-aside {
flex: 1;
overflow: hidden;
// margin-top: 85px;
padding-left: 20upx;
margin-bottom: 60px;
}
.s-item {
justify-content: flex-end;
align-items: center;
display: flex;
height: 70upx;
padding-top: 8upx;
font-size: 28upx;
color: #333333;
.promotion_mixg1 {
width: 12px;
height: 2px;
border-radius: 18px;
transform: rotate(125deg);
}
}
.t-list {
width: 96%;
border-radius: 15px;
background: #fff;
&:after {
content: '';
flex: 99;
height: 0;
}
}
.qzgoodsimg {
margin-top: -10px;
width: 120px;
}
.icon-click {
// position: absolute;
height: 28px;
right: 6%;
}
.btn-reduce {
// position: absolute;
// left: 0px;
// top: 0;
width: 28px;
height: 28px;
// z-index: 1;
}
.btn-plus {
// position: absolute;
// right: 0px;
// top: 0;
width: 28px;
height: 28px;
// z-index: 1;
}
.num {
padding: 0px 20px;
height: 28px;
line-height: 28px;
font-weight: 600;
border-radius: 18px;
}
.typecage {
margin-left: 2.5%;
border-radius: 3px;
border: 1px solid #333333;
display: inline-block;
}
.footbtn {
height: 50px;
background-color: #000000;
display: flex;
bottom: 0px;
}
.pricefot {
border-radius: 15px 15px 0 0;
box-shadow: 0px 5px 20px #333333;
}
.bocactive {
background-color: #eaf0ec;
color: #00713e;
}
.wybfot {
position: fixed;
bottom: 0px;
}
</style>

@ -35,22 +35,18 @@
<text class="promotion_mixg1 backcor33 marglerig"></text>
{{item.name}}
</view>
<view v-if="titem.ext1 == item.id" class="t-list mart10" v-for="titem in tlist" :key="titem.id">
<view v-if="titem.ext1 == item.id" class="t-list mart10 paddbotm10" v-for="titem in tlist"
:key="titem.id" @click="showPopup(titem)">
<view class="paddtop10 width94 font16 fcor333 fotrt fontwig6 text2">
{{titem.name}}
</view>
<view class="width94 alijun mart5">
<image :src="titem.defaultImage" mode="widthFix" class="qzgoodsimg"></image>
<view class="width50 fotrt">
<view class="width100 font12 colorc3" v-if="typeid == 1">¥<text
<view class="width100 font12 color2f6f43">¥<text
class="font18 fontwig6 margle">{{titem.salesTallPrice}}</text>
</view>
<view class="width100 font12 color2f6f43" v-if="typeid == 2">¥<text
class="font18 fontwig6 margle">{{titem.salesTallPrice}}</text>
</view>
<view class="width100 font14 mart5 colorc3" v-if="typeid == 1">
已减¥{{(titem.marketTallPrice - titem.salesTallPrice).toFixed(2)}}</view>
<view class="width100 font14 mart5 color2f6f43" v-if="typeid == 2">
<view class="width100 font14 mart5 color2f6f43">
已减¥{{(titem.marketTallPrice - titem.salesTallPrice).toFixed(2)}}</view>
<view class="width100 font14 mart5 fcor999" style="text-decoration: line-through;">
原价¥{{titem.marketTallPrice}}
@ -58,16 +54,8 @@
<view class="mart10 icon-click fotrt">
<!-- <image class="btn-reduce" mode="widthFix" src="../static/imgs/reduce.png"></image> -->
<!-- <view class="num fcorfff" style="background: #d90209;">1</view> -->
<image class="btn-plus" mode="widthFix" v-if="typeid == 1" @click="showPopup()"
src="../static/imgs/plus.png"></image>
<image class="btn-plus" mode="widthFix" v-if="typeid == 2" @click="showPopup()"
src="../static/imgs/blueplus.png"></image>
<image class="btn-plus" mode="widthFix" src="../static/imgs/blueplus.png"></image>
</view>
<!--
<view class="mart10 icon-click fotrt" v-if="typeid == 2">
<image class="btn-plus" mode="widthFix" @click="showPopup()"
src="../static/imgs/blueplus.png"></image>
</view> -->
</view>
</view>
@ -75,54 +63,86 @@
</view>
</scroll-view>
<shopcart :goods="goods" @add="addCart" @dec="decreaseCart" @input="inputCart" @delAll="delAll"></shopcart>
<shopcart :goods="shoppingcart" @add="addCart" @dec="decreaseCart" @input="inputCart" @delAll="delAll">
</shopcart>
<!-- 弹窗选择规格 -->
<wybPopup ref="popup" type="bottom" width="500" height="1000" scrollY="true" radius="6" :showCloseIcon="true">
<image mode="widthFix" class="width40w mart40" src="../static/imgs/prod1.png"></image>
<image mode="widthFix" class="width40w mart40" :src="cbkchangelist.defaultImage"></image>
<view class="width100 line1 mart10"></view>
<view class="mart20 width90 font18 fontwig6 fcor333">产品名字</view>
<view class="mart20 width90 font18 fontwig6 fcor333">{{cbkchangelist.name}}</view>
<view class="width90 mart10">
<view class="fcor333 font16 fontwig6">杯型</view>
<view class="mart10 width30 fotct height30 fcor666 font12 typecage" v-for="(item,index) in list"
:key="index">
中杯
<view class="mart10 width30 fotct height30 fcor666 font12 typecage"
:class="[cupSizeid == item ? 'bocactive' : '']" v-for="(item,index) in cupSize" :key="index"
@click="changetype(1,item)">
{{item}}
</view>
</view>
<view class="width90 mart10">
<view class="fcor333 font16 fontwig6">温度</view>
<view class="mart10 width30 fotct height30 fcor666 font12 typecage" v-for="(item,index) in list"
:key="index">
特别热
<view class="mart10 width30 fotct height30 fcor666 font12 typecage"
:class="[temperatureid == item ? 'bocactive' : '']" v-for="(item,index) in temperature"
@click="changetype(2,item)" :key="index">
{{item}}
</view>
</view>
<view class="width90 mart10">
<view class="width90 mart10" v-if="cream">
<view class="fcor333 font16 fontwig6">奶油</view>
<view class="mart10 width30 fotct height30 fcor666 font12 typecage"
:class="[creamid == item ? 'bocactive' : '']" v-for="(item,index) in cream"
@click="changetype(3,item)" :key="index">
{{item}}
</view>
</view>
<view class="width90 mart10" v-if="espresso">
<view class="fcor333 font16 fontwig6">浓缩咖啡</view>
<view class="mart10 width30 fotct height30 fcor666 font12 typecage"
:class="[espressoid == item ? 'bocactive' : '']" v-for="(item,index) in espresso"
@click="changetype(4,item)" :key="index">
{{item}}
</view>
</view>
<view class="width90 mart10" v-if="milk">
<view class="fcor333 font16 fontwig6">牛奶</view>
<view class="mart10 width30 fotct height30 fcor666 font12 typecage" v-for="(item,index) in list"
:key="index">
燕麦奶
<view class="mart10 width30 fotct height30 fcor666 font12 typecage"
:class="[milkid == item ? 'bocactive' : '']" v-for="(item,index) in milk"
@click="changetype(5,item)" :key="index">
{{item}}
</view>
</view>
<view class="width90 mart10" v-if="milkBubble">
<view class="fcor333 font16 fontwig6">奶泡</view>
<view class="mart10 width30 fotct height30 fcor666 font12 typecage"
:class="[milkBubbleid == item ? 'bocactive' : '']" v-for="(item,index) in milkBubble"
@click="changetype(6,item)" :key="index">
{{item}}
</view>
</view>
<view class="height30"></view>
<view class="wybfot width100">
<view class="height50 pricefot alijusstart ">
<view class="width50 margle10">
¥<text class="font24 fontwig6 fcor333 margle">35.9</text>
<view class="height70 pricefot alijusstart backcorfff">
<view class="width60 margle10">
<view class="width100">
¥<text class="font24 fontwig6 color2f6f43 margle">{{cbkchangelist.salesTallPrice}}</text>
</view>
<view class="width100 font12 fcor999">
<text>{{cupSizeid}}</text><text>,{{temperatureid}}</text><text
v-if="creamid">,{{creamid}}</text><text v-if="espressoid">,{{espressoid}}</text><text
v-if="milkid">,{{milkid}}</text><text v-if="milkBubbleid">,{{milkBubbleid}}</text>
</view>
</view>
<view class="icon-click">
<image class="btn-reduce" mode="widthFix" src="../static/imgs/wreduce.png"></image>
<view class="num fcor333">1</view>
<image class="btn-plus" mode="widthFix" v-if="typeid == 1" @click="showPopup()"
src="../static/imgs/plus.png"></image>
<image class="btn-plus" mode="widthFix" v-if="typeid == 2" @click="showPopup()"
src="../static/imgs/blueplus.png"></image>
<view class="icon-click alijusstart">
<image class="btn-reduce" mode="widthFix" @click="decreaseshopCart()"
src="../static/imgs/wreduce.png"></image>
<view class="num fcor333">{{nums}}</view>
<image class="btn-plus" mode="widthFix" @click="addshopCart()"
src="../static/imgs/blueplus.png">
</image>
</view>
</view>
<view class="width100 height50 fotct fcorfff" style="background-color: #c72a20;" v-if="typeid == 1"
@click="close()">
加入购物车</view>
<view class="width100 height50 backcorf2f6 fotct fcorfff" v-if="typeid == 2" @click="close()">加入购物车
<view class="width100 height50 backcorf2f6 fotct fcorfff" @click="close()">加入购物车
</view>
</view>
</wybPopup>
@ -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;

@ -1,38 +1,57 @@
<template>
<view>
<view class="width100 height220 headsbg backcorfff fotct">
<view class="width100 height220 headsbg backcorfff fotct" v-if="orderList.orderStatus == 1">
<view class="height20"></view>
<view class="headstu font18 fontwig6">
{{countdownm}}:{{countdowns}}
</view>
<view class="width100 font18 colorc72 mart5">待支付</view>
<view class="width100 font14 fcor666 mart5">若超时未支付,订单将自动取消</view>
<view class="stubtn mart15">立即支付</view>
<!-- && orderList.orderStatus != 2 -->
<view class="width100 font18 colorc72 mart5" v-if="orderList.orderStatus == 1">
{{typeText[orderList.orderStatus]}}</view>
<view class="width100 font14 fcor666 mart5" v-if="orderList.orderStatus == 1">若超时未支付,订单将自动取消</view>
<view class="stubtn mart15 backcorf2f6" v-if="typeid == 9 && orderList.orderStatus == 1">立即支付</view>
<view class="stubtn mart15" v-if="typeid == 4 && orderList.orderStatus == 1"
style="background-color: #c72a20;">立即支付</view>
</view>
<view class="width100 height150 headsbg backcorfff fotct" v-if="orderList.orderStatus != 1 && orderList.orderStatus != 3">
<view class="headotherstu alijus font18 fontwig6">
<image mode="widthFix" class="width50" src="../static/imgs/otherstu.png"></image>
</view>
<view class="width100 font18 fcor666 mart15" v-if="orderList.orderStatus != 1">
{{typeText[orderList.orderStatus]}}</view>
</view>
<!-- <view class="width96 mart20 colorc3 font12 fotct">
:约5分钟后取餐,请尽快到餐厅取餐哦
</view> -->
<view class="concont width94 mart10 backcorfff">
<view class="width94 paddtop10 font14">
<view class="width94 paddtop10 font16 fontwig6">
餐品明细
</view>
<view class="width100 bor-botm1 mart10 marb10"></view>
<view class="width100">
<view class="width100 alijusstart mart10 bor-botm1" v-for="(item,index) in orderList" :key="index">
<view class="width100 alijusstart mart10 bor-botm1" v-for="(item,index) in orderList.highChildOrderList"
:key="index">
<view class="width30">
<image src="../static/imgs/kfc2.png" mode="widthFix" class="width100"></image>
<image :src="item.goodsImg" mode="widthFix" class="width100"></image>
</view>
<view class="width40 font13 fcor666">香辣鸡腿堡</view>
<view class="width10 font12 fcor999">x1</view>
<view class="width40 font13 fcor666">{{item.goodsName}}</view>
<view class="width10 font12 fcor999">x{{item.saleCount}}</view>
<view class="width20">
<view class="width100 fcor333 font12">¥<text class="fontwig6 font16">16.8</text></view>
<view class="width100 fcor999 font12" style="text-decoration: line-through;">¥17.8</view>
<view class="width100 fcor333 font12">¥<text class="fontwig6 font16">{{item.totalPrice}}</text>
</view>
<view class="width100 fcor999 font12" style="text-decoration: line-through;">
¥{{item.goodsPrice}}</view>
</view>
</view>
<view class="width90 fotrt height50 font13 fcor999">
<text class="fcor333 fontwig6" style="margin: 0px 5px;"> 1 </text> 小计: <text
class="font16 colorc3 fontwig6 margle"> ¥16.8</text>
<text class="fcor333 fontwig6" style="margin: 0px 5px;"> {{coutnums}} </text> 小计:
<text class="font16 colorc3 fontwig6 margle" v-if="typeid == 4 "> ¥{{orderList.payRealPrice}}</text>
<text class="font16 color2f6f43 fontwig6 margle" v-if="typeid == 9 ">
¥{{orderList.payRealPrice}}</text>
</view>
</view>
</view>
@ -41,30 +60,31 @@
<view class="width94 alijusstart paddtop10 font14 fcor666">
订单信息
</view>
<view class="width94 alijusstart mart20 font14 fcor666">
<!-- <view class="width94 alijusstart mart20 font14 fcor666">
<view class="width30">取餐门店</view>
<view class="width70 fotrt">时代天街时代天街时代天街时代天街</view>
</view>
<view class="width70 fotrt">{{orderList.storeName}}-{{orderList.storeAddress}}</view>
</view> -->
<view class="width94 alijusstart mart20 font14 fcor666">
<view class="width30">订单号</view>
<view class="width70 fotrt">2901012002828228288482828</view>
<view class="width70 fotrt">{{orderList.orderNo}}</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666">
<view class="width94 alijusstart mart20 font14 fcor666" v-if="typeid == 4">
<view class="width30">就餐方式</view>
<view class="width70 fotrt">店内就餐</view>
<view class="width70 fotrt" v-if="orderList.eatType == 1">店内就餐</view>
<view class="width70 fotrt" v-if="orderList.eatType == 2">打包带走</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666">
<view class="width30">支付方式</view>
<view class="width70 fotrt">未支付</view>
<view class="width70 fotrt">{{typeText[orderList.orderStatus]}}</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666">
<view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.kfcOrderMobileRemark">
<view class="width30">联系方式</view>
<view class="width70 fotrt">15583253627</view>
<view class="width70 fotrt">{{orderList.kfcOrderMobileRemark}}</view>
</view>
<view class="width94 alijusend mart20 font14 fcor666 paddbotm20">
<view class="width94 alijusend mart20 font14 fcor666 paddbotm20" v-if="orderList.orderStatus == 1">
<view class="canbtn height30 marRight20">取消订单</view>
<view class="canbtn height30">联系客服</view>
<!-- <view class="canbtn height30">联系客服</view> -->
</view>
</view>
<view class="width90 mart10 font13 fcor666">友情提示</view>
@ -74,34 +94,75 @@
</template>
<script>
import {
getThirdOrderByOrderId
} from '../../Utils/Api.js';
export default {
data() {
return {
orderList: [1],
orderList: '',
sttypeid: 1,
countdownh: '',
countdownm: '',
countdowns: '',
productType: '',
timer: null, //
typeid: '', //
orderId: '', //id
coutnums: 0, //
typeText: {
1: '待支付',
2: '已支付',
3: '已完成',
4: '已退款',
5: '已取消',
6: '退款中',
7: '退款失败'
},
}
},
onLoad() {
onLoad(options) {
this.orderId = options.id;
this.getThirdOrderByOrderId();
this.timer = setInterval(() => {
this.showtime()
})
},
onUnload() {
clearInterval(this.timer);
},
onUnload() {
clearInterval(this.timer);
},
methods: {
getAllCount() {
this.orderList.highChildOrderList.forEach((food) => {
this.coutnums += food.saleCount
})
},
//
getThirdOrderByOrderId() {
uni.showLoading({
title: '加载中...'
})
let datas = {
orderId: this.orderId
}
getThirdOrderByOrderId(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
this.getAllCount();
}
})
},
//
changedissr(item) {
this.sttypeid = item;
},
//
showtime() {
showtime() {
// console.log('======'+nowtime.getTime());
var nowtime = new Date(), //
endtime = new Date("2022/7/5"); //
endtime = new Date("2022/7/5"); //
var lefttime = endtime.getTime() - nowtime.getTime(), //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime /
@ -140,8 +201,17 @@
border: 1px solid #c72a20;
}
.headotherstu {
width: 80px;
height: 80px;
line-height: 80px;
text-align: center;
border-radius: 50%;
margin-left: 40%;
background-color: #999999;
}
.stubtn {
background-color: #c72a20;
width: 30%;
height: 35px;
line-height: 35px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

@ -6,17 +6,18 @@
</template>
<script>
import citySelect from '@/components/city-select/city-select.vue'
import {
getAllCity
} from '../../Utils/Api.js';
import citySelect from '@/components/city-select/city-select.vue';
let app = getApp();
export default {
data() {
return {
//
formatName: 'cityName',
//
activeCity: {
id: 1,
cityName: '南京市'
},
activeCity: {},
//
hotCity: [{
id: 0,
@ -28,66 +29,18 @@
}
],
//
obtainCitys: [{
"cityInitial": "N",
"cityName": "内江市",
"provinceCode": "510000",
"cityCode": "511000000000",
"provinceName": "四川省",
"cityId": 528
},
{
"cityInitial": "L",
"cityName": "乐山市",
"provinceCode": "510000",
"cityCode": "511100000000",
"provinceName": "四川省",
"cityId": 141
},
{
"cityInitial": "N",
"cityName": "南充市",
"provinceCode": "510000",
"cityCode": "511300000000",
"provinceName": "四川省",
"cityId": 130
},
{
"cityInitial": "M",
"cityName": "眉山市",
"provinceCode": "510000",
"cityCode": "511400000000",
"provinceName": "四川省",
"cityId": 228
},
{
"cityInitial": "Y",
"cityName": "宜宾市",
"provinceCode": "510000",
"cityCode": "511500000000",
"provinceName": "四川省",
"cityId": 144
},
{
"cityInitial": "G",
"cityName": "广安市",
"provinceCode": "510000",
"cityCode": "511600000000",
"provinceName": "四川省",
"cityId": 5
}
]
obtainCitys: []
}
},
components: {
citySelect
},
onLoad() {
this.getAllCity();
this.activeCity = {
id: 1,
cityName: '南京市',
cityCode: 110100
cityName: app.globalData.cityName,
cityCode: app.globalData.cityId
}
//
this.hotCity = [{
@ -103,13 +56,27 @@
]
},
methods: {
//
cityClick(item) {
uni.showToast({
icon: 'none',
title: 'item: ' + JSON.stringify(item),
duration: 2000
app.globalData.cityName = item.cityName;
app.globalData.cityId = item.provinceCode;
uni.navigateBack({
})
},
//
getAllCity() {
uni.showLoading({
title: '加载中...'
})
getAllCity().then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.obtainCitys = res.return_data;
}
})
}
}
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -543,11 +543,6 @@ $uni-font-size-paragraph:30upx;
height: 25px;
}
.height20 {
height: 20px;
line-height: 20px;
}
.height50 {
height: 50px;

Loading…
Cancel
Save