feat:去除电脑端登录限制
This commit is contained in:
@@ -79,7 +79,6 @@ import { onMounted, reactive, ref } from 'vue'
|
|||||||
import { loginRules } from '@/utils/element/elRules.ts'
|
import { loginRules } from '@/utils/element/elRules.ts'
|
||||||
import { getLocalStorage, setLocalStorage } from 'vue3-common/utils/storageUtil'
|
import { getLocalStorage, setLocalStorage } from 'vue3-common/utils/storageUtil'
|
||||||
import { ILoginType } from '@/types/auth.ts'
|
import { ILoginType } from '@/types/auth.ts'
|
||||||
import { isMobile } from 'vue3-common/utils/layoutUtil'
|
|
||||||
|
|
||||||
const rules = reactive<FormRules>(loginRules)
|
const rules = reactive<FormRules>(loginRules)
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
@@ -98,16 +97,6 @@ onMounted(() => {
|
|||||||
const handleLogin = async (type: ILoginType) => {
|
const handleLogin = async (type: ILoginType) => {
|
||||||
loginFormRef.value.validate(async (valid: any) => {
|
loginFormRef.value.validate(async (valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (type === 'common' && !isMobile()) {
|
|
||||||
ElMessage.error('目前只支持移动端')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'admin' && isMobile()) {
|
|
||||||
ElMessage.error('目前只支持PC端')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'common') {
|
if (type === 'common') {
|
||||||
authStore.loginLoading = true
|
authStore.loginLoading = true
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import { ITravelSpot } from '@/types/travel.ts'
|
|||||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||||
import { parsePerson } from '@/utils/home/travelUtil.ts'
|
import { parsePerson } from '@/utils/home/travelUtil.ts'
|
||||||
import { showImagePreview } from 'vant'
|
import { showImagePreview } from 'vant'
|
||||||
import { ThumbImageQuery } from '@/utils'
|
import { RawImageQuery, ThumbImageQuery } from '@/utils'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const travelStore = useTravelStore()
|
const travelStore = useTravelStore()
|
||||||
@@ -86,7 +86,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const viewImageClick = () => {
|
const viewImageClick = () => {
|
||||||
const imageList = props.travelItem.recordList.flatMap((record) => {
|
const imageList = props.travelItem.recordList.flatMap((record) => {
|
||||||
return record.imageList.map((item) => item)
|
return record.imageList.map((item) => `${item}${RawImageQuery}`)
|
||||||
})
|
})
|
||||||
showImagePreview({ images: imageList, closeable: true })
|
showImagePreview({ images: imageList, closeable: true })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ export const AListPath = import.meta.env.VITE_API_ALIST_PATH
|
|||||||
|
|
||||||
export const ThumbImageQuery = '?q=70'
|
export const ThumbImageQuery = '?q=70'
|
||||||
|
|
||||||
|
export const RawImageQuery = '?w=2560&h=1440&q=100'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取assets静态资源
|
* 获取assets静态资源
|
||||||
* @param url 路径
|
* @param url 路径
|
||||||
|
|||||||
Reference in New Issue
Block a user