Commit d361795db0ddeeefb98ad16b12ff3deba60e7f7b

Authored by zhiyangdu
1 parent 99065814

url跳转

src/components/horizList/horizList.vue
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
46 :item="item"> 46 :item="item">
47 </swiper-item> 47 </swiper-item>
48 <shop-daren-hot v-if="com == '5'" 48 <shop-daren-hot v-if="com == '5'"
  49 + @userJump="userJump"
49 :item="item"> 50 :item="item">
50 51
51 </shop-daren-hot> 52 </shop-daren-hot>
@@ -90,7 +91,13 @@ @@ -90,7 +91,13 @@
90 jump(item) { 91 jump(item) {
91 this.$emit("jump", item); 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 * @param {object} item [数据对象] 103 * @param {object} item [数据对象]
src/components/shopDarenHot/shopDarenHot.vue
1 <template> 1 <template>
2 - <div v-if="item" class="recommendDaren"> 2 + <div v-if="item" class="recommendDaren" @click="userJump(item)">
3 <div class="daren_box"> 3 <div class="daren_box">
4 <img class="head_portrait" src="/static/img/2.png" /> 4 <img class="head_portrait" src="/static/img/2.png" />
5 <div class="name"> 5 <div class="name">
@@ -28,6 +28,13 @@ @@ -28,6 +28,13 @@
28 console.log(this.item) 28 console.log(this.item)
29 }, 29 },
30 methods: { 30 methods: {
  31 + /**
  32 + * 点击跳转
  33 + * @param {object} item [数据对象]
  34 + */
  35 + userJump(item) {
  36 + this.$emit("userJump", item);
  37 + },
31 } 38 }
32 } 39 }
33 </script> 40 </script>
src/components/shopDatenTop/shopDatenTop.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - <div class="item_box" @click="toDetail(shopDatenTop)"> 3 + <div class="item_box" @click="userJump(shopDatenTop)">
4 <img class="head_portrait" v-lazy="shopDatenTop.logo" /> 4 <img class="head_portrait" v-lazy="shopDatenTop.logo" />
5 <div class="user_info"> 5 <div class="user_info">
6 <div class="daren_box"> 6 <div class="daren_box">
@@ -37,8 +37,8 @@ @@ -37,8 +37,8 @@
37 * 点击事件 37 * 点击事件
38 * @param {object} item [数据参数] 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,7 +8,7 @@
8 }"> 8 }">
9 </swiper> 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 <text-title-box slot="title-box" @more="newDarenDynamicsMore" 14 <text-title-box slot="title-box" @more="newDarenDynamicsMore"
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 }"> 18 }">
19 </text-title-box> 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 :lists="shopDarenHot" 22 :lists="shopDarenHot"
23 com="5"> 23 com="5">
24 </horiz-list> 24 </horiz-list>
@@ -220,7 +220,7 @@ @@ -220,7 +220,7 @@
220 // 临时,设置跳转达人个人主页用户数据 220 // 临时,设置跳转达人个人主页用户数据
221 Object.assign(item, { 221 Object.assign(item, {
222 type: "5", 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 shop_type: "" 224 shop_type: ""
225 }); 225 });
226 226