Commit d361795db0ddeeefb98ad16b12ff3deba60e7f7b

Authored by zhiyangdu
1 parent 99065814

url跳转

src/components/horizList/horizList.vue
... ... @@ -46,6 +46,7 @@
46 46 :item="item">
47 47 </swiper-item>
48 48 <shop-daren-hot v-if="com == '5'"
  49 + @userJump="userJump"
49 50 :item="item">
50 51  
51 52 </shop-daren-hot>
... ... @@ -90,7 +91,13 @@
90 91 jump(item) {
91 92 this.$emit("jump", item);
92 93 },
93   -
  94 + /**
  95 + * 跳转到达人个人中心页面
  96 + * @param {object} item [数据对象]
  97 + */
  98 + userJump(item) {
  99 + this.$emit("userJump", item);
  100 + },
94 101 /**
95 102 * 加入购物车
96 103 * @param {object} item [数据对象]
... ...
src/components/shopDarenHot/shopDarenHot.vue
1 1 <template>
2   - <div v-if="item" class="recommendDaren">
  2 + <div v-if="item" class="recommendDaren" @click="userJump(item)">
3 3 <div class="daren_box">
4 4 <img class="head_portrait" src="/static/img/2.png" />
5 5 <div class="name">
... ... @@ -28,6 +28,13 @@
28 28 console.log(this.item)
29 29 },
30 30 methods: {
  31 + /**
  32 + * 点击跳转
  33 + * @param {object} item [数据对象]
  34 + */
  35 + userJump(item) {
  36 + this.$emit("userJump", item);
  37 + },
31 38 }
32 39 }
33 40 </script>
... ...
src/components/shopDatenTop/shopDatenTop.vue
1 1 <template>
2 2 <div>
3   - <div class="item_box" @click="toDetail(shopDatenTop)">
  3 + <div class="item_box" @click="userJump(shopDatenTop)">
4 4 <img class="head_portrait" v-lazy="shopDatenTop.logo" />
5 5 <div class="user_info">
6 6 <div class="daren_box">
... ... @@ -37,8 +37,8 @@
37 37 * 点击事件
38 38 * @param {object} item [数据参数]
39 39 */
40   - toDetail(item) {
41   - this.$emit("toDetail", item);
  40 + userJump(item) {
  41 + this.$emit("userJump", item);
42 42 }
43 43 }
44 44 }
... ...
src/pages/newDaren/newDaren.vue
... ... @@ -8,7 +8,7 @@
8 8 }">
9 9 </swiper>
10 10 <!--达人信息-->
11   - <shop-daten-top v-if="shopDatenTop" :shopDatenTop="shopDatenTop"></shop-daten-top>
  11 + <shop-daten-top v-if="shopDatenTop" @userJump="userJump" :shopDatenTop="shopDatenTop"></shop-daten-top>
12 12 <!--推荐达人-->
13 13 <!-- 最新动态标题 -->
14 14 <text-title-box slot="title-box" @more="newDarenDynamicsMore"
... ... @@ -18,7 +18,7 @@
18 18 }">
19 19 </text-title-box>
20 20 <!--导航-->
21   - <horiz-list class="components-box" v-if="shopDarenHot && shopDarenHot.length" @jump="jump"
  21 + <horiz-list class="components-box" v-if="shopDarenHot && shopDarenHot.length" @jump="jump" @userJump="userJump"
22 22 :lists="shopDarenHot"
23 23 com="5">
24 24 </horiz-list>
... ... @@ -220,7 +220,7 @@
220 220 // 临时,设置跳转达人个人主页用户数据
221 221 Object.assign(item, {
222 222 type: "5",
223   - 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",
  223 + to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect" + "&id=" + item.id : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect"+ "&id=" + item.id,
224 224 shop_type: ""
225 225 });
226 226  
... ...