hh
This commit is contained in:
1 parent
df5d962413
commit
a0adf39435
1132 files changed
+1671
No files matched your search
@@ -0,0 +1,72 @@
|
||||
const str = 'hello';
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import {useAppStore} from '@/store/app'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import { axiosApiInstance, clearAxios } from '@/utils/axios-api'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
export function getfromserver(path, reactive){
|
||||
try{
|
||||
|
||||
axiosApiInstance.get(path).then(result => {
|
||||
reactive.value = result.data})}
|
||||
catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
export function getfromserverfree(path, reactive){
|
||||
try{
|
||||
clearAxios.get(path).then(result => {
|
||||
reactive.value = result.data})}
|
||||
catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export function checkremote(filecheck){
|
||||
return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"
|
||||
// return filecheck
|
||||
// try{
|
||||
// let http = new XMLHttpRequest();
|
||||
// http.open('HEAD', filecheck, false);
|
||||
// http.send();
|
||||
// console.log(http.status)
|
||||
// return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"
|
||||
// }
|
||||
// catch(e){
|
||||
// return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"
|
||||
// }
|
||||
// let tmp = new Image
|
||||
// tmp.src=filecheck
|
||||
// if(tmp.complete){
|
||||
// return filecheck
|
||||
// }
|
||||
// else {
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default str;
|
||||
|
||||
|
||||
|
||||
export function pagecounter(){
|
||||
|
||||
const router = useRouter()
|
||||
const accountStore = useAccountStore()
|
||||
const appStore = useAppStore()
|
||||
let postdata = {user__id: "user" in accountStore && "id" in accountStore.user? accountStore.user.id: null, page: router.currentRoute.value.meta.title}
|
||||
clearAxios.post(`${baseURL}api/watcher/counter/`, postdata)
|
||||
.then(result => {
|
||||
|
||||
appStore.countvisitor = result.data})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user