diff --git a/App.vue b/App.vue index 8a45812..e44c12a 100644 --- a/App.vue +++ b/App.vue @@ -10,10 +10,10 @@ export default { this.$u.api.lang({lang: this.vuex_locale}); } // 设置底部导航栏角标 - uni.setTabBarBadge({ - index: 0, - text: '3' - }); + // uni.setTabBarBadge({ + // index: 0, + // text: '3' + // }); // uni.removeTabBarBadge({ // index: 0 // }); diff --git a/common/http.api.js b/common/http.api.js index a8c9fce..e37901e 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -13,7 +13,10 @@ const install = (Vue, vm) => { login: (params = {}) => vm.$u.post(config.adminPath+'/auth/login', params), getUserInfo: (params = {}) => vm.$u.get(config.adminPath+'/system/user/profile', params), - + //工作台列表 + getFunList:(params = {})=>vm.$u.get(config.adminPath+'/system/funList/list', params), + //我的访客列表 + getMyVisitor:(params = {})=>vm.$u.get(config.adminPath+'/property/visitorManagement/list',params), // 基础服务:登录登出、身份信息、菜单授权、切换系统、字典数据等 lang: (params = {}) => vm.$u.get('/lang/'+params.lang), index: (params = {}) => vm.$u.get(config.adminPath+'/mobile/index', params), diff --git a/common/http.interceptor.js b/common/http.interceptor.js index a072c2d..87898be 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -24,13 +24,12 @@ const install = (Vue, vm) => { if (!req.header){ req.header = []; } - req.header["source"] = "app"; - + req.header["source"] = "uniapp"; + req.header["clientId"] = "dab457a1ea14411787c240db05bb0832" // 默认指定返回 JSON 数据 if (!req.header[ajaxHeader]){ req.header[ajaxHeader] = 'json'; } - console.log('t1', req.url); // 设定传递 Token 认证参数 aidex if (req.url!="/auth/login"&&!req.header[sessionIdHeader] && vm.vuex_token){ req.header[sessionIdHeader] = "Bearer "+vm.vuex_token; diff --git a/pages.json b/pages.json index dde8d6e..32d5f3c 100644 --- a/pages.json +++ b/pages.json @@ -1,415 +1,405 @@ -{ - "easycom": { - "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" - }, - //案列页面 - // "pages": [ - // { - // "path": "pages/sys/login/index", - // "style": { - // "navigationBarTitleText": "登录" - // } - // }, - // { - // "path": "pages/sys/login/forget", - // "style": { - // "navigationBarTitleText": "忘记密码" - // } - // }, - // { - // "path": "pages/sys/login/reg", - // "style": { - // "navigationBarTitleText": "注册账号" - // } - // }, - // { - // "path": "pages/sys/msg/index", - // "style": { - // "navigationBarTitleText": "消息" - // } - // }, - // { - // "path": "pages/sys/msg/form", - // "style": { - // "navigationBarTitleText": "查看详情" - // } - // }, - // { - // "path": "pages/sys/home/index", - // "style": { - // "navigationBarTitleText": "工作台", - // "navigationStyle": "custom" // 隐藏系统导航栏 - - // } - // }, - // { - // "path": "pages/sys/user/index", - // "style": { - // "navigationBarTitleText": "我的", - // "navigationBarBackgroundColor":"#5b95ff", - // "navigationBarTextStyle": "white" - // } - // }, - // { - // "path": "pages/sys/user/info", - // "style": { - // "navigationBarTitleText": "个人信息" - // } - // }, - // { - // "path": "uview-ui/components/u-avatar-cropper/u-avatar-cropper", - // "style": { - // "navigationBarTitleText": "头像裁剪", - // "navigationBarBackgroundColor": "#000000" - // } - // }, - // { - // "path": "pages/sys/user/help", - // "style": { - // "navigationBarTitleText": "帮助中心" - // } - // }, - // { - // "path": "pages/sys/user/pwd", - // "style": { - // "navigationBarTitleText": "修改密码" - // } - // }, - // { - // "path": "pages/sys/user/setting", - // "style": { - // "navigationBarTitleText": "系统设置" - // } - // }, - // { - // "path": "pages/sys/user/comment", - // "style": { - // "navigationBarTitleText": "意见反馈" - // } - // }, - // { - // "path": "pages/sys/user/about", - // "style": { - // "navigationBarTitleText": "关于我们" - // } - // }, - // { - // "path": "pages/testData/form", - // "style": { - // "navigationBarTitleText": "新增编辑" - // } - // }, - // { - // "path": "pages/testData/index", - // "style": { - // "navigationBarTitleText": "增删改查" - // } - // }, - // { - // "path": "pages/common/webview", - // "style": { - // "navigationBarTitleText": "浏览网页" - // } - // }, - // { - // "path": "pages/sys/login/code", - // "style": { - // "navigationBarTitleText": "验证码" - // } - // }, - // { - // "path": "pages/sys/login/registerCode", - // "style": { - // "navigationBarTitleText": "验证码" - // } - // }, - // { - // "path": "pages/sys/user/service", - // "style": { - // "navigationBarTitleText": "联系客服" - // } - // }, - // { - // "path": "pages/sys/user/problem", - // "style": { - // "navigationBarTitleText": "常见问题" - // } - // }, - // { - // "path": "pages/sys/user/currency", - // "style": { - // "navigationBarTitleText": "通用" - // } - // }, - // { - // "path": "pages/sys/user/clear-cache", - // "style": { - // "navigationBarTitleText": "清除缓存" - // } - // }, - // { - // "path": "pages/sys/workbench/index", - // "style": { - // "navigationBarTitleText": "工作台" - // } - // }, - // { - // "path": "pages/sys/book/index", - // "style": { - // "navigationBarTitleText": "通讯录" - // } - // }, - // { - // "path": "pages/sys/book/personal-details", - // "style": { - // "navigationBarTitleText": "详情" - // } - // }, - // { - // "path": "pages/sys/msg/list-item", - // "style": { - // "navigationBarTitleText": "列表" - // } - // }, - // { - // "path": "pages/sys/workbench/add-form", - // "style": { - // "navigationBarTitleText": "请假申请" - // } - // }, - // { - // "path": "pages/sys/msg/examine-item", - // "style": { - // "navigationBarTitleText": "网上报销" - // } - // }, - // { - // "path": "pages/sys/msg/details", - // "style": { - // "navigationBarTitleText": "详情" - // } - // }, - // { - // "path": "pages/sys/user/modify", - // "style": { - // "navigationBarTitleText": "修改" - // } - // }, - // { - // "path": "pages/sys/workbench/install", - // "style": { - // "navigationBarTitleText": "常用设置", - // "navigationStyle": "custom" // 隐藏系统导航栏 - // } - // } - - // ], - // "tabBar": { - // "color": "#333333", - // "selectedColor": "#4094ff", - // "backgroundColor": "#ffffff", - // "borderStyle": "white", - // "list": [ - // { - // "pagePath": "pages/sys/msg/index", - // "iconPath": "static/aidex/tabbar/msg_1.png", - // "selectedIconPath": "static/aidex/tabbar/msg_2.png", - // "text": "消息" - // }, - // // { - // // "pagePath": "pages/sys/home/index", - // // "iconPath": "static/aidex/tabbar/home_1.png", - // // "selectedIconPath": "static/aidex/tabbar/home_2.png", - // // "text": "首页" - // // }, - // { - // "pagePath": "pages/sys/workbench/index", - // "iconPath": "static/aidex/tabbar/apply_1.png", - // "selectedIconPath": "static/aidex/tabbar/apply_2.png", - // "text": "工作台" - // }, - // { - // "pagePath": "pages/sys/book/index", - // "iconPath": "static/aidex/tabbar/book_1.png", - // "selectedIconPath": "static/aidex/tabbar/book_2.png", - // "text": "通讯录" - // }, - // { - // "pagePath": "pages/sys/user/index", - // "iconPath": "static/aidex/tabbar/my_1.png", - // "selectedIconPath": "static/aidex/tabbar/my_2.png", - // "text": "我的" - // } - // ] - // }, - "pages":[ - { - "path": "pages/sys/login/login", - "style": { - "navigationBarTitleText": "登录", - "navigationStyle": "custom" // 隐藏系统导航栏 - } - }, - - { - "path": "pages/sys/home/home", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "pages/sys/workbench/workbench", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "pages/sys/user/mine", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "pages/sys/user/changeInfo/changeInfo", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "pages/sys/user/message/message", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "pages/sys/user/serviceCenter/serviceCenter", - "style": { - "navigationBarTitleText": "服务中心" - } - }, - { - "path": "pages/sys/user/serviceCenter/questionDetail", - "style": { - "navigationBarTitleText": "服务中心" - } - }, - { - "path": "pages/sys/user/myVisitor/myVisitor", - "style": { - "navigationBarTitleText": "我的访客" - } - }, - { - "path": "pages/sys/user/myVisitor/creatVisitor", - "style": { - "navigationBarTitleText": "发起邀约" - } - }, - { - "path": "pages/sys/user/myVisitor/visitorInfo", - "style": { - "navigationStyle": "custom" - } - }, - { - "path" : "pages/sys/user/myPayment/myPayment", - "style" : - { - "navigationBarTitleText": "停车缴费" - } - }, - { - "path" : "pages/sys/user/myPayment/paymentRecords", - "style" : - { - "navigationBarTitleText": "缴费记录" - } - }, - { - "path" : "pages/sys/user/myRepair/myRepair", - "style" : - { - "navigationBarTitleText": "报事报修" - } - }, - { - "path" : "pages/sys/user/myRepair/addRepair", - "style" : - { - "navigationBarTitleText": "新增" - } - }, - { - "path" : "pages/sys/user/myRepair/repaired", - "style" : - { - "navigationStyle" : "custom" - } - }, - { - "path" : "pages/sys/user/myRepair/repairEvaluate", - "style" : - { - "navigationBarTitleText": "服务评价" - } - }, - { - "path" : "pages/sys/user/myRecord/myRecord", - "style" : - { - "navigationStyle" : "custom" - } - }, - { - "path" : "pages/sys/workbench/oa/oa", - "style" : - { - "navigationStyle" : "custom" - } - }, - - { - "path" : "pages/sys/workbench/oa/oaDetail", - "style" : - { - "navigationStyle" : "custom" - } - } - ], - "tabBar": { - "color": "#232323", - "selectedColor": "#0652FF", - "backgroundColor": "#fff", - "borderStyle": "black", - "list": [{ - "pagePath": "pages/sys/home/home", - "iconPath": "static/ic_main_home.png", - "selectedIconPath": "static/ic_main_home_selected.png", - "text": "首页" - }, - { - "pagePath": "pages/sys/workbench/workbench", - "iconPath": "static/ic_main_work.png", - "selectedIconPath": "static/ic_main_work_selected.png", - "text": "工作台" - }, - { - "pagePath": "pages/sys/user/mine", - "iconPath": "static/ic_main_mine.png", - "selectedIconPath": "/static/ic_main_mine_selected.png", - "text": "我的" - } - ] - }, - "subPackages": [ - - ], - "preloadRule": { - - }, - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "Aidex", - "navigationBarBackgroundColor": "#ffffff" - } -} +{ + "easycom": { + "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + }, + //案列页面 + // "pages": [ + // { + // "path": "pages/sys/login/index", + // "style": { + // "navigationBarTitleText": "登录" + // } + // }, + // { + // "path": "pages/sys/login/forget", + // "style": { + // "navigationBarTitleText": "忘记密码" + // } + // }, + // { + // "path": "pages/sys/login/reg", + // "style": { + // "navigationBarTitleText": "注册账号" + // } + // }, + // { + // "path": "pages/sys/msg/index", + // "style": { + // "navigationBarTitleText": "消息" + // } + // }, + // { + // "path": "pages/sys/msg/form", + // "style": { + // "navigationBarTitleText": "查看详情" + // } + // }, + // { + // "path": "pages/sys/home/index", + // "style": { + // "navigationBarTitleText": "工作台", + // "navigationStyle": "custom" // 隐藏系统导航栏 + + // } + // }, + // { + // "path": "pages/sys/user/index", + // "style": { + // "navigationBarTitleText": "我的", + // "navigationBarBackgroundColor":"#5b95ff", + // "navigationBarTextStyle": "white" + // } + // }, + // { + // "path": "pages/sys/user/info", + // "style": { + // "navigationBarTitleText": "个人信息" + // } + // }, + // { + // "path": "uview-ui/components/u-avatar-cropper/u-avatar-cropper", + // "style": { + // "navigationBarTitleText": "头像裁剪", + // "navigationBarBackgroundColor": "#000000" + // } + // }, + // { + // "path": "pages/sys/user/help", + // "style": { + // "navigationBarTitleText": "帮助中心" + // } + // }, + // { + // "path": "pages/sys/user/pwd", + // "style": { + // "navigationBarTitleText": "修改密码" + // } + // }, + // { + // "path": "pages/sys/user/setting", + // "style": { + // "navigationBarTitleText": "系统设置" + // } + // }, + // { + // "path": "pages/sys/user/comment", + // "style": { + // "navigationBarTitleText": "意见反馈" + // } + // }, + // { + // "path": "pages/sys/user/about", + // "style": { + // "navigationBarTitleText": "关于我们" + // } + // }, + // { + // "path": "pages/testData/form", + // "style": { + // "navigationBarTitleText": "新增编辑" + // } + // }, + // { + // "path": "pages/testData/index", + // "style": { + // "navigationBarTitleText": "增删改查" + // } + // }, + // { + // "path": "pages/common/webview", + // "style": { + // "navigationBarTitleText": "浏览网页" + // } + // }, + // { + // "path": "pages/sys/login/code", + // "style": { + // "navigationBarTitleText": "验证码" + // } + // }, + // { + // "path": "pages/sys/login/registerCode", + // "style": { + // "navigationBarTitleText": "验证码" + // } + // }, + // { + // "path": "pages/sys/user/service", + // "style": { + // "navigationBarTitleText": "联系客服" + // } + // }, + // { + // "path": "pages/sys/user/problem", + // "style": { + // "navigationBarTitleText": "常见问题" + // } + // }, + // { + // "path": "pages/sys/user/currency", + // "style": { + // "navigationBarTitleText": "通用" + // } + // }, + // { + // "path": "pages/sys/user/clear-cache", + // "style": { + // "navigationBarTitleText": "清除缓存" + // } + // }, + // { + // "path": "pages/sys/workbench/index", + // "style": { + // "navigationBarTitleText": "工作台" + // } + // }, + // { + // "path": "pages/sys/book/index", + // "style": { + // "navigationBarTitleText": "通讯录" + // } + // }, + // { + // "path": "pages/sys/book/personal-details", + // "style": { + // "navigationBarTitleText": "详情" + // } + // }, + // { + // "path": "pages/sys/msg/list-item", + // "style": { + // "navigationBarTitleText": "列表" + // } + // }, + // { + // "path": "pages/sys/workbench/add-form", + // "style": { + // "navigationBarTitleText": "请假申请" + // } + // }, + // { + // "path": "pages/sys/msg/examine-item", + // "style": { + // "navigationBarTitleText": "网上报销" + // } + // }, + // { + // "path": "pages/sys/msg/details", + // "style": { + // "navigationBarTitleText": "详情" + // } + // }, + // { + // "path": "pages/sys/user/modify", + // "style": { + // "navigationBarTitleText": "修改" + // } + // }, + // { + // "path": "pages/sys/workbench/install", + // "style": { + // "navigationBarTitleText": "常用设置", + // "navigationStyle": "custom" // 隐藏系统导航栏 + // } + // } + + // ], + // "tabBar": { + // "color": "#333333", + // "selectedColor": "#4094ff", + // "backgroundColor": "#ffffff", + // "borderStyle": "white", + // "list": [ + // { + // "pagePath": "pages/sys/msg/index", + // "iconPath": "static/aidex/tabbar/msg_1.png", + // "selectedIconPath": "static/aidex/tabbar/msg_2.png", + // "text": "消息" + // }, + // // { + // // "pagePath": "pages/sys/home/index", + // // "iconPath": "static/aidex/tabbar/home_1.png", + // // "selectedIconPath": "static/aidex/tabbar/home_2.png", + // // "text": "首页" + // // }, + // { + // "pagePath": "pages/sys/workbench/index", + // "iconPath": "static/aidex/tabbar/apply_1.png", + // "selectedIconPath": "static/aidex/tabbar/apply_2.png", + // "text": "工作台" + // }, + // { + // "pagePath": "pages/sys/book/index", + // "iconPath": "static/aidex/tabbar/book_1.png", + // "selectedIconPath": "static/aidex/tabbar/book_2.png", + // "text": "通讯录" + // }, + // { + // "pagePath": "pages/sys/user/index", + // "iconPath": "static/aidex/tabbar/my_1.png", + // "selectedIconPath": "static/aidex/tabbar/my_2.png", + // "text": "我的" + // } + // ] + // }, + "pages": [{ + "path": "pages/sys/login/login", + "style": { + "navigationBarTitleText": "登录", + "navigationStyle": "custom" // 隐藏系统导航栏 + } + }, + + { + "path": "pages/sys/home/home", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/workbench/workbench", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/user/mine", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/user/changeInfo/changeInfo", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/user/message/message", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/user/serviceCenter/serviceCenter", + "style": { + "navigationBarTitleText": "服务中心" + } + }, + { + "path": "pages/sys/user/serviceCenter/questionDetail", + "style": { + "navigationBarTitleText": "服务中心" + } + }, + { + "path": "pages/sys/user/myVisitor/myVisitor", + "style": { + "navigationBarTitleText": "我的访客" + } + }, + { + "path": "pages/sys/user/myVisitor/creatVisitor", + "style": { + "navigationBarTitleText": "发起邀约" + } + }, + { + "path": "pages/sys/user/myVisitor/visitorInfo", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/user/myPayment/myPayment", + "style": { + "navigationBarTitleText": "停车缴费" + } + }, + { + "path": "pages/sys/user/myPayment/paymentRecords", + "style": { + "navigationBarTitleText": "缴费记录" + } + }, + { + "path": "pages/sys/user/myRepair/myRepair", + "style": { + "navigationBarTitleText": "报事报修" + } + }, + { + "path": "pages/sys/user/myRepair/addRepair", + "style": { + "navigationBarTitleText": "新增" + } + }, + { + "path": "pages/sys/user/myRepair/repaired", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/user/myRepair/repairEvaluate", + "style": { + "navigationBarTitleText": "服务评价" + } + }, + { + "path": "pages/sys/user/myRecord/myRecord", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/sys/workbench/oa/oa", + "style": { + "navigationBarTitleText": "审批中心" + } + }, + + { + "path": "pages/sys/workbench/oa/oaDetail", + "style": { + "navigationStyle": "custom" + } + } + ], + "tabBar": { + "color": "#232323", + "selectedColor": "#0652FF", + "backgroundColor": "#fff", + "borderStyle": "black", + "list": [{ + "pagePath": "pages/sys/home/home", + "iconPath": "static/ic_main_home.png", + "selectedIconPath": "static/ic_main_home_selected.png", + "text": "首页" + }, + { + "pagePath": "pages/sys/workbench/workbench", + "iconPath": "static/ic_main_work.png", + "selectedIconPath": "static/ic_main_work_selected.png", + "text": "工作台" + }, + { + "pagePath": "pages/sys/user/mine", + "iconPath": "static/ic_main_mine.png", + "selectedIconPath": "/static/ic_main_mine_selected.png", + "text": "我的" + } + ] + }, + "subPackages": [ + + ], + "preloadRule": { + + }, + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "Aidex", + "navigationBarBackgroundColor": "#ffffff" + } +} \ No newline at end of file diff --git a/pages/sys/login/login.vue b/pages/sys/login/login.vue index b79aab1..07c49df 100644 --- a/pages/sys/login/login.vue +++ b/pages/sys/login/login.vue @@ -57,6 +57,9 @@ activeColor: '#007aff', checked: false } + }, + onLoad() { + this.getUserInfo() }, methods: { async submit() { @@ -82,15 +85,28 @@ this.$store.commit('$uStore', { name: 'vuex_token', value: res.data.access_token - }); - setTimeout(() => { - uni.reLaunch({ - url: '/pages/sys/home/home' - }); - }, 500); + }); + this.getUserInfo() + // setTimeout(() => { + // uni.reLaunch({ + // url: '/pages/sys/home/home' + // }); + // }, 500); } }, - + getUserInfo(){ + this.$u.api.getUserInfo({loginCheck: true}).then(res => { + if (res.code == '200'){ + this.$store.commit('$uStore', { + name: 'vuex_user', + value: res.data.user + }); + uni.reLaunch({ + url: '/pages/sys/home/home' + }); + } + }); + }, handleCheckboxChange(e) { this.checked = e.target.checked; } diff --git a/pages/sys/user/changeInfo/changeInfo.vue b/pages/sys/user/changeInfo/changeInfo.vue index cb487a4..d633537 100644 --- a/pages/sys/user/changeInfo/changeInfo.vue +++ b/pages/sys/user/changeInfo/changeInfo.vue @@ -1,6 +1,6 @@