From 2cbd23d061be5076b86771750bf17615bbecb57d Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 17 七月 2024 11:41:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
wechat_jiaxuan/pages/index/index.js | 64 +++++++++++++++++++++++++++-----
1 files changed, 54 insertions(+), 10 deletions(-)
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index c76e354..ea13e96 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/wechat_jiaxuan/pages/index/index.js
@@ -1,4 +1,4 @@
-// pages/index/index.js
+import { getDictData, getMemberInfo } from '../../api/index'
Page({
/**
@@ -9,6 +9,7 @@
topHeadStyle: 1,
showWhiteHead: true,
topHeadBorder: false,
+ member: {},
bannerList: [
{imgurl: ''},
@@ -24,11 +25,20 @@
interval: 3000,
duration: 500
},
+ HOME_CLASS_A: '',
+ HOME_CLASS_B: '',
+ HOME_CLASS_B2: '',
+ HOME_CLASS_C: '',
},
toSearch() {},
+ onShow() {
+ getMemberInfo().then(res => {
+ this.setData({member: res.data})
+ })
+ },
onLoad(options) {
-
+ this.initData()
},
changePath(e) {
let index = e.currentTarget.dataset.type
@@ -40,7 +50,7 @@
success: function (res) {
// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
res.eventChannel.emit('acceptDataFromOpenerPage', { link: 'https://m.zbom.com/mobile/styleTest.html?type=1' })
- saveBehavior({ type: 1 })
+ // saveBehavior({ type: 1 })
}
})
break;
@@ -69,17 +79,51 @@
break;
}
},
+ initData() {
+ getDictData({
+ code: 'WEIXIN_DEFAULT_IMGS',
+ label: 'HOME_CLASS_A'
+ }).then(res => {
+ this.setData({ HOME_CLASS_A: res.data.code })
+ })
+ getDictData({
+ code: 'WEIXIN_DEFAULT_IMGS',
+ label: 'HOME_CLASS_B'
+ }).then(res => {
+ this.setData({ HOME_CLASS_B: res.data.code })
+ })
+ getDictData({
+ code: 'WEIXIN_DEFAULT_IMGS',
+ label: 'HOME_CLASS_B2'
+ }).then(res => {
+ this.setData({ HOME_CLASS_B2: res.data.code })
+ })
+ getDictData({
+ code: 'WEIXIN_DEFAULT_IMGS',
+ label: 'HOME_CLASS_C'
+ }).then(res => {
+ this.setData({ HOME_CLASS_C: res.data.code })
+ })
+ },
+ jumpProVideo() {
+ wx.navigateTo({
+ url: '/pages/productVideo/index',
+ })
+ },
+ jumpProKefu() {
+ wx.navigateTo({
+ url: '/pages/kefu/index',
+ })
+ },
+ jumpProConsult() {
+ wx.switchTab({
+ url: '/pages/consult/consult',
+ })
+ },
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
*/
onReady() {
-
- },
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
- onShow() {
},
--
Gitblit v1.9.3