123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /**
- *@des 登录注册相关接口
- *@author hjp1011 21931118@qq.com
- *@blog http://www.wephp.com
- *@date 2019/11/15 15:14:47
- *@param login.js
- */
- export function getTabBarBadge() {
- //获取待办数量
- var url = this.$mConfig.baseUrl + '/fw/queryDocumentAndNotice';
- var token = this.$preToken + ' ' + this.$store.state.accessToken;
- this.$http.request({
- url: url,
- header: {
- 'content-type': 'application/json',
- 'Authorization': token
- },
- data: {
- pageNum: 1,
- pageSize: 20,
- orderByColumn: "ID",
- isAsc: "desc",
- }
- }).then(r => {
- console.log('-----------'+r.total)
- var sum = r.total;
- if (sum > 0) {
- uni.setTabBarBadge({
- index: 1,
- text: sum.toString()
- })
- }else{
- //移除角标
- uni.removeTabBarBadge({
- index:1
- })
- }
- })
- //获取待办数量结束
- };
|