接入登录页面
This commit is contained in:
@@ -8,13 +8,13 @@
|
|||||||
//export const SUPA_KEY: string = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlLTEiLCJpYXQiOjE3Njk2NzY0OTgsImV4cCI6MTkyNzM1NjQ5OH0.ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
//export const SUPA_KEY: string = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlLTEiLCJpYXQiOjE3Njk2NzY0OTgsImV4cCI6MTkyNzM1NjQ5OH0.ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
||||||
//export const SUPA_URL: string = 'http://192.168.1.62:18000'
|
//export const SUPA_URL: string = 'http://192.168.1.62:18000'
|
||||||
//export const SUPA_KEY: string = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlLTEiLCJpYXQiOjE3Njk2NzY0OTgsImV4cCI6MTkyNzM1NjQ5OH0.ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
//export const SUPA_KEY: string = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlLTEiLCJpYXQiOjE3Njk2NzY0OTgsImV4cCI6MTkyNzM1NjQ5OH0.ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
||||||
export const SUPA_URL: string = 'http://192.168.1.63:18000'
|
export const SUPA_URL: string = 'http://192.168.1.61:18000'
|
||||||
export const SUPA_KEY: string = 'eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJyb2xlIjogImFub24iLCAiaXNzIjogInN1cGFiYXNlIiwgImlhdCI6IDE3Njk4NDczMzQsICJleHAiOiAyMDg1MjA3MzM0fQ.js-2CS5_cUmf4iVv8aCmmx9iyFsQvLNDbt8YYOngeLU'
|
export const SUPA_KEY: string = 'eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJyb2xlIjogImFub24iLCAiaXNzIjogInN1cGFiYXNlIiwgImlhdCI6IDE3Njk4NDczMzQsICJleHAiOiAyMDg1MjA3MzM0fQ.js-2CS5_cUmf4iVv8aCmmx9iyFsQvLNDbt8YYOngeLU'
|
||||||
|
|
||||||
// WebSocket 实时连接(内网使用 ws:// 而非 wss://)
|
// WebSocket 实时连接(内网使用 ws:// 而非 wss://)
|
||||||
// export const WS_URL: string = 'ws://192.168.1.61:18000/realtime/v1/websocket'
|
// export const WS_URL: string = 'ws://192.168.1.61:18000/realtime/v1/websocket'
|
||||||
//export const WS_URL: string = 'ws://192.168.1.62:18000/realtime/v1/websocket'
|
//export const WS_URL: string = 'ws://192.168.1.62:18000/realtime/v1/websocket'
|
||||||
export const WS_URL: string = 'ws://192.168.1.63:18000/realtime/v1/websocket'
|
export const WS_URL: string = 'ws://192.168.1.61:18000/realtime/v1/websocket'
|
||||||
|
|
||||||
// 备用配置(已注释,如需切换可取消注释)
|
// 备用配置(已注释,如需切换可取消注释)
|
||||||
// 开发环境 - 其他内网地址
|
// 开发环境 - 其他内网地址
|
||||||
|
|||||||
14
pages.json
14
pages.json
@@ -1,12 +1,5 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
|
||||||
"path": "pages/mall/admin/homePage/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "管理后台",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/user/login",
|
"path": "pages/user/login",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -14,6 +7,13 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/mall/admin/homePage/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "管理后台",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/user/boot",
|
"path": "pages/user/boot",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -142,7 +142,8 @@
|
|||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import supa from '@/components/supadb/aksupainstance.uts'
|
import supa from '@/components/supadb/aksupainstance.uts'
|
||||||
import { IS_TEST_MODE } from '@/ak/config.uts'
|
import { IS_TEST_MODE } from '@/ak/config.uts'
|
||||||
import { getCurrentUser, logout } from '@/utils/store.uts'
|
import { getCurrentUser, logout, setIsLoggedIn, setUserProfile } from '@/utils/store.uts'
|
||||||
|
import type { UserProfile } from '@/pages/user/types.uts'
|
||||||
|
|
||||||
const cssVars = {
|
const cssVars = {
|
||||||
'--bg': '#f5f6f8',
|
'--bg': '#f5f6f8',
|
||||||
@@ -182,7 +183,7 @@ onMounted(() => {
|
|||||||
if (redirect != null && redirect.length > 0) {
|
if (redirect != null && redirect.length > 0) {
|
||||||
uni.redirectTo({ url: decodeURIComponent(redirect) })
|
uni.redirectTo({ url: decodeURIComponent(redirect) })
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({ url: '/pages/mall/consumer/index' })
|
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -279,7 +280,7 @@ const handleLogin = async () => {
|
|||||||
|
|
||||||
uni.showToast({ title: '管理员登录成功', icon: 'success' })
|
uni.showToast({ title: '管理员登录成功', icon: 'success' })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.switchTab({ url: '/pages/mall/consumer/index' })
|
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
|
||||||
}, 500)
|
}, 500)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -356,7 +357,7 @@ const handleLogin = async () => {
|
|||||||
if (redirect != null && redirect.length > 0) {
|
if (redirect != null && redirect.length > 0) {
|
||||||
uni.redirectTo({ url: decodeURIComponent(redirect) })
|
uni.redirectTo({ url: decodeURIComponent(redirect) })
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({ url: '/pages/mall/consumer/index' })
|
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user