zxz 2 anos atrás
pai
commit
ece8d08693
1 arquivos alterados com 42 adições e 2 exclusões
  1. 42 2
      pages/user/user.vue

+ 42 - 2
pages/user/user.vue

@@ -490,10 +490,12 @@
 							console.log("that.3333")
 							console.log(that.companyList)
 						if (that.companyList.length > 0) {
-							that.compName = that.companyList[0].compName
+							if(!that.compName){
+								that.compName = that.companyList[0].compName
+								uni.setStorageSync('compName1', that.companyList[0].compName)
+							}
 							console.log("this.compName")
 							console.log(that.compName)
-							uni.setStorageSync('compName1', that.companyList[0].compName)
 							that.haveCompany = true
 						}
 						else{
@@ -559,6 +561,44 @@
 							// 	url: '/pages/sale/information'
 							// });
 							uni.hideLoading()
+							uni.hideKeyboard()
+							uni.showTabBar()
+							uni.removeTabBarBadge({
+								index: 4
+							})
+							that.loadData()
+							that.username = that.userInfo.userName ? that.userInfo.userName : uni.getStorageSync("userInfo").data
+								.userName
+							that.userphone = that.userInfo.phone ? that.userInfo.phone : uni.getStorageSync("userInfo").data.phone
+							that.$api.doRequest('get', '/newNoticeTask/query/noticeTasks').then(res => {
+								console.log("noticeNumber", res)
+								if (res.data.data) {
+									let name = 'myTip';
+									let value = res.data.data.total;
+									that.$store.commit('$uStore', {
+										name,
+										value
+									});
+									if (value != 0 && value) {
+										uni.setTabBarBadge({
+											index: 4,
+											text: value + ""
+										})
+									}
+									name = 'taskTip';
+									value = res.data.data.total;
+									that.$store.commit('$uStore', {
+										name,
+										value
+									});
+									// name = 'contractTip';
+									// value = res.data.data.contractTip;
+									// that.$store.commit('$uStore', {
+									// 	name,
+									// 	value
+									// });
+								}
+							})
 							that.$api.msg('切换成功')
 						})