Commit ddad9c658df44a53e73b5f57694ce9cbf0701d38

Authored by zhiyangdu
1 parent 61a4349b

跳转优化

src/components/darenListCom/darenListCom.vue
1 <template> 1 <template>
2 <div class="daren-list-com" v-if="item"> 2 <div class="daren-list-com" v-if="item">
3 <div class="box" @click.stop.prevent @click="jump(item)"> 3 <div class="box" @click.stop.prevent @click="jump(item)">
4 - <div class="top-box" v-if="item.shop_user" @click.stop.prevent @click="userJump(item)"> 4 + <div class="top-box" v-if="item.shop_user" @click.stop.prevent @click="userJump(item,2)">
5 <div class="top-left"> 5 <div class="top-left">
6 6
7 <!-- 用户头像/昵称 --> 7 <!-- 用户头像/昵称 -->
@@ -10,7 +10,6 @@ @@ -10,7 +10,6 @@
10 </user-avatar> 10 </user-avatar>
11 </div> 11 </div>
12 <div class="top-right"> 12 <div class="top-right">
13 -  
14 <!-- 发布时间 --> 13 <!-- 发布时间 -->
15 {{item.time}} 14 {{item.time}}
16 </div> 15 </div>
@@ -117,7 +116,8 @@ @@ -117,7 +116,8 @@
117 * 用户头像/昵称,点击跳转 116 * 用户头像/昵称,点击跳转
118 * @param {object} item [数据对象] 117 * @param {object} item [数据对象]
119 */ 118 */
120 - userJump(item) { 119 + userJump(item,type) {
  120 + this.$set(item, "type", "2");
121 this.$emit("userJump", item); 121 this.$emit("userJump", item);
122 }, 122 },
123 123
src/pages/newDaren/newDaren.vue
@@ -337,7 +337,7 @@ @@ -337,7 +337,7 @@
337 * @param {object} item [数据对象] 337 * @param {object} item [数据对象]
338 */ 338 */
339 jump(item) { 339 jump(item) {
340 - 340 + debugger
341 // 判断并调用通用跳转 341 // 判断并调用通用跳转
342 if (typeof this.$parent.gotoDetail === "function") { 342 if (typeof this.$parent.gotoDetail === "function") {
343 343
@@ -345,7 +345,7 @@ @@ -345,7 +345,7 @@
345 // 临时,设置跳转参数,跳转达人动态详情页面 345 // 临时,设置跳转参数,跳转达人动态详情页面
346 Object.assign(item, { 346 Object.assign(item, {
347 type: "5", 347 type: "5",
348 - to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect" + "&id=" + item.id : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect"+ "&id=" + item.id, 348 + to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect" + "&id=" + item.uid: "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect"+ "&id=" + item.uid,
349 shop_type: "" 349 shop_type: ""
350 }); 350 });
351 351
@@ -360,6 +360,7 @@ @@ -360,6 +360,7 @@
360 /** 360 /**
361 * 用户头像/昵称,点击跳转 361 * 用户头像/昵称,点击跳转
362 * @param {object} item [数据对象] 362 * @param {object} item [数据对象]
  363 + * type等于2属于达人跳转传uid,type=1传id
363 */ 364 */
364 userJump(item) { 365 userJump(item) {
365 // 判断并调用通用跳转 366 // 判断并调用通用跳转
@@ -368,7 +369,7 @@ @@ -368,7 +369,7 @@
368 // 临时,设置跳转达人个人主页用户数据 369 // 临时,设置跳转达人个人主页用户数据
369 Object.assign(item, { 370 Object.assign(item, {
370 type: "5", 371 type: "5",
371 - 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, 372 + to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect" + "&id=" + (item.type==2?item.uid:item.id) : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect"+ "&id=" + (item.type==2?item.uid:item.id),
372 shop_type: "" 373 shop_type: ""
373 }); 374 });
374 375