现在非开发环境下web端视为服务器端口与页面端口一致
This commit is contained in:
1 parent
5ca7125328
commit
133d0b7844
6 files changed
+20
-4
No files matched your search
+10
-2
@@ -19,12 +19,20 @@ if (activeKeyMap == null ){
|
||||
activeKeyMap = JSON.stringify(['A-Z','0-9'])
|
||||
localStorage.setItem('activeKeyMap',activeKeyMap)
|
||||
}
|
||||
|
||||
// 开发环境下服务器端口使用设置的端口,否则使用与页面相同的端口
|
||||
const serverPort = process.env.NODE_ENV === 'development' ? config.PORT : location.port
|
||||
|
||||
// console.log(process.env.NODE_ENV,config.DEVPORT,location.port,serverPort)
|
||||
export const useSettingStore = defineStore("setting", {
|
||||
state: () => ({
|
||||
activeFuction: activeFuctionLocal,
|
||||
activeKeyMap:JSON.parse(activeKeyMap),
|
||||
serverPort:config.PORT,
|
||||
token,userID,userGroup
|
||||
enableGuest:config.enableGuest,
|
||||
serverPort,
|
||||
token,
|
||||
userID,
|
||||
userGroup
|
||||
}),
|
||||
getters: {
|
||||
// double: state => state.count * 2
|
||||
|
||||
Reference in new issue
Block a user