Browse Source

feature:增加h5多频多台的分享回调功能

zeng.chen 9 months atrás
parent
commit
9b7c9efbbc
2 changed files with 6 additions and 2 deletions
  1. 1 1
      src/pages/share/channels.vue
  2. 5 1
      src/pages/share/list.vue

+ 1 - 1
src/pages/share/channels.vue

@@ -44,7 +44,7 @@ export default {
   methods: {
   methods: {
     getDetail(item) {
     getDetail(item) {
       uni.navigateTo({
       uni.navigateTo({
-        url: `?page=/pages/share/list&channelId=${item.id}&userId=${this.userId}`,
+        url: `?page=/pages/share/list&channelId=${item.id}&userId=${this.userId}&categoryId=${this.categoryId}`,
       })
       })
     },
     },
   }
   }

+ 5 - 1
src/pages/share/list.vue

@@ -56,13 +56,17 @@ export default {
     if (e.userId) {
     if (e.userId) {
       this.form.userId = e.userId
       this.form.userId = e.userId
       this.form.channelId = e.channelId
       this.form.channelId = e.channelId
+      this.form.categoryId = e.categoryId
       // 频道详情
       // 频道详情
       channelDetail({
       channelDetail({
         channelId: e.channelId,
         channelId: e.channelId,
+        categoryId: e.categoryId,
         userId: e.userId
         userId: e.userId
       }).then(res => {
       }).then(res => {
         if (res.code === 0) {
         if (res.code === 0) {
           this.data = res.data
           this.data = res.data
+          // 返回给APP的
+          this.data.categoryId = this.data.categoryId ?? e.categoryId
         }
         }
       })
       })
       this.getList()
       this.getList()
@@ -93,7 +97,7 @@ export default {
     // },
     // },
     // 打开app
     // 打开app
     open() {
     open() {
-      this.openApp(`?page=/mobile/channelSinglePage&channel=${this.data.channelId}&channelId=${this.data.id}`)
+      this.openApp(`?page=/mobile/channelSinglePage&channel=${this.data.channelId}&channelId=${this.data.id}&categoryId=${this.data.categoryId}`)
     }
     }
   }
   }
 }
 }