liukangdong
2024-07-10 bdcefd7a9d54a48308ecce327011775db6a92ed6
wechat_jiaxuan/pages/index/index.js
@@ -30,7 +30,45 @@
  onLoad(options) {
  },
  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;
    }
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */