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