mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-11 17:42:47 +00:00
update web
This commit is contained in:
parent
7f59b963b5
commit
9c0d879ca7
0
web/addon/.gitignore
vendored
Normal file
0
web/addon/.gitignore
vendored
Normal file
@ -32,7 +32,7 @@ const configStore = useConfigStore()
|
|||||||
configStore.getLoginConfig()
|
configStore.getLoginConfig()
|
||||||
|
|
||||||
// 查询站点信息
|
// 查询站点信息
|
||||||
systemStore.getSitenfo()
|
systemStore.getSiteInfoFn()
|
||||||
|
|
||||||
// 如果已登录
|
// 如果已登录
|
||||||
getToken() && useMemberStore().setToken(getToken())
|
getToken() && useMemberStore().setToken(getToken())
|
||||||
|
|||||||
2
web/env/.env.dev
vendored
2
web/env/.env.dev
vendored
@ -5,7 +5,7 @@ VITE_APP_BASE_URL=''
|
|||||||
VITE_IMG_DOMAIN=''
|
VITE_IMG_DOMAIN=''
|
||||||
|
|
||||||
# 本地开发时站点id
|
# 本地开发时站点id
|
||||||
VITE_SITE_ID = 100000
|
VITE_SITE_ID = ''
|
||||||
|
|
||||||
# 本地存储时token的参数名
|
# 本地存储时token的参数名
|
||||||
VITE_REQUEST_STORAGE_TOKEN_KEY='webToken'
|
VITE_REQUEST_STORAGE_TOKEN_KEY='webToken'
|
||||||
|
|||||||
2
web/env/.env.product
vendored
2
web/env/.env.product
vendored
@ -5,7 +5,7 @@ VITE_APP_BASE_URL=''
|
|||||||
VITE_IMG_DOMAIN=''
|
VITE_IMG_DOMAIN=''
|
||||||
|
|
||||||
# 本地开发时站点id
|
# 本地开发时站点id
|
||||||
VITE_SITE_ID = 100000
|
VITE_SITE_ID = ''
|
||||||
|
|
||||||
# 本地存储时token的参数名
|
# 本地存储时token的参数名
|
||||||
VITE_REQUEST_STORAGE_TOKEN_KEY='webToken'
|
VITE_REQUEST_STORAGE_TOKEN_KEY='webToken'
|
||||||
|
|||||||
10
web/package-lock.json
generated
10
web/package-lock.json
generated
@ -20,6 +20,7 @@
|
|||||||
"@types/qrcode": "^1.5.0",
|
"@types/qrcode": "^1.5.0",
|
||||||
"nuxt": "^3.4.1",
|
"nuxt": "^3.4.1",
|
||||||
"nuxt-windicss": "^2.6.0",
|
"nuxt-windicss": "^2.6.0",
|
||||||
|
"qs": "6.7.0",
|
||||||
"sass": "^1.60.0",
|
"sass": "^1.60.0",
|
||||||
"vite-plugin-top-level-await": "^1.3.1",
|
"vite-plugin-top-level-await": "^1.3.1",
|
||||||
"vue-i18n": "^9.2.2"
|
"vue-i18n": "^9.2.2"
|
||||||
@ -6887,6 +6888,15 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/qs": {
|
||||||
|
"version": "6.7.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.7.0.tgz",
|
||||||
|
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/queue-microtask": {
|
"node_modules/queue-microtask": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
"resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||||
|
|||||||
@ -16,7 +16,8 @@
|
|||||||
"nuxt-windicss": "^2.6.0",
|
"nuxt-windicss": "^2.6.0",
|
||||||
"sass": "^1.60.0",
|
"sass": "^1.60.0",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
"vite-plugin-top-level-await": "^1.3.1"
|
"vite-plugin-top-level-await": "^1.3.1",
|
||||||
|
"qs": "6.7.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vueuse/core": "^9.13.0",
|
"@vueuse/core": "^9.13.0",
|
||||||
|
|||||||
@ -18,15 +18,13 @@ const useSystemStore = defineStore('system', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
async getSitenfo() {
|
async getSiteInfoFn() {
|
||||||
await getSiteInfo()
|
await getSiteInfo().then((res: any) => {
|
||||||
.then((res: any) => {
|
this.site = res.data
|
||||||
this.site = res.data
|
if (this.site.status == 3) navigateTo('/site/close', {replace: true})
|
||||||
if (this.site.status == 3) navigateTo('/site/close', { replace: true })
|
}).catch((err) => {
|
||||||
})
|
navigateTo('/site/nosite', {replace: true})
|
||||||
.catch((err) => {
|
})
|
||||||
navigateTo('/site/nosite', { replace: true })
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { breakpointsTailwind } from '@vueuse/core'
|
import { breakpointsTailwind } from '@vueuse/core'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import useMemberStore from '@/stores/member'
|
import useMemberStore from '@/stores/member'
|
||||||
|
import qs from 'qs'
|
||||||
|
|
||||||
interface ConfigOption {
|
interface ConfigOption {
|
||||||
showErrorMessage?: boolean
|
showErrorMessage?: boolean
|
||||||
@ -60,7 +61,8 @@ class Http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get(url: string, query = {}, config: ConfigOption = {}) {
|
public get(url: string, query = {}, config: ConfigOption = {}) {
|
||||||
return this.request(url, 'GET', { query }, config)
|
url += '?' + qs.stringify(query)
|
||||||
|
return this.request(url, 'GET', {}, config)
|
||||||
}
|
}
|
||||||
|
|
||||||
public post(url: string, body = {}, config: ConfigOption = {}) {
|
public post(url: string, body = {}, config: ConfigOption = {}) {
|
||||||
|
|||||||
@ -209,7 +209,7 @@ const test = {
|
|||||||
*/
|
*/
|
||||||
image(value: string) {
|
image(value: string) {
|
||||||
const newValue = value.split('?')[0]
|
const newValue = value.split('?')[0]
|
||||||
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i
|
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|jfif|bmp|dpg)/i // todo 暂不支持webp格式
|
||||||
return IMAGE_REGEXP.test(newValue)
|
return IMAGE_REGEXP.test(newValue)
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user