| | |
| | | let res = await getTreeList({
|
| | | type: type
|
| | | })
|
| | | if (res && res.code === 200) {
|
| | | if (res.code === 200) {
|
| | | content.commit('SETMENU', res.data)
|
| | | }
|
| | | },
|
| | | // 获取状态高度
|
| | | getHeight(context) { |
| | | // #ifdef MP-WEIXIN |
| | | let res = uni.getMenuButtonBoundingClientRect() |
| | | let status = uni.getSystemInfoSync() |
| | | let menuButtonWidth = res.width |
| | | let height = res.height |
| | | let statusbarHeight = status.statusBarHeight |
| | | let navHeight = res.height + (res.top - statusbarHeight) * 2; |
| | | context.commit('setHeight', { |
| | | statusbarHeight, |
| | | navHeight, |
| | | height, |
| | | menuButtonWidth |
| | | }) |
| | | // #endif
|
| | | |
| | | getHeight(context) {
|
| | | let res = uni.getMenuButtonBoundingClientRect()
|
| | | let status = uni.getSystemInfoSync()
|
| | | let menuButtonWidth = res.width
|
| | | let height = res.height
|
| | | let statusbarHeight = status.statusBarHeight
|
| | | let navHeight = res.height + (res.top - statusbarHeight) * 2;
|
| | | context.commit('setHeight', {
|
| | | statusbarHeight,
|
| | | navHeight,
|
| | | height,
|
| | | menuButtonWidth
|
| | | })
|
| | | },
|
| | | async getUpcomingNum(context) {
|
| | | let res = await pageCount({}) |
| | | |
| | | if (res && res.code === 200) {
|
| | | let res = await pageCount({})
|
| | | if (res.code === 200) {
|
| | | context.commit('SETNUM', {
|
| | | d: res.data.startNum,
|
| | | y: res.data.endNum
|
| | |
| | | // 向后端获取个人信息
|
| | | async getUserInfos(content) {
|
| | | let res = await getUserInfo()
|
| | | if (res && res.code === 200) {
|
| | | if (res.code === 200) {
|
| | | content.commit('SETUSERINFO', res.data)
|
| | | return true;
|
| | | }
|