|
@@ -68,6 +68,7 @@ import searchBox from "./components/searchBox.vue";
|
|
|
import audioBox from './components/audioBox.vue'
|
|
|
import sharePoster from '@/components/sharePoster/sharePoster.vue'
|
|
|
import {apiReportList,apiSubClassifyList} from '@/api/report'
|
|
|
+import {apiGetSceneToParams} from '@/api/common'
|
|
|
const moment=require('@/utils/moment-with-locales.min')
|
|
|
export default {
|
|
|
computed: {
|
|
@@ -107,7 +108,7 @@ export default {
|
|
|
return obj
|
|
|
},
|
|
|
code_scene(){
|
|
|
- return `classifyId=${this.classifyId}&classifyName=${this.classifyName}`
|
|
|
+ return JSON.stringify({classifyId:this.classifyId,classifyName:this.classifyName})
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -132,13 +133,17 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- console.log(options);
|
|
|
- this.classifyId=options.classifyId
|
|
|
- this.classifyName=decodeURIComponent(options.classifyName)
|
|
|
- // 设置title
|
|
|
- uni.setNavigationBarTitle({ title: decodeURIComponent(options.classifyName) })
|
|
|
- this.getList()
|
|
|
- this.getClassifyList()
|
|
|
+ if(options.scene){
|
|
|
+ this.init(options.scene)
|
|
|
+ }else{
|
|
|
+ this.classifyId=options.classifyId
|
|
|
+ this.classifyName=decodeURIComponent(options.classifyName)
|
|
|
+ // 设置title
|
|
|
+ uni.setNavigationBarTitle({ title: decodeURIComponent(options.classifyName) })
|
|
|
+ this.getList()
|
|
|
+ this.getClassifyList()
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
this.page=1
|
|
@@ -161,6 +166,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ async init(e){
|
|
|
+ const res=await apiGetSceneToParams({scene_key:e})
|
|
|
+ if(res.code==200){
|
|
|
+ const obj=JSON.parse(res.data)
|
|
|
+ this.classifyId=obj.classifyId
|
|
|
+ this.classifyName=decodeURIComponent(obj.classifyName)
|
|
|
+ uni.setNavigationBarTitle({ title: decodeURIComponent(obj.classifyName) })
|
|
|
+ this.getList()
|
|
|
+ this.getClassifyList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
//获取研报列表
|
|
|
async getList(){
|
|
|
const res=await apiReportList({
|