1.优化2.0的页面接口

yj-dev
杨杰 2 years ago
parent 7590f6eb14
commit a141c2a939
  1. 2
      App.vue
  2. 105
      Utils/Api.js
  3. 28
      pages/goods/refuel-confirm/refuel-confirm.vue
  4. 28
      pages/goods/refuel-details/refuel-details.vue
  5. 10
      pages/order/confirmation.vue
  6. 14
      pages/qianZhuPay/qianZhuPay.vue
  7. 21
      pages/tabBar/home/home.vue
  8. 13
      pages/tabBar/order/webUrl/webUrl.vue
  9. 116
      pages/tabBar/user/user.vue
  10. 220
      pages/user/coupon/coupon.vue
  11. 8
      pages/user/deposit/deposit.vue
  12. 14
      pages/user/order_details/order_details.vue
  13. 20
      pages/user/order_list/order_list.vue
  14. 73
      pages/userLogin/userLogin.vue
  15. 44
      qianzhu-KFC/confirmOrder/confirmOrder.vue
  16. 4
      qianzhu-KFC/menu-list/menu-list.vue
  17. 103
      qianzhu-KFC/order-details/order-details.vue
  18. BIN
      static/img/user/overdue.png
  19. BIN
      static/img/user/use.png
  20. 148
      subPages/coupon-comfirmation/coupon-comfirmation.vue
  21. 6
      subPages/rechargeDetails/rechargeDetails.vue
  22. 37
      subPages/trade-union-recharge/trade-union-recharge.vue
  23. 4
      uni.scss

@ -8,6 +8,7 @@
// url: 'https://hsg.dctpay.com/crest',
// v1url:'https://hsg.dctpay.com/v1',
// orderurl:' https://hsg.dctpay.com/order',
// userurl:'https://hsg.dctpay.com/user',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl: 'https://hsg.dctpay.com/brest',
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
@ -16,6 +17,7 @@
url: 'https://hsgcs.dctpay.com/crest',
v1url: 'https://hsgcs.dctpay.com/v1',
orderurl:'https://hsgcs.dctpay.com/order',
userurl:'https://hsgcs.dctpay.com/user',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',

@ -7,6 +7,7 @@ import {
let app = getApp();
let base = app.globalData.url;
let orderbase = app.globalData.orderurl;
let userbase = app.globalData.userurl;
let v1base = app.globalData.v1url;
let brestBase = app.globalData.brestUrl;
//公众号获取跳小程序参数
@ -19,11 +20,6 @@ export const getScheme = params => {
}
//根据code获取openId
export const HandleCode = params => {
return POST('GET', `${base}/wechat/handleCode`, params).then(res => res.data);
}
//微信登录获取手机号
export const GetPhoneNumber = params => {
return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data);
@ -46,21 +42,13 @@ export const findByLatAndLng = params => {
}
//获取用户信息
export const findUser = params => {
return POST('GET', `${base}/highUser/findUser`, params).then(res => res.data);
}
//绑定用户电话
export const loginByPhone = params => {
return POST('GET', `${base}/wechat/loginByPhone`, params).then(res => res.data);
};
// export const findUser = params => {
// return POST('GET', `${base}/highUser/findUser`, params).then(res => res.data);
// }
//微信登录
export const WXlogin = params => {
return POST('GET', `${base}/wechat/login`, params).then(res => res.data);
};
//H5 退出登录
export const loginOut = params => {
return POST('GET', `${base}/user/loginOut`, params).then(res => res.data);
};
//通过openid获取用户的信息
export const OpenidGetUser = (openId, params) => {
return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data);
@ -137,10 +125,6 @@ export const getUserCouponDetail = params => {
export const getUserNewCouponDetail = params => {
return POST('GET', `${base}/coupon/getUserNewCouponDetail`, params).then(res => res.data);
}
//获取订单信息
// export const getUserOrderList = params => {
// return POST('GET', `${base}/highOrder/getUserOrderList`, params).then(res => res.data);
// }
//取消订单
export const cancelOrder = params => {
return POST('GET', `${base}/highOrder/cancelOrder`, params).then(res => res.data);
@ -198,10 +182,6 @@ export const getCouponByDiscount = params => {
export const againReceiveCoupon = params => {
return POST('GET', `${base}/coupon/againReceiveCoupon`, params).then(res => res.data);
}
//查询我的优惠券
export const getUserDiscountList = params => {
return POST('GET', `${base}/userDiscount/getUserDiscountList`, params).then(res => res.data);
}
//使用优惠券
export const useDiscount = params => {
return POST('GET', `${base}/discount/useDiscount`, params).then(res => res.data);
@ -245,11 +225,7 @@ export const oilPriceDiscountCompute = params => {
//在线加油优惠券
export const canUseDiscount = params => {
return POST('POST', `${base}/userDiscount/canUseDiscount`, params).then(res => res.data);
}
//在线加油详情
export const getOrderByOrderNo = params => {
return POST('GET', `${base}/gasOrder/getOrderByOrderNo`, params).then(res => res.data);
}
}
//查询卡数据字典
export const getDictionaryByCodeType = params => {
@ -396,10 +372,6 @@ export const listByStoreCode = params => {
export const getThirdOrderByOrderNo = params => {
return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderNo`, params).then(res => res.data);
}
//肯德基,星巴克取消订单
export const thirdCancelOrder = params => {
return POST('GET', `${base}/highThirdParty/thirdCancelOrder`, params).then(res => res.data);
}
@ -420,10 +392,6 @@ export const getStarbucksProducts = params => {
export const qianzhuorderToPayByWx = params => {
return POST('POST', `${base}/thirdOrder/orderToPayByWx`, params).then(res => res.data);
}
//星巴克下单
export const xbkaddOrder = params => {
return POST('POST', `${base}/highThirdParty/addOrder`, params).then(res => res.data);
}
//会员充值产品
export const getMemberProducts = params => {
@ -458,10 +426,6 @@ export const qzOrderToPay = params => {
export const getGatewayToken = params => {
return POST('GET', `${base}/tPig/getGatewayToken`, params).then(res => res.data);
}
//取消订单
export const cancelOrderByOrderNo = params => {
return POST('GET', `${base}/highOrder/cancelOrderByOrderNo`, params).then(res => res.data);
}
//中石油生成二维码
export const getVerifyQRCode = params => {
@ -649,18 +613,63 @@ export const getDetailByOrderNo = params => {
//取消订单
export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data);
}
//微信支付
}
//微信支付
export const wechatPay = params => {
return POST('POST', `${orderbase}/orderPay/wechatPay`, params).then(res => res.data);
}
//工会卡、油卡
}
//工会卡、油卡
export const cardPay = params => {
return POST('POST', `${orderbase}/orderPay/cardPay`, params).then(res => res.data);
}
}
//已完成未查看
export const orderCheck = params => {
return POST('GET', `${orderbase}/highOrder/orderCheck`, params).then(res => res.data);
return POST('GET', `${orderbase}/orderCheck`, params).then(res => res.data);
}
//在线加油详情
export const getOrderByOrderNo = params => {
return POST('GET', `${orderbase}/oil/getOrderByOrderNo`, params).then(res => res.data);
}
//----------------我的页面接口
// 获取登录验证码
export const getLoginSMSCode = params => {
return POST('POST', `${userbase}/sms/getLoginSMSCode`, params).then(res => res.data);
}
// 手机号登录
export const phone = params => {
return POST('POST', `${userbase}/login/phone`, params).then(res => res.data);
}
// 微信小程序code解析
export const HandleCode = params => {
return POST('POST', `${userbase}/login/wxMiniHandleCode`, params).then(res => res.data);
}
// 微信小程序授权手机号登录
export const loginByPhone = params => {
return POST('POST', `${userbase}/login/wxMini`, params).then(res => res.data);
}
// 退出登录
export const loginOut = params => {
return POST('POST', `${userbase}/login/out`, params).then(res => res.data);
}
// 获取用户信息
export const findUser = params => {
return POST('POST', `${userbase}/getUserDetail`, params).then(res => res.data);
}
// 获取用户余额
export const getUserAccount = params => {
return POST('POST', `${userbase}/getUserAccount`, params).then(res => res.data);
}
//查询优惠券
export const getUserDiscountList = params => {
return POST('GET', `${userbase}/discount/getUserDiscountList`, params).then(res => res.data);
}

@ -76,6 +76,13 @@
<view class="flright width40 fotct" v-else>
¥0
</view>
</view>
<view class="width100 backcorfff mart10">
<view class="width96 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16">邀请码</view>
<input class="width60 fotrt font15" style="padding-right: 6%;" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<!-- // -->
@ -280,12 +287,19 @@
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1, //
paytypeList: [], //
paytypeList: [], //
identificationCode: '', //
}
},
onLoad(e) {
this.gasOrderList = app.globalData.pelletoilList;
this.orderPrice = this.gasOrderList.highChildOrderList[0].goodsPrice;
this.orderPrice = this.gasOrderList.highChildOrderList[0].goodsPrice;
// #ifdef H5
this.identificationCode = app.globalData.staffCode;
// #endif
// #ifdef MP
this.identificationCode = app.globalData.identificationCode;
// #endif
},
onShow() {
let that = this;
@ -544,7 +558,7 @@
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"promoteCode": this.gasOrderList.identificationCode,
"promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword
}
@ -617,7 +631,7 @@
if (this.paytype == '3' || this.paytype == '6') {
let params = {
"orderId": this.orderNo,
"orderNo": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
@ -782,15 +796,15 @@
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo,
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
"isTyAgent": this.gasOrderList.isTyAgent,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice,
"goodsType": 3,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"promoteCode": this.gasOrderList.identificationCode,
"payPwd": this.PaymentPassword
"promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword,
memDiscountId:this.memDiscountId
}
create(goods).then(res => {

@ -173,7 +173,6 @@
<script>
import {
getGasDetailByStoreKey,
addOrder,
getDictionaryByCodeTypeOl,
oilPriceDiscountCompute,
recentGasStation,
@ -921,33 +920,6 @@
uni.navigateTo({
url: '/pages/goods/refuel-confirm/refuel-confirm'
})
// addOrder(goods).then(res => {
// uni.hideLoading();
// if (res.return_code == '000000') {
// if (app.globalData.gasKey) {
// app.globalData.gasKey = '';
// app.globalData.staffCode = '';
// uni.removeStorage({
// key: 'gasKey'
// })
// uni.removeStorage({
// key: 'staffCode'
// })
// }
// uni.redirectTo({
// url: '/pages/goods/refuel-confirm/refuel-confirm?payprice=' + res.return_data
// .payPrice + '&orderId=' + res.return_data.id + '&couponId=' + this.counId +
// '&adres=' + this.storeList.gasAddress
// })
// } else {
// uni.showToast({
// title: res.return_msg,
// icon: 'none',
// duration: 2000
// });
// }
// })
},
}
}

@ -659,13 +659,14 @@
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"promoteCode": this.identificationCode
"promoteCode": this.identificationCode,
memDiscountId:this.memDiscountId
}
create(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.jumpType = res.return_data.highChildOrderList[0].ext1;
this.orderId = res.return_data.id;
this.orderId = res.return_data.orderNo;
this.orderDetails = res.return_data;
this.wechatPay(res.return_data);
} else {
@ -821,7 +822,8 @@
}],
"payGold": this.priceValue[1],
"promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword
"payPwd": this.PaymentPassword,
memDiscountId:this.memDiscountId
}
create(goods).then(res => {
uni.hideLoading();
@ -847,7 +849,7 @@
}
let params = {
"orderNo": item.orderNo,
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}

@ -6,8 +6,7 @@
<script>
import {
qzOrderToPay,
cancelOrderByOrderNo
qzOrderToPay
} from '../../Utils/Api.js'
let app = getApp();
// #ifdef H5
@ -70,7 +69,6 @@
})
},
fail: function(err) {
// that.cancelOrderByOrderNo();
uni.hideLoading();
uni.redirectTo({
url: '../tabBar/order/webUrl/webUrl?url=' + that
@ -86,7 +84,6 @@
// #endif
} else {
// that.cancelOrderByOrderNo();
uni.showToast({
title: res.return_msg,
icon: 'none'
@ -97,15 +94,6 @@
}
})
},
//
cancelOrderByOrderNo() {
let that = this;
let params = {
orderNo: that.orderNo,
}
cancelOrderByOrderNo(params).then(res => {
})
},
payRequest: function(self) {
uni.showLoading({
title: '支付中...'

@ -32,7 +32,7 @@
</view>
</view>
<!-- 顶部菜单 -->
<view v-for="(item,index) in homeCateList" :key="index">
<view v-for="(item,index) in homeCateList" :key="index" style="margin-top: -2px;">
<view class="height90 backcorltop mart50" v-if="item.type == 1">
<view class="category-list">
<view class="category" style="width: 25%;" v-for="(row, indexs) in item.childCategory" :key="indexs"
@ -60,14 +60,25 @@
<!-- 消息 -->
<view class="height120 backcorfff" v-if="item.type == 3">
<view class="height20 width100"></view>
<view class="width92 message alijus">
<swiper circular="true" autoplay="true" display-multiple-items="2" :vertical="true">
<swiper-item class="alijus" v-for="(swiper,index) in swiperList" :key="swiper.id"
<view class="width92 message alijus">
<view class="width100 alijus" style="margin-top: -20px;" @click="test(item.childDate)" v-if="item.childDate.length == 1">
<view class="width80p paddleft10 alijusstart">
<view class="stus"></view>
<view class="paddleft10 font14 fcor666 text1 width70">
{{item.childDate[0].title}}</view>
<view class="width25 font13 fcor999">40分钟前</view>
</view>
<view class="width20 alijus">
<image class="icon15" mode="widthFix" src="../../../static/img/jt.png"></image>
</view>
</view>
<swiper v-else circular="true" autoplay="true" display-multiple-items="2" :vertical="true">
<swiper-item class="alijus" v-for="(swipers,index) in item.childDate" :key="swipers.id"
@click="test(index)">
<view class="width80p paddleft10 alijusstart">
<view class="stus"></view>
<view class="paddleft10 font14 fcor666 text1 width70">
放松放松方放松放松方放松放松方</view>
{{swipers.title}}</view>
<view class="width25 font13 fcor999">40分钟前</view>
</view>
<view class="width20 alijus">

@ -5,9 +5,6 @@
</template>
<script>
import {
cancelOrderByOrderNo
} from '../../../../Utils/Api.js'
export default {
data() {
return {
@ -24,19 +21,9 @@
},
onUnload() {
// if(this.sourType != 'MOBILE'){
// this.cancelOrderByOrderNo();
// }
},
methods: {
//
cancelOrderByOrderNo() {
let that = this;
let params = {
orderNo: this.orderNo,
}
cancelOrderByOrderNo(params).then(res => {
})
},
}
}
</script>

@ -53,6 +53,9 @@
:text="therrNum" type="error" size="normal"></uni-badge>
<uni-badge style="width: 20px;position: absolute; left: 42%;"
v-if="row.text == '已支付' && orderPayNum " :text="orderPayNum" type="error" size="normal">
</uni-badge>
<uni-badge style="width: 20px;position: absolute; left: 63%;"
v-if="row.text == '已完成' && whetherCheckNum " :text="whetherCheckNum" type="error" size="normal">
</uni-badge>
<view class="img">
<image :src="row.icon" class="icon40" mode="widthFix"></image>
@ -60,15 +63,15 @@
<view class="text mart10">{{row.text}}</view>
</view>
</view>
<view class="width90 mart10 height60">
<swiper circular="true" interval="3000" autoplay="true">
<swiper-item v-for="(swiper,index) in nopaylist" :key="index">
<view class="width90 mart10 height60" v-if="nopaylist != ''">
<swiper circular="true" interval="3000" autoplay="true" @change="swiperChange">
<swiper-item v-for="(swiper,index) in nopaylist" :key="index" @click="jumpDetails(swiper.orderNo,swiper.productType)">
<view class="alijusstart border-8r backcor9 height60 ">
<image mode="widthFix" class="icon40 margle10" src="../../../static/img/user/user5.png">
</image>
<view class="width50 margle10">
<view class="font15 fcor333 fontspec">等待付款</view>
<view class="font12 fcor666 fontspec mart5">剩余时间: 13:44</view>
<view class="font12 fcor666 fontspec mart5">剩余时间: {{countdownm}}:{{countdowns}}</view>
</view>
<view class="topay">
去支付
@ -96,17 +99,19 @@
<view class="mart15 width90 alijus fotct paddbotm10">
<view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥2400</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">{{userAccount.integral}}</view>
<view class="fontspec font14 fcor333 mart5">积分余额</view>
</view>
<view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥2400</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥{{userAccount.oilCardPrice}}
</view>
<view class="fontspec font14 fcor333 mart5">油卡余额</view>
</view>
<view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥2400</view>
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 1">¥{{userAccount.hltCardPrice}}
</view>
<view class="fontspec font14 fcor333 mart5">工会卡余额</view>
</view>
</view>
@ -158,7 +163,10 @@
import {
loginByPhone,
findUser,
loginOut
loginOut,
getUserAccount,
getUserOrderList,
orderCheck
} from "../../../Utils/Api.js";
// import authorize from '../../../components/Authorize';
import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue";
@ -199,9 +207,13 @@
],
//
czList: '',
nopaylist: [1, 2, 3, 4, 5],
assetsstu: 2,
userphone:'' //
nopaylist: [],
assetsstu: 2,
userphone: '', //
userAccount: '', //,
countdownm: '', //
countdowns: '', //
}
},
//page.json "enablePullDownRefresh": true
@ -310,9 +322,9 @@
// #endif
},
methods: {
//
findUser() {
let params;
findUser(params).then(res => {
findUser().then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
@ -321,8 +333,9 @@
this.therrNum = res.return_data.unpaid;
this.whetherCheckNum = res.return_data.whetherCheckNum;
this.orderPayNum = res.return_data.orderPayNum;
this.rechargeOrderNum = res.return_data.rechargeOrderNum;
this.rechargeOrderNum = res.return_data.rechargeOrderNum;
this.geTel(this.user.phone);
this.getUserOrderList();
uni.setStorage({
key: "user",
data: res.return_data
@ -330,6 +343,27 @@
}
});
},
//
getUserOrderList() {
uni.showLoading({
title: '加载中...'
})
let pagenum = this.pageNum;
let params = {
status: 1,
pageNum: 1,
pageSize: 5
}
getUserOrderList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.list != '') {
this.nopaylist = res.return_data.list;
this.timesettime(res.return_data.list[0].createTime);
} else {
this.nopaylist = [];
}
})
},
//
jumplogin() {
uni.navigateTo({
@ -352,9 +386,61 @@
this.assetsstu = 2;
}
if (item == 2) {
this.assetsstu = 1;
this.getUserAccount();
}
},
//
getUserAccount() {
getUserAccount().then(res => {
if (res.return_code == '000000') {
this.assetsstu = 1;
this.userAccount = res.return_data;
}
});
},
//
swiperChange(e) {
this.timesettime(this.nopaylist[e.detail.current].createTime);
},
//
jumpDetails(e, item) {
this.orderCheck(e);
if (item == 1 || item == 2 || item == 3) {
uni.navigateTo({
url: '/qianzhu-KFC/order-details/order-details?id=' + e
})
return;
}
uni.navigateTo({
url: '/pages/user/order_details/order_details?id=' + e
})
},
//
orderCheck(item) {
let datas = {
orderNo: item
}
orderCheck(datas).then(res => {
});
},
//
timesettime(item) {
var nowtime = new Date(), //
endtime = item + 600000; //
var lefttime = endtime - nowtime, //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime /
(1000 * 60 * 60) % 24) + leftd * 24) : Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd *
24), //
leftm = Math.floor(lefttime / (1000 * 60) % 60) < 10 ? "0" + Math.floor(lefttime / (1000 * 60) % 60) :
Math.floor(lefttime / (1000 * 60) % 60), //
lefts = Math.floor(lefttime / 1000 % 60) < 10 ? "0" + Math.floor(lefttime / 1000 % 60) : Math.floor(
lefttime / 1000 % 60); //
this.countdownm = leftm //
this.countdowns = lefts //
},
// 广
jumppage(item) {
if (item == 1) {

@ -8,8 +8,8 @@
</view>
<scroll-view scroll-x='true' :style="{top:headerswiperTop}" class="srollview width100" scroll-with-animation>
<view class="conent" :class="[ordertypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index">{{item}}</view>
<view class="conent" :class="[ordertypeid == item.codeValue ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index" @tap="selectlist(item)">{{item.codeName}}</view>
</scroll-view>
<view class="place"></view>
<view class="list">
@ -23,48 +23,55 @@
<view class="carrier">
<view class="left">
<view class="alijusstart" style="margin-top: -7px;">
<view class="alijus font12 fotct fcorfff"
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1"
style="width: 70px;height: 20px;background-color: #FFBDBA;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
满减券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2"
style="width: 70px;height: 20px;background-color: #3ecbb0;margin-right: 2px;">
<image src="../../../static/img/user/user15.png" mode="widthFix" class="icon12">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
抵扣券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3"
style="width: 70px;height: 20px;background-color: #7986AA;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
折扣券
</view>
</view>
<view class="title alijusstart">
<text class="height20 fotct fcorfff font11"
style="width: 50px;background-color: #347edd;border-radius: 20px;">话费券</text>
<view class="text1 width70">{{row.highDiscount.discountName}}</view>
style="width: 50px;background-color: #347edd;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text>
<view class="text1 width70">{{row.discountName}}</view>
</view>
<view class="term">
有效期:{{row.useEndTime | formatDate('-')}}
</view>
</view>
<view class="right">
<view class="ticket">
<view class="num" v-if="row.highDiscount.discountType == 3">
{{row.highDiscount.discountPrice * 10}}
<view class="ticket" style="background-color: #009DFF;padding-top: 1vw;">
<view class="num" v-if="row.discountType == 3">
{{row.discountPrice * 10}}
</view>
<view class="num" v-else>
{{row.highDiscount.discountPrice}}
{{row.discountPrice}}
</view>
<view class="unit" v-if="row.highDiscount.discountType == 3">
<view class="unit" v-if="row.discountType == 3">
</view>
<view class="unit" v-else>
</view>
</view>
<!-- <view class="criteria">
{{row.highDiscount.discountName}}
</view> -->
<!-- #ifdef MP -->
<view class="use" @click="jumpcoupons(row)">
去使用
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<!-- <view class="btnsclick" v-if="row.highDiscount.usingRange == 5"
@click="useDiscount(row.discountAgentCodeId)"></view> -->
<view class="use" @click="jumpcoupons(row)">
去使用
</view>
@ -79,34 +86,58 @@
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in couponinvalidList" :key="index">
<!-- content -->
<view class="carrier">
<view class="left">
<view class="title">
{{row.highDiscount.discountName}}
<view class="alijusstart" style="margin-top: -7px;">
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
满减券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
抵扣券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
折扣券
</view>
</view>
<view class="title alijusstart">
<text class="height20 fotct fcorfff font11"
style="width: 50px;background-color: #999999;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text>
<view class="text1 width70">{{row.discountName}}</view>
</view>
<view class="term">
使用时间:{{row.useTime | formatDate('-')}}
有效期:{{row.useEndTime | formatDate('-')}}
</view>
<image src="../../../static/img/user/use.png" mode="widthFix"
style="position: absolute;right: 5px;top: 5px;" class="icon50"></image>
</view>
<view class="right invalid">
<view class="ticket">
<view class="num">
{{row.highDiscount.discountPrice}}
<view class="right">
<view class="ticket" style="background-color: #999999;padding-top: 7vw;">
<view class="num" v-if="row.discountType == 3">
{{row.discountPrice * 10}}
</view>
<view class="num" v-else>
{{row.discountPrice}}
</view>
<view class="unit">
<view class="unit" v-if="row.discountType == 3">
</view>
<view class="unit" v-else>
</view>
</view>
<view class="criteria">
{{row.highDiscount.discountName}}
</view>
<view class="use">
已使用
</view>
</view>
</view>
</view>
</view>
<!-- 已过期 -->
<view class="sub-list" v-if="typeClass == 'noinvalid'">
@ -114,34 +145,58 @@
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in couponnoinvalidList" :key="index">
<!-- content -->
<view class="carrier">
<view class="left">
<view class="title">
{{row.highDiscount.discountName}}
<view class="alijusstart" style="margin-top: -7px;">
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 1"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
满减券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 2"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
抵扣券
</view>
<view class="alijus font12 fotct fcorfff" v-if="row.discountType == 3"
style="width: 70px;height: 20px;background-color: #999999;margin-right: 2px;">
<image src="../../../static/img/user/user16.png" mode="widthFix" class="icon12">
</image>
折扣券
</view>
</view>
<view class="title alijusstart">
<text class="height20 fotct fcorfff font11"
style="width: 50px;background-color: #999999;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}</text>
<view class="text1 width70">{{row.discountName}}</view>
</view>
<view class="term">
过期时间:{{row.useEndTime | formatDate('-')}}
有效期:{{row.useEndTime | formatDate('-')}}
</view>
<image src="../../../static/img/user/overdue.png" mode="widthFix"
style="position: absolute;right: 5px;top: 5px;" class="icon50"></image>
</view>
<view class="right invalid">
<view class="ticket">
<view class="num">
{{row.highDiscount.discountPrice}}
<view class="right">
<view class="ticket" style="background-color: #999999;padding-top: 7vw;">
<view class="num" v-if="row.discountType == 3">
{{row.discountPrice * 10}}
</view>
<view class="num" v-else>
{{row.discountPrice}}
</view>
<view class="unit">
<view class="unit" v-if="row.discountType == 3">
</view>
<view class="unit" v-else>
</view>
</view>
<view class="criteria">
{{row.highDiscount.discountName}}
</view>
<view class="use">
已过期
</view>
</view>
</view>
</view>
</view>
</view>
<view :style="{display: usercouFeedbackHidden}" class="popup_content">
@ -179,7 +234,8 @@
import {
getUserDiscountList,
verifyWx,
useDiscount
useDiscount,
getDictionaryByCodeType
} from '../../../Utils/Api.js';
// #ifdef H5
var wx = require('jweixin-module');
@ -193,8 +249,8 @@
couponnoinvalidList: [],
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png',
headerTop: 0,
headerswiperTop:'45px',
headerTop: 0,
headerswiperTop: '45px',
//
typeClass: 'valid',
subState: '',
@ -206,9 +262,10 @@
isNoMoreData: false,
loadingText: '',
couponcout: 0,
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
ordertypeid: 1, //id
usercouFeedbackHidden: 'none', //
orderTyplist: '', //
statusid: '' //
}
},
onPageScroll(e) {
@ -249,11 +306,11 @@
// #endif
},
onLoad() {
// #ifdef H5
this.headerTop = '44PX';
this.headerswiperTop = '89px';
// #endif
this.getUserDiscountList(1);
// #ifdef H5
this.headerTop = '44PX';
this.headerswiperTop = '89px';
// #endif
this.getDictionaryByCodeType();
},
filters: {
//
@ -271,6 +328,15 @@
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
},
//
msgFormat: function(value, value1) {
for (var i = 0; i < value.length; i++) {
if (value1 == value[i].codeValue) {
let a = value[i].codeName;
return a;
}
}
}
},
onReachBottom() {
@ -285,6 +351,7 @@
methods: {
//
getUserDiscountList(item) {
this.statusid = item;
uni.showLoading({
title: '加载中...'
})
@ -297,7 +364,8 @@
let params = {
pageNum: pagenum,
status: item,
pageSize: this.pageSize
pageSize: this.pageSize,
useScope: this.ordertypeid
}
getUserDiscountList(params).then(res => {
if (res.return_code == '000000') {
@ -323,31 +391,55 @@
}
})
},
//
getDictionaryByCodeType() {
let datas = {
codeType: 'USING_RANGE'
}
getDictionaryByCodeType(datas).then(res => {
if (res.return_code == '000000') {
this.orderTyplist = res.return_data;
this.ordertypeid = res.return_data[0].codeValue;
this.getUserDiscountList(1);
}
})
},
//
selectlist(item) {
this.ordertypeid = item.codeValue;
this.pageNum = 1;
this.couponValidList = [];
this.couponinvalidList = [];
this.couponnoinvalidList = [];
this.isNoMoreData = false;
this.getUserDiscountList(this.statusid);
},
//
jumpcoupons(e) {
if (e.highDiscount.useScope == 3) {
if (e.useScope == 3) {
uni.navigateTo({
url: '../../../subPages/recharge/recharge'
})
} else if (e.highDiscount.useScope == 4) {
} else if (e.useScope == 4) {
app.globalData.distinguishid = 1;
uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order'
})
} else if (e.highDiscount.useScope == 5) {
} else if (e.useScope == 5) {
app.globalData.distinguishid = 2;
uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order'
})
} else if (e.highDiscount.useScope == 6) {
} else if (e.useScope == 6) {
uni.navigateTo({
url: '/member-Recharge/choicepage/choicepage'
})
}else if (e.highDiscount.useScope == 7) {
} else if (e.useScope == 7) {
uni.navigateTo({
url: '/pages/goods/refuel/refuel'
})
} else if (e.highDiscount.usingRange == 5) {
} else if (e.usingRange == 5) {
this.useDiscount(e.discountAgentCodeId);
} else {
uni.navigateTo({
@ -782,8 +874,8 @@
}
.ticket {
background-image: radial-gradient(6px at top left, #f5f5f5 50px, #009DFF);
padding-top: 1vw;
// background-image: radial-gradient(6px at top left, #f5f5f5 50px, #009DFF);
// padding-top: 1vw;
justify-content: center;
align-items: baseline;

@ -131,14 +131,14 @@
///
// #ifdef H5
let params = {
"orderId": res.return_data.id,
"orderNo": res.return_data.orderNo,
"openId": app.globalData.openId,
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": res.return_data.id,
"orderNo": res.return_data.orderNo,
"openId": app.globalData.openId,
"openIdType": 1
}
@ -187,7 +187,9 @@
} else {
uni.showToast({
title: res.return_msg
title: res.return_msg,
duration:2000,
icon:'none'
});
}
})

@ -14,7 +14,7 @@
<view class="width100 font18 fcorfff fotct height40p">
{{typeText[recinfo.orderStatus]}}
</view>
<view class="width90 fcorfff font18 mart10">实付:{{recinfo.payRealPrice}}</view>
<view class="width90 fcorfff font18 mart10" v-if="recinfo.payRealPrice">实付:{{recinfo.payRealPrice}}</view>
<view class="width90 fcorfff font14 mart10">{{recinfo.createTime | formatDate('-')}}</view>
<view class="width90 mart20" style="border-bottom: 1px dashed #7BC1F5;"></view>
@ -426,7 +426,7 @@
</image>{{recinfo.payPrice*100}}
</view>
</view>
<view class="btn" @tap="cancelOrder" style="border: 1px solid #0083f5;color: #0083f5;">取消订单</view>
<view class="btn" @tap="cancel" style="border: 1px solid #0083f5;color: #0083f5;">取消订单</view>
<view class="btn" @tap="toPay" style="background-color: #0083f5;color: #fff;">去支付</view>
</view>
</view>
@ -443,7 +443,7 @@
<script>
import {
getDetailByOrderNo,
cancelOrder,
cancel,
getPreByOrderIdId,
orderComplete,
getOrderByOrderNo
@ -581,7 +581,7 @@
//
showtime() {
var nowtime = new Date(), //
endtime = this.recinfo.createTime + 900000; //
endtime = this.recinfo.createTime + 600000; //
var lefttime = endtime - nowtime, //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime /
@ -639,7 +639,7 @@
}
});
},
cancelOrder() {
cancel() {
let that = this;
uni.showModal({
title: '取消订单',
@ -650,9 +650,9 @@
title: '加载中...'
})
let params = {
orderId: this.recinfo.id
orderNo: this.recinfo.id
}
cancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({

@ -342,20 +342,20 @@
} else {
payTypes = 2;
}
if (row.highChildOrderList[0].goodsType == 4 || row.highChildOrderList[0].goodsType == 9 || row
.highChildOrderList[0].goodsType == 10) {
// if (row.highChildOrderList[0].goodsType == 4 || row.highChildOrderList[0].goodsType == 9 || row
// .highChildOrderList[0].goodsType == 10) {
uni.redirectTo({
url: '/qianzhu-KFC/payment-method/payment-method?orderId=' + row.id + '&amount=' + row
.payPrice + '&productType=' + row.productType
})
return;
}
uni.redirectTo({
url: "/pages/pay/payment/payment?amount=" + row.payPrice +
'&paytype=' + payTypes + '&orderId=' + row.id + '&couponId=' + this.orderList[0]
.highChildOrderList[0].goodsId + '&typeaout=' + this.orderList[0].highChildOrderList[0]
.ext1 + '&goodsType=' + row.highChildOrderList[0].goodsType
})
// return;
// }
// uni.redirectTo({
// url: "/pages/pay/payment/payment?amount=" + row.payPrice +
// '&paytype=' + payTypes + '&orderId=' + row.id + '&couponId=' + this.orderList[0]
// .highChildOrderList[0].goodsId + '&typeaout=' + this.orderList[0].highChildOrderList[0]
// .ext1 + '&goodsType=' + row.highChildOrderList[0].goodsType
// })
}
}
}

@ -62,7 +62,8 @@
</image>
</view>
授权即表示同意
<text style="color: #089BF5;" @click="getDocument(1)">注册协议</text><text style="color: #089BF5;" @click="getDocument(2)">服务协议</text>
<text style="color: #089BF5;" @click="getDocument(1)">注册协议</text><text style="color: #089BF5;"
@click="getDocument(2)">服务协议</text>
</view>
</view>
<!-- 授权按钮 -->
@ -84,8 +85,8 @@
getUserInfo,
loginByPhone,
HandleCode,
loginByTel,
sendSmsCodeByHw
phone,
getLoginSMSCode
} from "../../Utils/Api.js"
export default {
data() {
@ -124,16 +125,16 @@
// #endif
this.user = app.globalData.userInfo;
},
methods: {
methods: {
//
getchecked() {
this.disabled = !this.disabled
},
//
getDocument(item){
uni.navigateTo({
url:'./agreement/agreement?id='+item
})
},
//
getDocument(item) {
uni.navigateTo({
url: './agreement/agreement?id=' + item
})
},
getuserinfo() {
let that = this;
@ -185,15 +186,15 @@
that.isShowAuth = false
},
//
loginByPhone(PhoneNumber) {
if (this.disabled == false) {
uni.showToast({
title: '请勾选用户协议',
icon: "none",
duration:2000
})
return;
}
loginByPhone(PhoneNumber) {
if (this.disabled == false) {
uni.showToast({
title: '请勾选用户协议',
icon: "none",
duration: 2000
})
return;
}
if (PhoneNumber.detail.iv == undefined) {
uni.showToast({
title: "用户取消授权",
@ -246,15 +247,15 @@
})
},
//
updateStu(item) {
if (this.disabled == false) {
uni.showToast({
title: '请勾选用户协议',
icon: "none",
duration:2000
})
return;
}
updateStu(item) {
if (this.disabled == false) {
uni.showToast({
title: '请勾选用户协议',
icon: "none",
duration: 2000
})
return;
}
this.type = item;
},
//
@ -274,10 +275,9 @@
title: '发送中...'
})
let params = {
phone: this.phoneNumber,
HWMSG: 5
phone: this.phoneNumber
}
sendSmsCodeByHw(params).then(res => {
getLoginSMSCode(params).then(res => {
if (res.return_code == '000000') {
this.getCodeisWaiting = true;
uni.showToast({
@ -334,9 +334,12 @@
})
let params = {
phone: this.phoneNumber,
code: this.code
type: "SMS",
platform: "H5",
smsCode: this.code
}
loginByTel(params).then(res => {
phone(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
app.globalData.token = res.return_data.uniqueCode;
@ -448,7 +451,7 @@
background-color: #089BF5;
margin-right: 10rpx;
border-radius: 50%;
text-align: center;
text-align: center;
vertical-align: sub;
}
@ -523,7 +526,7 @@
font-weight: 700;
background-color: #089bf5;
width: 40%;
padding: 0px;
padding: 0px;
color: #fff;
}

@ -69,7 +69,15 @@
style="text-decoration: line-through;"> ¥{{orderPrice}}</text>
</view>
</view>
</view>
</view>
<view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<view class="width94 concont mart10 backcorfff">
<view class="height50 width100 paddtop5 backcorfff" @click="showPopup()">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
@ -287,7 +295,7 @@
wechatPay,
cardPay,
getUserOrderPreList,
thirdCancelOrder,
cancel,
getRebateIntegral
} from '../../Utils/Api.js';
// #ifdef H5
@ -332,7 +340,8 @@
orderPrice: 0, //
rechargeDes: '', //
rebateIntegral: '', //
Integrastu: 1 //
Integrastu: 1 ,//
identificationCode: '', //
}
},
onLoad() {
@ -593,15 +602,14 @@
"productType": this.productType,
"orderItems": data2,
"eatType": this.sttypeid,
"goodsType": 9,
"goodsType": 4,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
}
console.log('======'+JSON.stringify(datas));
}
if (this.typeid == 2) {
datas = {
@ -612,12 +620,12 @@
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"goodsType": 4,
"goodsType": 9,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
}
}
@ -643,9 +651,9 @@
//
thirdCancelOrder() {
let params = {
orderId: this.orderId,
orderNo: this.orderId,
}
thirdCancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
this.orderId = '';
}
@ -874,15 +882,16 @@
"productType": this.productType,
"orderItems": data2,
"eatType": this.sttypeid,
"goodsType": 9,
"goodsType": 4,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
}
}
console.log('======'+JSON.stringify(datas));
}
if (this.typeid == 2) {
datas = {
@ -892,16 +901,17 @@
"storeCode":this.storeCode,
"platformId": this.showType,
"productType": this.productType,
"orderItems": data2,
"goodsType": 4,
"orderItems": this.orderList,
"goodsType": 9,
"saleCount": 1,
}],
"payGold": this.priceValue[1],
"companyId": app.globalData.companyId,
// "promoteCode": this.identificationCode,
"promoteCode": this.identificationCode,
"memDiscountId": this.memDiscountId,
"payPwd": this.PaymentPassword
}
}
}
create(datas).then(res => {

@ -185,7 +185,7 @@
slist: [], //
tlist: [], //
cateList: [],
storeCode: '', //
storeCode: '25477', //
cupSize: '', //
cupSizeid: '', //id
temperature: '', //
@ -211,7 +211,7 @@
}
},
onLoad(options) {
this.storeCode = options.storeCode;
// this.storeCode = options.storeCode;
this.starttime = options.sttime;
this.endtime = options.entime;
this.getStarbucksProducts();

@ -21,18 +21,18 @@
</view>
<view v-if="(orderList.orderStatus == 2 || orderList.orderStatus == 3 )">
<view v-if="typeid == 4 && orderList.list && phonestu == 2">
<view v-if="typeid == 4 && recinfo.list && phonestu == 2">
<view class="width90 mart15" style="display: flow-root;">
<view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6"
v-for="(item,index) in orderList.list" :key='index'>{{item.code}}
v-for="(item,index) in recinfo.list" :key='index'>{{item.code}}
<text class="medldcode fcorfff border-r font11">尾号{{item.phone}}</text>
</view>
</view>
</view>
<view class="fotct" v-if="typeid == 4 && orderList.list && phonestu == 1">
<view class="fotct" v-if="typeid == 4 && recinfo.list && phonestu == 1">
<view class="width90 mart15" style="display: flow-root;">
<view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6"
v-for="(item,index) in orderList.list" :key='index'>{{item.code}}
v-for="(item,index) in recinfo.list" :key='index'>{{item.code}}
<text class="medldcode fcorfff border-r font11">取餐码</text>
</view>
</view>
@ -46,11 +46,11 @@
<view class="width94 fcor666 font12 mart5">如有询问手机尾号请点击右侧按钮查看</view>
</view>
<view class="width30">
<view class="phoneck width85 border-r" v-if="typeid == 4 && orderList.list && phonestu == 1"
<view class="phoneck width85 border-r" v-if="typeid == 4 && recinfo.list && phonestu == 1"
@click="updatestu(2)">
查看手机尾号
</view>
<view class="phoneck width85 border-r" v-if="typeid == 4 && orderList.list && phonestu == 2"
<view class="phoneck width85 border-r" v-if="typeid == 4 && recinfo.list && phonestu == 2"
@click="updatestu(1)">
隐藏手机尾号
</view>
@ -59,15 +59,15 @@
</view>
<!-- 星巴克 -->
<view v-if="typeid == 9 && orderList.object.orderItems[0].code">
<view v-if="typeid == 9 && recinfo.object.orderItems[0].code">
<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 recinfo.object.orderItems" :key='index'>{{item.code}}</view>
</view>
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !orderList.list">
{{orderList.statusDesc}}
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !recinfo.list">
{{recinfo.statusDesc}}
</view>
<view class="fotct font20 width100 mart10 color2f6f43"
v-if="typeid == 9 && !orderList.object.orderItems[0].code">{{orderList.statusDesc}}</view>
v-if="typeid == 9 && !recinfo.object.orderItems[0].code">{{recinfo.statusDesc}}</view>
</view>
</view>
@ -76,7 +76,7 @@
充值明细
</view>
<view class="width94 paddtop15 font16 fontwig6 alijusstart" v-else>
<image src="../static/imgs/desloca.png" mode="widthFix" class="icon20 marglerig"></image> 南充麦当劳潆华南路餐厅
<image src="../static/imgs/desloca.png" mode="widthFix" class="icon20 marglerig"></image> {{orderList.highChildOrderList[0].storeName}}
</view>
<view class="width100 mart5">
<view class="width90 alijusstart mart15" v-for="(item,index) in orderList.highChildOrderList"
@ -85,15 +85,15 @@
<image :src="item.goodsImg" v-if="item.goodsImg" mode="widthFix" class="width100"></image>
<image src="../static/imgs/vipcz.png" v-else mode="widthFix" class="width90w"></image>
</view>
<view class="width50 font13 fcor666">
<view class="width50 font13 fcor333 fontwig6">
<view>{{item.goodsName}}</view>
<view class="font12 fcor999">{{item.saleCount}} </view>
<view class="font13 fcor999">{{item.saleCount}} </view>
</view>
<view class="width20">
<view class="width100 fcor333 font12">¥<text
<view class="width100 fcor333 font12 fotrt">¥<text
class="fontwig6 font16">{{item.goodsActualPrice}}</text>
</view>
<view class="width100 fcor999 font12" v-if="item.goodsActualPrice != item.goodsPrice"
<view class="width100 fcor999 font14 fotrt" v-if="item.goodsActualPrice != item.goodsPrice"
style="text-decoration: line-through;">
¥{{item.goodsPrice}}</view>
</view>
@ -117,7 +117,10 @@
</view>
<view class="width92 fotrt mart5 font14 fcor999">
优惠券 <text class="margle fcoreb5 font16 fontwig6">¥ {{orderList.deductionPrice}}</text>
优惠券优惠 <text class="margle fcoreb5 font16 fontwig6">¥ {{orderList.deductionCouponPrice}}</text>
</view>
<view class="width92 fotrt mart5 font14 fcor999">
商品优惠 <text class="margle fcoreb5 font16 fontwig6">¥ {{orderList.deductionProductPrice}}</text>
</view>
<view class="width92 fotrt mart5 font14 fcor999">
积分抵扣 <text class="margle fcoreb5 font16 fontwig6">¥ {{(orderList.payGold / 100).toFixed(2)}}</text>
@ -143,14 +146,18 @@
<view class="width30">流水号</view>
<view class="width70 fcor333 fotrt">{{orderList.paySerialNo}}</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.paySerialNo">
<view class="width94 alijusstart mart20 font14 fcor666">
<view class="width30">下单时间</view>
<view class="width70 fcor333 fotrt">{{orderList.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666">
<view class="width30">支付时间</view>
<view class="width70 fcor333 fotrt">{{orderList.payTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="typeid == 4">
<view class="width30">就餐方式</view>
<view class="width70 fotrt" v-if="orderList.eatType == 1">店内就餐</view>
<view class="width70 fcor333 fotrt" v-if="orderList.eatType == 2">打包带走</view>
<view class="width70 fotrt" v-if="recinfo.eatType == 1">店内就餐</view>
<view class="width70 fcor333 fotrt" v-if="recinfo.eatType == 2">打包带走</view>
</view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.payType">
<view class="width30">支付方式</view>
@ -173,7 +180,7 @@
<!-- 再来一单 -->
<view class="height50 width100"></view>
<view class="bottomstu backcorfff width100 height50 alijusend">
<view class="bottomstu backcorfff width100 height50 alijusend" v-if="orderList.orderStatus == 3">
<button open-type="contact" class="cusservice font12 fcor666">联系客服</button>
<view class="buybtn font12 fcorfff">再来一单</view>
</view>
@ -184,7 +191,7 @@
<script>
import {
getThirdOrderByOrderNo,
thirdCancelOrder,
cancel,
getDetailByOrderNo
} from '../../Utils/Api.js';
export default {
@ -218,7 +225,7 @@
this.orderId = options.id;
},
onShow() {
this.getThirdOrderByOrderNo();
this.getDetailByOrderNo();
},
onUnload() {
clearInterval(this.timer);
@ -245,34 +252,42 @@
}
getDetailByOrderNo(params).then(res => {
uni.hideLoading();
// if (res.return_code == '000000') {
// this.recinfo = res.return_data;
// }
if (res.return_code == '000000') {
this.recinfo = res.return_data;
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
if (this.orderList.orderStatus == 1) {
this.timer = setInterval(() => {
this.showtime()
})
}
if (this.orderList.orderStatus == 2) {
this.setTimer();
}
this.coutnums = 0;
this.getAllCount();
this.getThirdOrderByOrderNo();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
//
getThirdOrderByOrderNo() {
// uni.showLoading({
// title: '...'
// })
let datas = {
orderNo: this.orderId
}
getThirdOrderByOrderNo(datas).then(res => {
// uni.hideLoading();
uni.hideLoading();
if (res.return_code == '000000') {
this.typeid = res.return_data.highChildOrderList[0].goodsType;
this.orderList = res.return_data;
if (this.orderList.orderStatus == 1) {
this.timer = setInterval(() => {
this.showtime()
})
}
if (this.orderList.orderStatus == 2) {
this.setTimer();
}
this.coutnums = 0;
this.getAllCount();
this.recinfo = res.return_data;
} else {
uni.showToast({
title: res.return_msg,
@ -294,9 +309,9 @@
title: '加载中...'
})
let params = {
orderId: this.orderId,
orderNo: this.orderId,
}
thirdCancelOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
@ -351,7 +366,7 @@
//
showtime() {
var nowtime = new Date(), //
endtime = this.orderList.createTime + 900000; //
endtime = this.orderList.createTime + 600000; //
var lefttime = endtime - nowtime, //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime /

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@ -23,6 +23,13 @@
</view>
</view>
</view>
<view class="width94 backcorfff mart10">
<view class="width94 alijusstart height50 font14 fcor666">
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view>
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" />
</view>
</view>
<view class="width94 comorder mart10">
<view class="height50 width100 backcorfff">
@ -30,7 +37,7 @@
支付方式:
</view>
</view>
<view class="width94 line1 mart5 marb5"></view>
<!-- <view class="width94 line1 mart5 marb5"></view>
<view class="height50 width100 backcorfff" @tap="paytype='jinbi'">
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text>
@ -39,7 +46,7 @@
style="align-items: center;">
<radio :checked="paytype=='jinbi'" color="#0083f5" />
</view>
</view>
</view> -->
<view class="width94 line1 mart5 marb5"></view>
<view class="height50 width100 backcorfff" @tap="paytype='weixin'">
<view class="width50 flleft fcor333 font16" style="padding-left: 4%;">
@ -88,13 +95,13 @@
<script>
import {
addOrder,
create,
getDiscountPackageDetail,
loginByPhone,
orderToPay,
wechatPay,
orderToGoldPay,
findUser,
hltUnionCardPay,
cardPay,
getHuiLianTongCardBalance
} from '../../Utils/Api.js';
import ssPaymentPassword from '../../components/sanshui-payment-password'
@ -108,13 +115,7 @@
},
data() {
return {
buylist: [], //
goodsPrice: 0.0, //
sumPrice: 0.0, //
freight: 12.00, //
note: '', //
int: 1200, //
deduction: 0, //
couponId: '',
couponList: [],
UserNormalDiscountList: [],
@ -127,15 +128,21 @@
paytype: '',
PaymentPassword: '',
orderId: '',
jumpType: '',
tongCardPrice: 0,
storeId: '',
isDiscont: false
isDiscont: false,
identificationCode: '' //
};
},
onLoad(option) {
this.couponId = option.id;
this.couponId = option.id;
// #ifdef H5
this.identificationCode = app.globalData.staffCode;
// #endif
// #ifdef MP
this.identificationCode = app.globalData.identificationCode;
// #endif
this.getDiscountPackageDetail();
},
onShow() {
@ -178,8 +185,10 @@
findUser(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
this.getHuiLianTongCardBalance();
this.user = res.return_data;
if(res.return_data.hltCardNo != undefined){
this.getHuiLianTongCardBalance();
}
uni.setStorage({
key: "user",
data: res.return_data
@ -223,7 +232,7 @@
// H5
jumpH5Bding() {
uni.navigateTo({
url:'../../pages/login/register'
url: '../../pages/login/register'
})
},
//
@ -280,19 +289,19 @@
this.storeId = app.globalData.storeid
}
let goods = {
"highChildOrderList": [{
"goodsType": 7,
"childOrderList": [{
"goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 7,
"saleCount": 1,
"storeId": this.storeId
}]
}],
"promoteCode": this.identificationCode
}
addOrder(goods).then(res => {
create(goods).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
this.jumpType = res.return_data.highChildOrderList[0].ext1;
this.orderId = res.return_data.id;
this.orderToPay(res.return_data);
this.orderId = res.return_data.orderNo;
this.wechatPay(res.return_data);
} else {
uni.hideLoading();
uni.showToast({
@ -313,7 +322,7 @@
success() {
setTimeout(() => {
uni.navigateTo({
url:'../../pages/user/bindingCard/bindingCard'
url: '../../pages/user/bindingCard/bindingCard'
})
}, 1000)
}
@ -322,25 +331,24 @@
}
},
//
orderToPay(item) {
wechatPay(item) {
let that = this;
if (that.paytype == 'weixin') {
// #ifdef H5
let params = {
"orderId": item.id,
"orderNo": item.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": item.id,
"orderNo": item.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
"openIdType": 1
}
// #endif
orderToPay(params).then(res => {
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
@ -360,8 +368,8 @@
})
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url:'../coupon-comfirmation-success/coupon-comfirmation-success'
uni.reLaunch({
url: '../coupon-comfirmation-success/coupon-comfirmation-success'
});
},
fail: function(err) {
@ -384,29 +392,6 @@
})
}
})
} else if (that.paytype == 'jinbi') {
if (that.user.gold < that.paytheprice * 100) {
uni.showToast({
icon: 'none',
title: '积分不足',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url:'../../pages/user/deposit/deposit'
})
}, 1000)
}
});
return;
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url:'../../pages/login/updatePas/updatePas'
})
return;
}
that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'gonghuika') {
if (that.tongCardPrice < that.paytheprice) {
uni.showToast({
@ -418,7 +403,7 @@
}
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url:'../../pages/login/updatePas/updatePas'
url: '../../pages/login/updatePas/updatePas'
})
return;
}
@ -430,7 +415,7 @@
success() {
setTimeout(() => {
uni.navigateTo({
url:'../../pages/user/bindingCard/bindingCard'
url: '../../pages/user/bindingCard/bindingCard'
})
}, 1000)
}
@ -459,55 +444,26 @@
uni.showLoading({
title: '支付中...'
})
if (this.paytype == 'jinbi') {
let params = {
"orderId": this.orderId,
"password": this.PaymentPassword
}
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url:'../coupon-comfirmation-success/coupon-comfirmation-success'
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url:'../../pages/login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
let params = {
"orderId": this.orderId,
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword
}
hltUnionCardPay(params).then(res => {
cardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url:'../coupon-comfirmation-success/coupon-comfirmation-success'
uni.reLaunch({
url: '../coupon-comfirmation-success/coupon-comfirmation-success'
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url:'../../pages/login/updatePas/updatePas'
url: '../../pages/login/updatePas/updatePas'
})
return;
}
@ -552,8 +508,8 @@
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url:'../coupon-comfirmation-success/coupon-comfirmation-success'
uni.reLaunch({
url: '../coupon-comfirmation-success/coupon-comfirmation-success'
});
},
cancel: function(r) {},

@ -176,7 +176,7 @@
<script>
import {
getPhoneOrderById,
cancelRechargeOrder,
cancel,
} from '../../Utils/Api.js'
let app = getApp()
export default {
@ -263,9 +263,9 @@
title: '加载中...'
})
let params = {
orderId: this.recinfo.id
orderNo: this.recinfo.orderNo
}
cancelRechargeOrder(params).then(res => {
cancel(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({

@ -66,8 +66,8 @@
<script>
let app = getApp()
import {
addOrder,
orderToPay,
create,
wechatPay,
getHuiLianTongCardBalance
} from "../../Utils/Api.js";
// #ifdef H5
@ -142,37 +142,36 @@
uni.showLoading({
title: '正在提交订单...'
})
let datas = {
"identificationCode": app.globalData.identificationCode,
"memCardNo": this.cardId,
"highChildOrderList": [{
"goodsType": 8,
"goodsId": app.globalData.userInfo.id,
"saleCount": 1,
"goodsPrice": this.inputAmount
}]
}
let datas = {
"childOrderList": [{
"goodsId": app.globalData.userInfo.id,
"goodsPrice": this.inputAmount,
"goodsType": 8,
"saleCount": 1,
goodsSpecName:this.cardId
}]
}
let that = this;
addOrder(datas).then(res => {
create(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
///
// #ifdef H5
let params = {
"orderId": res.return_data.id,
"orderNo": res.return_data.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
"orderNo": res.return_data.orderNo,
"openId": app.globalData.openId,
"openIdType": 1
}
// #endif
orderToPay(params).then(res => {
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({

@ -895,4 +895,8 @@ $uni-font-size-paragraph:30upx;
.icon45 {
width: 45px;
}
.icon50 {
width: 50px;
}
Loading…
Cancel
Save