feat(): 修复我的页面报错问题
parent
b0fdfa16c1
commit
56a9d1b312
14
main.js
14
main.js
|
|
@ -13,10 +13,18 @@ $http.baseUrl = 'http://223.75.53.141:83'
|
|||
// $http.baseUrl = 'http://192.168.66.27:24105'
|
||||
// 请求拦截器
|
||||
$http.beforeRequest = function (options) {
|
||||
if (options.url.indexOf('/doLogin') == -1) {
|
||||
if (options.url.indexOf('/login') == -1) {
|
||||
options.header = {
|
||||
'Authorization': 'Bearer ' + uni.getStorageSync('Gs-Token')
|
||||
...(options.header || {}),
|
||||
'Authorization': 'Bearer ' + uni.getStorageSync('Gs-Token'),
|
||||
loginType: 1
|
||||
}
|
||||
// if (options.url.indexOf('/gunshiApp/tsg/visitMenuLog/insert') !== -1) {
|
||||
// options.header = {
|
||||
// ...options.header,
|
||||
// loginType: 1
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
// 响应拦截器
|
||||
|
|
@ -58,4 +66,4 @@ export function createApp() {
|
|||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// #endif
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name" : "檀树岗水库",
|
||||
"appid" : "__UNI__33ED56F",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.4",
|
||||
"versionName" : "1.0.5",
|
||||
"versionCode" : 1,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
|
|
|
|||
|
|
@ -603,4 +603,4 @@ export default {
|
|||
.noData {
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
</div>
|
||||
<div class="user">
|
||||
<div class="username">{{userList.nickName}}</div>
|
||||
<div class="userresponse">{{userList.dept.deptName}}</div>
|
||||
<div class="userresponse">{{deptName}}</div>
|
||||
</div>
|
||||
</view>
|
||||
<view class="funcBar">
|
||||
<div class="funcList" v-for="(item, index) in func" :key="index">
|
||||
<div @click="navigateToSubPage(func,index)">
|
||||
<div class="funcIcon" style="width:30px:;height:30px">
|
||||
<div class="funcIcon" style="width:30px;height:30px">
|
||||
<image class="icon-left" style="width: 100%; height: 100%" :src="item.img" mode="aspectFit">
|
||||
</image>
|
||||
</div>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
},
|
||||
]
|
||||
console.log(uni.getStorageSync('value'));
|
||||
export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userList: uni.getStorageSync('value'),
|
||||
|
|
@ -60,6 +60,12 @@
|
|||
default_src: uni.getStorageSync('avatar'),
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
deptName() {
|
||||
const d = this.userList && this.userList.dept
|
||||
return (d && d.deptName) || ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navigateToSubPage(item,index) {
|
||||
uni.navigateTo({
|
||||
|
|
|
|||
Loading…
Reference in New Issue