diff --git a/src/pages/pageHome/pageHome.vue b/src/pages/pageHome/pageHome.vue index 215686a..4d80e0c 100644 --- a/src/pages/pageHome/pageHome.vue +++ b/src/pages/pageHome/pageHome.vue @@ -231,7 +231,17 @@ // #endif }, onLoad() { - this.getUserInfo() + const token = uni.getStorageSync('token'); + // const Authorization = uni.getStorageSync('Authorization'); + if(token){ + this.getUserInfo() + }else{ + this.getSwpper() + } + wx.showShareMenu({ + withShareTicket: true, + menus: ['shareAppMessage', 'shareTimeline'] + }) }, methods: { //用户信息 @@ -252,6 +262,7 @@ uni.setStorageSync('isWlAdmin', res.data.isWlAdmin) uni.setStorageSync('isBusiness', res.data.isBusiness) this.getSwpper() + this.getTalkList() } }).catch(e => { uni.showToast({ @@ -366,8 +377,6 @@ this.http.request('/indexImage/sybjt', {}, "GET").then(res => { if (res.code == 200) { this.background = res.data[0].imagePath - this.getTalkList() - this.getUnshList() this.load = false } }).catch(e => { @@ -389,6 +398,7 @@ if (item.unread > 0) _this.isUnread = true; }); } + this.getUnshList() } }) .catch((e) => { diff --git a/src/request/interface.js b/src/request/interface.js index 6ed2d37..2d51629 100644 --- a/src/request/interface.js +++ b/src/request/interface.js @@ -5,7 +5,7 @@ export default { config: { - // baseUrl: "http://192.168.2.48:8080/h5/api", //俞燕红-小程序不能配跨域 + // baseUrl: "http://192.168.2.67:8080/h5/api", //俞燕红-小程序不能配跨域 // baseUrl: "/pre", //俞燕红-跨域 baseUrl: "https://yxx.ydool.net/h5/api", //线上 // baseUrl: "/h5/api", //h5