From a141c2a939b398cc13949a402f12dfecf8807590 Mon Sep 17 00:00:00 2001
From: Wik-T <812952667@qq.com>
Date: Tue, 1 Nov 2022 10:53:23 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=962.0=E7=9A=84=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 2 +
Utils/Api.js | 105 +++++----
pages/goods/refuel-confirm/refuel-confirm.vue | 28 ++-
pages/goods/refuel-details/refuel-details.vue | 28 ---
pages/order/confirmation.vue | 10 +-
pages/qianZhuPay/qianZhuPay.vue | 14 +-
pages/tabBar/home/home.vue | 21 +-
pages/tabBar/order/webUrl/webUrl.vue | 13 --
pages/tabBar/user/user.vue | 116 +++++++--
pages/user/coupon/coupon.vue | 220 +++++++++++++-----
pages/user/deposit/deposit.vue | 8 +-
pages/user/order_details/order_details.vue | 14 +-
pages/user/order_list/order_list.vue | 20 +-
pages/userLogin/userLogin.vue | 73 +++---
qianzhu-KFC/confirmOrder/confirmOrder.vue | 44 ++--
qianzhu-KFC/menu-list/menu-list.vue | 4 +-
qianzhu-KFC/order-details/order-details.vue | 103 ++++----
static/img/user/overdue.png | Bin 0 -> 5388 bytes
static/img/user/use.png | Bin 0 -> 4947 bytes
.../coupon-comfirmation.vue | 148 +++++-------
subPages/rechargeDetails/rechargeDetails.vue | 6 +-
.../trade-union-recharge.vue | 37 ++-
uni.scss | 4 +
23 files changed, 585 insertions(+), 433 deletions(-)
create mode 100644 static/img/user/overdue.png
create mode 100644 static/img/user/use.png
diff --git a/App.vue b/App.vue
index 748b045..da88b8f 100644
--- a/App.vue
+++ b/App.vue
@@ -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/',
diff --git a/Utils/Api.js b/Utils/Api.js
index 868959b..36d5a4f 100644
--- a/Utils/Api.js
+++ b/Utils/Api.js
@@ -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);
}
diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue
index 3249677..3a52bbb 100644
--- a/pages/goods/refuel-confirm/refuel-confirm.vue
+++ b/pages/goods/refuel-confirm/refuel-confirm.vue
@@ -76,6 +76,13 @@
¥0
+
+
+
+
+ 邀请码
+
+
@@ -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 => {
diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue
index cbfee48..92d5d3d 100644
--- a/pages/goods/refuel-details/refuel-details.vue
+++ b/pages/goods/refuel-details/refuel-details.vue
@@ -173,7 +173,6 @@
diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue
index de7528f..17fb8bd 100644
--- a/pages/tabBar/user/user.vue
+++ b/pages/tabBar/user/user.vue
@@ -53,6 +53,9 @@
:text="therrNum" type="error" size="normal">
+
+
@@ -60,15 +63,15 @@
{{row.text}}
-
-
-
+
+
+
等待付款
- 剩余时间: 13:44
+ 剩余时间: {{countdownm}}:{{countdowns}}
去支付
@@ -96,17 +99,19 @@
****
- ¥2400
+ {{userAccount.integral}}
积分余额
****
- ¥2400
+ ¥{{userAccount.oilCardPrice}}
+
油卡余额
****
- ¥2400
+ ¥{{userAccount.hltCardPrice}}
+
工会卡余额
@@ -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) {
diff --git a/pages/user/coupon/coupon.vue b/pages/user/coupon/coupon.vue
index 3f6847d..e8c310b 100644
--- a/pages/user/coupon/coupon.vue
+++ b/pages/user/coupon/coupon.vue
@@ -8,8 +8,8 @@
- {{item}}
+ {{item.codeName}}
@@ -23,48 +23,55 @@
-
+
+
+ 满减券
+
+
-
+
+
+ 抵扣券
+
+
+
折扣券
话费券
- {{row.highDiscount.discountName}}
+ style="width: 50px;background-color: #347edd;border-radius: 20px;">{{orderTyplist | msgFormat(row.discountUseScope)}}
+ {{row.discountName}}
有效期:{{row.useEndTime | formatDate('-')}}
-
-
- {{row.highDiscount.discountPrice * 10}}
+
+
+ {{row.discountPrice * 10}}
- {{row.highDiscount.discountPrice}}
+ {{row.discountPrice}}
-
+
折
元
-
去使用
-
去使用
@@ -79,34 +86,58 @@
-
-
- {{row.highDiscount.discountName}}
+
+
+
+
+ 满减券
+
+
+
+
+ 抵扣券
+
+
+
+
+ 折扣券
+
+
+
+ {{orderTyplist | msgFormat(row.discountUseScope)}}
+ {{row.discountName}}
- 使用时间:{{row.useTime | formatDate('-')}}
+ 有效期:{{row.useEndTime | formatDate('-')}}
+
-
-
-
- {{row.highDiscount.discountPrice}}
+
+
+
+ {{row.discountPrice * 10}}
+
+
+ {{row.discountPrice}}
-
+
+ 折
+
+
元
-
- {{row.highDiscount.discountName}}
-
-
- 已使用
-
+
@@ -114,34 +145,58 @@
-
-
- {{row.highDiscount.discountName}}
+
+
+
+
+ 满减券
+
+
+
+
+ 抵扣券
+
+
+
+
+ 折扣券
+
+
+
+ {{orderTyplist | msgFormat(row.discountUseScope)}}
+ {{row.discountName}}
- 过期时间:{{row.useEndTime | formatDate('-')}}
+ 有效期:{{row.useEndTime | formatDate('-')}}
+
-
-
-
- {{row.highDiscount.discountPrice}}
+
+
+
+ {{row.discountPrice * 10}}
+
+
+ {{row.discountPrice}}
-
+
+ 折
+
+
元
-
- {{row.highDiscount.discountName}}
-
-
- 已过期
-
+
- 取消订单
+ 取消订单
去支付
@@ -443,7 +443,7 @@