|
@@ -40,7 +40,7 @@
|
|
|
@click="toPage('/pages/researchReport/reportHome/reportHome')"></u-section>
|
|
|
</template>
|
|
|
<template v-slot:body>
|
|
|
- <view v-if="reportList.length!=0" >
|
|
|
+ <view v-if="reportList.length!=0">
|
|
|
<view v-for="(data,index) in reportList" :key="index" class="u-body-item u-flex u-p-t-0 "
|
|
|
style="align-items: inherit;" @click="toReport(data.id, data.title)">
|
|
|
<image :src="data.cover" mode="aspectFill"></image>
|
|
@@ -134,7 +134,8 @@
|
|
|
homeCourseList,
|
|
|
homeReportList,
|
|
|
homeSetting,
|
|
|
- homeSwiperList
|
|
|
+ homeSwiperList,
|
|
|
+ loadJlrzsUrl
|
|
|
} from '@/api/home.js'
|
|
|
import {
|
|
|
me
|
|
@@ -162,7 +163,7 @@
|
|
|
return tabbarStore.inactiveColor
|
|
|
})
|
|
|
const tabbarCurrentIndex = 0
|
|
|
-
|
|
|
+ const jlrzsUrl = ref(null)
|
|
|
const authStore = useAuthStore()
|
|
|
// 屏幕状态栏高度
|
|
|
const statusBarHeight = ref(0)
|
|
@@ -180,20 +181,7 @@
|
|
|
const isMember = ref(false)
|
|
|
|
|
|
// 首页-轮播图
|
|
|
- const swiperList = ref([
|
|
|
- // {
|
|
|
- // imgUrl: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
|
|
|
- // id: 1
|
|
|
- // },
|
|
|
- // {
|
|
|
- // imgUrl: 'https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c',
|
|
|
- // id: 2
|
|
|
- // },
|
|
|
- // {
|
|
|
- // imgUrl: 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg',
|
|
|
- // id: 3
|
|
|
- // },
|
|
|
- ])
|
|
|
+ const swiperList = ref([])
|
|
|
|
|
|
const courseList = ref([{
|
|
|
courseImg: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
|
|
@@ -272,7 +260,7 @@
|
|
|
title: '经理人指数',
|
|
|
icon: 'icon-zhishu',
|
|
|
url: '跳转页面的路径',
|
|
|
- toOtherApp: true,
|
|
|
+ toOtherApp: false,
|
|
|
otherAppId: '其他小程序的appid'
|
|
|
},
|
|
|
{
|
|
@@ -286,10 +274,10 @@
|
|
|
}
|
|
|
])
|
|
|
|
|
|
- const reportList = ref(
|
|
|
- [])
|
|
|
+ const reportList = ref([])
|
|
|
// 跳转页面
|
|
|
const jumpToPage = (data) => {
|
|
|
+
|
|
|
if (data.toOtherApp) {
|
|
|
// 跳转其他小程序
|
|
|
wx.navigateToMiniProgram({
|
|
@@ -311,7 +299,13 @@
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ if (data.id === 'index') {
|
|
|
+ const src = encodeURIComponent(jlrzsUrl.value);
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/webview/webview?url=${src}`
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
|
url: data.url
|
|
|
})
|
|
@@ -379,13 +373,15 @@
|
|
|
// console.log(res)
|
|
|
// })
|
|
|
}
|
|
|
- function initReport (){
|
|
|
+
|
|
|
+ function initReport() {
|
|
|
homeReportList().then(res => {
|
|
|
if (res?.data) {
|
|
|
reportList.value = res.data
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
function getCharCount() {
|
|
|
count().then(res => {
|
|
|
if (res && res.message === 'success') {
|
|
@@ -408,6 +404,14 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ function loadUrl() {
|
|
|
+ loadJlrzsUrl().then(res => {
|
|
|
+ if (res && res.code === 0) {
|
|
|
+ jlrzsUrl.value = res.data.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
onReady(() => {
|
|
|
uni.getSystemInfo({
|
|
|
success(e) {
|
|
@@ -431,6 +435,9 @@
|
|
|
// 登录后才请求消息数量
|
|
|
getCharCount()
|
|
|
initReport()
|
|
|
+ if(!jlrzsUrl.value){
|
|
|
+ loadUrl()
|
|
|
+ }
|
|
|
// 没有用户信息就加载一边
|
|
|
if (!isUserInfo) {
|
|
|
initUser();
|
|
@@ -674,4 +681,4 @@
|
|
|
color: $uni-text-color;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|