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
| <template>
|
| <view
| class="diy-imageSingle"
| :style="
| 'padding-top: ' +
| itemData.style.paddingTop +
| 'px;padding-bottom:' +
| itemData.style.paddingTop +
| 'px; padding-left:' +
| itemData.style.paddingLeft +
| 'px;padding-right:' +
| itemData.style.paddingLeft +
| 'px; background:' +
| itemData.style.background
| "
| >
| <view class="d-c-c" v-for="(imageSingle, index) in itemData.data" :key="index" @click="gotoPages(imageSingle)">
| <image :src="imageSingle.imgUrl" mode="widthFix"></image>
| </view>
|
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {};
| },
| props: ['itemData'],
| methods: {
| /*跳转页面*/
| gotoPages(e) {
| if(e.type && e.type == "小程序"){
| wx.navigateToMiniProgram({
| appId: e.inputname,
| path: e.linkUrl,
| extarData: {
| open: 'happy'
| },
| envVersion: 'release',
| success(res) {
| // 打开成功
| console.log("成功")
| }
| })
|
| }else{
| this.gotoPage(e.linkUrl);
| }
| //this.gotoPage(e.linkUrl);
| }
| }
| };
| </script>
|
| <style>
| .diy-imageSingle image {
| width: 100%;
| }
| </style>
|
|