1.在订单详情页加上客户返积分数

2.肯德基和星巴克新增用户选择数量
3.星巴克肯德基新增打烊时间
4.肯德基订单详情新增手机点击查看
5.肯德基和星巴克修改文字位置
6.绑定工会卡优化
7.修改贵州柴油汽油专区
8.优化积分支付密码功能
9..新增话费充值弹
master
杨杰 2 years ago
parent 815337acc7
commit cfb0389f82
  1. 2
      high-unionPay/App.vue
  2. 7
      high-unionPay/Utils/Api.js
  3. 144
      high-unionPay/member-Recharge/rec-confirmation/rec-confirmation.vue
  4. 12
      high-unionPay/pages.json
  5. 69
      high-unionPay/pages/goods/goods-list/goods-list.vue
  6. 168
      high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
  7. 22
      high-unionPay/pages/goods/refuel-details/refuel-details.vue
  8. 12
      high-unionPay/pages/goods/refuel/refuel.vue
  9. 17
      high-unionPay/pages/goods/store-list/store-details.vue
  10. 263
      high-unionPay/pages/login/updatePas/resetPas.vue
  11. 169
      high-unionPay/pages/order/confirmation.vue
  12. 111
      high-unionPay/pages/pay/payment/payment.vue
  13. 1169
      high-unionPay/pages/tabBar/category/category.vue
  14. 9
      high-unionPay/pages/tabBar/home/home.vue
  15. 4
      high-unionPay/pages/tabBar/user/user.vue
  16. 96
      high-unionPay/pages/unionPay/recharge/recharge.vue
  17. 236
      high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue
  18. 52
      high-unionPay/pages/user/bindingCard/bindingCard.vue
  19. 20
      high-unionPay/qianzhu-KFC/buffet-order/buffet-order.vue
  20. 95
      high-unionPay/qianzhu-KFC/confirmOrder/confirmOrder.vue
  21. 263
      high-unionPay/qianzhu-KFC/kfc-menu-list/kfc-menu-list.vue
  22. 124
      high-unionPay/qianzhu-KFC/menu-list/menu-list.vue
  23. 40
      high-unionPay/qianzhu-KFC/order-details/order-details.vue
  24. BIN
      high-unionPay/qianzhu-KFC/static/imgs/horn.png
  25. BIN
      high-unionPay/static/img/gou.png
  26. BIN
      high-unionPay/static/img/rebate.png
  27. BIN
      high-unionPay/static/img/sigh.png
  28. 4
      high-unionPay/uni.scss

@ -27,6 +27,8 @@
balancePrice : '',
balanceCardNo:'',
identificationCode:'',
//id
companyId:'',
//ID
storeid:'',
//

@ -498,4 +498,9 @@ export const sendUserPass = params => {
//话费列表
export const getUserOrderListhuafei = params => {
return POST('GET', `${base}/outRechargeOrder/getUserOrderList`, params).then(res => res.data);
}
}
//肯德基返利
export const getRebateIntegral = params => {
return POST('POST', `${base}/common/getRebateIntegral`, params).then(res => res.data);
}

@ -73,6 +73,26 @@
¥{{priceValue[1] / 100}}
</view>
</view>
<view class="width94 line1 marb5"></view>
<view class="height50 width100 backcorfff">
<view class="width40 flleft fcor333 fontwig6 font15 text1 alijusstart" style="padding-left: 4%;">
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;">
{{rebateIntegral}}积分
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 4%;">
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
<view class="width94 line1 marb5"></view>
<view class="height50 width100">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式
@ -86,7 +106,7 @@
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='4'" color="#c72a20"/>
<radio :checked="paytype=='4'" color="#c72a20" />
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="item == 3"></view>
@ -116,17 +136,17 @@
<wybPopup ref="popup" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view>
<view class="width92 height110 tccs mart10" v-for="(items, index) in OrderPreList" :key="index"
<view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="index"
@click="radioChanges(items)">
<image mode="widthFix" class="mart10" :src="imageUrl+items.discountImg"></image>
<view class="contrig">
<view class="width80p flleft">
<view class="font16 fontwig6 fcor333 text1 paddtop25">{{items.discountName}}</view>
<image mode="widthFix" :src="imageUrl+items.discountImg"></image>
<view class="alijus width60 margle10">
<view class="width80p">
<view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view>
<view class="font13 fcor999 mart5">有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
</view>
<view class="width20 flright">
<view class="yhprice">
<view class="width20 fotrt">
<view>
<radio v-if="items.discountCondition && orderPrice > items.discountCondition"
color="#c72a20" :checked="items.id == memDiscountId" />
<radio v-if="items.discountCondition && orderPrice < items.discountCondition"
@ -153,7 +173,8 @@
findUser,
qianzhuorderToUnionPay,
czhltUnionCardPay,
getUserOrderPreList
getUserOrderPreList,
getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
@ -168,7 +189,7 @@
data() {
return {
orderList: [],
paytype: '', //
paytype: '4', //
priceValue: [0, 0], //
availIntegal: 0, //
totalprice: 0, //
@ -194,6 +215,8 @@
imageUrl: app.globalData.imgUrl, //
orderPrice: 0, //
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 //
}
},
onLoad(options) {
@ -204,14 +227,14 @@
this.payPrice = options.price;
this.goodName = options.name;
},
onShow() {
onShow() {
this.customerMobile = app.globalData.userInfo.phone;
this.findUser();
},
methods: {
//
getThirdPartyByDetail() {
let datas = {
platformId: this.showType,
regionId: app.globalData.cityId,
@ -243,6 +266,7 @@
this.getHuiLianTongCardBalance();
this.getThirdPartyByDetail();
this.getUserOrderPreList();
this.getRebateIntegral();
uni.setStorage({
key: "user",
data: res.return_data
@ -250,6 +274,24 @@
}
});
},
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.payPrice,
"productId": 3,
"type": 4,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
} else {
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
//
getHuiLianTongCardBalance() {
if (!this.user.hltCardNo) {
@ -279,10 +321,12 @@
blockEnd() {
this.isDiscount = 1;
if (this.deductionPrice == 0) {
this.payPrice = Math.abs(parseFloat(this.totalprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed(
2));
this.payPrice = Math.abs(parseFloat(this.totalprice - parseFloat(this.priceValue[1] / 100).toFixed(2))
.toFixed(
2));
} else {
this.payPrice = Math.abs(parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this
this.payPrice = Math.abs(parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) -
this
.deductionPrice).toFixed(2));
}
if (this.payPrice == 0) {
@ -291,6 +335,7 @@
} else {
this.isUse = true;
}
this.getRebateIntegral();
},
//
changeRiado() {
@ -361,7 +406,7 @@
"orderId": res.return_data.id,
}
this.qianzhuorderToUnionPay(params);
}else {
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
@ -445,12 +490,16 @@
//
calculatepayPrice() {
if (this.deductionPrice == 0) {
this.payPrice = Math.abs(parseFloat(this.totalprice - (parseFloat(this.priceValue[1] / 100).toFixed(2)))
this.payPrice = Math.abs(parseFloat(this.totalprice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)))
.toFixed(2));
} else {
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
}
}
this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@ -514,31 +563,32 @@
duration: 2000
})
}
},
//
uniontopay(item) {
let that = this;
upsdk.pluginReady(function() {
upsdk.pay({
tn: item,
success: function(res) {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
})
},
fail: function(err) {
uni.showToast({
title: err.msg,
icon: 'none',
duration: 2000
})
// , err.msg , TN,
}
});
});
},
//
uniontopay(item) {
let that = this;
upsdk.pluginReady(function() {
upsdk.pay({
tn: item,
success: function(res) {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this
.orderId
})
},
fail: function(err) {
uni.showToast({
title: err.msg,
icon: 'none',
duration: 2000
})
// , err.msg , TN,
}
});
});
},
submitHandle(e) {
uni.showLoading({
@ -712,10 +762,8 @@
border-radius: 8px;
image {
float: left;
width: 170rpx;
max-height: 170rpx;
margin-left: 10px;
width: 160rpx;
max-height: 160rpx;
}
}
</style>

@ -1039,12 +1039,12 @@
"selectedIconPath": "static/img/tabBar/home-on.png",
"text": "嗨森逛"
},
// {
// "pagePath": "pages/tabBar/category/category",
// "iconPath": "static/img/tabBar/category.png",
// "selectedIconPath": "static/img/tabBar/category-on.png",
// "text": "导航"
// },
{
"pagePath": "pages/tabBar/category/category",
"iconPath": "static/img/tabBar/category.png",
"selectedIconPath": "static/img/tabBar/category-on.png",
"text": "商户"
},
{
"pagePath": "pages/tabBar/user/user",
"iconPath": "static/img/tabBar/user.png",

@ -19,6 +19,12 @@
</view>
</view>
<view class="width90 mart20 marb20 alijus">
<view class="font16 fcor333 paddtop5 paddbotm5 margle20 marRight20" v-for="(item,index) in cateTypeList"
@click="switchid(item)" :class="[goodtyid == item.id ? 'fcor089 borbtom fontwig6' : '']" :key="index">
{{item.title}}</view>
</view>
<view v-if="goodsList == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
@ -40,12 +46,12 @@
<view class="slogan" v-if="row.discountPrice !== row.salesPrice">
<!-- <image v-if="row.payType != 1" style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png">
</image>{{ row.salesPrice*100}} <text v-else></text>{{row.salesPrice}} -->
<view v-if="row.payType != 1">
<image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png">
</image>{{ row.salesPrice*100}}
</view>
</image>{{ row.salesPrice*100}} <text v-else></text>{{row.salesPrice}} -->
<view v-if="row.payType != 1">
<image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png">
</image>{{ row.salesPrice*100}}
</view>
<view v-else>{{ row.salesPrice}}</view>
</view>
</view>
@ -59,7 +65,8 @@
import {
getCouponList,
getCmsContent,
getBrandCouponList
getBrandCouponList,
getListGoodsType
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@ -88,7 +95,8 @@
typeId: '',
couponName: '',
brandid: '',
goodtyid: ''
goodtyid: '',
cateTypeList: [] //
};
},
@ -96,6 +104,9 @@
this.typeId = option.id;
this.brandid = option.brandId;
this.goodtyid = option.goodsId;
if (this.goodtyid == undefined) {
this.goodtyid = '';
}
if (option.id == 1) {
uni.setNavigationBarTitle({
title: '商品列表'
@ -114,7 +125,12 @@
uni.setNavigationBarTitle({
title: '中石化码列表'
});
this.getCouponListArea();
// this.getCouponListArea();
if (app.globalData.cityName == '贵州省') {
this.getListGoodsType();
} else {
this.getCouponListArea();
}
this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST');
}
if (option.id == 4) {
@ -133,6 +149,38 @@
this.getCouponListArea();
},
methods: {
//
getListGoodsType() {
uni.showLoading({
title: '加载中...'
})
let params = {
pageNum: 1,
pageSize: 10000,
userService: '贵州中石化'
}
getListGoodsType(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.cateTypeList = res.return_data.list;
this.goodtyid = res.return_data.list[0].id;
if (app.globalData.cityName == '贵州省') {
this.getCouponListArea();
}
} else {
this.cateTypeList = [];
}
})
},
//id
switchid(item) {
this.goodtyid = item.id;
this.pageNum = 1;
this.pageSize = 10;
this.isNoMoreData = false;
this.goodsList = [];
this.getCouponListArea();
},
//
getCmsContent() {
let params = {
@ -160,7 +208,8 @@
}
let pagenum = this.pageNum;
let params = {
regionId: app.globalData.cityId,
regionId: app.globalData.cityId,
goodsTypeId: this.goodtyid,
pageNum: pagenum,
pageSize: this.pageSize,
displayArea: this.typeId,

@ -121,7 +121,25 @@
</view>
</view>
</view>
<view class="width94 line1 mart5 marb5"></view>
<view class="height40 width100 backcorfff">
<view class="width40 flleft fcor666 font15 fontwig6 text1 alijusstart" style="padding-left: 2%;">
<image src="../../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view>
<view class="width50 flright fotrt paddtright15 font15 colore95 alijun" style="align-items: center;"
v-if="Integrastu == 1">
{{rebateIntegral}}积分
</view>
<view class="width50 flright fotrt paddtright15 font15 colore95 alijun" style="align-items: center;"
v-if="Integrastu == 2">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<image src="../../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
<!-- // -->
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式:</view>
<view class="line1"></view>
@ -176,18 +194,18 @@
<wybPopup ref="popup" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view>
<view class="width92 height110 tccs mart10" v-for="(items, index) in OrderPreList" :key="index"
<view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="index"
@click="radioChanges(items.highDiscount,items)">
<image mode="widthFix" class="mart10" :src="imageUrl+items.highDiscount.discountImg"></image>
<view class="contrig">
<view class="width80p flleft">
<view class="font16 fontwig6 fcor333 text1 paddtop25">{{items.highDiscount.discountName}}</view>
<image mode="widthFix" :src="imageUrl+items.highDiscount.discountImg"></image>
<view class="alijus width60 margle10">
<view class="width80p">
<view class="font16 fontwig6 fcor333 text1">{{items.highDiscount.discountName}}</view>
<view class="font13 fcor999 mart5">
有效期:{{items.highDiscount.salesEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
</view>
<view class="width20 flright">
<view class="yhprice">
<view class="width20 fotrt">
<view>
<radio
v-if="items.highDiscount.discountCondition && orderPrice >= items.highDiscount.discountCondition"
color="#c72a20" :checked="items.id == memDiscountId" />
@ -218,9 +236,10 @@
getUserOrderPreList,
canUseDiscount,
addOrder,
cancelOrder,
cancelOrder,
unionPay,
oilPriceDiscountCompute
oilPriceDiscountCompute,
getRebateIntegral
} from '../../../Utils/Api.js';
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
@ -257,7 +276,9 @@
memDiscountId: '', //id
priceValue: [0, 0], //
availIntegal: 0, //
gasOrderList: '' //
gasOrderList: '', //
rebateIntegral: '', //
Integrastu: 1 //
}
},
onLoad(e) {
@ -288,6 +309,24 @@
}
});
},
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.payPrice,
"productId": 1,
"type": 3,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
} else {
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
//
canUseDiscount() {
let params = {
@ -307,8 +346,8 @@
let datas = {
"price": this.gasOrderList.highChildOrderList[0].goodsPrice,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
"oilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
}
"oilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
}
oilPriceDiscountCompute(datas).then(res => {
if (res.return_code == '000000') {
this.orderList = res.return_data;
@ -320,6 +359,7 @@
} else {
this.availIntegal = payprice;
}
this.getRebateIntegral();
}
})
},
@ -397,7 +437,8 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
}
}
this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@ -431,6 +472,7 @@
} else {
this.isUse = true;
}
this.getRebateIntegral();
},
//
@ -687,8 +729,8 @@
title: '提交订单中...'
})
let goods = {
"identificationCode": this.gasOrderList.identificationCode,
"payGold": this.priceValue[1],
"identificationCode": this.gasOrderList.identificationCode,
"payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId,
"highChildOrderList": [{
"goodsType": this.gasOrderList.highChildOrderList[0].goodsType,
@ -791,50 +833,50 @@
that.$refs.paymentPassword.modalFun('show');
}
},
//
unionPay() {
let goods = {
"orderId": this.orderNo
}
unionPay(goods).then(res => {
if (res.return_code == '000000') {
this.uniontopay(res.return_data.prepayid);
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
})
},
//
uniontopay(item) {
let that = this;
upsdk.pluginReady(function() {
upsdk.pay({
tn: item,
success: function(res) {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
});
},
fail: function(err) {
uni.navigateBack({})
uni.showToast({
title: err.msg,
icon: 'none',
duration: 2000
})
// , err.msg , TN,
}
});
});
},
//
unionPay() {
let goods = {
"orderId": this.orderNo
}
unionPay(goods).then(res => {
if (res.return_code == '000000') {
this.uniontopay(res.return_data.prepayid);
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
})
},
//
uniontopay(item) {
let that = this;
upsdk.pluginReady(function() {
upsdk.pay({
tn: item,
success: function(res) {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
});
},
fail: function(err) {
uni.navigateBack({})
uni.showToast({
title: err.msg,
icon: 'none',
duration: 2000
})
// , err.msg , TN,
}
});
});
}
}
}
@ -935,10 +977,8 @@
border-radius: 8px;
image {
float: left;
width: 170rpx;
max-height: 170rpx;
margin-left: 10px;
width: 160rpx;
max-height: 160rpx;
}
}
</style>

@ -240,13 +240,21 @@
})
},
//
seeloaction() {
uni.openLocation({
latitude: Number(this.storeList.gasAddressLatitude), //
longitude: Number(this.storeList.gasAddressLongitude), //
name: this.storeList.gasName,
address: this.storeList.gasAddress
})
seeloaction() {
uni.showToast({
title: '当前暂不支持导航',
duration:2000,
icon: "none"
});
// window.open(
// `//uri.amap.com/navigation?from=${app.globalData.longitude},${app.globalData.latitude},&to=${this.storeList.gasAddressLongitude},${this.storeList.gasAddressLatitude},${this.storeList.gasAddress}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
// )
// uni.openLocation({
// latitude: Number(this.storeList.gasAddressLatitude), //
// longitude: Number(this.storeList.gasAddressLongitude), //
// name: this.storeList.gasName,
// address: this.storeList.gasAddress
// })
},
//
showPopup(item) {

@ -197,12 +197,12 @@
},
seeloaction(item) {
uni.openLocation({
latitude: Number(item.latitude), //
longitude: Number(item.longitude), //
name: item.store_name,
address: item.address
})
// uni.openLocation({
// latitude: Number(item.latitude), //
// longitude: Number(item.longitude), //
// name: item.store_name,
// address: item.address
// })
},
changeValue1(item) {
this.distanceName = item.name;

@ -133,12 +133,17 @@
},
//
seeloaction() {
uni.openLocation({
latitude: Number(this.merchanList.latitude), //
longitude: Number(this.merchanList.longitude), //
name: this.merchanList.storeName,
address: this.merchanList.address
})
uni.showToast({
title: '当前暂不支持导航',
duration:2000,
icon: "none"
});
// uni.openLocation({
// latitude: Number(this.merchanList.latitude), //
// longitude: Number(this.merchanList.longitude), //
// name: this.merchanList.storeName,
// address: this.merchanList.address
// })
},
//
getCouponListByStoreId() {

@ -1,103 +1,164 @@
<template>
<view>
<view class="logo">
<view class="img">
<image mode="widthFix" src="../../../static/img/logo2.jpg">
</image>
</view>
</view>
<!-- 账号密码输入框 -->
<view class="form">
<view class="password">
<image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input
placeholder="请输入旧密码" type="number" maxlength="6" v-model="jpasswd" password=true placeholder-style="color: #333333;" />
</view>
<view class="password">
<image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input
placeholder="请输入新密码" type="number" maxlength="6" v-model="xpasswd" password=true placeholder-style="color: #333333;" />
</view>
<view class="btn mart50" @tap="updateUserPayPwd"> </view>
</view>
</view>
</template>
<script>
import {
updateUserPayPwd
} from "../../../Utils/Api.js";
let app =getApp();
export default {
data() {
return {
jpasswd: '',
xpasswd: '',
}
},
methods: {
updateUserPayPwd() {
uni.hideKeyboard();
if (this.jpasswd == '') {
uni.showToast({
title: '请填写旧密码',
icon: "none"
});
return false;
}
if (this.xpasswd == '') {
uni.showToast({
title: '请填写新密码',
icon: "none"
});
return false;
}
uni.showLoading({
title: '设置中...'
})
let datas = {
"password": this.jpasswd,
"newPassword":this.xpasswd
}
updateUserPayPwd(datas).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
title: '修改成功',
<template>
<view>
<view class="logo">
<view class="img">
<image mode="widthFix" src="../../../static/img/logo2.jpg">
</image>
</view>
</view>
<!-- 账号密码输入框 -->
<view class="form re">
<view class="username">
<view class="get-code" style="color: #676767;" @click.stop="getCode()">{{getCodeText}}</view>
<input placeholder="请输入手机号" disabled="true" v-model="phoneNumber" placeholder-style="color: #676767;" />
</view>
<view class="code">
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: #676767;" />
</view>
<!-- <view class="password">
<image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image>
<input placeholder="请输入旧密码" type="number" maxlength="6" v-model="jpasswd" password=true
placeholder-style="color: #333333;" />
</view> -->
<view class="password">
<!-- <image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image> -->
<input placeholder="请输入新密码" type="number" maxlength="6" v-model="xpasswd" password=true
placeholder-style="color: #676767;" />
</view>
<view class="btn mart50" @tap="updateUserPayPwd"> </view>
</view>
</view>
</template>
<script>
import {
updateUserPayPwd,
sendSmsCodeByHw
} from "../../../Utils/Api.js";
let app = getApp();
export default {
data() {
return {
phoneNumber: "",
code: '',
getCodeText: '获取验证码',
getCodeisWaiting: false,
jpasswd: '',
xpasswd: '',
}
},
onLoad() {
this.phoneNumber = app.globalData.userInfo.phone;
},
methods: {
//
getCode() {
uni.hideKeyboard()
if (this.getCodeisWaiting) {
return;
}
uni.showLoading({
title: '发送中...'
})
let params = {
phone: this.phoneNumber,
HWMSG: 6
}
sendSmsCodeByHw(params).then(res => {
if (res.return_code == '000000') {
this.getCodeisWaiting = true;
uni.showToast({
title: '验证码已发送',
icon: "none"
});
this.setTimer();
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: "none"
})
uni.hideLoading()
}
})
},
//
setTimer() {
let holdTime = 60;
this.getCodeText = "重新获取(60)"
this.Timer = setInterval(() => {
if (holdTime <= 0) {
this.getCodeisWaiting = false;
this.getCodeBtnColor = "#ffffff";
this.getCodeText = "获取验证码"
clearInterval(this.Timer);
return;
}
this.getCodeText = "重新获取(" + holdTime + ")"
holdTime--;
}, 1000)
},
//
updateUserPayPwd() {
uni.hideKeyboard();
if (this.code == '') {
uni.showToast({
title: '请填写验证码',
icon: "none",
duration: 2000
});
return false;
}
if (this.xpasswd == '') {
uni.showToast({
title: '请填写新的积分支付密码',
icon: "none",
duration: 2000
});
return false;
}
uni.showLoading({
title: '设置中...'
})
let datas = {
"code": this.code,
"newPassword": this.xpasswd
}
updateUserPayPwd(datas).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
title: '修改成功',
icon: "none",
duration: 2000
});
uni.navigateBack({})
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: "none",
duration:2000
});
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.navigateBack({
})
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss">
@import "../../../static/css/login.scss";
.form {
.res {
display: flex;
justify-content: space-between;
align-items: center;
height: 100upx;
color: rgba($color: #ffffff, $alpha: 0.8);
}
}
duration: 2000
})
}
})
}
}
}
</script>
<style lang="scss">
@import '../../../static/css/login.scss';
.form {
.res {
display: flex;
justify-content: space-between;
align-items: center;
height: 100upx;
color: rgba($color: #ffffff, $alpha: 0.8);
}
}
</style>

@ -86,23 +86,23 @@
<image style="width: 40rpx;height: 40rpx;" src="../../static/img/jt.png"></image>
</view>
</view>
</view>
<view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<view class="width94 comorder mart10">
<view class="height50 width100 backcorfff">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式<text class="jfrecharge" @click="jumpdeposits" v-if="couponList.displayArea == 2|| couponList.displayArea == 4 ">积分充值</text>
支付方式<text class="jfrecharge" @click="jumpdeposits" v-if="couponList.payType == 2">积分充值</text>
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="couponList.displayArea == 2 || couponList.displayArea == 4"></view>
<view class="height50 width100 backcorfff" @tap="paytype='jinbi'" v-if="couponList.displayArea == 2 || couponList.displayArea == 4">
<view class="width94 line1 mart5 marb5" v-if="couponList.payType == 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='jinbi'" v-if="couponList.payType == 2 ">
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text>
</view>
@ -111,8 +111,8 @@
<radio :checked="paytype=='jinbi'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="couponList.displayArea != 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='unionPay'" v-if="couponList.displayArea != 2">
<view class="width94 line1 mart5 marb5" v-if="couponList.payType != 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='unionPay'" v-if="couponList.payType != 2">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
银联支付
</view>
@ -121,6 +121,16 @@
<radio :checked="paytype=='unionPay'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="couponList.payType == 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='gonghuika'" v-if="couponList.payType == 2">
<view class="width70 flleft fcor333 fontwig6 font16" 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;">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
<!-- <view class="width94 line1 mart5 marb5" v-if="couponList.displayArea == 4"></view>
<view class="height50 width100 backcorfff" @tap="paytype='unionPaystags'"
v-if="couponList.displayArea == 4">
@ -198,7 +208,8 @@
orderToGoldPay,
findUser,
unionPay,
hltUnionCardPay
hltUnionCardPay,
getHuiLianTongCardBalance
} from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import ssPaymentPassword from '../../components/sanshui-payment-password'
@ -235,7 +246,7 @@
storeId: '',
isDiscont: false,
coupondiscountid: '',
typeId: '',
typeId: '',
identificationCode: '' //
};
@ -287,6 +298,9 @@
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
if (this.user.hltCardNo) {
this.getHuiLianTongCardBalance();
}
uni.setStorage({
key: "user",
data: res.return_data
@ -294,6 +308,19 @@
}
});
},
//
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.user.hltCardNo.cardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
//
getCouponById() {
uni.showLoading({
@ -477,11 +504,42 @@
that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'unionPay') {
that.unionPay();
} else if (that.paytype == 'unionPaystags') {
} else if (that.paytype == 'unionPaystags') {
//
uni.redirectTo({
url: '../tabBar/order/stagesUrl/stagesUrl?orderid=' + that.orderId
uni.redirectTo({
url: '../tabBar/order/stagesUrl/stagesUrl?orderid=' + that.orderId
})
} else if (that.paytype == 'gonghuika') {
if (that.tongCardPrice < that.paytheprice) {
uni.showToast({
icon: 'none',
title: '工会卡余额不足',
duration: 2000,
});
return;
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../login/updatePas/updatePas'
})
return;
}
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.$refs.paymentPassword.modalFun('show');
} else {
uni.showToast({
title: '请选择支付方式',
@ -490,7 +548,7 @@
})
}
},
//
unionPay() {
let goods = {
@ -549,29 +607,62 @@
uni.showLoading({
title: '支付中...'
})
let params = {
"orderId": this.orderId,
"password": this.PaymentPassword
}
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
});
if (this.paytype == 'jinbi') {
let params = {
"orderId": this.orderId,
"password": this.PaymentPassword
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
});
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
let params = {
"orderId": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
hltUnionCardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
},
//

@ -18,7 +18,7 @@
</view>
<view class="content">
<view class="pay-list">
<view class="row" @tap="paytype='jinbi'">
<view class="row" @tap="paytype='jinbi'" v-if="pryType == 2">
<view class="left">
<image src="../../../static/img/jfx.png"></image>
</view>
@ -29,7 +29,7 @@
<radio :checked="paytype=='jinbi'" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='gonghuika'">
<view class="row" @tap="paytype='unionpay'" v-if="pryType != 2">
<view class="left">
<image mode="widthFix" style="border-radius: 50%;" src="../../../static/img/unionpay.png">
</image>
@ -38,10 +38,10 @@
银联支付
</view>
<view class="right">
<radio :checked="paytype=='gonghuika'" color="#0083f5" />
<radio :checked="paytype=='unionpay'" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='oilcard'" v-if="goodsType == 3">
<view class="row" @tap="paytype='oilcard'" v-if="pryType == 3">
<view class="left">
<image :src="imagewxUrl+imgadres1"></image>
</view>
@ -51,6 +51,17 @@
<view class="right">
<radio :checked="paytype=='oilcard'" @click="changeRiado1()" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='gonghuika'" v-if="pryType == 2">
<view class="left">
<image style="border-radius: 50%;" src="../../../static/img/ghkpay.png"></image>
</view>
<view class="center">
汇联通工会卡(余额:{{tongCardPrice}})
</view>
<view class="right">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
<!-- <view class="width100 line1 mart5 marb5"></view>
<view class="row" @tap="paytype='unionPaystags'">
@ -87,7 +98,8 @@
hltUnionCardPay,
unionPay,
oilCardPay,
findUser
findUser,
getHuiLianTongCardBalance
} from '../../../Utils/Api.js'
import ssPaymentPassword from '../../../components/sanshui-payment-password'
let app = getApp();
@ -138,7 +150,25 @@
this.findUser();
}
},
methods: {
methods: {
//
changeRiado() {
if (!this.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
},
//
changeRiado1() {
if (!this.user.isSetOilCard) {
@ -162,7 +192,10 @@
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;
}
@ -172,11 +205,40 @@
})
}
});
},
//
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.user.hltCardNo.cardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
//
orderToPay() {
let that = this;
if (that.paytype == 'jinbi') {
if (that.paytype == 'jinbi') {
if (that.user.gold < that.amount * 100) {
uni.showToast({
icon: 'none',
title: '积分不足',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/deposit/deposit'
})
}, 1000)
}
});
return;
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
@ -184,7 +246,7 @@
return;
}
that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'gonghuika') {
} else if (that.paytype == 'unionpay') {
that.unionPay();
} else if (that.paytype == 'unionPaystags') {
uni.navigateTo({
@ -213,6 +275,37 @@
return;
}
that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'gonghuika') {
if (that.tongCardPrice < that.amount) {
uni.showToast({
icon: 'none',
title: '工会卡余额不足',
duration: 2000,
});
return;
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.$refs.paymentPassword.modalFun('show');
} else {
uni.showToast({
title: '请选择支付方式',

File diff suppressed because it is too large Load Diff

@ -258,9 +258,12 @@
}
findByLatAndLng(datas).then(res => {
if (res.return_code == '000000') {
app.globalData.qianzhuCityName = res.return_data.result.addressComponent.city;
// res.return_data.provinceName
app.globalData.cityName = res.return_data.provinceName;
app.globalData.qianzhuCityName = res.return_data.cityName;
app.globalData.cityId = res.return_data.regionId;
// app.globalData.cityId = '520000';
app.globalData.companyId = res.return_data.companyId;
}
});
},

@ -275,7 +275,7 @@
},
{
url: '../../login/updatePas/updatePas',
text: '设置密码',
text: '设置积分密码',
img: '../../../static/img/pas.png',
type: 2
},
@ -296,7 +296,7 @@
},
{
url: '../../login/updatePas/resetPas',
text: '修改密码',
text: '修改积分密码',
img: '../../../static/img/pas.png',
type: 2
},

@ -1,30 +1,68 @@
<template>
<view>
<image class="width100" mode="widthFix" src="../../../static/img/unionimg/upay3.jpg"></image>
<image class="width94 mart20" mode="widthFix" src="../../../static/img/unionimg/upay4.jpg" @click="jumprecent(1)"></image>
<image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay2.jpg" @click="jumprecent(2)"></image>
<image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay1.jpg" @click="jumprecent(3)"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
//
jumprecent(item){
uni.navigateTo({
url: '../recharge-centre/recharge-centre?id='+ item
})
}
}
}
</script>
<style>
<template>
<view>
<image class="width100" mode="widthFix" src="../../../static/img/unionimg/upay3.jpg"></image>
<image class="width94 mart20" mode="widthFix" src="../../../static/img/unionimg/upay4.jpg"
@click="jumprecent(1)"></image>
<image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay2.jpg"
@click="jumprecent(2)"></image>
<image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay1.jpg"
@click="jumprecent(3)"></image>
<wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6" :showCloseIcon="true">
<image class="popImg" :src="imageUrl+imgadres1"></image>
</wybPopup>
</view>
</template>
<script>
import {
getCmsContent
} from '../../../Utils/Api.js'
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
let app = getApp();
export default {
components: {
wybPopup
},
data() {
return {
imageUrl: app.globalData.imgUrl,
imgadres1: '',
}
},
onLoad() {
this.getCmsAactibity();
},
methods: {
//
jumprecent(item) {
uni.navigateTo({
url: '../recharge-centre/recharge-centre?id=' + item
})
},
//
getCmsAactibity() {
let params = {
regionId: app.globalData.cityId,
categoryCode: 'CMS_TELEPHONE_POP_UP'
}
getCmsContent(params).then(res => {
if (res.return_code == '000000' && res.return_data != '') {
//广
this.imgadres1 = res.return_data[0].imgData;
this.showPopup();
}
});
},
//
showPopup() {
this.$refs.popup.show();
}
}
}
</script>
<style lang="scss">
.popImg {
width: 100%;
height: 430px;
}
</style>

@ -2,9 +2,12 @@
<view>
<view class="width94 comorder">
<view class="height100p width94 goodsimg">
<image class="flleft" mode="widthFix" v-if="rechargeModel == 3" src="../../../static/img/cz1.jpg"></image>
<image class="flleft" mode="widthFix" v-if="rechargeModel == 2" src="../../../static/img/cz3.jpg"></image>
<image class="flleft" mode="widthFix" v-if="rechargeModel == 1" src="../../../static/img/cz2.jpg"></image>
<image class="flleft" mode="widthFix" v-if="rechargeModel == 3" src="../../../static/img/cz1.jpg">
</image>
<image class="flleft" mode="widthFix" v-if="rechargeModel == 2" src="../../../static/img/cz3.jpg">
</image>
<image class="flleft" mode="widthFix" v-if="rechargeModel == 1" src="../../../static/img/cz2.jpg">
</image>
<view class="tcrig">
<view class="font18 fontwig6 fcor333 text1" v-if="rechargeModel == 1">电信话费充值</view>
<view class="font18 fontwig6 fcor333 text1" v-if="rechargeModel == 2">移动话费充值</view>
@ -80,6 +83,26 @@
</view>
</view>
<view class="width94 line1 mart5 marb5"></view>
<view class="height40 width100 backcorfff">
<view class="width40 flleft fcor666 font15 fontwig6 text1 alijusstart" style="padding-left: 2%;">
<image src="../../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;">
{{rebateIntegral}}积分
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<image src="../../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
<view class="width94 line1 marb5"></view>
<view class="height50 width100 backcorfff">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式
@ -126,17 +149,24 @@
</view>
<wybPopup ref="popup" type="bottom" width="500" scrollY="true" radius="6" :showCloseIcon="true">
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view>
<view class="width92 height110 tccs mart10" v-for="(items, index) in OrderPreList" :key="items"
<view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="items"
@click="radioChanges(items)">
<image mode="widthFix" class="flleft mart10" :src="imageUrl+items.discountImg"></image>
<view class="contrig">
<view class="width80p flleft">
<view class="font16 fontwig6 fcor333 text1 paddtop25">{{items.discountName}}</view>
<image mode="widthFix" :src="imageUrl+items.discountImg"></image>
<view class="alijus width60 margle10">
<view class="width80p">
<view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view>
<view class="font13 fcor999 mart5">有效期至{{items.useEndTime | timeFormat('yyyy-mm-dd')}}</view>
</view>
<view class="width20 flright">
<view class="yhprice">
<radio color="#0083f5" :checked="items.id == memDiscountId" />
<view class="width20 fotrt">
<view>
<radio color="#0083f5"
v-if="items.discountCondition && orderPrice > items.discountCondition"
:checked="items.id == memDiscountId" />
<radio color="#0083f5"
v-if="items.discountCondition && orderPrice < items.discountCondition" disabled="true"
:checked="items.id == memDiscountId" />
<radio color="#0083f5" v-if="!items.discountCondition"
:checked="items.id == memDiscountId" />
</view>
</view>
</view>
@ -154,9 +184,10 @@
hltUnionCardPayghk,
getHuiLianTongCardBalance,
getUserOrderPreList,
findById
findById,
getRebateIntegral
} from '../../../Utils/Api.js';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '../../../components/cj-slider/cj-slider.vue';
import ssPaymentPassword from '../../../components/sanshui-payment-password';
let app = getApp();
@ -176,7 +207,7 @@
radioStatus: true,
memDiscountId: '',
user: '',
paytype: '',
paytype: '4',
PaymentPassword: '',
orderId: '',
jumpType: '',
@ -197,7 +228,9 @@
changePrice: '', //
isDiscount: true,
availIntegal: '', //
isUse: true //
isUse: true, //
rebateIntegral: '', //
Integrastu: 1 //
};
},
@ -254,6 +287,7 @@
this.user = res.return_data;
this.findById();
this.getHuiLianTongCardBalance();
this.getRebateIntegral();
uni.setStorage({
key: "user",
data: res.return_data
@ -261,6 +295,24 @@
}
});
},
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.payPrice,
"productId": this.rechargeModel,
"type": 3,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
} else {
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
//
getUserOrderPreList() {
let params = {
@ -300,7 +352,7 @@
},
//
radioChanges(item) {
this.paytheprice = this.orderPrice;
this.paytheprice = this.orderPrice;
this.rechangeload();
if (this.memDiscountId == item.id) { //
this.memDiscountId = '';
@ -337,7 +389,7 @@
let pprice = parseFloat(item * 100).toFixed(0);
let payprice = parseFloat(item * 100 * zkprice).toFixed(0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
this.availIntegal = this.user.gold;
this.priceValue[1] = 0;
// if (this.availIntegal < this.priceValue[1]) {
// this.priceValue[1] = this.user.gold;
@ -346,7 +398,7 @@
} else {
this.availIntegal = payprice;
this.priceValue[1] = 0;
}
}
this.reload();
this.calculatepayPrice();
},
@ -358,11 +410,12 @@
} else {
this.payPrice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this
.deductionPrice).toFixed(2);
}
},
rechangeload() {
this.isUse = false;
this.$nextTick(() => (this.isUse = true))
}
this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
this.$nextTick(() => (this.isUse = true))
},
//
reload() {
@ -388,45 +441,45 @@
duration: 2000
})
return;
}
let params = {
"memDiscountId": that.memDiscountId,
"rechargeContent": that.rechargeContent,
"goodsId": that.objectId,
"integralNum": that.priceValue[1],
"password": ''
}
uni.showLoading({
title: '加载中...'
})
addOrderPay(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
that.orderToUnionPay(res.return_data.id);
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
}
let params = {
"memDiscountId": that.memDiscountId,
"rechargeContent": that.rechargeContent,
"goodsId": that.objectId,
"integralNum": that.priceValue[1],
"password": ''
}
uni.showLoading({
title: '加载中...'
})
addOrderPay(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
that.orderToUnionPay(res.return_data.id);
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
})
},
//
orderToUnionPay(item) {
let params = {
"orderId": item
}
orderToUnionPay(params).then(res => {
if (res.return_code == '000000') {
this.uniontopay(res.return_data.prepayid, item);
} else {
uni.showToast({
title: res.return_msg,
icon: 'none'
})
}
})
},
//
orderToUnionPay(item) {
let params = {
"orderId": item
}
orderToUnionPay(params).then(res => {
if (res.return_code == '000000') {
this.uniontopay(res.return_data.prepayid,item);
} else {
uni.showToast({
title: res.return_msg,
icon: 'none'
})
}
})
},
//
changeRiado() {
@ -494,32 +547,32 @@
icon: 'none',
duration: 2000
})
},
//
uniontopay(item,item1) {
let that = this;
upsdk.pluginReady(function() {
upsdk.pay({
tn: item,
success: function(res) {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../Phone-recharge-details/Phone-recharge-details?id=' +
item1
})
},
fail: function(err) {
uni.navigateBack({})
uni.showToast({
title: err.msg,
icon: 'none',
duration: 2000
})
}
});
});
},
//
uniontopay(item, item1) {
let that = this;
upsdk.pluginReady(function() {
upsdk.pay({
tn: item,
success: function(res) {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../Phone-recharge-details/Phone-recharge-details?id=' +
item1
})
},
fail: function(err) {
uni.navigateBack({})
uni.showToast({
title: err.msg,
icon: 'none',
duration: 2000
})
}
});
});
},
submitHandle(e) {
uni.showLoading({
@ -547,7 +600,7 @@
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
uni.reLaunch({
uni.reLaunch({
url: '../Phone-recharge-details/Phone-recharge-details?id=' +
this.orderId
})
@ -617,6 +670,7 @@
} else {
this.isUse = true;
}
this.getRebateIntegral();
},
}
@ -739,10 +793,8 @@
border-radius: 8px;
image {
float: left;
width: 170rpx;
max-height: 170rpx;
margin-left: 10px;
width: 160rpx;
max-height: 160rpx;
}
}

@ -5,20 +5,20 @@
<view class="username paddtop10">
<picker mode="selector" style="width: 90%;" :range="cardList" range-key="codeName"
@change="changeUserCard">
<view class="date text1" style="padding: 0 25rpx;">{{typeName}}</view>
<view class="date text1" >{{typeName}}</view>
</picker>
<image class="flright" style="width: 15px;height: 15px;" src="../../../static/img/downj.png"></image>
</view>
<!-- <view class="username paddtop10" v-if="UserCard && type == 2">
<view class="username paddtop10" v-if="UserCard">
<picker mode="selector" style="width: 90%;" :range="UserCard" range-key="cardNo" @change="bindUserCard">
<view class="date text1">{{cardNoNumber}}</view>
<view class="date text1" style="padding: 0 25rpx;">{{cardNoNumber}}</view>
</picker>
<image class="flright" style="width: 15px;height: 15px;" src="../../../static/img/downj.png"></image>
</view> -->
</view>
<view class="username">
<view class="username" v-if="!UserCard">
<input style="width: 100%;" :disabled="disStute" maxlength="19" placeholder="请输入卡号"
v-model="cardNoNumber" placeholder-style="color: #333333;" />
</view>
@ -32,17 +32,17 @@
<view class="btn mart50" @tap="bindHuiLianTongCard" v-if="phoneNumber">绑定卡号</view>
<view class="btn mart50" @tap="doCardNonum" v-else>获取预留手机号</view>
</view>
<view class="width90 mart20 height120 backcorfff fotct" style="position: absolute;top: 70%;" v-if="type == 1">
<!-- <view class="width90 mart20 height120 backcorfff fotct" style="position: absolute;top: 70%;" v-if="type == 1">
<view class="fontlet font20 fcor666 fontwig6 height45l " style="border-bottom: 1px solid #F4F4F4;">温馨提示
</view>
<view class="fontlet font20 fcor666 fontwig6 height45l paddtop10">1元可抵扣100积分</view>
</view>
</view> -->
</view>
</template>
<script>
import md5 from "@/common/SDK/md5.min.js";
import {
import {
sendSmsCodeByHw,
getHuiLianTongCardByCardNo,
getDetailByCardNo,
@ -70,7 +70,6 @@
},
onLoad(options) {
this.user = app.globalData.userInfo;
// this.getHuiLianTongCardByPhone();
this.getDictionaryByCodeType();
},
@ -84,13 +83,16 @@
if (res.return_code == '000000') {
this.cardList = res.return_data;
this.type = res.return_data[0].codeValue;
if (this.type == 1) {
this.getHuiLianTongCardByPhone();
}
this.typeName = res.return_data[0].codeName;
}
})
},
//
getHuiLianTongCardByPhone() {
let params = {
let params = {
phone: this.user.phone
}
uni.showLoading();
@ -98,7 +100,11 @@
uni.hideLoading();
if (res.return_code == '000000' && res.return_data != '') {
this.UserCard = res.return_data;
this.cardNoNumber = res.return_data[0].cardNo;
this.cardNoNumber = res.return_data[0].cardNo;
let params = {
cardNo: this.cardNoNumber
}
this.getHuiLianTongCardByCardNo(params);
return;
}
this.UserCard = '';
@ -106,15 +112,22 @@
},
//
changeUserCard(e) {
this.type = this.cardList[e.target.value].codeValue;
this.typeName = this.cardList[e.target.value].codeName;
this.cardNoNumber = '';
this.phoneNumber = '';
this.type = this.cardList[e.target.value].codeValue;
if(this.type == 1){
this.getHuiLianTongCardByPhone();
}
this.typeName = this.cardList[e.target.value].codeName;
this.cardNoNumber = '';
this.phoneNumber = '';
this.disStute = false;
},
//
bindUserCard(e) {
this.cardNoNumber = this.UserCard[e.target.value].cardNo;
this.cardNoNumber = this.UserCard[e.target.value].cardNo;
let params = {
cardNo: this.cardNoNumber
}
this.getHuiLianTongCardByCardNo(params);
},
getCode() {
uni.hideKeyboard()
@ -132,8 +145,8 @@
title: '发送中...'
})
let params = {
phone: this.phoneNumber,
HWMSG:1
phone: this.phoneNumber,
HWMSG: 1
}
sendSmsCodeByHw(params).then(res => {
if (res.return_code == '000000') {
@ -284,8 +297,7 @@
duration: 2000,
success() {
setTimeout(() => {
uni.navigateBack({
})
uni.navigateBack({})
}, 1000)
}
});

@ -105,15 +105,17 @@
},
//
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
})
if (this.typeid == 2) {
uni.navigateTo({
url: '../menu-list/menu-list?storeCode=' + item.code + '&sttime=' + item.startTime +
'&entime=' + item.endTime
})
}
if (this.typeid == 1) {
uni.navigateTo({
url: '../kfc-menu-list/kfc-menu-list?storeCode=' + item.storeCode + '&sttime=' + item
.startTime + '&entime=' + item.endTime
})
}
},
//

@ -113,7 +113,27 @@
<view class="width20 flright fotrt paddtright10 font15 fcor666 alijun" style="align-items: center;">
¥{{priceValue[1] / 100}}
</view>
</view>
</view>
<view class="width94 line1 marb5"></view>
<view class="height40 width100 backcorfff">
<view class="width40 flleft fcor666 font15 text1 alijusstart" style="padding-left: 2%;">
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;">
{{rebateIntegral}}积分
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
<view class="width94 line1 marb5"></view>
<view class="height50 width100">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式
@ -214,17 +234,17 @@
<wybPopup ref="popup" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view>
<view class="width92 height110 tccs mart10" v-for="(items, index) in OrderPreList" :key="index"
<view class="width92 height110 tccs mart10 alijus" v-for="(items, index) in OrderPreList" :key="index"
@click="radioChanges(items)">
<image mode="widthFix" class="mart10" :src="imageUrl+items.discountImg"></image>
<view class="contrig">
<view class="width80p flleft">
<view class="font16 fontwig6 fcor333 text1 paddtop25">{{items.discountName}}</view>
<image mode="widthFix" :src="imageUrl+items.discountImg"></image>
<view class="alijus width60 margle10">
<view class="width80p">
<view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view>
<view class="font13 fcor999 mart5">有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
</view>
<view class="width20 flright">
<view class="yhprice">
<view class="width20 fotrt">
<view>
<radio v-if="typeid == 1 && items.discountCondition && orderPrice > items.discountCondition"
color="#c72a20" :checked="items.id == memDiscountId" />
@ -262,7 +282,8 @@
findUser,
qianzhuorderToUnionPay,
czhltUnionCardPay,
getUserOrderPreList
getUserOrderPreList,
getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
var jweixin = require('jweixin-module');
@ -278,7 +299,7 @@
return {
orderList: [],
sttypeid: 1,
paytype: '', //
paytype: '4', //
typeid: app.globalData.distinguishid, //
priceValue: [0, 0], //
availIntegal: 0, //
@ -304,7 +325,9 @@
OrderPreList: [], //
imageUrl: app.globalData.imgUrl, //
orderPrice: 0, //
rechargeDes: '', //
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 //
}
},
onLoad() {
@ -348,6 +371,24 @@
}
}
});
},
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.payPrice,
"productId": this.productType,
"type": 4,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
} else {
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
//
findUser() {
@ -357,7 +398,8 @@
this.user = res.return_data;
this.getHuiLianTongCardBalance();
this.getThirdPartyByDetail();
this.getUserOrderPreList();
this.getUserOrderPreList();
this.getRebateIntegral();
uni.setStorage({
key: "user",
data: res.return_data
@ -452,7 +494,8 @@
this.paytype = '';
} else {
this.isUse = true;
}
}
this.getRebateIntegral();
},
//
changeRiado() {
@ -660,7 +703,9 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
}
}
this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@ -941,16 +986,16 @@
margin-left: 180rpx;
}
.tccs {
box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.2);
border: 1px solid #f6f6f6;
border-radius: 8px;
image {
float: left;
width: 170rpx;
max-height: 170rpx;
margin-left: 10px;
}
.tccs {
box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.2);
border: 1px solid #f6f6f6;
border-radius: 8px;
image {
// float: left;
width: 160rpx;
max-height: 160rpx;
// margin-left: 10px;
}
}
</style>

@ -1,19 +1,17 @@
<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 class="width100" v-if="flist ==''">
<view class="width100 height40 font14 padleft15 alijusstart"
style="background-color: #e7f2ea;color: #4e8a5c;">
<image class="icon20 paddtright5" mode="widthFix" src="../static/imgs/horn.png"></image>
营业时间{{starttime}}{{endtime}}.
</view>
<view v-if="flist == '' " class="width100 mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="width90 mart5 font12 fcor999">前门西大街正阳市场1号楼中部</view>
</view> -->
</view>
<scroll-view scroll-y class="left-aside">
<scroll-view scroll-y class="left-aside" v-if="flist !=''">
<view v-for="(item,index) in flist" :key="index" class="f-item" :class="{active: item.name == currentId}"
@click="tabtap(item)">
<view class="width100 fotct">
@ -26,8 +24,8 @@
</scroll-view>
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll"
:scroll-top="tabScrollTop">
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop"
v-if="flist !='' ">
<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>
@ -36,7 +34,7 @@
{{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)">
:key="index">
<view class="paddtop10 width94 font16 fcor333 fotrt fontwig6 text2">
{{titem.productName}}
</view>
@ -59,10 +57,22 @@
v-if="titem.originalPrice == titem.salePrice" style="text-decoration: line-through;">
</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 class="mart10 icon-click fotrt alijusend" v-if="titem.productId">
<image class="btn-reduce" mode="widthFix" src="../static/imgs/reduce.png"
v-if="titem.count > 0" @click="deletenums(titem)"></image>
<view class="num fcorfff" style="background: #d90209;" v-if="titem.count > 0">
{{titem.count}}
</view>
<image class="btn-plus" mode="widthFix" src="../static/imgs/plus.png"
@click="showPopups(titem)"></image>
</view>
<view class="mart10 icon-click fotrt alijusend" v-else>
<view class="num fcorfff font14" style="background: #d90209;" @click="showPopups(titem)">
选规格
</view>
<view class="unibadge" v-if="titem.count > 0">
{{titem.count}}</view>
</view>
</view>
@ -72,12 +82,13 @@
</view>
</scroll-view>
<shopcart :goods="shoppingcart" @add="addCart" @dec="decreaseCart" @input="inputCart" @delAll="delAll">
<shopcart v-if="flist !='' " :goods="shoppingcart" @add="addCart" @dec="decreaseCart"
@delAll="delAll">
</shopcart>
<!-- 弹窗选择规格 -->
<wybPopup ref="popup" type="bottom" width="500" height="700" scrollY="true" radius="6" :showCloseIcon="true">
<wybPopup ref="popup" type="bottom" width="500" height="700" 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>
@ -139,11 +150,17 @@
kfcname: '', //
kfcimgs: '', //
kfcprice: '', //
kfcoldprice: '' //
kfcoldprice: '', //
starttime: '', //
endtime: '', //
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'storeClose.png',
}
},
onLoad(options) {
this.storeCode = options.storeCode;
this.starttime = options.sttime;
this.endtime = options.entime;
this.listByStoreCode();
},
methods: {
@ -232,6 +249,21 @@
addCart: function(item) {
if (item.num >= 0) {
item.num++
for (var i = 0; i < this.tlist.length; i++) {
if (this.tlist[i].productId && item.productId == this.tlist[i].productId) {
this.tlist[i].count = item.num;
}
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (item.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = item.num
}
}
}
}
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
good.num = item.num
@ -248,27 +280,25 @@
decreaseCart(item) {
if (item.num) {
item.num--
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
good.num = item.num
})
}
},
inputCart: function(item) {
if (item.num >= 0) {
item.num++
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
good.num = item.num + -1
})
for (var i = 0; i < this.tlist.length; i++) {
if (this.tlist[i].productId && item.productId == this.tlist[i].productId) {
this.tlist[i].count = this.tlist[i].count - 1;
}
} else {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (item.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count - 1;
}
}
}
}
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
Vue.set(good, 'count', 1)
good.num = item.num
})
}
},
//
delAll() {
@ -276,13 +306,34 @@
if (good.num) {
good.num = 0
}
})
})
for (var i = 0; i < this.tlist.length; i++) {
this.tlist[i].count = 0;
}
this.shoppingcart = [];
app.globalData.qianzhulist = '';
},
//
deletenums(item) {
if (item.count) {
item.count--
for (var i = 0; i < this.tlist.length; i++) {
if (this.tlist[i].productId && item.productId == this.tlist[i].productId) {
this.tlist[i].count = item.count;
}
}
this.shoppingcart.forEach((good) => {
if (item.productName == good.name)
good.num = item.count
})
}
},
//
showPopups(item) {
let that = this;
that.nums = 1;
that.nums = 1;
if (item.productId) {
that.productId = item.productId;
// that.kdjchangelist = item;
@ -299,7 +350,7 @@
"imgs": that.kfcimgs,
"price": that.kfcprice,
"oldprice": that.kfcoldprice
}
}
that.shoppingcart.push(datas);
uni.showLoading({
title: '添加中...'
@ -311,12 +362,12 @@
} else {
let indexs = 1;
for (var i = 0; i < that.shoppingcart.length; i++) {
if (that.shoppingcart[i].name == that.kfcname) {
indexs = 0;
if (that.shoppingcart[i].name == that.kfcname) {
indexs = 0;
that.shoppingcart[i].num = that.shoppingcart[i].num + 1;
}
}
if (indexs != 0) {
if (indexs != 0) {
let datas = {
"num": 1,
"storeCode": that.storeCode,
@ -325,8 +376,8 @@
"imgs": that.kfcimgs,
"price": that.kfcprice,
"oldprice": that.kfcoldprice
}
that.shoppingcart.push(datas);
}
that.shoppingcart.push(datas);
uni.showLoading({
title: '添加中...'
})
@ -335,17 +386,24 @@
}, 1000);
}
}
}else{
that.kdjchangelist = item.specGroups;
that.kfcimgs = item.specGroups[0].productImageUrl;
that.productId = item.specGroups[0].productId;
that.kfcprice = item.specGroups[0].salePrice;
that.kfcname = item.specGroups[0].productName;
that.kfcoldprice = item.specGroups[0].originalPrice;
that.$refs.popup.show();
}
for (var i = 0; i < that.tlist.length; i++) {
if (that.tlist[i].productId && item.productId == that.tlist[i].productId) {
that.tlist[i].count = that.tlist[i].count + 1
}
}
} else {
that.kdjchangelist = item.specGroups;
that.kfcimgs = item.specGroups[0].productImageUrl;
that.productId = item.specGroups[0].productId;
that.kfcprice = item.specGroups[0].salePrice;
that.kfcname = item.specGroups[0].productName;
that.kfcoldprice = item.specGroups[0].originalPrice;
that.$refs.popup.show();
}
},
//
changetype(item) {
this.productId = item.productId;
@ -367,7 +425,17 @@
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
}
this.$refs.popup.hide();
return;
}
@ -375,7 +443,17 @@
for (var i = 0; i < this.shoppingcart.length; i++) {
if (this.shoppingcart[i].name == this.kfcname) {
indexs = 0;
this.shoppingcart[i].num = this.shoppingcart[i].num + this.nums;
this.shoppingcart[i].num = this.shoppingcart[i].num + this.nums;
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
}
}
}
if (indexs != 0) {
@ -388,29 +466,39 @@
"price": this.kfcprice,
"oldprice": this.kfcoldprice
}
this.shoppingcart.push(datas);
this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) {
if (!this.tlist[i].productId) {
for (var k = 0; k < this.tlist[i].specGroups.length; k++) {
if (this.productId == this.tlist[i].specGroups[k].productId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
}
}
this.$refs.popup.hide();
},
//key
checinfo(item, item1) {
const keys1 = Object.keys(item);
const keys2 = Object.keys(item1);
if (keys1.length !== keys2.length) {
return false;
}
for (let index = 0; index < keys1.length; index++) {
const val1 = item[keys1[index]];
const val2 = item1[keys2[index]];
if (keys2[index] !== 'num') {
if (val1 !== val2) {
return false;
}
}
}
return true;
},
//key
checinfo(item, item1) {
const keys1 = Object.keys(item);
const keys2 = Object.keys(item1);
if (keys1.length !== keys2.length) {
return false;
}
for (let index = 0; index < keys1.length; index++) {
const val1 = item[keys1[index]];
const val2 = item1[keys2[index]];
if (keys2[index] !== 'num') {
if (val1 !== val2) {
return false;
}
}
}
return true;
},
//
navToList() {
@ -509,6 +597,7 @@
border-radius: 15px;
background: #fff;
min-height: 150px;
&:after {
content: '';
flex: 99;
@ -518,7 +607,7 @@
}
.qzgoodsimg {
margin-top: -10px;
margin-top: -10px;
min-height: 100px;
width: 120px;
}
@ -577,5 +666,19 @@
.wybfot {
position: fixed;
bottom: 0px;
}
.unibadge {
background: #000;
width: 20px;
height: 20px;
border-radius: 50%;
font-size: 9px;
color: #fff;
line-height: 20px;
text-align: center;
position: absolute;
margin-top: -15px;
margin-right: -5px;
}
</style>

@ -1,19 +1,17 @@
<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 class="width100" v-if="flist ==''">
<view class="width100 height40 font14 padleft15 alijusstart"
style="background-color: #e7f2ea;color: #4e8a5c;">
<image class="icon20 paddtright5" mode="widthFix" src="../static/imgs/horn.png"></image>
营业时间{{starttime}}{{endtime}}.
</view>
<view v-if="flist == '' " class="width100 mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="width90 mart5 font12 fcor999">前门西大街正阳市场1号楼中部</view>
</view> -->
</view>
<scroll-view scroll-y class="left-aside">
<scroll-view scroll-y class="left-aside" v-if="flist != '' ">
<view v-for="item in flist" :key="item.id" class="f-item" :class="{active: item.id === currentId}"
@click="tabtap(item)">
<view class="width100 fotct">
@ -26,8 +24,8 @@
</scroll-view>
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll"
:scroll-top="tabScrollTop">
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop"
v-if="flist != '' ">
<view v-for="item in slist" :key="item.id" :id="'main-'+item.id">
<view class="s-item width90">
<text class="promotion_mixg1 backcor99" style="margin-right: -3px;"></text>
@ -36,7 +34,7 @@
{{item.name}}
</view>
<view v-if="titem.ext1 == item.id" class="t-list mart10 paddbotm10" v-for="titem in tlist"
:key="titem.id" @click="showPopup(titem)">
:key="titem.id">
<view class="paddtop10 width94 font16 fcor333 fotrt fontwig6 text2">
{{titem.name}}
</view>
@ -44,7 +42,7 @@
<image :src="titem.defaultImage" mode="widthFix" class="qzgoodsimg"></image>
<view class="width50 fotrt">
<view class="width100 font12 color2f6f43">¥<text
class="font18 fontwig6 margle">{{titem.salesTallPrice}}</text>
class="font18 fontwig6 margle">{{titem.showPrice}}</text>
</view>
<view class="width100 font14 mart5 color2f6f43"
v-if="titem.marketTallPrice != titem.salesTallPrice">
@ -62,10 +60,16 @@
style="text-decoration: line-through;">
</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/blueplus.png"></image>
<view class="mart10 icon-click fotrt alijusend">
<!-- <image class="btn-reduce" mode="widthFix" src="../static/imgs/wreduce.png"
@click="deletenums(titem)" v-if="titem.count > 0"></image> -->
<view class="num fcorfff font14" style="background: #4e8a5c;" @click="showPopup(titem)">
选规格
</view>
<view class="unibadge" v-if="titem.count > 0">
{{titem.count}}</view>
<!-- <image class="btn-plus" mode="widthFix" src="../static/imgs/blueplus.png"
@click="showPopup(titem)"></image> -->
</view>
</view>
</view>
@ -74,7 +78,7 @@
</view>
</scroll-view>
<shopcart :goods="shoppingcart" @add="addCart" @dec="decreaseCart" @input="inputCart" @delAll="delAll">
<shopcart v-if="flist !=''" :goods="shoppingcart" @add="addCart" @dec="decreaseCart" @delAll="delAll">
</shopcart>
@ -199,11 +203,17 @@
shoppingcart: [], //
productId: '', //id
salesTallPrice: '', //
marketTallPrice: '' //
marketTallPrice: '', //
starttime: '', //
endtime: '', //
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'storeClose.png',
}
},
onLoad(options) {
this.storeCode = options.storeCode;
this.starttime = options.sttime;
this.endtime = options.entime;
this.getStarbucksProducts();
},
methods: {
@ -290,6 +300,12 @@
//
addCart: function(item) {
if (item.num >= 0) {
for (var i = 0; i < this.tlist.length; i++) {
if (item.productId == this.tlist[i].goodsId) {
this.tlist[i].count = this.tlist[i].count + 1;
}
}
this.shoppingcart.forEach((good) => {
if (JSON.stringify(item) == JSON.stringify(good)) {
item.num++
@ -303,11 +319,16 @@
Vue.set(good, 'count', 1)
})
}
},
decreaseCart(item) {
if (item.num) {
item.num--
for (var i = 0; i < this.tlist.length; i++) {
if (item.productId == this.tlist[i].goodsId) {
this.tlist[i].count = this.tlist[i].count - 1;
}
}
this.shoppingcart.forEach((good) => {
if (this.checinfo(good, item) === true) {
good.num = item.num
@ -315,24 +336,17 @@
})
}
},
inputCart: function(item) {
if (item.num >= 0) {
item.num++
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
good.num = item.num + -1
})
} else {
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
Vue.set(good, 'count', 1)
})
}
},
//
delAll() {
this.shoppingcart.forEach((good) => {
if (good.num) {
good.num = 0
}
})
for (var i = 0; i < this.tlist.length; i++) {
this.tlist[i].count = 0;
}
this.shoppingcart = [];
},
//
@ -427,15 +441,31 @@
this.shoppingcart.forEach((good) => {
if (this.checinfo(good, datas) === true) {
good.num = good.num + this.nums;
for (var i = 0; i < this.tlist.length; i++) {
if (this.cbkchangelist.goodsId == this.tlist[i].goodsId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
istue = 1;
}
})
if (istue == 0) {
this.shoppingcart.push(datas);
for (var i = 0; i < this.tlist.length; i++) {
if (this.cbkchangelist.goodsId == this.tlist[i].goodsId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
}
} else {
for (var i = 0; i < this.tlist.length; i++) {
if (this.cbkchangelist.goodsId == this.tlist[i].goodsId) {
this.tlist[i].count = this.tlist[i].count + this.nums
}
}
this.shoppingcart.push(datas);
}
}
this.$refs.popup.hide();
},
//key
@ -619,4 +649,18 @@
position: fixed;
bottom: 0px;
}
.unibadge {
background: #000;
width: 20px;
height: 20px;
border-radius: 50%;
font-size: 9px;
color: #fff;
line-height: 20px;
text-align: center;
position: absolute;
margin-top: -15px;
margin-right: -5px;
}
</style>

@ -29,19 +29,26 @@
<view v-if="(orderList.orderStatus == 2 || orderList.orderStatus == 3 ) && typeid != 10">
<view class="fotct font14 width100 fcor999">您的取餐码为</view>
<view v-if="typeid == 4 && orderList.list">
<view v-if="typeid == 4 && orderList.list && phonestu == 2">
<view class="width90 alijusstart mart20" v-for="(item,index) in orderList.list" :key='index'>
<view class="font14 width50 fcor666">取餐号: <text class="colorc3 font18">{{item.code}}</text>
</view>
<view class="font14 width50 fcor666">手机尾号: <text class="colorc3 font18">{{item.phone}}</text>
</view>
</view>
</view>
<view class="fotct" v-if="typeid == 4 && orderList.list && phonestu == 1">
<view class="width90 alicntend mart10 " v-for="(item,index) in orderList.list" :key='index'>
<view class="font14 width100 fcor666">取餐号: <text class="colorc3 font18">{{item.code}}</text>
</view>
</view>
</view>
<view v-if="typeid == 9 && orderList.object.orderItems[0].code">
<view class="fotct font18 width100 mart10 color2f6f43"
v-for="(item,index) in orderList.object.orderItems" :key='index'>{{item.code}}</view>
</view>
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && orderList.list">请取餐</view>
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && orderList.list">请取餐</view>
<view class="phoneck" v-if="typeid == 4 && orderList.list && phonestu == 1" @click="updatestu">查看手机号</view>
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !orderList.list">
{{orderList.statusDesc}}
</view>
@ -189,7 +196,8 @@
5: '已取消',
6: '退款中',
7: '退款失败'
},
},
phonestu: 1 //
}
},
onLoad(options) {
@ -202,7 +210,11 @@
clearInterval(this.timer);
clearInterval(this.timerdjs);
},
methods: {
methods: {
//
updatestu() {
this.phonestu = 2
},
getAllCount() {
this.orderList.highChildOrderList.forEach((food) => {
this.coutnums += food.saleCount
@ -210,14 +222,14 @@
},
//
getThirdOrderByOrderId() {
uni.showLoading({
title: '加载中...'
})
// uni.showLoading({
// title: '...'
// })
let datas = {
orderId: this.orderId
}
getThirdOrderByOrderId(datas).then(res => {
uni.hideLoading();
// uni.hideLoading();
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
@ -412,5 +424,17 @@
width: 80px;
border-radius: 25px;
text-align: center;
}
.phoneck {
height: 35px;
width: 120px;
line-height: 35px;
font-size: 14px;
border-radius: 39px;
border: 1px solid #CD2314;
box-sizing: border-box;
color: #CD2314;
margin: 10px auto;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -240,6 +240,10 @@ $uni-font-size-paragraph:30upx;
}
.color2f6f43 {
color: #2f6f43;
}
.colore95{
color: #e95845;
}
.backcorf2f6 {

Loading…
Cancel
Save