PASSAGGIO A VITE !
AGG. 1.1.23
This commit is contained in:
@@ -3,7 +3,8 @@ import { Api } from '@api'
|
||||
|
||||
import { serv_constants } from './Modules/serv_constants'
|
||||
|
||||
import { IMessage, IMessageState, IMsgUsers, StatusMessage } from '../model'
|
||||
import type { IMessage, IMessageState, IMsgUsers} from '../model';
|
||||
import { StatusMessage } from '../model'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { MsgDefault } from '@src/model'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
@@ -74,10 +75,10 @@ export const useMessageStore = defineStore('MessageStore', {
|
||||
}
|
||||
},
|
||||
|
||||
async updateMsgDataFromServer({ username, lastdataread }: {username: string, lastdataread: Date}) {
|
||||
async updateMsgDataFromServer({ username, lastdataread }: { username: string, lastdataread: Date }) {
|
||||
// console.log('updateMsgDataFromServer', username, lastdataread)
|
||||
|
||||
return Api.SendReq(`/sendmsg/${username}/${lastdataread}/${process.env.APP_ID}`, 'GET', null)
|
||||
return Api.SendReq(`/sendmsg/${username}/${lastdataread}/${tools.getEnv('VITE_APP_ID')}`, 'GET', null)
|
||||
.then((res) => {
|
||||
// console.log('res', res)
|
||||
if (res.status === 200) {
|
||||
@@ -100,7 +101,7 @@ export const useMessageStore = defineStore('MessageStore', {
|
||||
const userStore = useUserStore()
|
||||
|
||||
data.source!.page = ''
|
||||
data.idapp = process.env.APP_ID
|
||||
data.idapp = tools.getEnv('VITE_APP_ID')
|
||||
data.origin = userStore.my.username
|
||||
data.datemsg = tools.getDateNow()
|
||||
data.status = StatusMessage.WaitingToSend
|
||||
|
||||
Reference in New Issue
Block a user