|
@@ -2,8 +2,7 @@
|
|
<view class="container" :style="{backgroundColor: `${backgroundColor}`}">
|
|
<view class="container" :style="{backgroundColor: `${backgroundColor}`}">
|
|
<u-navbar :is-back="false" title="" :style="{backgroundColor: `${backgroundColor}`}" :border-bottom="false">
|
|
<u-navbar :is-back="false" title="" :style="{backgroundColor: `${backgroundColor}`}" :border-bottom="false">
|
|
<view class="slot-wrap">
|
|
<view class="slot-wrap">
|
|
- <image :src="`${FILE_URL}/login-icon.png`"
|
|
|
|
- mode="aspectFit" style="width: 300rpx;"></image>
|
|
|
|
|
|
+ <image :src="`${FILE_URL}/login-icon.png`" mode="aspectFit" style="width: 300rpx;"></image>
|
|
</view>
|
|
</view>
|
|
</u-navbar>
|
|
</u-navbar>
|
|
<view class="page-content">
|
|
<view class="page-content">
|
|
@@ -25,23 +24,23 @@
|
|
<u-card padding="20" margin="0rpx 0rpx 30rpx" border-radius="20"
|
|
<u-card padding="20" margin="0rpx 0rpx 30rpx" border-radius="20"
|
|
box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
|
|
box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
|
|
<template v-slot:head>
|
|
<template v-slot:head>
|
|
- <u-section title="课程预告" sub-title="查看更多" sub-color="#000000" @click="toPage('/pages/goOnEdu/index')"></u-section>
|
|
|
|
|
|
+ <u-section title="课程预告" sub-title="查看更多" sub-color="#000000"
|
|
|
|
+ @click="toPage('/pages/goOnEdu/index')"></u-section>
|
|
</template>
|
|
</template>
|
|
<template v-slot:body>
|
|
<template v-slot:body>
|
|
- <lg-swiper v-if="courseList.length!=0"
|
|
|
|
- :sildeItems="courseList"
|
|
|
|
- @swiperClick="swiperClick"
|
|
|
|
- image="courseImg" title="courseName"></lg-swiper>
|
|
|
|
|
|
+ <lg-swiper v-if="courseList.length!=0" :sildeItems="courseList" @swiperClick="swiperClick"
|
|
|
|
+ image="courseImg" title="courseName"></lg-swiper>
|
|
<u-empty text="暂无内容" mode="data" v-else></u-empty>
|
|
<u-empty text="暂无内容" mode="data" v-else></u-empty>
|
|
</template>
|
|
</template>
|
|
</u-card>
|
|
</u-card>
|
|
<u-card padding="30" margin="0rpx 0rpx 30rpx" border-radius="20"
|
|
<u-card padding="30" margin="0rpx 0rpx 30rpx" border-radius="20"
|
|
box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
|
|
box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
|
|
<template v-slot:head>
|
|
<template v-slot:head>
|
|
- <u-section title="研究报告" sub-title="查看更多" sub-color="#000000" @click="toPage('/pages/researchReport/reportHome/reportHome')"></u-section>
|
|
|
|
|
|
+ <u-section title="研究报告" sub-title="查看更多" sub-color="#000000"
|
|
|
|
+ @click="toPage('/pages/researchReport/reportHome/reportHome')"></u-section>
|
|
</template>
|
|
</template>
|
|
<template v-slot:body>
|
|
<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 "
|
|
<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)">
|
|
style="align-items: inherit;" @click="toReport(data.id, data.title)">
|
|
<image :src="data.cover" mode="aspectFill"></image>
|
|
<image :src="data.cover" mode="aspectFill"></image>
|
|
@@ -51,8 +50,9 @@
|
|
<text class="item-content-type">{{data.type}}</text>
|
|
<text class="item-content-type">{{data.type}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="item-button">
|
|
<view class="item-button">
|
|
- <view v-if="data.viewMode==='1'" class="func-box" style="justify-content: flex-end;">
|
|
|
|
- <view class="button free" >免费</view>
|
|
|
|
|
|
+ <view v-if="data.viewMode==='1'" class="func-box"
|
|
|
|
+ style="justify-content: flex-end;">
|
|
|
|
+ <view class="button free">免费</view>
|
|
</view>
|
|
</view>
|
|
<view v-else-if="data.viewMode==='2' && isMember" class="func-box">
|
|
<view v-else-if="data.viewMode==='2' && isMember" class="func-box">
|
|
<view class="price">¥{{ data.price }}元</view>
|
|
<view class="price">¥{{ data.price }}元</view>
|
|
@@ -71,13 +71,15 @@
|
|
{{data.hasBuy ? '已购买' : '立即购买'}}
|
|
{{data.hasBuy ? '已购买' : '立即购买'}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view v-else-if="data.viewMode==='3' && data.price===data.priceMember" class="func-box">
|
|
|
|
|
|
+ <view v-else-if="data.viewMode==='3' && data.price===data.priceMember"
|
|
|
|
+ class="func-box">
|
|
<view class="price">¥{{ data.price }}元</view>
|
|
<view class="price">¥{{ data.price }}元</view>
|
|
<view :class="['button', data.hasBuy ? 'free' : 'buy']">
|
|
<view :class="['button', data.hasBuy ? 'free' : 'buy']">
|
|
{{data.hasBuy ? '已购买' : '立即购买'}}
|
|
{{data.hasBuy ? '已购买' : '立即购买'}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view v-else-if="data.viewMode==='3' && data.price!==data.priceMember" class="func-box">
|
|
|
|
|
|
+ <view v-else-if="data.viewMode==='3' && data.price!==data.priceMember"
|
|
|
|
+ class="func-box">
|
|
<view style="flex: 0 0 auto;display: flex;align-items: center;">
|
|
<view style="flex: 0 0 auto;display: flex;align-items: center;">
|
|
<view class="member-free">
|
|
<view class="member-free">
|
|
{{`会员:${data.priceMember}元`}}
|
|
{{`会员:${data.priceMember}元`}}
|
|
@@ -105,10 +107,8 @@
|
|
</view>
|
|
</view>
|
|
</u-modal>
|
|
</u-modal>
|
|
<!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
|
|
<!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
|
|
- <u-tabbar v-model="tabbarCurrentIndex"
|
|
|
|
- :list="tabbarList" icon-size="50"
|
|
|
|
- :active-color="tabbarActiveColor"
|
|
|
|
- :inactive-color="tabbarInactiveColor"></u-tabbar>
|
|
|
|
|
|
+ <u-tabbar v-model="tabbarCurrentIndex" :list="tabbarList" icon-size="50" :active-color="tabbarActiveColor"
|
|
|
|
+ :inactive-color="tabbarInactiveColor"></u-tabbar>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -141,7 +141,9 @@
|
|
} from '@/api/user.js'
|
|
} from '@/api/user.js'
|
|
import configService from '@/utils/baseurl.js'
|
|
import configService from '@/utils/baseurl.js'
|
|
const FILE_URL = configService.FILE_URL;
|
|
const FILE_URL = configService.FILE_URL;
|
|
- import { useTabbarStore } from '@/store/tabbarStore.js'
|
|
|
|
|
|
+ import {
|
|
|
|
+ useTabbarStore
|
|
|
|
+ } from '@/store/tabbarStore.js'
|
|
const tabbarStore = useTabbarStore()
|
|
const tabbarStore = useTabbarStore()
|
|
// 底部导航栏数据
|
|
// 底部导航栏数据
|
|
const tabbarList = computed(() => {
|
|
const tabbarList = computed(() => {
|
|
@@ -178,18 +180,19 @@
|
|
const isMember = ref(false)
|
|
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([
|
|
|
|
+ // {
|
|
|
|
+ // 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 courseList = ref([{
|
|
const courseList = ref([{
|
|
@@ -211,6 +214,7 @@
|
|
// 首页-导航栏
|
|
// 首页-导航栏
|
|
const navList = ref([{
|
|
const navList = ref([{
|
|
id: 'notice',
|
|
id: 'notice',
|
|
|
|
+ isLogin: false,
|
|
title: '通知公告',
|
|
title: '通知公告',
|
|
icon: 'icon-xiaoxitongzhi',
|
|
icon: 'icon-xiaoxitongzhi',
|
|
url: '/pages/notice/notice/notice',
|
|
url: '/pages/notice/notice/notice',
|
|
@@ -220,6 +224,7 @@
|
|
{
|
|
{
|
|
id: 'dynamic',
|
|
id: 'dynamic',
|
|
title: '协会动态',
|
|
title: '协会动态',
|
|
|
|
+ isLogin: false,
|
|
icon: 'icon-xinxisousuo-01',
|
|
icon: 'icon-xinxisousuo-01',
|
|
url: '/pages/dynamic/dynamic/dynamic',
|
|
url: '/pages/dynamic/dynamic/dynamic',
|
|
toOtherApp: false,
|
|
toOtherApp: false,
|
|
@@ -228,6 +233,7 @@
|
|
{
|
|
{
|
|
id: 'guide',
|
|
id: 'guide',
|
|
title: '办事指引',
|
|
title: '办事指引',
|
|
|
|
+ isLogin: false,
|
|
icon: 'icon-caidanguanli',
|
|
icon: 'icon-caidanguanli',
|
|
url: '/pages/guide/guide/guide',
|
|
url: '/pages/guide/guide/guide',
|
|
toOtherApp: false,
|
|
toOtherApp: false,
|
|
@@ -236,6 +242,7 @@
|
|
{
|
|
{
|
|
id: 'edu',
|
|
id: 'edu',
|
|
title: '继续教育',
|
|
title: '继续教育',
|
|
|
|
+ isLogin: true,
|
|
icon: 'icon-xueshimao1',
|
|
icon: 'icon-xueshimao1',
|
|
url: '/pages/goOnEdu/index',
|
|
url: '/pages/goOnEdu/index',
|
|
toOtherApp: false,
|
|
toOtherApp: false,
|
|
@@ -243,15 +250,17 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 'level',
|
|
id: 'level',
|
|
|
|
+ isLogin: true,
|
|
title: '水平认证',
|
|
title: '水平认证',
|
|
icon: 'icon-zhengshu-copy',
|
|
icon: 'icon-zhengshu-copy',
|
|
- url: '跳转页面的路径',
|
|
|
|
|
|
+ url: 'pages/index/index',
|
|
toOtherApp: true,
|
|
toOtherApp: true,
|
|
- otherAppId: '其他小程序的appid'
|
|
|
|
|
|
+ otherAppId: 'wx050c17d8b239da86'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 'report',
|
|
id: 'report',
|
|
title: '研究报告',
|
|
title: '研究报告',
|
|
|
|
+ isLogin: true,
|
|
icon: 'icon-circular',
|
|
icon: 'icon-circular',
|
|
url: '/pages/researchReport/reportHome/reportHome',
|
|
url: '/pages/researchReport/reportHome/reportHome',
|
|
toOtherApp: false,
|
|
toOtherApp: false,
|
|
@@ -259,6 +268,7 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 'index',
|
|
id: 'index',
|
|
|
|
+ isLogin: true,
|
|
title: '经理人指数',
|
|
title: '经理人指数',
|
|
icon: 'icon-zhishu',
|
|
icon: 'icon-zhishu',
|
|
url: '跳转页面的路径',
|
|
url: '跳转页面的路径',
|
|
@@ -267,10 +277,11 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
id: 'pay',
|
|
id: 'pay',
|
|
|
|
+ isLogin: true,
|
|
title: '会费缴交',
|
|
title: '会费缴交',
|
|
icon: 'icon-jinqian-jiage',
|
|
icon: 'icon-jinqian-jiage',
|
|
- url: '跳转页面的路径',
|
|
|
|
- toOtherApp: true,
|
|
|
|
|
|
+ url: '/pages/huiFeiJiaoJiao/huiFeiJiaoJiao',
|
|
|
|
+ toOtherApp: false,
|
|
otherAppId: '其他小程序的appid'
|
|
otherAppId: '其他小程序的appid'
|
|
}
|
|
}
|
|
])
|
|
])
|
|
@@ -281,13 +292,26 @@
|
|
const jumpToPage = (data) => {
|
|
const jumpToPage = (data) => {
|
|
if (data.toOtherApp) {
|
|
if (data.toOtherApp) {
|
|
// 跳转其他小程序
|
|
// 跳转其他小程序
|
|
- console.log("跳转至其他小程序", data.otherAppId)
|
|
|
|
|
|
+ wx.navigateToMiniProgram({
|
|
|
|
+ appId: data.otherAppId, // 例如:wx1234567890abcdef
|
|
|
|
+ path: data.url, // 跳转路径
|
|
|
|
+ envVersion: 'release', // 版本(develop/trial/release)
|
|
|
|
+ success(res) {
|
|
|
|
+ console.log('跳转成功');
|
|
|
|
+ },
|
|
|
|
+ fail(err) {
|
|
|
|
+ console.error('跳转失败', err);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (!authStore.isAuthenticated) {
|
|
|
|
- loginModal.value = true
|
|
|
|
- return
|
|
|
|
|
|
+ if (data.isLogin) {
|
|
|
|
+ if (!authStore.isAuthenticated) {
|
|
|
|
+ loginModal.value = true
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: data.url
|
|
url: data.url
|
|
})
|
|
})
|
|
@@ -307,8 +331,9 @@
|
|
url: url
|
|
url: url
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- const itemClick = (data) =>{
|
|
|
|
|
|
+ const itemClick = (data) => {
|
|
// console.log("轮播图swiper", data)
|
|
// console.log("轮播图swiper", data)
|
|
|
|
+
|
|
if (!authStore.isAuthenticated) {
|
|
if (!authStore.isAuthenticated) {
|
|
loginModal.value = true
|
|
loginModal.value = true
|
|
return
|
|
return
|
|
@@ -349,16 +374,18 @@
|
|
courseList.value = res.data
|
|
courseList.value = res.data
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ initReport()
|
|
|
|
+ // homeSetting().then(res=>{
|
|
|
|
+ // console.log(res)
|
|
|
|
+ // })
|
|
|
|
+ }
|
|
|
|
+ function initReport (){
|
|
homeReportList().then(res => {
|
|
homeReportList().then(res => {
|
|
if (res?.data) {
|
|
if (res?.data) {
|
|
reportList.value = res.data
|
|
reportList.value = res.data
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- // homeSetting().then(res=>{
|
|
|
|
- // console.log(res)
|
|
|
|
- // })
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
function getCharCount() {
|
|
function getCharCount() {
|
|
count().then(res => {
|
|
count().then(res => {
|
|
if (res && res.message === 'success') {
|
|
if (res && res.message === 'success') {
|
|
@@ -371,13 +398,13 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- function toReport(id, title){
|
|
|
|
|
|
+ function toReport(id, title) {
|
|
if (!authStore.isAuthenticated) {
|
|
if (!authStore.isAuthenticated) {
|
|
loginModal.value = true
|
|
loginModal.value = true
|
|
return
|
|
return
|
|
}
|
|
}
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:"/pages/reportDetail/reportDetail?id="+id+"&title="+title
|
|
|
|
|
|
+ url: "/pages/reportDetail/reportDetail?id=" + id + "&title=" + title
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -403,12 +430,14 @@
|
|
if (isLogin) {
|
|
if (isLogin) {
|
|
// 登录后才请求消息数量
|
|
// 登录后才请求消息数量
|
|
getCharCount()
|
|
getCharCount()
|
|
|
|
+ initReport()
|
|
// 没有用户信息就加载一边
|
|
// 没有用户信息就加载一边
|
|
if (!isUserInfo) {
|
|
if (!isUserInfo) {
|
|
initUser();
|
|
initUser();
|
|
} else {
|
|
} else {
|
|
- isMember.value = authStore.userInfo.isMember==='0'?false:true;
|
|
|
|
|
|
+ isMember.value = authStore.userInfo.isMember === '0' ? false : true;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
})
|
|
})
|
|
@@ -424,11 +453,13 @@
|
|
.slot-wrap {
|
|
.slot-wrap {
|
|
padding-left: 20rpx;
|
|
padding-left: 20rpx;
|
|
}
|
|
}
|
|
- .menu-item{
|
|
|
|
- .iconfont{
|
|
|
|
|
|
+
|
|
|
|
+ .menu-item {
|
|
|
|
+ .iconfont {
|
|
font-size: 60rpx;
|
|
font-size: 60rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
.grid-text {
|
|
.grid-text {
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
margin-top: 4rpx;
|
|
margin-top: 4rpx;
|