|
@@ -179,34 +179,52 @@
|
|
|
this.loadData()
|
|
|
var userInfo = uni.getStorageSync("userInfo")
|
|
|
var that = this
|
|
|
- this.$api.doRequest('get', '/salePlanInfo/getTips', {
|
|
|
- phone: userInfo.phone
|
|
|
- }).then(res => {
|
|
|
+ this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
|
|
|
+ console.log("checkSession",res)
|
|
|
+ if (res.data.data == "INVALID") {
|
|
|
+ uni.showModal({
|
|
|
+ title: '登录提示',
|
|
|
+ content: 'Session过期需要重新登录,是否立即登录?',
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '登录',
|
|
|
+ success: (e) => {
|
|
|
+ if (e.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/public/login'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
|
|
|
if (res.data.data) {
|
|
|
let name = 'myTip';
|
|
|
- let value = res.data.data.myTip;
|
|
|
+ let value = res.data.data.task;
|
|
|
that.$store.commit('$uStore', {
|
|
|
name,
|
|
|
value
|
|
|
});
|
|
|
- if (value != 0) {
|
|
|
+ if(value != 0&&value){
|
|
|
uni.setTabBarBadge({
|
|
|
- index: 4,
|
|
|
- text: value + ""
|
|
|
+ index:4,
|
|
|
+ text:value+""
|
|
|
})
|
|
|
}
|
|
|
name = 'taskTip';
|
|
|
- value = res.data.data.taskTip;
|
|
|
- that.$store.commit('$uStore', {
|
|
|
- name,
|
|
|
- value
|
|
|
- });
|
|
|
- name = 'contractTip';
|
|
|
- value = res.data.data.contractTip;
|
|
|
+ value = res.data.data.task;
|
|
|
that.$store.commit('$uStore', {
|
|
|
name,
|
|
|
value
|
|
|
});
|
|
|
+ // name = 'contractTip';
|
|
|
+ // value = res.data.data.contractTip;
|
|
|
+ // that.$store.commit('$uStore', {
|
|
|
+ // name,
|
|
|
+ // value
|
|
|
+ // });
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -266,37 +284,7 @@
|
|
|
this.loadStatus = 'more'
|
|
|
this.loadData()
|
|
|
var userInfo = uni.getStorageSync("userInfo")
|
|
|
- var that = this
|
|
|
- this.$api.doRequest('get', '/salePlanInfo/getTips', {
|
|
|
- phone: userInfo.phone
|
|
|
- }).then(res => {
|
|
|
- if (res.data.data) {
|
|
|
- let name = 'myTip';
|
|
|
- let value = res.data.data.myTip;
|
|
|
- that.$store.commit('$uStore', {
|
|
|
- name,
|
|
|
- value
|
|
|
- });
|
|
|
- if (value != 0) {
|
|
|
- uni.setTabBarBadge({
|
|
|
- index: 4,
|
|
|
- text: value + ""
|
|
|
- })
|
|
|
- }
|
|
|
- name = 'taskTip';
|
|
|
- value = res.data.data.taskTip;
|
|
|
- that.$store.commit('$uStore', {
|
|
|
- name,
|
|
|
- value
|
|
|
- });
|
|
|
- name = 'contractTip';
|
|
|
- value = res.data.data.contractTip;
|
|
|
- that.$store.commit('$uStore', {
|
|
|
- name,
|
|
|
- value
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
},
|
|
|
onPageScroll(e) {
|
|
|
this.scrollTop = e.scrollTop;
|