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

@ -7,6 +7,7 @@ import {
let app = getApp(); let app = getApp();
let base = app.globalData.url; let base = app.globalData.url;
let orderbase = app.globalData.orderurl; let orderbase = app.globalData.orderurl;
let userbase = app.globalData.userurl;
let v1base = app.globalData.v1url; let v1base = app.globalData.v1url;
let brestBase = app.globalData.brestUrl; 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 => { export const GetPhoneNumber = params => {
return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data); return POST('GET', `${base}/wechat/getPhoneNumber`, params).then(res => res.data);
@ -46,21 +42,13 @@ export const findByLatAndLng = params => {
} }
//获取用户信息 //获取用户信息
export const findUser = params => { // export const findUser = params => {
return POST('GET', `${base}/highUser/findUser`, params).then(res => res.data); // 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 WXlogin = params => { export const WXlogin = params => {
return POST('GET', `${base}/wechat/login`, params).then(res => res.data); 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获取用户的信息 //通过openid获取用户的信息
export const OpenidGetUser = (openId, params) => { export const OpenidGetUser = (openId, params) => {
return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data); return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data);
@ -137,10 +125,6 @@ export const getUserCouponDetail = params => {
export const getUserNewCouponDetail = params => { export const getUserNewCouponDetail = params => {
return POST('GET', `${base}/coupon/getUserNewCouponDetail`, params).then(res => res.data); 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 => { export const cancelOrder = params => {
return POST('GET', `${base}/highOrder/cancelOrder`, params).then(res => res.data); return POST('GET', `${base}/highOrder/cancelOrder`, params).then(res => res.data);
@ -198,10 +182,6 @@ export const getCouponByDiscount = params => {
export const againReceiveCoupon = params => { export const againReceiveCoupon = params => {
return POST('GET', `${base}/coupon/againReceiveCoupon`, params).then(res => res.data); 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 => { export const useDiscount = params => {
return POST('GET', `${base}/discount/useDiscount`, params).then(res => res.data); return POST('GET', `${base}/discount/useDiscount`, params).then(res => res.data);
@ -245,11 +225,7 @@ export const oilPriceDiscountCompute = params => {
//在线加油优惠券 //在线加油优惠券
export const canUseDiscount = params => { export const canUseDiscount = params => {
return POST('POST', `${base}/userDiscount/canUseDiscount`, params).then(res => res.data); 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 => { export const getDictionaryByCodeType = params => {
@ -396,10 +372,6 @@ export const listByStoreCode = params => {
export const getThirdOrderByOrderNo = params => { export const getThirdOrderByOrderNo = params => {
return POST('GET', `${base}/highThirdParty/getThirdOrderByOrderNo`, params).then(res => res.data); 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 => { export const qianzhuorderToPayByWx = params => {
return POST('POST', `${base}/thirdOrder/orderToPayByWx`, params).then(res => res.data); 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 => { export const getMemberProducts = params => {
@ -458,10 +426,6 @@ export const qzOrderToPay = params => {
export const getGatewayToken = params => { export const getGatewayToken = params => {
return POST('GET', `${base}/tPig/getGatewayToken`, params).then(res => res.data); 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 => { export const getVerifyQRCode = params => {
@ -649,18 +613,63 @@ export const getDetailByOrderNo = params => {
//取消订单 //取消订单
export const cancel = params => { export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data); return POST('POST', `${orderbase}/cancel`, params).then(res => res.data);
} }
//微信支付 //微信支付
export const wechatPay = params => { export const wechatPay = params => {
return POST('POST', `${orderbase}/orderPay/wechatPay`, params).then(res => res.data); return POST('POST', `${orderbase}/orderPay/wechatPay`, params).then(res => res.data);
} }
//工会卡、油卡 //工会卡、油卡
export const cardPay = params => { export const cardPay = params => {
return POST('POST', `${orderbase}/orderPay/cardPay`, params).then(res => res.data); return POST('POST', `${orderbase}/orderPay/cardPay`, params).then(res => res.data);
} }
//已完成未查看 //已完成未查看
export const orderCheck = params => { 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> <view class="flright width40 fotct" v-else>
¥0 ¥0
</view> </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> </view>
<!-- // --> <!-- // -->
@ -280,12 +287,19 @@
rechargeDes: '', // rechargeDes: '', //
rebateIntegral: '', // rebateIntegral: '', //
Integrastu: 1, // Integrastu: 1, //
paytypeList: [], // paytypeList: [], //
identificationCode: '', //
} }
}, },
onLoad(e) { onLoad(e) {
this.gasOrderList = app.globalData.pelletoilList; 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() { onShow() {
let that = this; let that = this;
@ -544,7 +558,7 @@
"saleCount": 1, "saleCount": 1,
}], }],
"payGold": this.priceValue[1], "payGold": this.priceValue[1],
"promoteCode": this.gasOrderList.identificationCode, "promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword "payPwd": this.PaymentPassword
} }
@ -617,7 +631,7 @@
if (this.paytype == '3' || this.paytype == '6') { if (this.paytype == '3' || this.paytype == '6') {
let params = { let params = {
"orderId": this.orderNo, "orderNo": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
@ -782,15 +796,15 @@
"gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo, "gasGunNo": this.gasOrderList.highChildOrderList[0].gasGunNo,
"gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo, "gasOilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
"isTyAgent": this.gasOrderList.isTyAgent, "isTyAgent": this.gasOrderList.isTyAgent,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId, "goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
"goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice, "goodsPrice": this.gasOrderList.highChildOrderList[0].goodsPrice,
"goodsType": 3, "goodsType": 3,
"saleCount": 1, "saleCount": 1,
}], }],
"payGold": this.priceValue[1], "payGold": this.priceValue[1],
"promoteCode": this.gasOrderList.identificationCode, "promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword "payPwd": this.PaymentPassword,
memDiscountId:this.memDiscountId
} }
create(goods).then(res => { create(goods).then(res => {

@ -173,7 +173,6 @@
<script> <script>
import { import {
getGasDetailByStoreKey, getGasDetailByStoreKey,
addOrder,
getDictionaryByCodeTypeOl, getDictionaryByCodeTypeOl,
oilPriceDiscountCompute, oilPriceDiscountCompute,
recentGasStation, recentGasStation,
@ -921,33 +920,6 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/goods/refuel-confirm/refuel-confirm' 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, "saleCount": 1,
}], }],
"payGold": this.priceValue[1], "payGold": this.priceValue[1],
"promoteCode": this.identificationCode "promoteCode": this.identificationCode,
memDiscountId:this.memDiscountId
} }
create(goods).then(res => { create(goods).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.jumpType = res.return_data.highChildOrderList[0].ext1; 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.orderDetails = res.return_data;
this.wechatPay(res.return_data); this.wechatPay(res.return_data);
} else { } else {
@ -821,7 +822,8 @@
}], }],
"payGold": this.priceValue[1], "payGold": this.priceValue[1],
"promoteCode": this.identificationCode, "promoteCode": this.identificationCode,
"payPwd": this.PaymentPassword "payPwd": this.PaymentPassword,
memDiscountId:this.memDiscountId
} }
create(goods).then(res => { create(goods).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -847,7 +849,7 @@
} }
let params = { let params = {
"orderNo": item.orderNo, "orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }

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

@ -32,7 +32,7 @@
</view> </view>
</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="height90 backcorltop mart50" v-if="item.type == 1">
<view class="category-list"> <view class="category-list">
<view class="category" style="width: 25%;" v-for="(row, indexs) in item.childCategory" :key="indexs" <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="height120 backcorfff" v-if="item.type == 3">
<view class="height20 width100"></view> <view class="height20 width100"></view>
<view class="width92 message alijus"> <view class="width92 message alijus">
<swiper circular="true" autoplay="true" display-multiple-items="2" :vertical="true"> <view class="width100 alijus" style="margin-top: -20px;" @click="test(item.childDate)" v-if="item.childDate.length == 1">
<swiper-item class="alijus" v-for="(swiper,index) in swiperList" :key="swiper.id" <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)"> @click="test(index)">
<view class="width80p paddleft10 alijusstart"> <view class="width80p paddleft10 alijusstart">
<view class="stus"></view> <view class="stus"></view>
<view class="paddleft10 font14 fcor666 text1 width70"> <view class="paddleft10 font14 fcor666 text1 width70">
放松放松方放松放松方放松放松方</view> {{swipers.title}}</view>
<view class="width25 font13 fcor999">40分钟前</view> <view class="width25 font13 fcor999">40分钟前</view>
</view> </view>
<view class="width20 alijus"> <view class="width20 alijus">

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

@ -53,6 +53,9 @@
:text="therrNum" type="error" size="normal"></uni-badge> :text="therrNum" type="error" size="normal"></uni-badge>
<uni-badge style="width: 20px;position: absolute; left: 42%;" <uni-badge style="width: 20px;position: absolute; left: 42%;"
v-if="row.text == '已支付' && orderPayNum " :text="orderPayNum" type="error" size="normal"> 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> </uni-badge>
<view class="img"> <view class="img">
<image :src="row.icon" class="icon40" mode="widthFix"></image> <image :src="row.icon" class="icon40" mode="widthFix"></image>
@ -60,15 +63,15 @@
<view class="text mart10">{{row.text}}</view> <view class="text mart10">{{row.text}}</view>
</view> </view>
</view> </view>
<view class="width90 mart10 height60"> <view class="width90 mart10 height60" v-if="nopaylist != ''">
<swiper circular="true" interval="3000" autoplay="true"> <swiper circular="true" interval="3000" autoplay="true" @change="swiperChange">
<swiper-item v-for="(swiper,index) in nopaylist" :key="index"> <swiper-item v-for="(swiper,index) in nopaylist" :key="index" @click="jumpDetails(swiper.orderNo,swiper.productType)">
<view class="alijusstart border-8r backcor9 height60 "> <view class="alijusstart border-8r backcor9 height60 ">
<image mode="widthFix" class="icon40 margle10" src="../../../static/img/user/user5.png"> <image mode="widthFix" class="icon40 margle10" src="../../../static/img/user/user5.png">
</image> </image>
<view class="width50 margle10"> <view class="width50 margle10">
<view class="font15 fcor333 fontspec">等待付款</view> <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>
<view class="topay"> <view class="topay">
去支付 去支付
@ -96,17 +99,19 @@
<view class="mart15 width90 alijus fotct paddbotm10"> <view class="mart15 width90 alijus fotct paddbotm10">
<view class="width31"> <view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view> <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 class="fontspec font14 fcor333 mart5">积分余额</view>
</view> </view>
<view class="width31"> <view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view> <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 class="fontspec font14 fcor333 mart5">油卡余额</view>
</view> </view>
<view class="width31"> <view class="width31">
<view class="fontspec font20 fcor333 fontwig6" v-if="assetsstu == 2">****</view> <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 class="fontspec font14 fcor333 mart5">工会卡余额</view>
</view> </view>
</view> </view>
@ -158,7 +163,10 @@
import { import {
loginByPhone, loginByPhone,
findUser, findUser,
loginOut loginOut,
getUserAccount,
getUserOrderList,
orderCheck
} from "../../../Utils/Api.js"; } from "../../../Utils/Api.js";
// import authorize from '../../../components/Authorize'; // import authorize from '../../../components/Authorize';
import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue"; import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue";
@ -199,9 +207,13 @@
], ],
// //
czList: '', czList: '',
nopaylist: [1, 2, 3, 4, 5], nopaylist: [],
assetsstu: 2, assetsstu: 2,
userphone:'' // userphone: '', //
userAccount: '', //,
countdownm: '', //
countdowns: '', //
} }
}, },
//page.json "enablePullDownRefresh": true //page.json "enablePullDownRefresh": true
@ -310,9 +322,9 @@
// #endif // #endif
}, },
methods: { methods: {
//
findUser() { findUser() {
let params; findUser().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;
@ -321,8 +333,9 @@
this.therrNum = res.return_data.unpaid; this.therrNum = res.return_data.unpaid;
this.whetherCheckNum = res.return_data.whetherCheckNum; this.whetherCheckNum = res.return_data.whetherCheckNum;
this.orderPayNum = res.return_data.orderPayNum; this.orderPayNum = res.return_data.orderPayNum;
this.rechargeOrderNum = res.return_data.rechargeOrderNum; this.rechargeOrderNum = res.return_data.rechargeOrderNum;
this.geTel(this.user.phone); this.geTel(this.user.phone);
this.getUserOrderList();
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data 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() { jumplogin() {
uni.navigateTo({ uni.navigateTo({
@ -352,9 +386,61 @@
this.assetsstu = 2; this.assetsstu = 2;
} }
if (item == 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) { jumppage(item) {
if (item == 1) { if (item == 1) {

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

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

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

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

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

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

@ -21,18 +21,18 @@
</view> </view>
<view v-if="(orderList.orderStatus == 2 || orderList.orderStatus == 3 )"> <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="width90 mart15" style="display: flow-root;">
<view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6" <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> <text class="medldcode fcorfff border-r font11">尾号{{item.phone}}</text>
</view> </view>
</view> </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="width90 mart15" style="display: flow-root;">
<view class="fcor333 mart15 font24 fontspec width50 fotlt flleft height30h fontwig6" <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> <text class="medldcode fcorfff border-r font11">取餐码</text>
</view> </view>
</view> </view>
@ -46,11 +46,11 @@
<view class="width94 fcor666 font12 mart5">如有询问手机尾号请点击右侧按钮查看</view> <view class="width94 fcor666 font12 mart5">如有询问手机尾号请点击右侧按钮查看</view>
</view> </view>
<view class="width30"> <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)"> @click="updatestu(2)">
查看手机尾号 查看手机尾号
</view> </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)"> @click="updatestu(1)">
隐藏手机尾号 隐藏手机尾号
</view> </view>
@ -59,15 +59,15 @@
</view> </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" <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>
<view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !orderList.list"> <view class="fotct font20 width100 mart10 colorc3" v-if="typeid == 4 && !recinfo.list">
{{orderList.statusDesc}} {{recinfo.statusDesc}}
</view> </view>
<view class="fotct font20 width100 mart10 color2f6f43" <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>
</view> </view>
@ -76,7 +76,7 @@
充值明细 充值明细
</view> </view>
<view class="width94 paddtop15 font16 fontwig6 alijusstart" v-else> <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>
<view class="width100 mart5"> <view class="width100 mart5">
<view class="width90 alijusstart mart15" v-for="(item,index) in orderList.highChildOrderList" <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="item.goodsImg" v-if="item.goodsImg" mode="widthFix" class="width100"></image>
<image src="../static/imgs/vipcz.png" v-else mode="widthFix" class="width90w"></image> <image src="../static/imgs/vipcz.png" v-else mode="widthFix" class="width90w"></image>
</view> </view>
<view class="width50 font13 fcor666"> <view class="width50 font13 fcor333 fontwig6">
<view>{{item.goodsName}}</view> <view>{{item.goodsName}}</view>
<view class="font12 fcor999">{{item.saleCount}} </view> <view class="font13 fcor999">{{item.saleCount}} </view>
</view> </view>
<view class="width20"> <view class="width20">
<view class="width100 fcor333 font12">¥<text <view class="width100 fcor333 font12 fotrt">¥<text
class="fontwig6 font16">{{item.goodsActualPrice}}</text> class="fontwig6 font16">{{item.goodsActualPrice}}</text>
</view> </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;"> style="text-decoration: line-through;">
¥{{item.goodsPrice}}</view> ¥{{item.goodsPrice}}</view>
</view> </view>
@ -117,7 +117,10 @@
</view> </view>
<view class="width92 fotrt mart5 font14 fcor999"> <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>
<view class="width92 fotrt mart5 font14 fcor999"> <view class="width92 fotrt mart5 font14 fcor999">
积分抵扣 <text class="margle fcoreb5 font16 fontwig6">¥ {{(orderList.payGold / 100).toFixed(2)}}</text> 积分抵扣 <text class="margle fcoreb5 font16 fontwig6">¥ {{(orderList.payGold / 100).toFixed(2)}}</text>
@ -143,14 +146,18 @@
<view class="width30">流水号</view> <view class="width30">流水号</view>
<view class="width70 fcor333 fotrt">{{orderList.paySerialNo}}</view> <view class="width70 fcor333 fotrt">{{orderList.paySerialNo}}</view>
</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="width30">下单时间</view>
<view class="width70 fcor333 fotrt">{{orderList.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</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="width94 alijusstart mart20 font14 fcor666" v-if="typeid == 4">
<view class="width30">就餐方式</view> <view class="width30">就餐方式</view>
<view class="width70 fotrt" v-if="orderList.eatType == 1">店内就餐</view> <view class="width70 fotrt" v-if="recinfo.eatType == 1">店内就餐</view>
<view class="width70 fcor333 fotrt" v-if="orderList.eatType == 2">打包带走</view> <view class="width70 fcor333 fotrt" v-if="recinfo.eatType == 2">打包带走</view>
</view> </view>
<view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.payType"> <view class="width94 alijusstart mart20 font14 fcor666" v-if="orderList.payType">
<view class="width30">支付方式</view> <view class="width30">支付方式</view>
@ -173,7 +180,7 @@
<!-- 再来一单 --> <!-- 再来一单 -->
<view class="height50 width100"></view> <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> <button open-type="contact" class="cusservice font12 fcor666">联系客服</button>
<view class="buybtn font12 fcorfff">再来一单</view> <view class="buybtn font12 fcorfff">再来一单</view>
</view> </view>
@ -184,7 +191,7 @@
<script> <script>
import { import {
getThirdOrderByOrderNo, getThirdOrderByOrderNo,
thirdCancelOrder, cancel,
getDetailByOrderNo getDetailByOrderNo
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
export default { export default {
@ -218,7 +225,7 @@
this.orderId = options.id; this.orderId = options.id;
}, },
onShow() { onShow() {
this.getThirdOrderByOrderNo(); this.getDetailByOrderNo();
}, },
onUnload() { onUnload() {
clearInterval(this.timer); clearInterval(this.timer);
@ -245,34 +252,42 @@
} }
getDetailByOrderNo(params).then(res => { getDetailByOrderNo(params).then(res => {
uni.hideLoading(); uni.hideLoading();
// if (res.return_code == '000000') {
// this.recinfo = res.return_data;
// }
if (res.return_code == '000000') { 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() { getThirdOrderByOrderNo() {
// uni.showLoading({
// title: '...'
// })
let datas = { let datas = {
orderNo: this.orderId orderNo: this.orderId
} }
getThirdOrderByOrderNo(datas).then(res => { getThirdOrderByOrderNo(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.recinfo = res.return_data;
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();
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
@ -294,9 +309,9 @@
title: '加载中...' title: '加载中...'
}) })
let params = { let params = {
orderId: this.orderId, orderNo: this.orderId,
} }
thirdCancelOrder(params).then(res => { cancel(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
@ -351,7 +366,7 @@
// //
showtime() { showtime() {
var nowtime = new Date(), // var nowtime = new Date(), //
endtime = this.orderList.createTime + 900000; // endtime = this.orderList.createTime + 600000; //
var lefttime = endtime - nowtime, // var lefttime = endtime - nowtime, //
leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), // leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)), //
lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime / 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>
</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="width94 comorder mart10">
<view class="height50 width100 backcorfff"> <view class="height50 width100 backcorfff">
@ -30,7 +37,7 @@
支付方式: 支付方式:
</view> </view>
</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="height50 width100 backcorfff" @tap="paytype='jinbi'">
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;"> <view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text> 积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text>
@ -39,7 +46,7 @@
style="align-items: center;"> style="align-items: center;">
<radio :checked="paytype=='jinbi'" color="#0083f5" /> <radio :checked="paytype=='jinbi'" color="#0083f5" />
</view> </view>
</view> </view> -->
<view class="width94 line1 mart5 marb5"></view> <view class="width94 line1 mart5 marb5"></view>
<view class="height50 width100 backcorfff" @tap="paytype='weixin'"> <view class="height50 width100 backcorfff" @tap="paytype='weixin'">
<view class="width50 flleft fcor333 font16" style="padding-left: 4%;"> <view class="width50 flleft fcor333 font16" style="padding-left: 4%;">
@ -88,13 +95,13 @@
<script> <script>
import { import {
addOrder, create,
getDiscountPackageDetail, getDiscountPackageDetail,
loginByPhone, loginByPhone,
orderToPay, wechatPay,
orderToGoldPay, orderToGoldPay,
findUser, findUser,
hltUnionCardPay, cardPay,
getHuiLianTongCardBalance getHuiLianTongCardBalance
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
import ssPaymentPassword from '../../components/sanshui-payment-password' import ssPaymentPassword from '../../components/sanshui-payment-password'
@ -108,13 +115,7 @@
}, },
data() { data() {
return { return {
buylist: [], //
goodsPrice: 0.0, // goodsPrice: 0.0, //
sumPrice: 0.0, //
freight: 12.00, //
note: '', //
int: 1200, //
deduction: 0, //
couponId: '', couponId: '',
couponList: [], couponList: [],
UserNormalDiscountList: [], UserNormalDiscountList: [],
@ -127,15 +128,21 @@
paytype: '', paytype: '',
PaymentPassword: '', PaymentPassword: '',
orderId: '', orderId: '',
jumpType: '',
tongCardPrice: 0, tongCardPrice: 0,
storeId: '', storeId: '',
isDiscont: false isDiscont: false,
identificationCode: '' //
}; };
}, },
onLoad(option) { 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(); this.getDiscountPackageDetail();
}, },
onShow() { onShow() {
@ -178,8 +185,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;
this.getHuiLianTongCardBalance(); if(res.return_data.hltCardNo != undefined){
this.getHuiLianTongCardBalance();
}
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data data: res.return_data
@ -223,7 +232,7 @@
// H5 // H5
jumpH5Bding() { jumpH5Bding() {
uni.navigateTo({ uni.navigateTo({
url:'../../pages/login/register' url: '../../pages/login/register'
}) })
}, },
// //
@ -280,19 +289,19 @@
this.storeId = app.globalData.storeid this.storeId = app.globalData.storeid
} }
let goods = { let goods = {
"highChildOrderList": [{ "childOrderList": [{
"goodsType": 7,
"goodsId": this.couponId, "goodsId": this.couponId,
"goodsPrice": this.paytheprice,
"goodsType": 7,
"saleCount": 1, "saleCount": 1,
"storeId": this.storeId }],
}] "promoteCode": this.identificationCode
} }
addOrder(goods).then(res => { create(goods).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading(); uni.hideLoading();
this.jumpType = res.return_data.highChildOrderList[0].ext1; this.orderId = res.return_data.orderNo;
this.orderId = res.return_data.id; this.wechatPay(res.return_data);
this.orderToPay(res.return_data);
} else { } else {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
@ -313,7 +322,7 @@
success() { success() {
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url:'../../pages/user/bindingCard/bindingCard' url: '../../pages/user/bindingCard/bindingCard'
}) })
}, 1000) }, 1000)
} }
@ -322,25 +331,24 @@
} }
}, },
// //
orderToPay(item) { wechatPay(item) {
let that = this; let that = this;
if (that.paytype == 'weixin') { if (that.paytype == 'weixin') {
// #ifdef H5 // #ifdef H5
let params = { let params = {
"orderId": item.id, "orderNo": item.orderNo,
"openId": app.globalData.openId, "openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2 "openIdType": 2
} }
// #endif // #endif
// #ifdef MP // #ifdef MP
let params = { let params = {
"orderId": item.id, "orderNo": item.orderNo,
"openId": app.globalData.openId, "openId": app.globalData.openId,
"orderScene": "GOODS_ORDER" "openIdType": 1
} }
// #endif // #endif
orderToPay(params).then(res => { wechatPay(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
// #ifdef MP // #ifdef MP
uni.showLoading({ uni.showLoading({
@ -360,8 +368,8 @@
}) })
app.globalData.storeid = ''; app.globalData.storeid = '';
app.globalData.storename = ''; app.globalData.storename = '';
uni.reLaunch({ uni.reLaunch({
url:'../coupon-comfirmation-success/coupon-comfirmation-success' url: '../coupon-comfirmation-success/coupon-comfirmation-success'
}); });
}, },
fail: function(err) { 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') { } else if (that.paytype == 'gonghuika') {
if (that.tongCardPrice < that.paytheprice) { if (that.tongCardPrice < that.paytheprice) {
uni.showToast({ uni.showToast({
@ -418,7 +403,7 @@
} }
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url:'../../pages/login/updatePas/updatePas' url: '../../pages/login/updatePas/updatePas'
}) })
return; return;
} }
@ -430,7 +415,7 @@
success() { success() {
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url:'../../pages/user/bindingCard/bindingCard' url: '../../pages/user/bindingCard/bindingCard'
}) })
}, 1000) }, 1000)
} }
@ -459,55 +444,26 @@
uni.showLoading({ uni.showLoading({
title: '支付中...' 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 = { let params = {
"orderId": this.orderId, "orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": this.user.hltCardNo.cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
hltUnionCardPay(params).then(res => { cardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ uni.reLaunch({
url:'../coupon-comfirmation-success/coupon-comfirmation-success' url: '../coupon-comfirmation-success/coupon-comfirmation-success'
}); });
return; return;
} }
if (res.return_code == '102130') { if (res.return_code == '102130') {
uni.navigateTo({ uni.navigateTo({
url:'../../pages/login/updatePas/updatePas' url: '../../pages/login/updatePas/updatePas'
}) })
return; return;
} }
@ -552,8 +508,8 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ uni.reLaunch({
url:'../coupon-comfirmation-success/coupon-comfirmation-success' url: '../coupon-comfirmation-success/coupon-comfirmation-success'
}); });
}, },
cancel: function(r) {}, cancel: function(r) {},

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

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

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