|
@@ -58,9 +58,10 @@ import PositionList from '@/components/PositionList'
|
|
|
import AdvertisePop from '@/components/Advertisement'
|
|
|
import { dealDictObjData } from '@/utils/position'
|
|
|
import { getJobAdvertisedSearch } from '@/api/position'
|
|
|
-import { onShow, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
|
|
+import { onShow, onLoad, onShareAppMessage } from '@dcloudio/uni-app'
|
|
|
import Navbar from '@/components/Navbar'
|
|
|
import { getRewardEventList } from '@/utils/eventList'
|
|
|
+import { getMorningNewsArticle } from '@/api/content'
|
|
|
|
|
|
// 设置自定义tabbar选中值
|
|
|
onShow(() => {
|
|
@@ -69,23 +70,17 @@ onShow(() => {
|
|
|
// 设置当前tab页的下标index
|
|
|
currentTabBar?.setData({ selected: 0 });
|
|
|
})
|
|
|
-
|
|
|
onLoad(() => {
|
|
|
|
|
|
wx.showShareMenu({
|
|
|
withShareTicket: true,
|
|
|
- menus: ['shareAppMessage', 'shareTimeline']
|
|
|
+ menus: ['shareAppMessage']
|
|
|
})
|
|
|
onShareAppMessage(() => {
|
|
|
return {
|
|
|
title: '门墩儿 专注顶尖招聘',
|
|
|
- path: '/pages/index/position'
|
|
|
- }
|
|
|
- })
|
|
|
- onShareTimeline(() => {
|
|
|
- return {
|
|
|
- title: '门墩儿 专注顶尖招聘',
|
|
|
- path: '/pages/index/position'
|
|
|
+ path: '/pages/index/position',
|
|
|
+ imageUrl: 'https://minio.menduner.com/dev/menduner/miniProgram/share-cover.png'
|
|
|
}
|
|
|
})
|
|
|
if (!uni.getStorageSync('token')) getRewardEventList()
|
|
@@ -112,7 +107,7 @@ const gridList = [
|
|
|
{ label: '优选集团', icon: '/static/img/group.png', path: '' },
|
|
|
{ label: '精选企业', icon: '/static/img/enterprise.png', path: '' },
|
|
|
{ label: '门墩儿猎头', icon: '/static/img/headhunting.png', path: '' },
|
|
|
- { label: '早报资讯', icon: '/static/img/information.png', specifications: 50, path: '' },
|
|
|
+ { label: '早报资讯', icon: '/static/img/information.png', id: 'morningNews' },
|
|
|
{ label: '联系我们', icon: '/static/img/contact.png', path: '' }
|
|
|
]
|
|
|
|
|
@@ -124,14 +119,28 @@ const handleToDetails = ({ id }) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const handleGrid = (e) => {
|
|
|
+const handleGrid = async (e) => {
|
|
|
// uni.showToast({
|
|
|
// icon: 'none',
|
|
|
// title: '请前往网页版门墩儿查看'
|
|
|
// })
|
|
|
// inputDialog.value.open()
|
|
|
|
|
|
- // wx79f9c2db3c3a35e3
|
|
|
+ const index = e.detail.index
|
|
|
+ const obj = gridList[index]
|
|
|
+ // 早报资讯
|
|
|
+ if (obj?.id === 'morningNews') {
|
|
|
+ try {
|
|
|
+ const { data } = await getMorningNewsArticle()
|
|
|
+ if (data && Object.keys(data).length && data.url) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/addWebView/index?url=${data.url}`
|
|
|
+ })
|
|
|
+ } else uni.showToast({ icon: 'none', title: '暂无早报资讯内容' })
|
|
|
+ } catch (err) {
|
|
|
+ uni.showToast({ icon: 'none', title: err.msg })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//
|