@@ -75,6 +75,8 @@ var config = { | |||||
privacyAgr: `${host}/zkPrivate/findById`, | privacyAgr: `${host}/zkPrivate/findById`, | ||||
//首页更新弹框 | //首页更新弹框 | ||||
updatePopup: `${host}/zkMessage/showMessage`, | updatePopup: `${host}/zkMessage/showMessage`, | ||||
//首页首次更新弹框 | |||||
firstShowPopup: `${host}/zkMessage/firstShow`, | |||||
} | } | ||||
}; | }; |
@@ -384,7 +384,7 @@ | |||||
lookDetail(){ | lookDetail(){ | ||||
let link = encodeURIComponent(JSON.stringify(this.content)) | let link = encodeURIComponent(JSON.stringify(this.content)) | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "../mine/messageDetail?content=" + link + "&id=" + this.id | |||||
url: "../mine/messageDetail?content=" + link + "&id=" + this.id+"&tit="+this.tit | |||||
}) | }) | ||||
let data = { | let data = { | ||||
id:this.id, | id:this.id, | ||||
@@ -399,7 +399,7 @@ | |||||
}, | }, | ||||
data, | data, | ||||
success: (res) => { | success: (res) => { | ||||
return; | |||||
this.initPopup() | |||||
} | } | ||||
}) | }) | ||||
this.isShowUpdate = false; | this.isShowUpdate = false; | ||||
@@ -413,11 +413,25 @@ | |||||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | 'Access-Token': uni.getStorageSync('weapp_session_login_data').token | ||||
}, | }, | ||||
success: (res) => { | success: (res) => { | ||||
this.first(res.data.data.id) | |||||
this.content = res.data.data.content | this.content = res.data.data.content | ||||
this.tit = res.data.data.title | this.tit = res.data.data.title | ||||
this.aid = res.data.data.accountId | this.aid = res.data.data.accountId | ||||
this.id = res.data.data.id | 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) => { | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
@@ -1,5 +1,6 @@ | |||||
<template> | <template> | ||||
<view class="main"> | <view class="main"> | ||||
<view class="tit">{{tit}}</view> | |||||
<u-parse class="ql-editor" :content="content" @preview="preview" @navigate="navigate"/> | <u-parse class="ql-editor" :content="content" @preview="preview" @navigate="navigate"/> | ||||
<web-view v-if="webviewShow" :webview-styles="webviewStyles" :src="webviewUrl"></web-view> | <web-view v-if="webviewShow" :webview-styles="webviewStyles" :src="webviewUrl"></web-view> | ||||
<!-- <view v-html="content"></view> --> | <!-- <view v-html="content"></view> --> | ||||
@@ -15,6 +16,7 @@ | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
tit:"", | |||||
content:"", | content:"", | ||||
id:"", | id:"", | ||||
webviewShow:false, | webviewShow:false, | ||||
@@ -33,6 +35,7 @@ | |||||
this.id = e.id; | this.id = e.id; | ||||
let link=JSON.parse(decodeURIComponent(e.content)) | let link=JSON.parse(decodeURIComponent(e.content)) | ||||
this.content = link | this.content = link | ||||
this.tit = e.tit | |||||
this.read() | this.read() | ||||
}, | }, | ||||
methods:{ | methods:{ | ||||
@@ -72,6 +75,12 @@ | |||||
.main{ | .main{ | ||||
padding: 20rpx; | padding: 20rpx; | ||||
word-wrap: break-word; | word-wrap: break-word; | ||||
.tit{ | |||||
font-size: 46rpx; | |||||
font-weight: 800; | |||||
text-align: center; | |||||
margin-bottom: 16rpx; | |||||
} | |||||
} | } | ||||
.ql-container { | .ql-container { | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
@@ -5,7 +5,7 @@ | |||||
<view class="upgradeList"> | <view class="upgradeList"> | ||||
<block v-if="updateAnnList.length!=0"> | <block v-if="updateAnnList.length!=0"> | ||||
<block v-for="(item,index) in updateAnnList" :key="index"> | <block v-for="(item,index) in updateAnnList" :key="index"> | ||||
<view class="upgradeItem" @click="goDetail(item.content,item.id)"> | |||||
<view class="upgradeItem" @click="goDetail(item.content,item.id,item.title)"> | |||||
<view class="notRead"> | <view class="notRead"> | ||||
<view v-if="item.readFlag==0" class="red"></view> | <view v-if="item.readFlag==0" class="red"></view> | ||||
</view> | </view> | ||||
@@ -112,10 +112,10 @@ | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
goDetail(text, id) { | |||||
goDetail(text, id,title) { | |||||
let link = encodeURIComponent(JSON.stringify(text)) | let link = encodeURIComponent(JSON.stringify(text)) | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "./messageDetail?content=" + link + "&id=" + id | |||||
url: "./messageDetail?content=" + link + "&id=" + id+"&tit="+title | |||||
}) | }) | ||||
}, | }, | ||||
change(index) { | change(index) { | ||||