浏览代码

Merge branch 'report_share'

jwyu 2 年之前
父节点
当前提交
ea5d89b9d7
共有 2 个文件被更改,包括 6 次插入3 次删除
  1. 2 1
      pages-report/chapterDetail.vue
  2. 4 2
      pages/voice/voice.vue

+ 2 - 1
pages-report/chapterDetail.vue

@@ -18,7 +18,8 @@ export default {
   onShareAppMessage() {
     return {
       title:this.msgObj.title,
-      path:`/pages-report/chapterDetail?chapterId=${this.msgObj.chapterId}`
+      path:`/pages-report/chapterDetail?chapterId=${this.msgObj.chapterId}`,
+      imageUrl:this.msgObj.shareImg||''
     }
   },
   methods: {

+ 4 - 2
pages/voice/voice.vue

@@ -284,6 +284,7 @@ export default {
             const res=await apiVoiceSectionList()
             if(res.code!==200) return
             const arr=res.data||[]
+            let temarr=[]
             this.options=arr.map(item=>{
                 let obj={
                     text:'',
@@ -291,7 +292,7 @@ export default {
                 }
                 obj.text=item.VarietyName
                 obj.children=item.Children.map(_item=>{
-                    this.tabsList.push(_item)
+                    temarr.push(_item)
                     return {
                         text:_item.SectionName,
                         id:_item.SectionId
@@ -299,7 +300,8 @@ export default {
                 })
                 return obj
             })
-            this.activeId=this.tabsList[0].SectionId
+            this.tabsList=temarr||[]
+            this.activeId=temarr[0].SectionId
             this.$nextTick(()=>{
                 this.selectComponent('#tabs').resize();// 解决初始渲染 vant tab 底部条
             })