Commit ddad9c658df44a53e73b5f57694ce9cbf0701d38

Authored by zhiyangdu
1 parent 61a4349b

跳转优化

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