mpVideo.js
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// pages/tab/shopMall/pages/discover/components/common/mpVideo/mpVideo.js
Component({
/**
* 组件的属性列表
*/
externalClasses: ["custom-class"],
properties: {
fileList: {
type: Array,
value: []
},
curIdx: {
type: Number,
value: 0,
observer:function(val,n){
this.setData({
currentIdx: val,
});
}
}
},
/**
* 组件的初始数据
*/
data: {
currentIdx: 0,
curPicIdx: 0,
},
/**
* 组件的方法列表
*/
methods: {
changeSwiperItem(e) {
this.setData({
currentIdx: e.detail.current,
curPicIdx: 0
});
},
changePic(e) {
console.log(e.detail.current)
this.setData({
curPicIdx: e.detail.current,
});
},
clickProd(e){
const {pagePathType,id,marketingType} = e.currentTarget.dataset.prodinfo
if(pagePathType==1){
// marketingType 4膨胀金 3众筹
if(marketingType == 4){
wx.$router.go('/packageShopmall/packageExpandedGold/pages/activity/index/index', {id,isBack:true, notIntercept:true})
}else{
wx.$router.go('/pages/crowdfunding/index/index', {id, notIntercept:true})
}
}else{
wx.$router.go('/packageShopmall/packageMall/pages/detail/detail', {id, notIntercept:true})
}
},
},
});