From 417eb0e7d83118500e8c537b9ae4a6e05355c6af Mon Sep 17 00:00:00 2001 From: yangsanTT <812952667@qq.com> Date: Tue, 1 Jun 2021 21:02:27 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E8=AF=95=E7=94=A8=E6=88=B7=E6=B3=A8?= =?UTF-8?q?=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Utils/Api.js | 3 +++ pages/login/register.vue | 17 +++++++------- pages/order/confirmation.vue | 5 +++-- pages/pay/payment/payment.vue | 3 +-- pages/tabBar/home/home.vue | 42 +++++++++++++++++++++++++++++++---- 5 files changed, 53 insertions(+), 17 deletions(-) diff --git a/Utils/Api.js b/Utils/Api.js index a1cf68a..9b65321 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -151,6 +151,9 @@ export const bindUserPhone = params => { export const H5login = params => { return POST('GET', `${base}/user/login`, params).then(res => res.data); } +export const getH5AccessToken = params => { + return POSTBREST('GET', `${base}/wechat/getH5AccessToken`, params).then(res => res.data); +} //**门店// export const userLogin = params => { diff --git a/pages/login/register.vue b/pages/login/register.vue index ec54a3c..0060a2c 100644 --- a/pages/login/register.vue +++ b/pages/login/register.vue @@ -24,7 +24,7 @@ 已有账号立即登录 --> - + @@ -145,9 +145,9 @@ key: "token", data: res.return_data.uniqueCode }) - uni.reLaunch({ - url: '/pages/tabBar/home/home' - }); + 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.showToast({ title: res.return_msg, @@ -173,9 +173,7 @@ key: "token", data: res.return_data.uniqueCode }) - uni.navigateBack({ - }) - + uni.navigateBack({}) } else { uni.showToast({ title: res.return_msg, @@ -189,7 +187,7 @@ //微信登录 openWx() { 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'; + '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&state=2#wechat_redirect'; }, toLogin() { uni.hideKeyboard() @@ -204,7 +202,8 @@