mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-06-09 15:32:27 +08:00
优化,完善代码
This commit is contained in:
@@ -29,11 +29,33 @@
|
||||
this.id = option.id
|
||||
this.getDetail()
|
||||
},
|
||||
onShow(){
|
||||
this.recordView(this.id)
|
||||
},
|
||||
methods:{
|
||||
recordView(assetId) {
|
||||
let token = this.$getToken()
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
if(token){
|
||||
return
|
||||
}
|
||||
if (token) {
|
||||
let url = "/potential/add";
|
||||
this.$u.get(url, {
|
||||
assetId: this.id,
|
||||
assetsName: '查看公告' + this.title,
|
||||
userType: userInfo.userType
|
||||
}, {
|
||||
'WT': this.$getToken()
|
||||
}).then(obj => {
|
||||
|
||||
}).catch(err => {
|
||||
console.log("记录客户浏览记录失败", err)
|
||||
})
|
||||
}
|
||||
},
|
||||
getDetail(){
|
||||
this.$u.get(`/notice/detail?id=${this.id}`,{},{
|
||||
WT: this.$getToken()
|
||||
}).then(res=>{
|
||||
this.$u.get(`/notice/detail?id=${this.id}`,{},{}).then(res=>{
|
||||
if(res.flag) {
|
||||
this.title = res.data.noticeTitle;
|
||||
this.content = res.data.noticeContent;
|
||||
@@ -44,12 +66,13 @@
|
||||
})
|
||||
}
|
||||
this.attachments = res.data.attachments;
|
||||
this.recordView(this.id)
|
||||
}
|
||||
})
|
||||
},
|
||||
download(item){
|
||||
uni.downloadFile({
|
||||
url: this.$config.staticUrl + item.url,
|
||||
url: this.$config.staticUrl + item.fileUrl,
|
||||
success(res) {
|
||||
uni.openDocument({
|
||||
filePath: res.tempFilePath
|
||||
|
||||
Reference in New Issue
Block a user