|
@@ -3,7 +3,7 @@ import { useAppStore } from '~src/store'
|
|
|
import { getButtons } from '~api/menu'
|
|
|
import projectApi from '~api/project'
|
|
|
import { getStoreValue } from '~src/utils/storage'
|
|
|
-import { ArrToOneObj, getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
+import { ArrToOneObj, getArrValue, getObjVal, getObjValue, isNullES } from 'js-fast-way'
|
|
|
import website from '~src/config/index'
|
|
|
|
|
|
const store = useAppStore(pinia)
|
|
@@ -92,11 +92,10 @@ const getContractInfo = async (contractId) => {
|
|
|
return getObjValue(data)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//按钮初始化
|
|
|
export const initButtons = async () => {
|
|
|
const value = getStoreValue('buttons')
|
|
|
- if (!value) {
|
|
|
+ if (!getObjVal(value)) {
|
|
|
const { error, data } = await getButtons()
|
|
|
if (error) return Promise.reject('error')
|
|
|
const buttons = getArrValue(data)
|