Browse Source

初始化删除消息提示

wangchao 3 năm trước cách đây
mục cha
commit
417f2c1cb5

+ 3 - 1
pages/business/business.vue

@@ -161,7 +161,9 @@
 					
 			// 	})
 			// }, 500);
-			
+			uni.removeTabBarBadge({
+				index: 4
+			})
 			this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
 				if (res.data.data) {
 					let name = 'myTip';

+ 25 - 0
pages/grain_pulse/home.vue

@@ -197,6 +197,31 @@
 			else{
 				this.getList()
 			}
+			uni.removeTabBarBadge({
+				index: 4
+			})
+			this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
+				if (res.data.data) {
+					let name = 'myTip';
+					let value = res.data.data.task;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if(value != 0&&value){
+						uni.setTabBarBadge({
+							index:4,
+							text:value+""
+						})
+					}
+					name = 'taskTip';
+					value = res.data.data.task;
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+				}
+			})
 		},
 		onLoad(option) {
 			if (option.position){

+ 0 - 1
pages/task/audit/purchase_settlement_details.vue

@@ -74,7 +74,6 @@
 				this.$api.doRequest('get', '/stockPurchaseReceiptReport/getInfo', {
 					id: this.id
 				}).then(res => {
-					debugger
 					this.contractNo = res.data.data.contractNo
 					this.unitPrice = res.data.data.price
 					this.goodsName = res.data.data.goodsName

+ 3 - 0
pages/tran/tran.vue

@@ -129,6 +129,9 @@
 				var userInfo = uni.getStorageSync("userInfo")
 				var that = this
 				console.log("userInfo",userInfo)
+				uni.removeTabBarBadge({
+					index: 4
+				})
 				this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
 					if (res.data.data) {
 						let name = 'myTip';

+ 3 - 0
pages/user/user.vue

@@ -281,6 +281,9 @@
 			this.isShow();
 			uni.hideKeyboard()
 			uni.showTabBar()
+			uni.removeTabBarBadge({
+				index: 4
+			})
 			this.loadData()
 			console.log("hasLogin", this.hasLogin)
 			if (this.userInfo) {