diff --git a/src/api/base.ts b/src/api/base.ts index 857e8bd..9ff95a8 100644 --- a/src/api/base.ts +++ b/src/api/base.ts @@ -6,6 +6,7 @@ import { message } from 'ant-design-vue'; import router from '@/router'; import { MessageType } from 'ant-design-vue/types/message'; import store from '@/store'; +import { geti18n } from '@/utils/i18n'; // 泛型接口 export interface Get { @@ -16,7 +17,7 @@ let count = 0; const div: any = document.getElementById("make"); export function countadd(){ if(count == 0){ - login = message.loading('加载中..', 0) + login = message.loading(geti18n().$t('jiazaizhong'), 0) div.style.display = "block" } count++; @@ -35,7 +36,7 @@ export function countdel(){ } axios.interceptors.request.use((config)=>{ if(count == 0){ - login = message.loading('加载中..', 0) + login = message.loading(geti18n().$t('jiazaizhong'), 0) div.style.display = "block" } count++; diff --git a/src/api/index.ts b/src/api/index.ts index c66653f..2b3b042 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -2,6 +2,7 @@ import router from '@/router'; import store from '@/store'; import { LiveList, LivelistInfo, LoginData, UserInfo } from '@/types'; import { getValue, saveValue, toindex } from '@/utils/common'; +import { geti18n } from '@/utils/i18n'; import { message } from 'ant-design-vue'; import dayjs from 'dayjs'; import { del, get, post, put, setToken } from './base' @@ -185,7 +186,7 @@ export async function liveadd(data: any) { export async function videoadd( form: any,data: any) { const res=await post('video',data) if(res.code==0){ - message.success("发布成功") + message.success(geti18n().$t('shipinshangchuanchenggong')) form.value = { title: "", img: "", @@ -283,7 +284,7 @@ export async function videodetail(data?: any,ifupdate?: number) { export async function videodel(data: any) { const res = await del('video/'+data); if(res.code==0){ - message.success("删除成功") + message.success(res.msg) } console.log(res) @@ -295,7 +296,7 @@ export async function videodel(data: any) { export async function accountadd(data?: any) { const res = await post('wallect',data); if(res.code==0){ - message.success("新增成功") + message.success(res.msg) router.push("/mine/wallet") } @@ -396,7 +397,7 @@ export async function getaccountinfo(data?: any){ export async function editaccount( id: any,data?: any){ const res=await put('wallect/' +id ,data); if(res.code==0){ - message.success("修改成功") + message.success(res.msg) router.push("/mine/wallet") }else{ message.error(res.msg) @@ -410,7 +411,7 @@ export async function deleteaccount(data: any) { const res = await del('wallect/' + data); if(res.code==0){ - message.success("删除成功") + message.success(res.msg) router.push("/mine/wallet") } @@ -572,7 +573,7 @@ interface SendData{ export async function addcomment(data?: any): Promise { const res=await post('comments',data) if(res.code==0){ - message.success("发布成功") + message.success(res.msg) } } @@ -583,7 +584,7 @@ export async function addcomment(data?: any): Promise { export async function delreply(data?: any) { const res = await del('comments/'+data); if(res.code==0){ - message.success("删除成功") + message.success(res.msg) } return res } @@ -675,7 +676,7 @@ export async function editsystemsetting(e?: any): Promise { const res = await put(`member/${store.state.userinfo.memberid}`,newdata); console.log(res) if(res.code == 0){ - message.success("修改成功") + message.success(res.msg) store.dispatch("setUserInfo"); location.reload(); return true; @@ -922,7 +923,7 @@ export async function changetel(code: string,e: string) { const res = await put(`member/${store.state.userinfo.memberid}`,{code: code, mobile:e}); console.log(res) if(res.code == 0){ - message.success("修改成功") + message.success(res.msg) return true; }else{ message.error(res.msg); diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 0da7554..c25d030 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -353,6 +353,8 @@ export default { youxiangb:"Beelink email", chuanzhen:"Fax", appxiazai:"Download Beelink app", + shipinshangchuanchenggong:"Save correctly,waiting for review", + jiazaizhong:"Loding.", shichangtishi:"", renshutishi: '', tixianzhu: "", diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts index a24a62e..0ed5bcb 100644 --- a/src/i18n/zh.ts +++ b/src/i18n/zh.ts @@ -353,6 +353,8 @@ export default { youxiangb:"Beelink邮箱", chuanzhen:"传真", appxiazai:"Beelink App下载", + shipinshangchuanchenggong:"上传成功,等待审核", + jiazaizhong:"加载中", shichangtishi:"", renshutishi: '', tixianzhu:"",