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 @@