feat: enable WeChat share/forward on all pages via onShareAppMessage + onShareTimeline
This commit is contained in:
@@ -41,6 +41,11 @@
|
||||
const appVersion = typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : '1.0.0'
|
||||
const goAgreement = () => uni.navigateTo({ url: '/pages/agreement/agreement' })
|
||||
const goPrivacy = () => uni.navigateTo({ url: '/pages/privacy/privacy' })
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
onShareAppMessage(() => ({ title: '职引 - AI模拟面试平台 | 宇之然AI磁场', path: '/pages/about/about' }))
|
||||
onShareTimeline(() => ({ title: '职引 - AI模拟面试平台 | 宇之然AI磁场' }))
|
||||
// #endif
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -102,9 +102,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShow, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - AI择业顾问 | 专业分析+岗位推荐', path: '/pages/career/career' }))
|
||||
onShareTimeline(() => ({ title: '职引 - AI择业顾问 | 专业分析+岗位推荐' }))
|
||||
// #endif
|
||||
|
||||
const grades = ['大一', '大二', '大三', '大四', '研一', '研二', '研三', '已毕业']
|
||||
|
||||
const step = ref('input')
|
||||
|
||||
@@ -76,9 +76,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 分享面经 | 共建大厂面试题库', path: '/pages/contribute/contribute' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 分享面经 | 共建大厂面试题库' }))
|
||||
// #endif
|
||||
|
||||
const interviewId = ref('')
|
||||
const urlPosition = ref('')
|
||||
const form = ref({ company: '', position: '', rounds: '', experience: '', tags: [] })
|
||||
|
||||
@@ -61,8 +61,16 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 面经与面试记录 | 大厂面经题库', path: '/pages/history/history' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 面经与面试记录 | 大厂面经题库' }))
|
||||
// #endif
|
||||
|
||||
const filter = ref('all')
|
||||
const interviewList = ref([])
|
||||
const loading = ref(true)
|
||||
|
||||
@@ -185,9 +185,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShow, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - AI模拟面试 | 校招求职一站式平台', path: '/pages/index/index' }))
|
||||
onShareTimeline(() => ({ title: '职引 - AI模拟面试 | 校招求职一站式平台' }))
|
||||
// #endif
|
||||
|
||||
const userInfo = ref(null)
|
||||
const greeting = ref('')
|
||||
const hotPositions = ref([])
|
||||
|
||||
@@ -113,9 +113,18 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, onBeforeUnmount, nextTick } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api, API_ENDPOINTS } from '../../config'
|
||||
import DigitalHuman from '../../components/digital-human.vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - AI模拟面试 | 数字人面试官实战练习', path: '/pages/interview/interview' }))
|
||||
onShareTimeline(() => ({ title: '职引 - AI模拟面试 | 数字人面试官实战练习' }))
|
||||
// #endif
|
||||
const messages = ref([{ role: 'ai', content: '你好!我是 AI 面试官,请选择岗位开始模拟面试!' }])
|
||||
const inputText = ref('')
|
||||
const aiLoading = ref(false)
|
||||
|
||||
@@ -118,8 +118,16 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 登录注册 | AI模拟面试', path: '/pages/login/login' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 登录注册 | AI模拟面试' }))
|
||||
// #endif
|
||||
|
||||
const agreed = ref(false)
|
||||
|
||||
const mainTab = ref('login')
|
||||
|
||||
@@ -78,8 +78,16 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 引力值购买 | AI模拟面试', path: '/pages/member/member' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 引力值购买 | AI模拟面试' }))
|
||||
// #endif
|
||||
|
||||
const goBack = () => uni.switchTab({ url: '/pages/user/user' })
|
||||
|
||||
// #ifdef H5
|
||||
|
||||
@@ -134,9 +134,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShow, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 进步轨迹 | 能力雷达+打卡日历', path: '/pages/progress/progress' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 进步轨迹 | 能力雷达+打卡日历' }))
|
||||
// #endif
|
||||
|
||||
const stats = ref({ completedInterviews: 0, avgScore: 0, streak: 0 })
|
||||
const progress = ref({ dimensions: {}, interviews: [], recentScores: [] })
|
||||
const skillsGap = ref(null)
|
||||
|
||||
@@ -70,9 +70,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, nextTick } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 面试报告与评分 | AI多维评分', path: '/pages/report/report' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 面试报告与评分 | AI多维评分' }))
|
||||
// #endif
|
||||
|
||||
const loading = ref(true)
|
||||
const report = ref(null)
|
||||
const dimList = ref([])
|
||||
|
||||
@@ -148,9 +148,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 简历诊断与优化 | AI智能优化', path: '/pages/resume/resume' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 简历诊断与优化 | AI智能优化' }))
|
||||
// #endif
|
||||
|
||||
const currentTab = ref('list')
|
||||
const showForm = ref(false)
|
||||
const formTitle = ref('')
|
||||
|
||||
@@ -281,9 +281,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShow, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 面试复盘分析 | AI评析+口语分析', path: '/pages/review/review' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 面试复盘分析 | AI评析+口语分析' }))
|
||||
// #endif
|
||||
|
||||
const mode = ref('list')
|
||||
const loading = ref(false)
|
||||
const submitting = ref(false)
|
||||
|
||||
@@ -166,9 +166,19 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
// #ifdef MP-WEIXIN
|
||||
import { onShow, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
// #endif
|
||||
import { api } from '../../config'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(() => ({ title: '职引 - 个人中心 | AI模拟面试', path: '/pages/user/user' }))
|
||||
onShareTimeline(() => ({ title: '职引 - 个人中心 | AI模拟面试' }))
|
||||
// #endif
|
||||
|
||||
const userInfo = ref({})
|
||||
const isAdmin = ref(false)
|
||||
const stats = ref({ interviewCount: 0, avgScore: '--', completedCount: 0 })
|
||||
|
||||
Reference in New Issue
Block a user