hh-doctor-sdk 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ Page({
29
29
  * 生命周期函数--监听页面显示
30
30
  */
31
31
  onShow() {
32
- if (wx.loginConfig && wx.loginConfig.judgeLogin) {
32
+ if (!wx.loginConfig || !wx.loginConfig.judgeLogin) {
33
33
  wx.showToast({
34
34
  title: '未配置登录检测',
35
35
  })
@@ -61,15 +61,17 @@ Page({
61
61
  // wx.switchTab({
62
62
  // url: '/pages/recommend/recommend',
63
63
  // })
64
- wx.loginConfig.judgeLogin(false)
64
+ wx.loginConfig.directLogin(false)
65
+ }
66
+
67
+ if (res.confirm) {
68
+ // wx.navigateTo({
69
+ // url: '/pkgMine/pages/mine/loginpage',
70
+ // })
71
+ wx.loginConfig.directLogin(true)
65
72
  }
66
73
  }
67
- if (res.confirm) {
68
- // wx.navigateTo({
69
- // url: '/pkgMine/pages/mine/loginpage',
70
- // })
71
- wx.loginConfig.judgeLogin(true)
72
- }
74
+
73
75
  }
74
76
  })
75
77
  }
@@ -29,6 +29,7 @@ function initSDK() {
29
29
  }
30
30
 
31
31
  function setLoginCheck(judgeLogin, directLogin) {
32
+ console.error('增加登录检测配置===>')
32
33
  wx.loginConfig = {}
33
34
  wx.loginConfig.judgeLogin = judgeLogin
34
35
  wx.loginConfig.directLogin = directLogin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-doctor-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "和缓名医小程序SDK",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"