darenList.vue
15 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<template>
<div class="daren-list">
<!-- 达人动态列表 -->
<daren-list-box class="daren-list" @userJump="userJump" @jump="jump" @goodsJump="goodsJump" @goodsPrimary="goodsPrimary"
:lists="[
{
user: {
simg: 'static/img/6.png',
nickname: '欧阳娜娜'
},
createtime: '123分钟前',
intro: '盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域',
img: {
list: [
{
img: 'static/img/banner-02.jpg'
}
]
},
hot: {
simg: 'static/img/icon_popular_comment.png',
info: '口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~'
},
goods: [
{
simg: 'static/img/pic_3.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
}
],
comment_num: '11100',
like_num: '123'
},
{
user: {
simg: 'static/img/6.png',
nickname: '欧阳娜娜'
},
createtime: '123分钟前',
img: {
list: [
{
img: 'static/img/banner-03.jpg'
}
]
},
hot: {
simg: 'static/img/icon_popular_comment.png',
info: '口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~'
},
goods: [
{
simg: 'static/img/pic_3.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
}
],
comment_num: '11100',
like_num: '123'
},
{
user: {
simg: 'static/img/6.png',
nickname: '欧阳娜娜'
},
createtime: '123分钟前',
intro: '盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域',
hot: {
simg: 'static/img/icon_popular_comment.png',
info: '口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~'
},
goods: [
{
simg: 'static/img/pic_3.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
},
{
simg: 'static/img/pic_2.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
},
{
simg: 'static/img/pic_1.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
},
{
simg: 'static/img/pic_3.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
},
{
simg: 'static/img/pic_2.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
},
{
simg: 'static/img/pic_1.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
}
],
comment_num: '11100',
like_num: '123'
},
{
user: {
simg: 'static/img/6.png',
nickname: '欧阳娜娜'
},
createtime: '123分钟前',
intro: '盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域',
img: {
list: [
{
img: 'static/img/banner-02.jpg'
}
]
},
goods: [
{
simg: 'static/img/pic_3.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
},
{
simg: 'static/img/pic_1.jpg',
title: '臻溪国奖茯全金花黑茶',
price: '288.00'
}
],
comment_num: '11100',
like_num: '123'
}
]">
<!-- 最新动态标题 -->
<text-title-box slot="title-box" @more="newDarenDynamicsMore"
:titles="{
title: '最新动态',
more: true
}">
</text-title-box>
</daren-list-box>
</div>
</template>
<script>
// 引入组件
import { Toast, Indicator } from "mint-ui";
import darenListBox from "@/components/darenListBox/darenListBox";
import textTitleBox from "@/components/textTitleBox/textTitleBox";
export default {
name: "darenList",
data() {
return {
title: "", // 标题
}
},
components:{
darenListBox,
textTitleBox
},
created() {
// 设置标题
this.$set(this, "title", "达人");
// 获取优选库精选活动
// this.activityAd();
},
methods: {
// 下拉刷新
// onRefresh() {
// // 下拉刷新中
// this.$set(this, "isLoading", true);
// // 获取优选库精选活动
// this.activityAd();
// },
/**
* 获取优选库精选活动
*/
activityAd() {
// 加载中提示
Indicator.open("加载中...");
// 获取证书请求接口
this.http("/Api/" + this.getApiVersion().index + "/activityAd", {
id: this.$route.query.id
}, this.activityAdCallback, {
method: "post"
}
);
},
/**
* 获取优选库精选活动回调
* @param {object} res [服务器返回数据]
* @param {object} ext [扩展参数]
*/
activityAdCallback(res, ext) {
// 加载完成
Indicator.close();
// 下拉刷新结束
this.$set(this, "isLoading", false);
// 返回处理
if (res.code == 200) {
// 解构数据
let { data: datas } = res;
/* 获取优选库精选活动数据 开始 */
// 设置标题
this.$set(this, "title", datas.title);
// 设置banner数据
if (datas.banner && datas.banner.length) {
this.$set(this, "banner", datas.banner);
}
// 设置navs数据
if (datas.navs && datas.navs.length) {
this.$set(this, "navs", datas.navs);
}
// 设置ads数据
if (datas.ads && datas.ads.length) {
this.$set(this, "ads", datas.ads);
}
/* 获取优选库精选活动数据 结束 */
} else if (res.code == 400) {
// 获取优选库精选活动失败
Toast(res.message);
} else {
// 获取优选库精选活动失败
Toast("获取优选库精选活动失败");
}
},
/**
* 调用通用跳转
* @param {object} item [通用跳转对象]
*/
toDetail(item) {
// 判断是否有通用跳转函数
if (typeof this.$parent.gotoDetail === "function") {
// 调用通用跳转
this.$parent.gotoDetail(item);
}
},
/**
* 最新达人动态更过
*/
newDarenDynamicsMore() {
console.log("newDarenDynamicsMore");
},
/**
* 跳转达人动态详情
* @param {object} item [数据对象]
*/
jump(item) {
// 判断并调用通用跳转
if (typeof this.$parent.gotoDetail === "function") {
// 临时,设置跳转参数,跳转达人动态详情页面
Object.assign(item, {
type: "25",
to: "265",
shop_type: ""
});
console.log("jump", item);
this.$parent.gotoDetail(item);
}
},
/**
* 用户头像/昵称,点击跳转
* @param {object} item [数据对象]
*/
userJump(item) {
// 判断并调用通用跳转
if (typeof this.$parent.gotoDetail === "function") {
// 临时,设置跳转达人个人主页用户数据
Object.assign(item, {
type: "5",
to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=40&from=redirect" : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=40&from=redirect",
shop_type: ""
});
console.log("userJump", item);
this.$parent.gotoDetail(item);
}
},
/**
* 点击跳转商品
* @param {object} item [数据对象]
*/
goodsJump(item) {
// 判断并调用通用跳转
if (typeof this.$parent.gotoDetail === "function") {
// 临时,设置跳转商品详情参数
Object.assign(item, {
type: "2",
to: "9525393",
shop_type: "1"
});
console.log("goodsJump", item);
this.$parent.gotoDetail(item);
}
},
/**
* 点击跳转商品购买
* @param {object} item [数据对象]
*/
goodsPrimary(item) {
// 判断并调用通用跳转
if (typeof this.$parent.gotoDetail === "function") {
// 临时,设置跳转商品详情参数
Object.assign(item, {
type: "2",
to: "9525393",
shop_type: "1"
});
console.log("goodsPrimary", item);
this.$parent.gotoDetail(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");
}
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style rel="stylesheet/less" lang="less" scoped>
@import "darenList";
</style>