feat : 增加部分语音提示

This commit is contained in:
2025-12-23 09:51:14 +08:00
parent ffcf34fb10
commit 8494210a5d
2 changed files with 9 additions and 2 deletions

View File

@@ -80,6 +80,7 @@ import useUserStore from '@/stores/useUserStore';
import useLocationStore from '@/stores/useLocationStore'; import useLocationStore from '@/stores/useLocationStore';
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore()); const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
const { $api, navTo, vacanciesTo, navBack } = inject('globalFunction'); const { $api, navTo, vacanciesTo, navBack } = inject('globalFunction');
import { playTextDirectly } from '@/hook/useTTSPlayer-all-in-one';
const isExpanded = ref(false); const isExpanded = ref(false);
const pageState = reactive({ const pageState = reactive({
@@ -119,11 +120,13 @@ function companyCollection() {
$api.createRequest(`/app/company/collection/${id}/2`, {}, 'DELETE').then((resData) => { $api.createRequest(`/app/company/collection/${id}/2`, {}, 'DELETE').then((resData) => {
getCompanyInfo(companyId, zphId); getCompanyInfo(companyId, zphId);
$api.msg('取消收藏成功'); $api.msg('取消收藏成功');
playTextDirectly('取消收藏成功');
}); });
} else { } else {
$api.createRequest(`/app/company/collection/${id}/2`, {}, 'POST').then((resData) => { $api.createRequest(`/app/company/collection/${id}/2`, {}, 'POST').then((resData) => {
getCompanyInfo(companyId, zphId); getCompanyInfo(companyId, zphId);
$api.msg('收藏成功'); $api.msg('收藏成功');
playTextDirectly('收藏成功');
}); });
} }
} else { } else {
@@ -133,11 +136,13 @@ function companyCollection() {
$api.createRequest(`/app/company/collection/${companyId}/1`, {}, 'DELETE').then((resData) => { $api.createRequest(`/app/company/collection/${companyId}/1`, {}, 'DELETE').then((resData) => {
getCompanyInfo(companyId); getCompanyInfo(companyId);
$api.msg('取消收藏成功'); $api.msg('取消收藏成功');
playTextDirectly('取消收藏成功');
}); });
} else { } else {
$api.createRequest(`/app/company/collection/${companyId}/1`, {}, 'POST').then((resData) => { $api.createRequest(`/app/company/collection/${companyId}/1`, {}, 'POST').then((resData) => {
getCompanyInfo(companyId); getCompanyInfo(companyId);
$api.msg('收藏成功'); $api.msg('收藏成功');
playTextDirectly('收藏成功');
}); });
} }
} }

View File

@@ -112,6 +112,7 @@ import { storeToRefs } from 'pinia';
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore()); const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
import useUserStore from '@/stores/useUserStore'; import useUserStore from '@/stores/useUserStore';
const { isMiniProgram } = storeToRefs(useUserStore()); const { isMiniProgram } = storeToRefs(useUserStore());
import { playTextDirectly } from '@/hook/useTTSPlayer-all-in-one';
const isExpanded = ref(false); const isExpanded = ref(false);
const fairInfo = ref({}); const fairInfo = ref({});
@@ -201,19 +202,20 @@ function expand() {
isExpanded.value = !isExpanded.value; isExpanded.value = !isExpanded.value;
} }
// 取消/收藏岗位 // 取消/预约招聘会
function applyExhibitors() { function applyExhibitors() {
const fairId = fairInfo.value.zphID; const fairId = fairInfo.value.zphID;
if (fairInfo.value.isCollection) { if (fairInfo.value.isCollection) {
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => { $api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
getJobFairInfo(fairId); getJobFairInfo(fairId);
$api.msg('取消预约成功'); $api.msg('取消预约成功');
playTextDirectly('取消预约成功')
}); });
$api.msg('已预约成功');
} else { } else {
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'POST').then((resData) => { $api.createRequest(`/app/fair/collection/${fairId}`, {}, 'POST').then((resData) => {
getJobFairInfo(fairId); getJobFairInfo(fairId);
$api.msg('预约成功'); $api.msg('预约成功');
playTextDirectly('预约成功')
}); });
} }
} }