From ce446f63f1c80e814f7cd94a6abfae61c6d7a22e Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 16 七月 2024 17:32:28 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
wechat_jiaxuan/pages/index/index.js | 102 ++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 92 insertions(+), 10 deletions(-)
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 06434ae..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,24 +25,105 @@
interval: 3000,
duration: 500
},
+ HOME_CLASS_A: '',
+ HOME_CLASS_B: '',
+ HOME_CLASS_B2: '',
+ HOME_CLASS_C: '',
},
toSearch() {},
- onLoad(options) {
-
+ onShow() {
+ getMemberInfo().then(res => {
+ this.setData({member: res.data})
+ })
},
+ onLoad(options) {
+ this.initData()
+ },
+ changePath(e) {
+ let index = e.currentTarget.dataset.type
+ console.log(index);
+ switch (index) {
+ case '0':
+ wx.navigateTo({
+ url: '/pages/webView/index',
+ success: function (res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', { link: 'https://m.zbom.com/mobile/styleTest.html?type=1' })
+ // saveBehavior({ type: 1 })
+ }
+ })
+ break;
+ case '1':
+ wx.navigateTo({
+ url: '/pages/calculator/index'
+ })
+ break;
+
+ case '2':
+ wx.navigateTo({
+ url: '/pages/design/design'
+ })
+ // wx.navigateTo({
+ // url: '/pages/wonderful_activity/index',
+ // success: function(res) {
+ // // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ // res.eventChannel.emit('acceptDataFromOpenerPage', { type: 1 })
+ // }
+ // })
+ break;
+
+ default:
+ console.log('error')
+ 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