فهرست منبع

添加意向职位消息订阅

Xiao_123 2 ماه پیش
والد
کامیت
25f8ec60b1
3فایلهای تغییر یافته به همراه35 افزوده شده و 19 حذف شده
  1. 10 10
      api/common.js
  2. 23 4
      pages/index/my.vue
  3. 2 5
      pagesB/positionDetail/index.vue

+ 10 - 10
api/common.js

@@ -336,16 +336,16 @@ export const huntSubmit = async (data) => {
 }
 
 // 获得微信小程订阅模板列表
-export const getSubscribeTemplateList = async () => {
-  return request({
-    url: `/app-api/menduner/system/social-user/get-subscribe-template-list`,
-    method: 'GET',
-    custom: {
-      showLoading: false,
-      auth: false
-    }
-  })
-}
+// export const getSubscribeTemplateList = async () => {
+//   return request({
+//     url: `/app-api/menduner/system/social-user/get-subscribe-template-list`,
+//     method: 'GET',
+//     custom: {
+//       showLoading: false,
+//       auth: false
+//     }
+//   })
+// }
 
 // 求职端交易订单  创建
 export const orderCreated = async (data) => {

+ 23 - 4
pages/index/my.vue

@@ -162,6 +162,24 @@ onLoad(() => {
   })
 })
 
+const openSubscribe = (path) => {
+  wx.requestSubscribeMessage({
+    tmplIds: ['2dByiI4wf6D3ZmxDH1QywH264F3N-9ysnvsS7xQm4PE'],
+    success:(res)=>{
+      console.log(res, 'uni.requestSubscribeMessage-res')
+			uni.navigateTo({
+				url: path
+			})
+    },
+    fail:(err)=>{
+      console.log('订阅失败', err)
+			uni.navigateTo({
+				url: path
+			})
+    }
+  })
+}
+
 // 列表跳转
 const dialogType = ref('')
 const handleToLink = (item) => {
@@ -179,10 +197,6 @@ const handleToLink = (item) => {
 		inputDialog.value.open()
 	}
 	if (item.key === 'recruit') {
-		// uni.showToast({
-		// 	title: '请前往网页版门墩儿招聘',
-		// 	icon: 'none'
-		// })
 		dialogType.value = 1
 		inputDialog.value.open()
 	}
@@ -207,6 +221,11 @@ const handleToLink = (item) => {
 		handleShareCode()
 		return
 	}
+	// 点击在线简历需调起订阅消息
+	if (item.title === '在线简历'){
+		openSubscribe(item.path)
+		return
+	}
 	uni.navigateTo({
 		url: item.path
 	})

+ 2 - 5
pagesB/positionDetail/index.vue

@@ -247,7 +247,6 @@ import { getAccessToken, showNecessaryInfoPopup } from '@/utils/request'
 import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
 import { prologue, defaultText } from '@/hooks/useIM'
 import { userStore } from '@/store/user'
-import { getSubscribeTemplateList } from '@/api/common'
 import { formatName } from '@/utils/getText'
 import studentDeliveryForm from '@/components/studentDeliveryForm'
 // import { getShareQueryById } from '@/api/jobFair.js'
@@ -556,10 +555,8 @@ const handleDelivery = async () => {
   resumeList.value = data
 
   // 消息订阅
-  const { data: templateList } = await getSubscribeTemplateList()
-  const tmplIds = templateList.map(e => e.id)
-  console.log(tmplIds, '消息订阅模版ID')
-  uni.requestSubscribeMessage({
+  const tmplIds = ['2KOkuFsB-2MrvnQa_45OvqMJ9ik37Xz43YXPApiQ9es', 'tUTwKQTdWnZsen7Nhtu0ksMQj0lkEuMt2nBzCrm_7vY']
+  wx.requestSubscribeMessage({
     tmplIds,
     success:(res)=>{
       console.log(res, 'uni.requestSubscribeMessage-res')