|
@@ -2,7 +2,7 @@
|
|
|
import { homePage } from '../../api/index'
|
|
|
import { userEntityRecharge } from '../../api/charge'
|
|
|
import { createQRcode } from "../../api/document";
|
|
|
-
|
|
|
+const app = getApp()
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
@@ -24,7 +24,13 @@ Page({
|
|
|
},
|
|
|
|
|
|
onShow () {
|
|
|
- this.initIndexData()
|
|
|
+ if (app.globalData.userInfo.login) {
|
|
|
+ this.initIndexData()
|
|
|
+ } else {
|
|
|
+ wx.reLaunch({
|
|
|
+ url: '/pages/my/my'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
onPullDownRefresh () {
|
|
|
wx.vibrateShort({
|
|
@@ -32,6 +38,12 @@ Page({
|
|
|
})
|
|
|
this.initIndexData(true)
|
|
|
},
|
|
|
+ onShareAppMessage () {
|
|
|
+ return {
|
|
|
+ title: 'ITTHealth',
|
|
|
+ path: '/page/index/index'
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取首页信息
|
|
|
initIndexData (pullDownRefresh = false) {
|
|
|
wx.showLoading({
|