From 1a6905045d38bb50b0c6554c3440bdfd339c8d23 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 30 七月 2024 19:13:46 +0800
Subject: [PATCH] ‘’
---
wechat_jiaxuan/pages/index/index.js | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 2fad1b9..3c1ace0 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/wechat_jiaxuan/pages/index/index.js
@@ -12,6 +12,7 @@
HYEventBus
} = require('hy-event-store')
const eventBus = new HYEventBus()
+const app = getApp()
Page({
/**
@@ -48,10 +49,15 @@
HOME_CLASS_B2: '',
HOME_CLASS_C: '',
},
+ onLoadLogin(options){
+ // 宸茬粡鐧诲綍锛屽彲浠ヨ蛋渚濊禆token鐨勯�昏緫浜�
+ console.log('棣栭〉鐨刼nLoadLogin',options,`{"token":"${app.globalData.token}"}`);
+ this.initData()
+ },
onShow() {
let that = this
- const member = wx.getStorageSync('member')
- if (member && (member.authStatus == '1' || member.authStatus == '2')) {
+ const member = wx.getStorageSync('member') || {}
+ if (member && member.id) {
getMemberInfo().then(res => {
this.setData({
member: res.data
@@ -70,9 +76,6 @@
onLoad(options) {
const member = wx.getStorageSync('member')
this.initDictData()
- setTimeout(() => {
- this.initData()
- }, 1200)
},
changePath(e) {
let index = e.currentTarget.dataset.type
@@ -230,9 +233,13 @@
})
},
bannerbindload(e) {
- const height = e.detail.height
+ const {
+ height,
+ width
+ } = e.detail
+ let activeHeight = height * 670 / width
this.setData({
- bannerImgHeight: height
+ bannerImgHeight: activeHeight
})
},
consultbindload(e) {
@@ -242,7 +249,7 @@
} = e.detail
let activeHeight = height * 670 / width
this.setData({
- consultImgHeight: activeHeight
+ consultImgHeight: activeHeight + 100
})
},
consultClick(e) {
--
Gitblit v1.9.3