From 5387ad0d3cbf095425020fee846a3a1161e90511 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Tue, 9 Apr 2024 12:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=87=AA=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/user/sessionApi.js | 6 ++++-- conf/config.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/user/sessionApi.js b/api/user/sessionApi.js index b3bd491..fa39807 100644 --- a/api/user/sessionApi.js +++ b/api/user/sessionApi.js @@ -57,8 +57,9 @@ export function autoLogin(options) { if (hasLogin()) { return; } + //todo 如果是 h5 或者 微信小程序 ,检查是否做了配置,如果没有做配置不做自登陆 - // #ifdef H5 || MP-MP-WEIXIN + // #ifdef H5 || MP-WEIXIN autoLoginWechat(options); // #endif @@ -70,11 +71,11 @@ export function autoLogin(options) { */ export function autoLoginWechat(options) { let _openId = options.openId; + if(_openId){ //h5 自登陆的情况 loginByOpenId(_openId); return; } - //todo 如果参数中带了wAppId let _wAppId = options.wAppId; @@ -83,6 +84,7 @@ export function autoLoginWechat(options) { return; } + let _objType = "1100"; // todo public // #ifdef MP-WEIXIN _objType = "1000"; diff --git a/conf/config.js b/conf/config.js index cd60fa2..6c6243f 100644 --- a/conf/config.js +++ b/conf/config.js @@ -15,7 +15,7 @@ const baseUrl = '/'; // #ifndef H5 //服务器域名 小程序 或者 app 时 后端地址 -const baseUrl = 'https://wuye.taksongroup.com/'; +const baseUrl = 'http://192.168.100.108:8088/'; // #endif let commonBaseUrl = 'http://demo.homecommunity.cn/';