jiekou
This commit is contained in:
@@ -631,19 +631,36 @@ export async function checkuser(data?: any){
|
||||
/**
|
||||
* 获取区号列表
|
||||
*/
|
||||
export async function getquhaolist() {
|
||||
const res=await get("phonecodes")
|
||||
export function getquhaolist() {
|
||||
// const res=await get("phonecodes")
|
||||
// console.log(res)
|
||||
return res.data
|
||||
// return res.data
|
||||
return new Promise((res)=>{
|
||||
const time = setInterval(()=>{
|
||||
if(store.state.indexarr.phonecodes){
|
||||
res(store.state.indexarr.phonecodes)
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时区列表
|
||||
*/
|
||||
export async function getzonelist(): Promise<any>{
|
||||
const res=await get("timezones")
|
||||
export function getzonelist(): Promise<any>{
|
||||
// console.log(res)
|
||||
return res.data
|
||||
// const res=await get("timezones")
|
||||
// console.log(res)
|
||||
// return res.data
|
||||
return new Promise((res)=>{
|
||||
const time = setInterval(()=>{
|
||||
if(store.state.indexarr.timezones){
|
||||
res(store.state.indexarr.timezones)
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -668,9 +685,17 @@ export async function editsystemsetting(e?: any): Promise<boolean> {
|
||||
/**
|
||||
* 货币列表
|
||||
*/
|
||||
export async function getcurrencys(){
|
||||
const res=await get("currencys")
|
||||
return res.data
|
||||
export function getcurrencys(){
|
||||
// const res=await get("currencys")
|
||||
// return res.data
|
||||
return new Promise((res)=>{
|
||||
const time = setInterval(()=>{
|
||||
if(store.state.indexarr.currencys){
|
||||
res(store.state.indexarr.currencys)
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -720,8 +745,16 @@ interface Willsay{
|
||||
name: string;
|
||||
}
|
||||
|
||||
export async function getarchives(): Promise<[Countries[],Willsay[]]>{
|
||||
return [(await get<Countries[]>("countries")).data, (await get<Willsay[]>("willsay")).data];
|
||||
export function getarchives(): Promise<[any,any]>{
|
||||
// return [(await get<Countries[]>("countries")).data, (await get<Willsay[]>("willsay")).data];
|
||||
return new Promise((res)=>{
|
||||
const time = setInterval(()=>{
|
||||
if(store.state.indexarr.countries && store.state.indexarr.willsay){
|
||||
res([store.state.indexarr.countries, store.state.indexarr.willsay])
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
export async function getwillsay(): Promise<Willsay[]>{
|
||||
@@ -745,9 +778,17 @@ interface Language {
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export async function getlanguages(): Promise<Language[]>{
|
||||
export function getlanguages(): Promise<any>{
|
||||
|
||||
return (await get<Language[]>("languages")).data;
|
||||
// return (await get<Language[]>("languages")).data;
|
||||
return new Promise((res)=>{
|
||||
const time = setInterval(()=>{
|
||||
if(store.state.indexarr.language){
|
||||
res(store.state.indexarr.language)
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1174,9 +1215,17 @@ export function getaddr() {
|
||||
// console.log(res)
|
||||
// }
|
||||
|
||||
export async function interests() {
|
||||
const res = await get('interests');
|
||||
return res.data;
|
||||
export function interests() {
|
||||
// const res = await get('interests');
|
||||
// return res.data;
|
||||
return new Promise((res)=>{
|
||||
const time = setInterval(()=>{
|
||||
if(store.state.indexarr.interests){
|
||||
res(store.state.indexarr.interests)
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
|
||||
export async function getset() {
|
||||
@@ -1253,3 +1302,7 @@ export async function share() {
|
||||
export async function addshareClick(videoid:number) {
|
||||
await get("addshareClick",{videoid})
|
||||
}
|
||||
|
||||
export async function personalCenterData() {
|
||||
return (await get<any>('personalCenterData')).data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user