com.vue
6.41 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<template>
<div class="index-box">
<!-- style_1组件 -->
<style-7 @more="moreA" @bannerJump="bannerJumpA" @jump=jumpA @addCart=addCartA
:styles="styleA">
</style-7>
</div>
</template>
<script>
// 引入组件
import { Toast, Indicator } from "mint-ui";
import style7 from "@/components/style_7/style_7";
export default {
data () {
return {
title: "",
styleA: {
"id": "1567",
"simg": "https://wjjtest.ys2.cnliveimg.com/shop/img/2020/03/26/5e7c442f13a41.png",
"style": "7",
"title": "网家家生鲜",
"video": "",
"video_img": "",
"w": "90",
"h": "90",
"img": [],
"market": {
"id": "66",
"title": "火锅测试",
"icon": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/05/06/5ccfa14759478.png",
"simg": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/05/06/5ccfa14a3c3fe.jpg",
"pid": "4",
"type": "13",
"to": "66",
"shop_type": "",
"goods": [
{
"id": "9520377",
"title": "测试优惠劵",
"simg": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/29/5cc5e6f49256e.png",
"price": "120.00",
"shop_type": "1"
},
{
"id": "9520377",
"title": "测试优惠劵",
"simg": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/29/5cc5e6f49256e.png",
"price": "120.00",
"shop_type": "1"
},
{
"id": "9520377",
"title": "测试优惠劵",
"simg": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/29/5cc5e6f49256e.png",
"price": "120.00",
"shop_type": "1"
},
{
"id": "9520377",
"title": "测试优惠劵",
"simg": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/29/5cc5e6f49256e.png",
"price": "120.00",
"shop_type": "1"
},
{
"id": "9520377",
"title": "测试优惠劵",
"simg": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/29/5cc5e6f49256e.png",
"price": "120.00",
"shop_type": "1"
},
{
"id": "9520377",
"title": "测试优惠劵",
"simg": "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2019/04/29/5cc5e6f49256e.png",
"price": "120.00",
"shop_type": "1"
}
]
}
},
}
},
components: {
style7,
},
created() {
// 设置标题
this.$set(this, "title", "aabb");
},
methods: {
/**
* 更多A
* @param {object} item [数据对象]
*/
moreA(item) {
console.log("moreA", item);
},
/**
* Banner跳转A
* @param {object} item [数据对象]
*/
bannerJumpA(item) {
// 判断并调用通用跳转
if (typeof this.$parent.gotoDetail === "function") {
this.$parent.gotoDetail(item);
}
},
/**
* 跳转A
* @param {object} item [数据对象]
*/
jumpA(item) {
console.log("jumpA", item);
},
/**
* 加入购物车A
* @param {object} item [数据对象]
*/
addCartA(item) {
console.log("addCartA", item);
},
/**
* 更多B
* @param {object} item [数据对象]
*/
moreB(item) {
console.log("moreB", item);
},
/**
* 跳转A
* @param {object} item [数据对象]
*/
jumpB(item) {
console.log("jumpA", item);
},
/**
* 加入购物车A
* @param {object} item [数据对象]
*/
addCartB(item) {
console.log("addCartA", item);
},
},
head: {
title () {
return {
inner: this.title
}
}
},
watch: {
// 设置页面标题
title(newVal) {
if (this.$store.state.browser.toLowerCase() == "qq" && this.$store.state.deviceType.toLowerCase() == "iphone") {
this.$iFrame.insertIFrame(newVal);
} else {
this.$emit("updateHead");
}
}
},
mounted() {
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style rel="stylesheet/less" lang='less' scoped>
@import "com";
</style>