diff --git a/common/api/user.js b/common/api/user.js index 3d62a31..477c38d 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -419,6 +419,12 @@ export default { order: order, }); }, + //取消红点 + dynamicRead({id}) { + return vm.$u.post('message/dynamicRead', { + friend_tomid:id + }); + }, } } } \ No newline at end of file diff --git a/pageB/details/index.vue b/pageB/details/index.vue index 08c9a84..93196e3 100644 --- a/pageB/details/index.vue +++ b/pageB/details/index.vue @@ -82,14 +82,20 @@ export default { this.member_id = option.id; this.getUserInfo(option.id); this.getArticlelist(); + }, methods:{ // 获取信息 getUserInfo(id) { this.$u.post("MemberExpert/expertInfo",{member_id: id}).then(res => { - // console.log(res); + console.log(res); this.userInfo = res.data.info; - // console.log(this.userInfo); + console.log(this.userInfo.is_attention); + if(this.userInfo.is_attention == 1){ + this.$u.api.dynamicRead({id}).then((res)=>{ + console.log(res) + }) + } }) }, // 获取列表 diff --git a/pageD/attention/attention.vue b/pageD/attention/attention.vue index 26205dc..1005c6c 100644 --- a/pageD/attention/attention.vue +++ b/pageD/attention/attention.vue @@ -63,7 +63,7 @@ this.attention = res.data.data; } this.status = "loadmore" - if(res.data.data.length < 15){ + if(res.data.data.length < parseInt(res.data.per_page)){ this.status = "nomore" } }) diff --git a/pages.json b/pages.json index f62a433..6ec3525 100644 --- a/pages.json +++ b/pages.json @@ -504,7 +504,7 @@ { "path": "attention/attention", "style": { - "navigationBarTitleText": "关注消息", + "navigationBarTitleText": "达人消息", "app-plus": { "titleSize": "36px", "titleColor": "#333333", diff --git a/pages/information/information.vue b/pages/information/information.vue index e75d614..4247942 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -59,7 +59,7 @@ { id: 0, url: '../../static/pageD/info(15).png', - text: '关注消息' + text: '达人消息' }, ], diff --git a/pages/zhibo/index.nvue b/pages/zhibo/index.nvue index 6d0227f..9976dc2 100644 --- a/pages/zhibo/index.nvue +++ b/pages/zhibo/index.nvue @@ -338,13 +338,21 @@ export default { danmulist:[] }; }, + onBackPress(options) { + uni.setKeepScreenOn({ + keepScreenOn: false + }); + return false; + }, onLoad(a) { this.url = a.url; this.id = a.id console.log(this.url); let that = this; - + uni.setKeepScreenOn({ + keepScreenOn: true + }); uni.getSystemInfo({ success(a) {