diff --git a/config.js b/config.js index dd4cbfb..cf933e3 100644 --- a/config.js +++ b/config.js @@ -75,6 +75,8 @@ var config = { privacyAgr: `${host}/zkPrivate/findById`, //首页更新弹框 updatePopup: `${host}/zkMessage/showMessage`, + //首页首次更新弹框 + firstShowPopup: `${host}/zkMessage/firstShow`, } }; diff --git a/pages/index/index.vue b/pages/index/index.vue index 0521efa..ca0a390 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -384,7 +384,7 @@ lookDetail(){ let link = encodeURIComponent(JSON.stringify(this.content)) uni.navigateTo({ - url: "../mine/messageDetail?content=" + link + "&id=" + this.id + url: "../mine/messageDetail?content=" + link + "&id=" + this.id+"&tit="+this.tit }) let data = { id:this.id, @@ -399,7 +399,7 @@ }, data, success: (res) => { - return; + this.initPopup() } }) this.isShowUpdate = false; @@ -413,11 +413,25 @@ 'Access-Token': uni.getStorageSync('weapp_session_login_data').token }, success: (res) => { + this.first(res.data.data.id) this.content = res.data.data.content this.tit = res.data.data.title this.aid = res.data.data.accountId this.id = res.data.data.id - this.isShowUpdate = res.data.data.readFlag==0?true:false + this.isShowUpdate = res.data.data.readFlag==0?true:false; + } + }) + }, + first(id){ + uni.request({ + url: config.service.firstShowPopup, + method: "GET", + header: { + 'content-type': 'application/json', + 'Access-Token': uni.getStorageSync('weapp_session_login_data').token + }, + data:{id}, + success: (res) => { } }) }, diff --git a/pages/mine/messageDetail.vue b/pages/mine/messageDetail.vue index 8ea662c..fdb794e 100644 --- a/pages/mine/messageDetail.vue +++ b/pages/mine/messageDetail.vue @@ -1,5 +1,6 @@