This commit is contained in:
parent
bc7f7c6b82
commit
ea4b4b40bc
|
@ -115,7 +115,13 @@ window.parent.addEventListener('message', function (event) {
|
|||
uni.setNavigationBarTitle({
|
||||
title: srcList.title,
|
||||
})
|
||||
useStore.setUserInfo({ srcList, contentData, query: query.value, token: contentData.token })
|
||||
useStore.setUserInfo({
|
||||
srcList,
|
||||
contentData,
|
||||
query: query.value,
|
||||
token: contentData.token,
|
||||
href: window.location.href,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -152,7 +158,13 @@ function initData(res) {
|
|||
uni.setNavigationBarTitle({
|
||||
title: srcList.title,
|
||||
})
|
||||
useStore.setUserInfo({ srcList, contentData, query: query.value, token })
|
||||
useStore.setUserInfo({
|
||||
srcList,
|
||||
contentData,
|
||||
query: query.value,
|
||||
token,
|
||||
href: window.location.href,
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const initState = { nickname: '', query: '', token: '', srcList: { url: '' }, contentData: {} }
|
||||
const initState = {
|
||||
nickname: '',
|
||||
query: '',
|
||||
token: '',
|
||||
href: '',
|
||||
srcList: { url: '' },
|
||||
contentData: {},
|
||||
}
|
||||
|
||||
export const useUserStore = defineStore(
|
||||
'user',
|
||||
|
|
|
@ -30,6 +30,7 @@ type IUserInfo = {
|
|||
srcList?: SrcListType
|
||||
contentData?: object
|
||||
query?: string
|
||||
href?: string
|
||||
}
|
||||
|
||||
enum TestEnum {
|
||||
|
|
Loading…
Reference in New Issue