From 9635927ca4990da120d9cac0323eae07d4586c76 Mon Sep 17 00:00:00 2001
From: Wik-T <812952667@qq.com>
Date: Thu, 2 Dec 2021 09:54:53 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=9F=BA=E6=9C=AC=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E3=80=82=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 18 +-
Utils/Api.js | 4 +-
Utils/Request.js | 17 +-
components/Authorize.vue | 5 +-
manifest.json | 6 +-
pages.json | 72 +-
pages/goods/externalCoupon/externalCoupon.vue | 709 ++++++++----------
pages/goods/refuel-details/refuel-details.vue | 2 +-
pages/login/register.vue | 135 ++--
pages/order/confirmation.vue | 43 +-
pages/qianZhuPay/union-pay/union-pay.vue | 217 +++++-
pages/tabBar/user/user.vue | 2 +-
pages/userLogin/userLogin.vue | 2 +-
.../unionComfirmation/unionComfirmation.vue | 2 +-
subPages/unionPay/unionPay.vue | 83 +-
15 files changed, 725 insertions(+), 592 deletions(-)
diff --git a/App.vue b/App.vue
index ae6b2f8..eb2a24c 100644
--- a/App.vue
+++ b/App.vue
@@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//正式
- // url: 'https://hsg.dctpay.com/crest',
- // imgUrl: 'https://hsg.dctpay.com/filesystem/',
- // brestUrl : 'https://hsg.dctpay.com/brest',
- // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
+ url: 'https://hsg.dctpay.com/crest',
+ imgUrl: 'https://hsg.dctpay.com/filesystem/',
+ brestUrl : 'https://hsg.dctpay.com/brest',
+ imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//测试
- url: 'https://hsgcs.dctpay.com/crest',
- brestUrl : 'https://hsgcs.dctpay.com/brest',
- imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
- imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
+ // url: 'https://hsgcs.dctpay.com/crest',
+ // brestUrl : 'https://hsgcs.dctpay.com/brest',
+ // imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
+ // imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo : '',
openId: '',
@@ -27,6 +27,8 @@
balancePrice : '',
balanceCardNo:'',
identificationCode:'',
+ // h5获取信息
+ h5code:'',
//门店ID
storeid:'',
//门店名字
diff --git a/Utils/Api.js b/Utils/Api.js
index baa9141..b6290f4 100644
--- a/Utils/Api.js
+++ b/Utils/Api.js
@@ -182,8 +182,8 @@ export const getCmsContent = params => {
}
//设置用户参数
-export const setUserParam = params => {
- return POST('GET', `${base}/highUser/setUserParam`, params).then(res => res.data);
+export const setCacheParam = params => {
+ return POST('POST', `${base}/highUser/setCacheParam`, params).then(res => res.data);
}
/**
* 工会卡
diff --git a/Utils/Request.js b/Utils/Request.js
index 0e7b07c..fa5dd7f 100644
--- a/Utils/Request.js
+++ b/Utils/Request.js
@@ -24,16 +24,23 @@ function request(method, url, data) {
uni.setStorage({
key: "token",
data: ''
- })
+ })
uni.showToast({
title: '登录信息过期,请重新授权',
icon: 'none',
duration: 2000,
success() {
- setTimeout(() => {
- uni.navigateTo({
- url:'/pages/userLogin/userLogin'
- })
+ setTimeout(() => {
+ // #ifdef H5
+ uni.navigateTo({
+ url:'/pages/login/register'
+ })
+ // #endif
+ // #ifdef MP
+ uni.navigateTo({
+ url: '/pages/userLogin/userLogin'
+ })
+ // #endif
}, 800);
}
})
diff --git a/components/Authorize.vue b/components/Authorize.vue
index 46f48dd..217c120 100644
--- a/components/Authorize.vue
+++ b/components/Authorize.vue
@@ -115,9 +115,8 @@
},
getH5userinfo(){
uni.navigateTo({
- url:'/pages/login/register?id=1'
- })
- // location.href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_userinfo#wechat_redirect';
+ url:'/pages/login/register'
+ })
},
close() {
uni.reLaunch({
diff --git a/manifest.json b/manifest.json
index 8c5e513..d6a45e5 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"name" : "嗨森逛",
"appid" : "__UNI__E807B53",
"description" : "",
- "versionName" : "1.2.0",
+ "versionName" : "1.2.1",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
@@ -80,14 +80,14 @@
}
}
},
- "title" : "嗨森逛",
+ "title" : "嗨加油",
"router" : {
"mode" : "hash",
"base" : "/H5"
},
"devServer" : {
"port" : "",
- "https" : true
+ "https" : false
},
"domain" : "https://hsgcs.dctpay.com",
"template" : ""
diff --git a/pages.json b/pages.json
index e76e09d..ddf3f9a 100644
--- a/pages.json
+++ b/pages.json
@@ -1,23 +1,33 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
- {
- "path": "pages/tabBar/home/home",
- "style": {
- "navigationBarTextStyle": "white",
- "navigationBarTitleText": "首页",
- "navigationBarBackgroundColor": "#0083f5",
- "backgroundColorTop": "#0083f5",
- "onReachBottomDistance": 50,
- "app-plus": {
- "titleNView": false, //禁用原生导航栏
- "softinputNavBar": "none",
- "subNVues": [{
- "id": "homeTitleNvue", // 唯一标识
- "path": "pages/tabBar/home/subNvue/homeTitleNvue", // 页面路径
- "type": "navigationBar"
- }]
- }
- }
+ {
+ "path": "pages/qianZhuPay/union-pay/union-pay",
+ "style": {
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "选择方式",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "enablePullDownRefresh": false
+ }
+
+ },{
+ "path": "pages/tabBar/home/home",
+ "style": {
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "首页",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "onReachBottomDistance": 50,
+ "app-plus": {
+ "titleNView": false, //禁用原生导航栏
+ "softinputNavBar": "none",
+ "subNVues": [{
+ "id": "homeTitleNvue", // 唯一标识
+ "path": "pages/tabBar/home/subNvue/homeTitleNvue", // 页面路径
+ "type": "navigationBar"
+ }]
+ }
+ }
}, {
"path": "pages/user/bindingCardList/bindingCardList",
"style": {
@@ -321,9 +331,21 @@
}, {
"path": "pages/goods/externalCoupon/externalCoupon",
- "style": {
- "navigationBarTitleText": "扫码领取优惠券",
- "enablePullDownRefresh": false
+ "style": {
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "扫码领取优惠券",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "onReachBottomDistance": 50,
+ "app-plus": {
+ "titleNView": false, //禁用原生导航栏
+ "softinputNavBar": "none",
+ "subNVues": [{
+ "id": "homeTitleNvue", // 唯一标识
+ "path": "pages/tabBar/home/subNvue/homeTitleNvue", // 页面路径
+ "type": "navigationBar"
+ }]
+ }
}
}, {
@@ -462,14 +484,6 @@
"navigationBarTextStyle": "white"
}
- },{
- "path" : "pages/qianZhuPay/union-pay/union-pay",
- "style" :
- {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false
- }
-
}
diff --git a/pages/goods/externalCoupon/externalCoupon.vue b/pages/goods/externalCoupon/externalCoupon.vue
index 01b1913..932b197 100644
--- a/pages/goods/externalCoupon/externalCoupon.vue
+++ b/pages/goods/externalCoupon/externalCoupon.vue
@@ -1,378 +1,333 @@
-
-
-
-
-
-
-
- {{couponsDetails.highDiscount.discountName}}
-
- 活动截止时间:{{salesEndTime | formatDate('-')}}
-
-
- 领取有效期:{{couponsDetails.highDiscount.effectiveDay}}天
-
-
-
-
-
- 去使用
-
-
-
-
-
-
- {{ product.highCoupon.couponName }}
-
-
- ¥{{ product.highCoupon.discountPrice}}
-
-
- ¥{{ product.highCoupon.salesPrice}}
-
-
-
-
-
- {{ product.highCoupon.discountPrice*100}}
-
-
-
- {{ product.highCoupon.salesPrice*100}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue
index 4ce4a27..8d5f6c6 100644
--- a/pages/goods/refuel-details/refuel-details.vue
+++ b/pages/goods/refuel-details/refuel-details.vue
@@ -279,7 +279,7 @@
// H5获取手机号
jumpH5Bding() {
uni.navigateTo({
- url: '/pages/login/register?id=2'
+ url: '/pages/login/register'
})
},
//失去焦点算价格和油升
diff --git a/pages/login/register.vue b/pages/login/register.vue
index be5ba30..beb98cc 100644
--- a/pages/login/register.vue
+++ b/pages/login/register.vue
@@ -9,22 +9,22 @@
- {{getCodeText}}
-
+ {{getCodeText}}
+
-
+
- 立即注册
- 绑定手机号
+ 立即注册
+
-
+
@@ -43,17 +43,15 @@
return {
phoneNumber: "",
imagewxUrl: app.globalData.imageWxImg,
- imgadres:'wx.png',
+ imgadres: 'wx.png',
code: '',
passwd: "",
getCodeText: '获取验证码',
getCodeBtnColor: "#ffffff",
- getCodeisWaiting: false,
- Typeid: ''
+ getCodeisWaiting: false
}
},
- onLoad(options) {
- this.Typeid = options.id
+ onLoad() {
},
methods: {
Timer() {},
@@ -129,67 +127,59 @@
phone: this.phoneNumber,
code: this.code
}
- if (this.Typeid == 1) {
- H5login(params).then(res => {
- uni.hideLoading()
- if (res.return_code == '000000') {
- app.globalData.userInfo = res.return_data
- .object
- .highUser;
- app.globalData.token = res.return_data.uniqueCode;
- uni.setStorage({
- key: "user",
- data: res.return_data
- .object
- .highUser
- })
- uni.setStorage({
- key: "token",
- data: res.return_data.uniqueCode
- })
- if (this.isWeiXinLogin()) {
- //微信内核支付
- location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
- }else{
- uni.reLaunch({
- url: '/pages/tabBar/home/home'
- })
- }
-
- } else {
- uni.showToast({
- title: res.return_msg,
- icon: "none"
- });
- }
- })
- } else {
- bindUserPhone(params).then(res => {
- uni.hideLoading()
- if (res.return_code == '000000') {
- app.globalData.userInfo = res.return_data
+ // if (this.Typeid == 1) {
+ H5login(params).then(res => {
+ uni.hideLoading()
+ if (res.return_code == '000000') {
+ app.globalData.userInfo = res.return_data
+ .object
+ .highUser;
+ app.globalData.token = res.return_data.uniqueCode;
+ uni.setStorage({
+ key: "user",
+ data: res.return_data
.object
- .highUser;
- app.globalData.token = res.return_data.uniqueCode;
- uni.setStorage({
- key: "user",
- data: res.return_data
- .object
- .highUser
- })
- uni.setStorage({
- key: "token",
- data: res.return_data.uniqueCode
- })
- uni.navigateBack({})
- } else {
- uni.showToast({
- title: res.return_msg,
- icon: "none"
- });
- }
- })
- }
+ .highUser
+ })
+ uni.setStorage({
+ key: "token",
+ data: res.return_data.uniqueCode
+ })
+ uni.navigateBack({})
+ } else {
+ uni.showToast({
+ title: res.return_msg,
+ icon: "none"
+ });
+ }
+ })
+ // } else {
+ // bindUserPhone(params).then(res => {
+ // uni.hideLoading()
+ // if (res.return_code == '000000') {
+ // app.globalData.userInfo = res.return_data
+ // .object
+ // .highUser;
+ // app.globalData.token = res.return_data.uniqueCode;
+ // uni.setStorage({
+ // key: "user",
+ // data: res.return_data
+ // .object
+ // .highUser
+ // })
+ // uni.setStorage({
+ // key: "token",
+ // data: res.return_data.uniqueCode
+ // })
+ // uni.navigateBack({})
+ // } else {
+ // uni.showToast({
+ // title: res.return_msg,
+ // icon: "none"
+ // });
+ // }
+ // })
+ // }
},
//微信内核浏览器
@@ -224,6 +214,7 @@
width: 50px;
height: 50px;
margin-left: 40%;
- margin-top: 250upx;
+ margin-top: 90px;
+ margin-bottom: 40px;
}
diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue
index 05831d4..1dc836a 100644
--- a/pages/order/confirmation.vue
+++ b/pages/order/confirmation.vue
@@ -164,7 +164,6 @@
getCouponById,
loginByPhone,
getUserNormalDiscountList,
- bindUserPhone,
orderToPay,
orderToGoldPay,
findUser,
@@ -205,12 +204,12 @@
orderId: '',
jumpType: '',
tongCardPrice: 0,
- storeId:''
+ storeId: ''
};
},
onLoad(option) {
- this.couponId = option.id;
+ this.couponId = option.id;
this.getCouponById();
},
onShow() {
@@ -272,7 +271,7 @@
couponId: this.couponId
}
getCouponById(params).then(res => {
- if (res.return_code == '000000') {
+ if (res.return_code == '000000') {
this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice;
uni.hideLoading()
@@ -347,7 +346,7 @@
// H5获取手机号
jumpH5Bding() {
uni.navigateTo({
- url: '/pages/login/register?id=2'
+ url: '/pages/login/register'
})
},
// 微信获取手机号
@@ -399,9 +398,9 @@
}
uni.showLoading({
title: '提交订单中...'
- })
- if(this.couponList.reserveStatus){
- this.storeId = app.globalData.storeid
+ })
+ if (this.couponList.reserveStatus) {
+ this.storeId = app.globalData.storeid
}
let goods = {
"memDiscountId": this.memDiscountId,
@@ -409,7 +408,7 @@
"highChildOrderList": [{
"goodsType": 1,
"goodsId": this.couponId,
- "saleCount": 1,
+ "saleCount": 1,
"storeId": this.storeId
}]
}
@@ -457,11 +456,21 @@
orderToPay(item) {
let that = this;
if (that.paytype == 'weixin') {
+ // #ifdef H5
+ let params = {
+ "orderId": item.id,
+ "openId": app.globalData.openId,
+ "orderScene": "GOODS_ORDER",
+ "openIdType": 2
+ }
+ // #endif
+ // #ifdef MP
let params = {
"orderId": item.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
+ // #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
@@ -479,8 +488,8 @@
uni.hideLoading();
uni.showToast({
title: '支付成功'
- })
- app.globalData.storeid = '';
+ })
+ app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + that.couponId
@@ -568,8 +577,8 @@
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
- })
- app.globalData.storeid = '';
+ })
+ app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
@@ -600,8 +609,8 @@
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
- })
- app.globalData.storeid = '';
+ })
+ app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
@@ -654,8 +663,8 @@
// 支付成功后的回调函数
uni.showToast({
title: '支付成功'
- })
- app.globalData.storeid = '';
+ })
+ app.globalData.storeid = '';
app.globalData.storename = '';
if (that.jumpType == 4) {
uni.reLaunch({
diff --git a/pages/qianZhuPay/union-pay/union-pay.vue b/pages/qianZhuPay/union-pay/union-pay.vue
index f7e3b84..b859551 100644
--- a/pages/qianZhuPay/union-pay/union-pay.vue
+++ b/pages/qianZhuPay/union-pay/union-pay.vue
@@ -1,27 +1,192 @@
-
-
- 测试中。。。。
-
-
-
-
-
-
diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue
index adfd71c..93a5725 100644
--- a/pages/tabBar/user/user.vue
+++ b/pages/tabBar/user/user.vue
@@ -362,7 +362,7 @@
// H5获取手机号
jumpH5Bding() {
uni.navigateTo({
- url: '/pages/login/register?id=2'
+ url: '/pages/login/register'
})
},
//跳转用户信息
diff --git a/pages/userLogin/userLogin.vue b/pages/userLogin/userLogin.vue
index a5c6438..126638a 100644
--- a/pages/userLogin/userLogin.vue
+++ b/pages/userLogin/userLogin.vue
@@ -129,7 +129,7 @@
},
getH5userinfo() {
uni.navigateTo({
- url: '/pages/login/register?id=1'
+ url: '/pages/login/register'
})
},
}
diff --git a/subPages/unionComfirmation/unionComfirmation.vue b/subPages/unionComfirmation/unionComfirmation.vue
index 6c712d0..ffd7661 100644
--- a/subPages/unionComfirmation/unionComfirmation.vue
+++ b/subPages/unionComfirmation/unionComfirmation.vue
@@ -196,7 +196,7 @@
// H5获取手机号
jumpH5Bding() {
uni.navigateTo({
- url: '/pages/login/register?id=2'
+ url: '/pages/login/register'
})
},
// 微信获取手机号
diff --git a/subPages/unionPay/unionPay.vue b/subPages/unionPay/unionPay.vue
index b9de60e..35023f7 100644
--- a/subPages/unionPay/unionPay.vue
+++ b/subPages/unionPay/unionPay.vue
@@ -7,7 +7,7 @@