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 : '', balancePrice : '',
balanceCardNo:'', balanceCardNo:'',
identificationCode:'', identificationCode:'',
//id
companyId:'',
//ID //ID
storeid:'', storeid:'',
// //

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

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

@ -19,6 +19,12 @@
</view> </view>
</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"> <view v-if="goodsList == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view> </view>
@ -40,12 +46,12 @@
<view class="slogan" v-if="row.discountPrice !== row.salesPrice"> <view class="slogan" v-if="row.discountPrice !== row.salesPrice">
<!-- <image v-if="row.payType != 1" style="width: 15px;height: 15px;vertical-align: sub;" <!-- <image v-if="row.payType != 1" style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png"> src="../../../static/img/jfh.png">
</image>{{ row.salesPrice*100}} <text v-else></text>{{row.salesPrice}} --> </image>{{ row.salesPrice*100}} <text v-else></text>{{row.salesPrice}} -->
<view v-if="row.payType != 1"> <view v-if="row.payType != 1">
<image style="width: 15px;height: 15px;vertical-align: sub;" <image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png"> src="../../../static/img/jfh.png">
</image>{{ row.salesPrice*100}} </image>{{ row.salesPrice*100}}
</view> </view>
<view v-else>{{ row.salesPrice}}</view> <view v-else>{{ row.salesPrice}}</view>
</view> </view>
</view> </view>
@ -59,7 +65,8 @@
import { import {
getCouponList, getCouponList,
getCmsContent, getCmsContent,
getBrandCouponList getBrandCouponList,
getListGoodsType
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
@ -88,7 +95,8 @@
typeId: '', typeId: '',
couponName: '', couponName: '',
brandid: '', brandid: '',
goodtyid: '' goodtyid: '',
cateTypeList: [] //
}; };
}, },
@ -96,6 +104,9 @@
this.typeId = option.id; this.typeId = option.id;
this.brandid = option.brandId; this.brandid = option.brandId;
this.goodtyid = option.goodsId; this.goodtyid = option.goodsId;
if (this.goodtyid == undefined) {
this.goodtyid = '';
}
if (option.id == 1) { if (option.id == 1) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '商品列表' title: '商品列表'
@ -114,7 +125,12 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '中石化码列表' title: '中石化码列表'
}); });
this.getCouponListArea(); // this.getCouponListArea();
if (app.globalData.cityName == '贵州省') {
this.getListGoodsType();
} else {
this.getCouponListArea();
}
this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST'); this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST');
} }
if (option.id == 4) { if (option.id == 4) {
@ -133,6 +149,38 @@
this.getCouponListArea(); this.getCouponListArea();
}, },
methods: { 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() { getCmsContent() {
let params = { let params = {
@ -160,7 +208,8 @@
} }
let pagenum = this.pageNum; let pagenum = this.pageNum;
let params = { let params = {
regionId: app.globalData.cityId, regionId: app.globalData.cityId,
goodsTypeId: this.goodtyid,
pageNum: pagenum, pageNum: pagenum,
pageSize: this.pageSize, pageSize: this.pageSize,
displayArea: this.typeId, displayArea: this.typeId,

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

@ -240,13 +240,21 @@
}) })
}, },
// //
seeloaction() { seeloaction() {
uni.openLocation({ uni.showToast({
latitude: Number(this.storeList.gasAddressLatitude), // title: '当前暂不支持导航',
longitude: Number(this.storeList.gasAddressLongitude), // duration:2000,
name: this.storeList.gasName, icon: "none"
address: this.storeList.gasAddress });
}) // 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) { showPopup(item) {

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

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

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

@ -86,23 +86,23 @@
<image style="width: 40rpx;height: 40rpx;" src="../../static/img/jt.png"></image> <image style="width: 40rpx;height: 40rpx;" src="../../static/img/jt.png"></image>
</view> </view>
</view> </view>
</view> </view>
<view class="width94 backcorfff mart10"> <view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666"> <view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view> <view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" /> <input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view> </view>
</view> </view>
<view class="width94 comorder mart10"> <view class="width94 comorder mart10">
<view class="height50 width100 backcorfff"> <view class="height50 width100 backcorfff">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <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> </view>
<view class="width94 line1 mart5 marb5" v-if="couponList.displayArea == 2 || couponList.displayArea == 4"></view> <view class="width94 line1 mart5 marb5" v-if="couponList.payType == 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='jinbi'" v-if="couponList.displayArea == 2 || couponList.displayArea == 4"> <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%;"> <view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text> 积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text>
</view> </view>
@ -111,8 +111,8 @@
<radio :checked="paytype=='jinbi'" color="#0083f5" /> <radio :checked="paytype=='jinbi'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5" v-if="couponList.displayArea != 2"></view> <view class="width94 line1 mart5 marb5" v-if="couponList.payType != 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='unionPay'" v-if="couponList.displayArea != 2"> <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 class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
银联支付 银联支付
</view> </view>
@ -121,6 +121,16 @@
<radio :checked="paytype=='unionPay'" color="#0083f5" /> <radio :checked="paytype=='unionPay'" color="#0083f5" />
</view> </view>
</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="width94 line1 mart5 marb5" v-if="couponList.displayArea == 4"></view>
<view class="height50 width100 backcorfff" @tap="paytype='unionPaystags'" <view class="height50 width100 backcorfff" @tap="paytype='unionPaystags'"
v-if="couponList.displayArea == 4"> v-if="couponList.displayArea == 4">
@ -198,7 +208,8 @@
orderToGoldPay, orderToGoldPay,
findUser, findUser,
unionPay, unionPay,
hltUnionCardPay hltUnionCardPay,
getHuiLianTongCardBalance
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import ssPaymentPassword from '../../components/sanshui-payment-password' import ssPaymentPassword from '../../components/sanshui-payment-password'
@ -235,7 +246,7 @@
storeId: '', storeId: '',
isDiscont: false, isDiscont: false,
coupondiscountid: '', coupondiscountid: '',
typeId: '', typeId: '',
identificationCode: '' // identificationCode: '' //
}; };
@ -287,6 +298,9 @@
if (res.return_code == '000000') { if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data; app.globalData.userInfo = res.return_data;
this.user = res.return_data; this.user = res.return_data;
if (this.user.hltCardNo) {
this.getHuiLianTongCardBalance();
}
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data 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() { getCouponById() {
uni.showLoading({ uni.showLoading({
@ -477,11 +504,42 @@
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'unionPay') { } else if (that.paytype == 'unionPay') {
that.unionPay(); that.unionPay();
} else if (that.paytype == 'unionPaystags') { } else if (that.paytype == 'unionPaystags') {
// //
uni.redirectTo({ uni.redirectTo({
url: '../tabBar/order/stagesUrl/stagesUrl?orderid=' + that.orderId 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 { } else {
uni.showToast({ uni.showToast({
title: '请选择支付方式', title: '请选择支付方式',
@ -490,7 +548,7 @@
}) })
} }
}, },
// //
unionPay() { unionPay() {
let goods = { let goods = {
@ -549,29 +607,62 @@
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
}) })
let params = { if (this.paytype == 'jinbi') {
"orderId": this.orderId, let params = {
"password": this.PaymentPassword "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 (res.return_code == '102130') { orderToGoldPay(params).then(res => {
uni.navigateTo({ uni.hideLoading();
url: '../../login/updatePas/updatePas' 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({ return;
title: res.return_msg, }
icon: 'none'
}) 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>
<view class="content"> <view class="content">
<view class="pay-list"> <view class="pay-list">
<view class="row" @tap="paytype='jinbi'"> <view class="row" @tap="paytype='jinbi'" v-if="pryType == 2">
<view class="left"> <view class="left">
<image src="../../../static/img/jfx.png"></image> <image src="../../../static/img/jfx.png"></image>
</view> </view>
@ -29,7 +29,7 @@
<radio :checked="paytype=='jinbi'" color="#0083f5" /> <radio :checked="paytype=='jinbi'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="row" @tap="paytype='gonghuika'"> <view class="row" @tap="paytype='unionpay'" v-if="pryType != 2">
<view class="left"> <view class="left">
<image mode="widthFix" style="border-radius: 50%;" src="../../../static/img/unionpay.png"> <image mode="widthFix" style="border-radius: 50%;" src="../../../static/img/unionpay.png">
</image> </image>
@ -38,10 +38,10 @@
银联支付 银联支付
</view> </view>
<view class="right"> <view class="right">
<radio :checked="paytype=='gonghuika'" color="#0083f5" /> <radio :checked="paytype=='unionpay'" color="#0083f5" />
</view> </view>
</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"> <view class="left">
<image :src="imagewxUrl+imgadres1"></image> <image :src="imagewxUrl+imgadres1"></image>
</view> </view>
@ -51,6 +51,17 @@
<view class="right"> <view class="right">
<radio :checked="paytype=='oilcard'" @click="changeRiado1()" color="#0083f5" /> <radio :checked="paytype=='oilcard'" @click="changeRiado1()" color="#0083f5" />
</view> </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>
<!-- <view class="width100 line1 mart5 marb5"></view> <!-- <view class="width100 line1 mart5 marb5"></view>
<view class="row" @tap="paytype='unionPaystags'"> <view class="row" @tap="paytype='unionPaystags'">
@ -87,7 +98,8 @@
hltUnionCardPay, hltUnionCardPay,
unionPay, unionPay,
oilCardPay, oilCardPay,
findUser findUser,
getHuiLianTongCardBalance
} from '../../../Utils/Api.js' } from '../../../Utils/Api.js'
import ssPaymentPassword from '../../../components/sanshui-payment-password' import ssPaymentPassword from '../../../components/sanshui-payment-password'
let app = getApp(); let app = getApp();
@ -138,7 +150,25 @@
this.findUser(); 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() { changeRiado1() {
if (!this.user.isSetOilCard) { if (!this.user.isSetOilCard) {
@ -162,7 +192,10 @@
findUser(params).then(res => { findUser(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data; 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) { if (res.return_data.oilCard) {
this.oilPirce = res.return_data.oilCard.amount; 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() { orderToPay() {
let that = this; 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) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../../login/updatePas/updatePas' url: '../../login/updatePas/updatePas'
@ -184,7 +246,7 @@
return; return;
} }
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'gonghuika') { } else if (that.paytype == 'unionpay') {
that.unionPay(); that.unionPay();
} else if (that.paytype == 'unionPaystags') { } else if (that.paytype == 'unionPaystags') {
uni.navigateTo({ uni.navigateTo({
@ -213,6 +275,37 @@
return; return;
} }
that.$refs.paymentPassword.modalFun('show'); 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 { } else {
uni.showToast({ uni.showToast({
title: '请选择支付方式', title: '请选择支付方式',

File diff suppressed because it is too large Load Diff

@ -258,9 +258,12 @@
} }
findByLatAndLng(datas).then(res => { findByLatAndLng(datas).then(res => {
if (res.return_code == '000000') { 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', url: '../../login/updatePas/updatePas',
text: '设置密码', text: '设置积分密码',
img: '../../../static/img/pas.png', img: '../../../static/img/pas.png',
type: 2 type: 2
}, },
@ -296,7 +296,7 @@
}, },
{ {
url: '../../login/updatePas/resetPas', url: '../../login/updatePas/resetPas',
text: '修改密码', text: '修改积分密码',
img: '../../../static/img/pas.png', img: '../../../static/img/pas.png',
type: 2 type: 2
}, },

@ -1,30 +1,68 @@
<template> <template>
<view> <view>
<image class="width100" mode="widthFix" src="../../../static/img/unionimg/upay3.jpg"></image> <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 mart20" mode="widthFix" src="../../../static/img/unionimg/upay4.jpg"
<image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay2.jpg" @click="jumprecent(2)"></image> @click="jumprecent(1)"></image>
<image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay1.jpg" @click="jumprecent(3)"></image> <image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay2.jpg"
</view> @click="jumprecent(2)"></image>
</template> <image class="width94 mart10" mode="widthFix" src="../../../static/img/unionimg/upay1.jpg"
@click="jumprecent(3)"></image>
<script> <wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6" :showCloseIcon="true">
export default { <image class="popImg" :src="imageUrl+imgadres1"></image>
data() { </wybPopup>
return { </view>
</template>
}
}, <script>
methods: { import {
// getCmsContent
jumprecent(item){ } from '../../../Utils/Api.js'
uni.navigateTo({ import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
url: '../recharge-centre/recharge-centre?id='+ item let app = getApp();
}) export default {
} components: {
} wybPopup
} },
</script> data() {
return {
<style> 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> </style>

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

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

@ -105,15 +105,17 @@
}, },
// //
jumpmenulist(item) { jumpmenulist(item) {
if (this.typeid == 2) { if (this.typeid == 2) {
uni.navigateTo({ uni.navigateTo({
url: '../menu-list/menu-list?storeCode=' + item.code url: '../menu-list/menu-list?storeCode=' + item.code + '&sttime=' + item.startTime +
}) '&entime=' + item.endTime
} })
if (this.typeid == 1) { }
uni.navigateTo({ if (this.typeid == 1) {
url: '../kfc-menu-list/kfc-menu-list?storeCode=' + item.storeCode 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;"> <view class="width20 flright fotrt paddtright10 font15 fcor666 alijun" style="align-items: center;">
¥{{priceValue[1] / 100}} ¥{{priceValue[1] / 100}}
</view> </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="height50 width100">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <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"> <wybPopup ref="popup" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view> <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)"> @click="radioChanges(items)">
<image mode="widthFix" class="mart10" :src="imageUrl+items.discountImg"></image> <image mode="widthFix" :src="imageUrl+items.discountImg"></image>
<view class="contrig"> <view class="alijus width60 margle10">
<view class="width80p flleft"> <view class="width80p">
<view class="font16 fontwig6 fcor333 text1 paddtop25">{{items.discountName}}</view> <view class="font16 fontwig6 fcor333 text1">{{items.discountName}}</view>
<view class="font13 fcor999 mart5">有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}} <view class="font13 fcor999 mart5">有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view> </view>
</view> </view>
<view class="width20 flright"> <view class="width20 fotrt">
<view class="yhprice"> <view>
<radio v-if="typeid == 1 && items.discountCondition && orderPrice > items.discountCondition" <radio v-if="typeid == 1 && items.discountCondition && orderPrice > items.discountCondition"
color="#c72a20" :checked="items.id == memDiscountId" /> color="#c72a20" :checked="items.id == memDiscountId" />
@ -262,7 +282,8 @@
findUser, findUser,
qianzhuorderToUnionPay, qianzhuorderToUnionPay,
czhltUnionCardPay, czhltUnionCardPay,
getUserOrderPreList getUserOrderPreList,
getRebateIntegral
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
// #ifdef H5 // #ifdef H5
var jweixin = require('jweixin-module'); var jweixin = require('jweixin-module');
@ -278,7 +299,7 @@
return { return {
orderList: [], orderList: [],
sttypeid: 1, sttypeid: 1,
paytype: '', // paytype: '4', //
typeid: app.globalData.distinguishid, // typeid: app.globalData.distinguishid, //
priceValue: [0, 0], // priceValue: [0, 0], //
availIntegal: 0, // availIntegal: 0, //
@ -304,7 +325,9 @@
OrderPreList: [], // OrderPreList: [], //
imageUrl: app.globalData.imgUrl, // imageUrl: app.globalData.imgUrl, //
orderPrice: 0, // orderPrice: 0, //
rechargeDes: '', // rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 //
} }
}, },
onLoad() { 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() { findUser() {
@ -357,7 +398,8 @@
this.user = res.return_data; this.user = res.return_data;
this.getHuiLianTongCardBalance(); this.getHuiLianTongCardBalance();
this.getThirdPartyByDetail(); this.getThirdPartyByDetail();
this.getUserOrderPreList(); this.getUserOrderPreList();
this.getRebateIntegral();
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data data: res.return_data
@ -452,7 +494,8 @@
this.paytype = ''; this.paytype = '';
} else { } else {
this.isUse = true; this.isUse = true;
} }
this.getRebateIntegral();
}, },
// //
changeRiado() { changeRiado() {
@ -660,7 +703,9 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed( this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this 2)) - this
.deductionPrice).toFixed(2)); .deductionPrice).toFixed(2));
} }
this.getRebateIntegral();
}, },
rechangeload() { rechangeload() {
this.isUse = false; this.isUse = false;
@ -941,16 +986,16 @@
margin-left: 180rpx; margin-left: 180rpx;
} }
.tccs { .tccs {
box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.2); box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.2);
border: 1px solid #f6f6f6; border: 1px solid #f6f6f6;
border-radius: 8px; border-radius: 8px;
image { image {
float: left; // float: left;
width: 170rpx; width: 160rpx;
max-height: 170rpx; max-height: 160rpx;
margin-left: 10px; // margin-left: 10px;
} }
} }
</style> </style>

@ -1,19 +1,17 @@
<template> <template>
<view class="content"> <view class="content">
<!-- <view class="width100 height85 backcorfff heads"> <view class="width100" v-if="flist ==''">
<view class="paddtop10 width90 alijusstart"> <view class="width100 height40 font14 padleft15 alijusstart"
<view class="width80p font16 fcor333 fontwig6"> style="background-color: #e7f2ea;color: #4e8a5c;">
<image mode="widthFix" class="icon15 marRight10" src="../static/imgs/shop.png"></image>时代天街 <image class="icon20 paddtright5" mode="widthFix" src="../static/imgs/horn.png"></image>
</view> 营业时间{{starttime}}{{endtime}}.
<view class="width20 fotrt"> </view>
<image mode="widthFix" class="icon20" src="../static/imgs/nocollection.png"></image> <view v-if="flist == '' " class="width100 mart60 fotct font14 fcor666">
<image mode="widthFix" class="icon20" src="../static/imgs/collection.png"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
</view> </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}" <view v-for="(item,index) in flist" :key="index" class="f-item" :class="{active: item.name == currentId}"
@click="tabtap(item)"> @click="tabtap(item)">
<view class="width100 fotct"> <view class="width100 fotct">
@ -26,8 +24,8 @@
</scroll-view> </scroll-view>
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" <scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop"
:scroll-top="tabScrollTop"> v-if="flist !='' ">
<view v-for="(item,index) in slist" :key="index" :id="'main-'+item.kfcId"> <view v-for="(item,index) in slist" :key="index" :id="'main-'+item.kfcId">
<view class="s-item width90"> <view class="s-item width90">
<text class="promotion_mixg1 backcor99" style="margin-right: -3px;"></text> <text class="promotion_mixg1 backcor99" style="margin-right: -3px;"></text>
@ -36,7 +34,7 @@
{{item.name}} {{item.name}}
</view> </view>
<view v-if="titem.cateName == item.name" class="t-list mart10 paddbotm10" v-for="(titem,index) in tlist" <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"> <view class="paddtop10 width94 font16 fcor333 fotrt fontwig6 text2">
{{titem.productName}} {{titem.productName}}
</view> </view>
@ -59,10 +57,22 @@
v-if="titem.originalPrice == titem.salePrice" style="text-decoration: line-through;"> v-if="titem.originalPrice == titem.salePrice" style="text-decoration: line-through;">
</view> </view>
<view class="mart10 icon-click fotrt"> <view class="mart10 icon-click fotrt alijusend" v-if="titem.productId">
<!-- <image class="btn-reduce" mode="widthFix" src="../static/imgs/reduce.png"></image> --> <image class="btn-reduce" mode="widthFix" src="../static/imgs/reduce.png"
<!-- <view class="num fcorfff" style="background: #d90209;">1</view> --> v-if="titem.count > 0" @click="deletenums(titem)"></image>
<image class="btn-plus" mode="widthFix" src="../static/imgs/plus.png"></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>
</view> </view>
@ -72,12 +82,13 @@
</view> </view>
</scroll-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> </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> <image mode="widthFix" class="width40w mart40" :src="kfcimgs"></image>
<view class="width100 line1 mart10"></view> <view class="width100 line1 mart10"></view>
<view class="mart20 width90 font18 fontwig6 fcor333">{{kfcname}}</view> <view class="mart20 width90 font18 fontwig6 fcor333">{{kfcname}}</view>
@ -139,11 +150,17 @@
kfcname: '', // kfcname: '', //
kfcimgs: '', // kfcimgs: '', //
kfcprice: '', // kfcprice: '', //
kfcoldprice: '' // kfcoldprice: '', //
starttime: '', //
endtime: '', //
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'storeClose.png',
} }
}, },
onLoad(options) { onLoad(options) {
this.storeCode = options.storeCode; this.storeCode = options.storeCode;
this.starttime = options.sttime;
this.endtime = options.entime;
this.listByStoreCode(); this.listByStoreCode();
}, },
methods: { methods: {
@ -232,6 +249,21 @@
addCart: function(item) { addCart: function(item) {
if (item.num >= 0) { if (item.num >= 0) {
item.num++ 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) => { this.shoppingcart.forEach((good) => {
if (item.name == good.name) if (item.name == good.name)
good.num = item.num good.num = item.num
@ -248,27 +280,25 @@
decreaseCart(item) { decreaseCart(item) {
if (item.num) { if (item.num) {
item.num-- item.num--
this.shoppingcart.forEach((good) => { for (var i = 0; i < this.tlist.length; i++) {
if (item.name == good.name) if (this.tlist[i].productId && item.productId == this.tlist[i].productId) {
good.num = item.num this.tlist[i].count = this.tlist[i].count - 1;
}) }
}
},
inputCart: function(item) {
if (item.num >= 0) {
item.num++
this.shoppingcart.forEach((good) => {
if (item.name == good.name)
good.num = item.num + -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) => { this.shoppingcart.forEach((good) => {
if (item.name == good.name) if (item.name == good.name)
Vue.set(good, 'count', 1) good.num = item.num
}) })
} }
}, },
// //
delAll() { delAll() {
@ -276,13 +306,34 @@
if (good.num) { if (good.num) {
good.num = 0 good.num = 0
} }
}) })
for (var i = 0; i < this.tlist.length; i++) {
this.tlist[i].count = 0;
}
this.shoppingcart = [];
app.globalData.qianzhulist = ''; 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) { showPopups(item) {
let that = this; let that = this;
that.nums = 1; that.nums = 1;
if (item.productId) { if (item.productId) {
that.productId = item.productId; that.productId = item.productId;
// that.kdjchangelist = item; // that.kdjchangelist = item;
@ -299,7 +350,7 @@
"imgs": that.kfcimgs, "imgs": that.kfcimgs,
"price": that.kfcprice, "price": that.kfcprice,
"oldprice": that.kfcoldprice "oldprice": that.kfcoldprice
} }
that.shoppingcart.push(datas); that.shoppingcart.push(datas);
uni.showLoading({ uni.showLoading({
title: '添加中...' title: '添加中...'
@ -311,12 +362,12 @@
} else { } else {
let indexs = 1; let indexs = 1;
for (var i = 0; i < that.shoppingcart.length; i++) { for (var i = 0; i < that.shoppingcart.length; i++) {
if (that.shoppingcart[i].name == that.kfcname) { if (that.shoppingcart[i].name == that.kfcname) {
indexs = 0; indexs = 0;
that.shoppingcart[i].num = that.shoppingcart[i].num + 1; that.shoppingcart[i].num = that.shoppingcart[i].num + 1;
} }
} }
if (indexs != 0) { if (indexs != 0) {
let datas = { let datas = {
"num": 1, "num": 1,
"storeCode": that.storeCode, "storeCode": that.storeCode,
@ -325,8 +376,8 @@
"imgs": that.kfcimgs, "imgs": that.kfcimgs,
"price": that.kfcprice, "price": that.kfcprice,
"oldprice": that.kfcoldprice "oldprice": that.kfcoldprice
} }
that.shoppingcart.push(datas); that.shoppingcart.push(datas);
uni.showLoading({ uni.showLoading({
title: '添加中...' title: '添加中...'
}) })
@ -335,17 +386,24 @@
}, 1000); }, 1000);
} }
} }
}else{
that.kdjchangelist = item.specGroups; for (var i = 0; i < that.tlist.length; i++) {
that.kfcimgs = item.specGroups[0].productImageUrl; if (that.tlist[i].productId && item.productId == that.tlist[i].productId) {
that.productId = item.specGroups[0].productId; that.tlist[i].count = that.tlist[i].count + 1
that.kfcprice = item.specGroups[0].salePrice; }
that.kfcname = item.specGroups[0].productName; }
that.kfcoldprice = item.specGroups[0].originalPrice; } else {
that.$refs.popup.show(); 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) { changetype(item) {
this.productId = item.productId; this.productId = item.productId;
@ -367,7 +425,17 @@
"price": this.kfcprice, "price": this.kfcprice,
"oldprice": this.kfcoldprice "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(); this.$refs.popup.hide();
return; return;
} }
@ -375,7 +443,17 @@
for (var i = 0; i < this.shoppingcart.length; i++) { for (var i = 0; i < this.shoppingcart.length; i++) {
if (this.shoppingcart[i].name == this.kfcname) { if (this.shoppingcart[i].name == this.kfcname) {
indexs = 0; 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) { if (indexs != 0) {
@ -388,29 +466,39 @@
"price": this.kfcprice, "price": this.kfcprice,
"oldprice": this.kfcoldprice "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(); this.$refs.popup.hide();
}, },
//key //key
checinfo(item, item1) { checinfo(item, item1) {
const keys1 = Object.keys(item); const keys1 = Object.keys(item);
const keys2 = Object.keys(item1); const keys2 = Object.keys(item1);
if (keys1.length !== keys2.length) { if (keys1.length !== keys2.length) {
return false; return false;
} }
for (let index = 0; index < keys1.length; index++) { for (let index = 0; index < keys1.length; index++) {
const val1 = item[keys1[index]]; const val1 = item[keys1[index]];
const val2 = item1[keys2[index]]; const val2 = item1[keys2[index]];
if (keys2[index] !== 'num') { if (keys2[index] !== 'num') {
if (val1 !== val2) { if (val1 !== val2) {
return false; return false;
} }
} }
} }
return true; return true;
}, },
// //
navToList() { navToList() {
@ -509,6 +597,7 @@
border-radius: 15px; border-radius: 15px;
background: #fff; background: #fff;
min-height: 150px; min-height: 150px;
&:after { &:after {
content: ''; content: '';
flex: 99; flex: 99;
@ -518,7 +607,7 @@
} }
.qzgoodsimg { .qzgoodsimg {
margin-top: -10px; margin-top: -10px;
min-height: 100px; min-height: 100px;
width: 120px; width: 120px;
} }
@ -577,5 +666,19 @@
.wybfot { .wybfot {
position: fixed; position: fixed;
bottom: 0px; 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> </style>

@ -1,19 +1,17 @@
<template> <template>
<view class="content"> <view class="content">
<!-- <view class="width100 height85 backcorfff heads"> <view class="width100" v-if="flist ==''">
<view class="paddtop10 width90 alijusstart"> <view class="width100 height40 font14 padleft15 alijusstart"
<view class="width80p font16 fcor333 fontwig6"> style="background-color: #e7f2ea;color: #4e8a5c;">
<image mode="widthFix" class="icon15 marRight10" src="../static/imgs/shop.png"></image>时代天街 <image class="icon20 paddtright5" mode="widthFix" src="../static/imgs/horn.png"></image>
</view> 营业时间{{starttime}}{{endtime}}.
<view class="width20 fotrt"> </view>
<image mode="widthFix" class="icon20" src="../static/imgs/nocollection.png"></image> <view v-if="flist == '' " class="width100 mart60 fotct font14 fcor666">
<image mode="widthFix" class="icon20" src="../static/imgs/collection.png"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
</view> </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}" <view v-for="item in flist" :key="item.id" class="f-item" :class="{active: item.id === currentId}"
@click="tabtap(item)"> @click="tabtap(item)">
<view class="width100 fotct"> <view class="width100 fotct">
@ -26,8 +24,8 @@
</scroll-view> </scroll-view>
<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" <scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop"
:scroll-top="tabScrollTop"> v-if="flist != '' ">
<view v-for="item in slist" :key="item.id" :id="'main-'+item.id"> <view v-for="item in slist" :key="item.id" :id="'main-'+item.id">
<view class="s-item width90"> <view class="s-item width90">
<text class="promotion_mixg1 backcor99" style="margin-right: -3px;"></text> <text class="promotion_mixg1 backcor99" style="margin-right: -3px;"></text>
@ -36,7 +34,7 @@
{{item.name}} {{item.name}}
</view> </view>
<view v-if="titem.ext1 == item.id" class="t-list mart10 paddbotm10" v-for="titem in tlist" <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"> <view class="paddtop10 width94 font16 fcor333 fotrt fontwig6 text2">
{{titem.name}} {{titem.name}}
</view> </view>
@ -44,7 +42,7 @@
<image :src="titem.defaultImage" mode="widthFix" class="qzgoodsimg"></image> <image :src="titem.defaultImage" mode="widthFix" class="qzgoodsimg"></image>
<view class="width50 fotrt"> <view class="width50 fotrt">
<view class="width100 font12 color2f6f43">¥<text <view class="width100 font12 color2f6f43">¥<text
class="font18 fontwig6 margle">{{titem.salesTallPrice}}</text> class="font18 fontwig6 margle">{{titem.showPrice}}</text>
</view> </view>
<view class="width100 font14 mart5 color2f6f43" <view class="width100 font14 mart5 color2f6f43"
v-if="titem.marketTallPrice != titem.salesTallPrice"> v-if="titem.marketTallPrice != titem.salesTallPrice">
@ -62,10 +60,16 @@
style="text-decoration: line-through;"> style="text-decoration: line-through;">
</view> </view>
<view class="mart10 icon-click fotrt"> <view class="mart10 icon-click fotrt alijusend">
<!-- <image class="btn-reduce" mode="widthFix" src="../static/imgs/reduce.png"></image> --> <!-- <image class="btn-reduce" mode="widthFix" src="../static/imgs/wreduce.png"
<!-- <view class="num fcorfff" style="background: #d90209;">1</view> --> @click="deletenums(titem)" v-if="titem.count > 0"></image> -->
<image class="btn-plus" mode="widthFix" src="../static/imgs/blueplus.png"></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> </view>
</view> </view>
@ -74,7 +78,7 @@
</view> </view>
</scroll-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> </shopcart>
@ -199,11 +203,17 @@
shoppingcart: [], // shoppingcart: [], //
productId: '', //id productId: '', //id
salesTallPrice: '', // salesTallPrice: '', //
marketTallPrice: '' // marketTallPrice: '', //
starttime: '', //
endtime: '', //
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'storeClose.png',
} }
}, },
onLoad(options) { onLoad(options) {
this.storeCode = options.storeCode; this.storeCode = options.storeCode;
this.starttime = options.sttime;
this.endtime = options.entime;
this.getStarbucksProducts(); this.getStarbucksProducts();
}, },
methods: { methods: {
@ -290,6 +300,12 @@
// //
addCart: function(item) { addCart: function(item) {
if (item.num >= 0) { 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) => { this.shoppingcart.forEach((good) => {
if (JSON.stringify(item) == JSON.stringify(good)) { if (JSON.stringify(item) == JSON.stringify(good)) {
item.num++ item.num++
@ -303,11 +319,16 @@
Vue.set(good, 'count', 1) Vue.set(good, 'count', 1)
}) })
} }
}, },
decreaseCart(item) { decreaseCart(item) {
if (item.num) { if (item.num) {
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) => { this.shoppingcart.forEach((good) => {
if (this.checinfo(good, item) === true) { if (this.checinfo(good, item) === true) {
good.num = item.num 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() { 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 = []; this.shoppingcart = [];
}, },
// //
@ -427,15 +441,31 @@
this.shoppingcart.forEach((good) => { this.shoppingcart.forEach((good) => {
if (this.checinfo(good, datas) === true) { if (this.checinfo(good, datas) === true) {
good.num = good.num + this.nums; 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; istue = 1;
} }
}) })
if (istue == 0) { if (istue == 0) {
this.shoppingcart.push(datas); 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 { } 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.shoppingcart.push(datas);
} }
this.$refs.popup.hide(); this.$refs.popup.hide();
}, },
//key //key
@ -619,4 +649,18 @@
position: fixed; position: fixed;
bottom: 0px; 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> </style>

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

Loading…
Cancel
Save