Bladeren bron

早报资讯公众号文章展示

Xiao_123 6 maanden geleden
bovenliggende
commit
3afb738691

+ 4 - 10
App.vue

@@ -1,22 +1,16 @@
 <script>
-import { onShareAppMessage,onShareTimeline } from '@dcloudio/uni-app'
+import { onShareAppMessage } from '@dcloudio/uni-app'
 	export default {
 		onLaunch: function() {
-			
 			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.jpg'
 				}
 			})
 			console.log('App Launch')

+ 13 - 0
api/content.js

@@ -0,0 +1,13 @@
+import request from "@/utils/request"
+
+// 获取最新的早报资讯
+export const getMorningNewsArticle = () => {
+  return request({
+    url: '/app-api/menduner/system/morning-news/get',
+    method: 'GET',
+    custom: {
+      showLoading: false,
+      auth: false
+    }
+  })
+}

+ 6 - 0
pages.json

@@ -38,6 +38,12 @@
 			"style": {
 				"navigationBarTitleText": "最近联系人"
 			}
+		},
+		{
+			"path": "pages/addWebView/index",
+			"style": {
+				"navigationBarTitleText": "早报资讯"
+			}
 		}
 	],
 	"subPackages": [

+ 15 - 0
pages/addWebView/index.vue

@@ -0,0 +1,15 @@
+<template>
+  <web-view :src="url"></web-view>
+</template>
+ 
+<script setup>
+import { ref } from 'vue'
+import { onLoad } from '@dcloudio/uni-app'
+
+const url = ref('')
+
+onLoad((options) => {
+  // 传入需要跳转的链接 使用web-view标签进行跳转
+  url.value = decodeURIComponent(options.url)
+})
+</script>

+ 4 - 20
pages/index/communicate.vue

@@ -47,10 +47,8 @@
 <script setup>
 import { ref, watch } from 'vue'
 import layoutPage from '@/layout'
-// import { getAccessToken } from '@/utils/request'
-// import { showAuthModal } from '@/hooks/useModal'
 import { getConversationSync } from '@/api/common'
-import { onShow, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
+import { onShow, onLoad, onShareAppMessage } from '@dcloudio/uni-app'
 import { getUserAvatar } from '@/utils/avatar'
 import { timesTampChange } from '@/utils/date'
 import { userStore } from '@/store/user'
@@ -88,18 +86,13 @@ onShow(() => {
 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.jpg'
     }
   })
 })
@@ -126,15 +119,6 @@ const handleTo = (item) => {
   })
 }
 
-// if (!getAccessToken()) {
-// 	uni.showToast({
-// 		title: '请先登录',
-// 		icon: 'none'
-// 	})
-// 	showAuthModal()
-// 	return
-// }
-
 async function init () {
 	try {
 		const { data } = await getConversationSync({ msg_count: 1 })

+ 4 - 12
pages/index/crowdsourcing.vue

@@ -42,15 +42,12 @@
 <script setup>
 import { ref, reactive } from 'vue'
 import SwiperAd from '@/components/SwiperAd'
-// import { showAuthModal } from '@/hooks/useModal'
-// import { userStore } from '@/store/user'
 import layoutPage from '@/layout'
 import ResumeStatus from '@/components/ResumeStatus'
 import { getJobAdvertisedHire } from '@/api/position.js'
-import { getDict } from '@/hooks/useDictionaries.js'
 import { dealDictArrayData } from '@/utils/position.js'
 import PositionList from '@/components/PositionList'
-import { onShow, onLoad } from '@dcloudio/uni-app'
+import { onShow, onLoad, onShareAppMessage } from '@dcloudio/uni-app'
 // 设置自定义tabbar选中值
 onShow(() => {
     const currentPage = getCurrentPages()[0];  // 获取当前页面实例
@@ -88,18 +85,13 @@ onLoad(() => {
 	getList()
   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.jpg'
     }
   })
 })

+ 4 - 9
pages/index/my.vue

@@ -78,7 +78,7 @@ import { getUserAvatar } from '@/utils/avatar'
 import { getAccessToken } from '@/utils/request'
 import layoutPage from '@/layout'
 import { showAuthModal } from '@/hooks/useModal'
-import { onShow, onLoad } from '@dcloudio/uni-app'
+import { onShow, onLoad, onShareAppMessage } from '@dcloudio/uni-app'
 import { getJobAdvertisedShareQrcode } from '@/api/user'
 // 设置自定义tabbar选中值
 onShow(() => {
@@ -125,18 +125,13 @@ watch(
 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.jpg'
     }
   })
 })

+ 22 - 13
pages/index/position.vue

@@ -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.jpg'
     }
   })
   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}`
+        })
+      }
+    } catch (err) {
+      uni.showToast({ icon: 'none', title: err.msg })
+    }
+  }
 }
 
 // 

+ 3 - 8
pages/index/welfare.vue

@@ -108,7 +108,7 @@ import {
   getUserAccount,
 } from '@/api/sign'
 import { getTaskList } from '@/api/integral'
-import { onShow, onLoad } from '@dcloudio/uni-app'
+import { onShow, onLoad, onShareAppMessage } from '@dcloudio/uni-app'
 import { userStore } from '@/store/user'
 import { showAuthModal } from '@/hooks/useModal'
 
@@ -140,13 +140,8 @@ onLoad(() => {
   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.jpg'
     }
   })
 })

+ 3 - 5
pagesB/positionDetail/index.vue

@@ -5,10 +5,8 @@
         <view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
         <view v-else>
           <!-- 职位名称 + 薪资 -->
-          <view class="d-flex justify-space-between">
-            <h2 class="JobName ellipsis">
-              {{ info.name }}
-            </h2>
+          <h2 class="JobName">{{ info.name }}</h2>
+          <view style="text-align: end;">
             <span v-if="!info.payFrom && !info.payTo" class="salary w-600">面议</span>
             <span v-else class="salary w-600">{{ info.payFrom }}-{{ info.payTo }}/{{ positionInfo.payName }}</span>
           </view>
@@ -213,7 +211,7 @@ import {
 import { getPersonResumeCv, saveResume } from '@/api/user'
 import { dealDictObjData } from '@/utils/position'
 import { getAccessToken } from '@/utils/request'
-import { onLoad,onShareAppMessage,onShareTimeline, onShow } from '@dcloudio/uni-app'
+import { onLoad, onShareAppMessage, onShow } from '@dcloudio/uni-app'
 import { prologue, defaultText } from '@/hooks/useIM'
 
 const sharePopup = ref()

+ 0 - 4
static/style/position/index.css

@@ -30,10 +30,6 @@
 .JobName {
   color: #37576c;
   font-size: 24px;
-  margin-right: 30px;
-  margin-top: 1px;
-  vertical-align: middle;
-  flex: 1;
 }
 
 .tagList {

File diff suppressed because it is too large
+ 0 - 0
static/style/position/index.min.css


+ 4 - 4
static/style/position/index.scss

@@ -11,10 +11,10 @@
 .JobName {
   color: #37576c;
   font-size: 24px;
-  margin-right: 30px;
-  margin-top: 1px;
-  vertical-align: middle;
-  flex: 1;
+  // margin-right: 30px;
+  // margin-top: 1px;
+  // vertical-align: middle;
+  // flex: 1;
 }
 
 .tagList {

Some files were not shown because too many files changed in this diff