diff --git a/sheep/components/s-auth-modal/s-auth-modal.vue b/sheep/components/s-auth-modal/s-auth-modal.vue
index 449eb20..dc1a61d 100644
--- a/sheep/components/s-auth-modal/s-auth-modal.vue
+++ b/sheep/components/s-auth-modal/s-auth-modal.vue
@@ -9,27 +9,27 @@
@onConfirm="onConfirm"
/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
还没有账号?
-
+
+
{
return new Promise(async (resolve, reject) => {
diff --git a/sheep/platform/provider/wechat/miniProgram.js b/sheep/platform/provider/wechat/miniProgram.js
index d4b83eb..05d787e 100644
--- a/sheep/platform/provider/wechat/miniProgram.js
+++ b/sheep/platform/provider/wechat/miniProgram.js
@@ -4,18 +4,11 @@ import AuthUtil from '@/sheep/api/member/auth';
const socialType = 34; // 社交类型 - 微信小程序
-let sessionId = uni.getStorageSync('sessionId');
let subscribeEventList = [];
// 加载微信小程序
function load() {
checkUpdate();
- // const sessionStatus = await checkSession();
- // 小程序的接口改动太频繁了 强制每次进入都重新获取
- const sessionStatus = false;
- if (!sessionStatus) {
- getSessionId();
- }
getSubscribeTemplate();
}
@@ -97,55 +90,6 @@ const unbind = async () => {
return !error;
};
-// 获取最新sessionId
-const getSessionId = async (auto_login = null) => {
- // 获取code
- let codeStr = '';
- const loginResult = await uni.login();
- if (loginResult.errMsg === 'login:ok') {
- codeStr = loginResult.code;
- } else {
- getSessionId(auto_login);
- return false;
- }
- if(auto_login === null) {
- auto_login = !!($store('app').platform.auto_login && !$store('user').isLogin);
- }
-
- const { error, data } = await third.wechat.getSessionId({
- platform: 'miniProgram',
- payload: encodeURIComponent(
- JSON.stringify({
- code: codeStr,
- auto_login,
- }),
- ),
- });
- if (error === 0) {
- uni.setStorageSync('sessionId', data.session_id);
- return true;
- }
- return false;
-};
-
-// 检查sessionId是否可用
-const checkSession = () => {
- return new Promise((resolve, reject) => {
- if (!sessionId) {
- return resolve(false);
- }
- uni.checkSession({
- success() {
- return resolve(true);
- },
- fail() {
- uni.removeStorageSync('sessionId');
- return resolve(false);
- },
- });
- });
-};
-
// 小程序更新
const checkUpdate = async (silence = true) => {
if (uni.canIUse('getUpdateManager')) {
diff --git a/sheep/platform/provider/wechat/openPlatform.js b/sheep/platform/provider/wechat/openPlatform.js
index e85ddfa..7dbf5ec 100644
--- a/sheep/platform/provider/wechat/openPlatform.js
+++ b/sheep/platform/provider/wechat/openPlatform.js
@@ -1,6 +1,8 @@
// 登录
import third from '@/sheep/api/third';
+// TODO 芋艿:等后面搞 App 再弄
+
const load = async () => {};
// 微信开放平台移动应用授权登陆