This commit is contained in:
2025-11-05 17:09:14 +08:00
65 changed files with 19779 additions and 589 deletions

View File

@@ -106,7 +106,7 @@
</view>
<view class="service-title">题库和考试</view>
</view>
<view class="service-item press-button" @click="handleServiceClick('quality-assessment')">
<view class="service-item press-button" @click="goCa()">
<view class="service-icon service-icon-8">
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
</view>
@@ -701,9 +701,43 @@ const handleServiceClick = (serviceType) => {
}
};
// 处理直播按钮点击
// 处理直播按钮点击 - 跳转微信视频号
const handleLiveClick = () => {
$api.msg('该功能正在开发中');
// #ifdef MP-WEIXIN
const feedId = 'sphKH1AEeLfTJJE';
// 使用微信原生 API 打开视频号直播
if (typeof wx !== 'undefined' && wx.openChannelsUserProfile) {
wx.openChannelsUserProfile({
// feedId: feedId,
finderUserName: feedId, // 视频号 finderUserName如果feedId足够可以留空
success: (res) => {
console.log('打开视频号成功', res);
},
fail: (err) => {
console.error('打开视频号失败', err);
$api.msg(err.errMsg || '无法打开直播,请稍后重试');
}
});
} else {
// 如果 API 不存在,尝试使用 uni API
uni.openChannelsLive({
feedId: feedId,
success: (res) => {
console.log('打开视频号成功', res);
},
fail: (err) => {
console.error('打开视频号失败', err);
$api.msg('无法打开直播,请检查微信版本或稍后重试');
}
});
}
// #endif
// #ifndef MP-WEIXIN
// 非微信小程序环境提示
$api.msg('该功能仅在微信小程序中可用');
// #endif
};
// 跳转到测试页面
@@ -1029,6 +1063,13 @@ function goRc(){
}
}
}
// 跳转素质测评页面(在线测评,职业库,职业生涯规划)
function goCa(){
if (checkLogin()) {
const userInfo = uni.getStorageSync('userInfo')
navTo(`/packageCa/search/search?userId=${userInfo.userId}&name=${userInfo.name}`);
}
}
defineExpose({ loadData });