| | |
| | | <u-icon name="arrow-down" color="#fff"></u-icon>
|
| | | </view>
|
| | | </u-navbar> -->
|
| | | |
| | | |
| | |
|
| | | <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder @leftClick="navToSelectSite()"
|
| | | bgColor="#017BFC">
|
| | | <view slot="left" class="top flex">
|
| | |
| | | <u-icon name="arrow-right" color="#fff"></u-icon>
|
| | | </view>
|
| | | </u-navbar>
|
| | | |
| | |
|
| | | <view class="swiper">
|
| | | <u-swiper :list="bannerList" height="320rpx" radius="10"></u-swiper>
|
| | | </view>
|
| | | <view class="content">
|
| | | <view class="">
|
| | |
|
| | |
|
| | |
|
| | | <view class="section flex j-c-s-a a-i-c mb-20" v-if="isShowContact && curSelectSite.addressType == 1">
|
| | | <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name"
|
| | | @click="navigatorPage(`${i.path}?id=${i.id}`)">
|
| | |
| | | this.init()
|
| | | })
|
| | | //选择位置刷新楼盘表
|
| | | uni.$on('refreshPage',(val)=>{
|
| | | console.log("refreshPage=>",val);
|
| | | uni.$on('refreshPage', (val) => {
|
| | | console.log("refreshPage=>", val);
|
| | | this.curSelectSite = val
|
| | | this.getHouseDataList(val.id)
|
| | | })
|
| | |
| | | if (type == 1) {
|
| | | let index = arr.findIndex(item => item.name == "标签报事")
|
| | | return index;
|
| | | } else{
|
| | | } else {
|
| | | let index2 = arr.findIndex(item => item.name == "租户上报")
|
| | | return index2
|
| | | }
|
| | |
| | | title: "尚无绑定房屋信息",
|
| | | icon: "error"
|
| | | })
|
| | | } else if (path == '/subPackage/workbench/views/cscj'){
|
| | | this.$u.func.globalNavigator(path,"navTo")
|
| | | }else {
|
| | | } else if (path == '/subPackage/workbench/views/cscj') {
|
| | | this.$u.func.globalNavigator(path, "navTo")
|
| | | } else {
|
| | | this.$u.func.globalNavigator(`${path}?houseCode=${this.curHouseCode}`, "navTo")
|
| | | }
|
| | | } else {
|
| | |
| | | })
|
| | | }
|
| | | },
|
| | | |
| | | navToSelectSite(){
|
| | |
|
| | | navToSelectSite() {
|
| | | this.$u.func.globalNavigator('selectSite', "navTo")
|
| | | },
|
| | |
|
| | |
| | | import Vuex from 'vuex' |
| | | Vue.use(Vuex) |
| | | import { |
| | | dynamicMenu, |
| | | } from "@/api/system/role.js" |
| | | dynamicMenu, |
| | | } from "@/api/system/role.js" |
| | | let lifeData = {}; |
| | | |
| | | try { |
| | |
| | | // tabbarIndex: uni.getStorageSync("tabbarIndex") || 0, |
| | | hasUpdate: false, //true为不可登录,需要更新,false则是最新版 |
| | | menu: [], |
| | | siteInfo:{} ,//社区信息 |
| | | labelMenuList:[] //标签报事菜单 |
| | | siteInfo: {}, //社区信息 |
| | | labelMenuList: [] //标签报事菜单 |
| | | }, |
| | | |
| | | mutations: { |
| | |
| | | uni.setStorageSync('userInfo', data) |
| | | }, |
| | | //设置社区位置 |
| | | setSiteInfo(state,val){ |
| | | setSiteInfo(state, val) { |
| | | state.siteInfo = val; |
| | | uni.setStorageSync('siteInfo', val) |
| | | }, |
| | | //标签报事菜单 |
| | | setLabelReporMenutList(state,val){ |
| | | setLabelReporMenutList(state, val) { |
| | | state.labelMenuList = val; |
| | | uni.setStorageSync('labelMenuList',val); |
| | | uni.setStorageSync('labelMenuList', val); |
| | | } |
| | | |
| | | |
| | | }, |
| | | actions:{ |
| | | getMenuList({commit}){ |
| | | actions: { |
| | | getMenuList({ |
| | | commit |
| | | }) { |
| | | // let id = uni.getStorageSync("activeRole").id; |
| | | let { id, roleName } = uni.getStorageSync("activeRole") |
| | | return new Promise((resolve,reject)=>{ |
| | | let param = { |
| | | roleId:id |
| | | } |
| | | if(uni.getStorageSync("siteInfo").addressType == 1 && roleName == "居民"){ |
| | | param.labelType = 1; |
| | | let { |
| | | id, |
| | | roleName |
| | | } = uni.getStorageSync("activeRole") |
| | | return new Promise((resolve, reject) => { |
| | | let param = { |
| | | roleId: id |
| | | } |
| | | console.log("===>",param); |
| | | dynamicMenu(param).then(res=>{ |
| | | if(res.code == 200){ |
| | | if (uni.getStorageSync("siteInfo").addressType == 1 || roleName == "居民") { |
| | | param.labelType = uni.getStorageSync("siteInfo").addressType; |
| | | param.roleName = roleName; |
| | | } |
| | | console.log("===>", param); |
| | | dynamicMenu(param).then(res => { |
| | | if (res.code == 200) { |
| | | let data = res.data; |
| | | if(!data) return |
| | | if (!data) return |
| | | let menu = data.filter(e => e.name == 'app')[0].children; |
| | | commit("SET_MENU",menu); |
| | | commit("SET_MENU", menu); |
| | | // let liveList = menu.filter(item=>item.name == '生活') |
| | | // let labelList = []; |
| | | // if(liveList.length && liveList[0].children){ |
| | |
| | | // } |
| | | // } |
| | | resolve(menu) |
| | | }else { |
| | | } else { |
| | | reject("fail") |
| | | } |
| | | }) |
| | |
| | | |
| | | // 登录操作 1 |
| | | const login = async (userInfo) => { |
| | | |
| | | vm.$u.vuex('userInfo', userInfo) |
| | | vm.$u.vuex('accessToken', userInfo.access_token) |
| | | vm.$u.vuex('isLogin', true) |
| | | |
| | | let activeRoleId = userInfo.role_id.split(",")[0] |
| | | |
| | | const resDetail = await getDetail({ |
| | | id: activeRoleId |
| | | }) |
| | | console.log("当前激活角色的id:", resDetail.data) |
| | | //添加当前激活的角色(默认取第一个) |
| | | store.commit('setActiveRole', resDetail.data) |
| | | |
| | | //获取角色菜单 |
| | | const { |
| | | data |
| | | } = await dynamicMenu({roleId:activeRoleId}) |
| | | } = await dynamicMenu({ |
| | | roleId: activeRoleId |
| | | }) |
| | | |
| | | let appMenu = data.filter(e => e.name == 'app')[0].children |
| | | console.log("当前角色菜单:", appMenu) |