|
@@ -29,7 +29,6 @@
|
|
v-if="index<gridCol*2">
|
|
v-if="index<gridCol*2">
|
|
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
|
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
|
<image :src="item.src" class="sign"></image>
|
|
<image :src="item.src" class="sign"></image>
|
|
-
|
|
|
|
<text style="color: #333333;">{{item.name}}</text>
|
|
<text style="color: #333333;">{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -103,7 +102,6 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- pcUserInfo:{},
|
|
|
|
isShowAlert: false,
|
|
isShowAlert: false,
|
|
content: '您尚未登录,是否立即登录?',
|
|
content: '您尚未登录,是否立即登录?',
|
|
haveCompany: false,
|
|
haveCompany: false,
|
|
@@ -399,8 +397,7 @@
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
// console.log(111111111)
|
|
// console.log(111111111)
|
|
- this.pcUserInfo = uni.getStorageSync('pcUserInfo')
|
|
|
|
- if (this.pcUserInfo) {
|
|
|
|
|
|
+ if (uni.getStorageSync('pcUserInfo')) {
|
|
// console.log(2222222)
|
|
// console.log(2222222)
|
|
for (var i = 0; i < this.gridList1.length; i++) {
|
|
for (var i = 0; i < this.gridList1.length; i++) {
|
|
if (this.gridList1[i].num == 0 || this.gridList1[i].num == 1 || this.gridList1[i].num == 3 || this
|
|
if (this.gridList1[i].num == 0 || this.gridList1[i].num == 1 || this.gridList1[i].num == 3 || this
|
|
@@ -486,26 +483,21 @@
|
|
|
|
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
|
|
+ if(uni.getStorageSync('compName1')){
|
|
|
|
+ that.compName = uni.getStorageSync('compName1').company
|
|
|
|
+ }
|
|
that.$api.doRequest('get', '/commonUser/getCompOwn', {
|
|
that.$api.doRequest('get', '/commonUser/getCompOwn', {
|
|
phone: that.userInfo.phone
|
|
phone: that.userInfo.phone
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.data.data) {
|
|
if (res.data.data) {
|
|
that.companyList = res.data.data
|
|
that.companyList = res.data.data
|
|
- if(that.pcUserInfo){
|
|
|
|
- for(let i=0;i<that.companyList.length;i++){
|
|
|
|
- if(that.pcUserInfo.compId == that.companyList[i].compId){
|
|
|
|
- uni.setStorageSync('compName1',that.companyList[i].compName)
|
|
|
|
- that.compName = that.companyList[i].compName
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ uni.setStorageSync('companyList', that.companyList)
|
|
console.log("that.3333")
|
|
console.log("that.3333")
|
|
console.log(that.companyList)
|
|
console.log(that.companyList)
|
|
if (that.companyList.length > 0) {
|
|
if (that.companyList.length > 0) {
|
|
if (!that.compName) {
|
|
if (!that.compName) {
|
|
that.compName = that.companyList[0].compName
|
|
that.compName = that.companyList[0].compName
|
|
- uni.setStorageSync('compName1', that.companyList[0].compName)
|
|
|
|
|
|
+ uni.setStorageSync('compName1', {company:that.companyList[0].compName})
|
|
}
|
|
}
|
|
console.log("this.compName")
|
|
console.log("this.compName")
|
|
console.log(that.compName)
|
|
console.log(that.compName)
|