From d9a89d83c2048a964f16ca179feb2b7f21b9d33a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 29 七月 2024 16:28:47 +0800
Subject: [PATCH] 提交
---
wechat_staff/pages/index/index.js | 39 +++++++++++++++++++++++++++++----------
1 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/wechat_staff/pages/index/index.js b/wechat_staff/pages/index/index.js
index 3952d1c..39f047c 100644
--- a/wechat_staff/pages/index/index.js
+++ b/wechat_staff/pages/index/index.js
@@ -6,6 +6,8 @@
getCustomizedNewsList,
newsPage
} from '../../api/index'
+const { HYEventBus } = require('hy-event-store')
+const eventBus = new HYEventBus()
Page({
data: {
searchValue: '',
@@ -28,12 +30,11 @@
onLoad() {
const res = wx.getMenuButtonBoundingClientRect()
this.setData({
- clientHeight: res.height
- })
- this.setData({
+ clientHeight: res.height,
clientTop: res.top
})
-
+ },
+ onShow() {
this.initData()
},
initData() {
@@ -106,6 +107,20 @@
url: '/pages/promotion/index',
})
},
+ funClick(e){
+ const i = e.currentTarget.dataset.i
+ let map = ['product_intro', 'whole_case', 'real_case']
+ if(i == 3){
+ wx.navigateTo({
+ url: '/pages/consult/consult',
+ })
+ }else{
+ wx.setStorageSync('discoverKey', map[i])
+ wx.switchTab({
+ url: '/pages/discover/discover',
+ })
+ }
+ },
jumpProVideo() {
wx.navigateTo({
url: '/pages/productVideo/index',
@@ -115,12 +130,16 @@
const {
videourl
} = e.currentTarget.dataset
- wx.previewMedia({
- sources: [{
- url: videourl,
- type: 'video'
- }]
- })
+ let videoPlay = this.selectComponent('.videoPlay');
+ if(videoPlay){
+ videoPlay.startPlayVideo(videourl,this );
+ }
+ // wx.previewMedia({
+ // sources: [{
+ // url: videourl,
+ // type: 'video'
+ // }]
+ // })
},
seriveClick(e) {
const {
--
Gitblit v1.9.3