|
@@ -1,62 +1,58 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
- <My_listbox ref="List" @getlist="getDetail" bottomHeight="75" :isShowEmpty="false">
|
|
|
- <view class="main">
|
|
|
- <view class="changeby-box">
|
|
|
- <view class="changeby">
|
|
|
- <image class="headpic"
|
|
|
- :src="detail.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
|
|
|
- mode="aspectFill" />
|
|
|
- <view class="name u-line-1">
|
|
|
- {{ detail.changeby || '--' }}
|
|
|
- </view>
|
|
|
+ <view style="background-color: #fff;padding-bottom: 80px;padding-top: 10px;">
|
|
|
+ <view class="main">
|
|
|
+ <view class="changeby-box">
|
|
|
+ <view class="changeby">
|
|
|
+ <image class="headpic"
|
|
|
+ :src="detail.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
|
|
|
+ mode="aspectFill" />
|
|
|
+ <view class="name u-line-1">
|
|
|
+ {{ detail.changeby || '--' }}
|
|
|
</view>
|
|
|
- <navigator class="iconfont icon-a-720quanjing-bai" v-if="detail.ispanorama"
|
|
|
- style="color: #C30D23;font-size: 24px;"
|
|
|
- :url="'/packageA/webView/webView?url=' + detail.panoramaurl" />
|
|
|
</view>
|
|
|
- <view class="title" v-if="detail.title_c || detail.title">
|
|
|
- {{ detail.title_c || detail.title }}
|
|
|
+ <navigator class="iconfont icon-a-720quanjing-bai" v-if="detail.ispanorama"
|
|
|
+ style="color: #C30D23;font-size: 24px;" :url="'/packageA/webView/webView?url=' + detail.panoramaurl" />
|
|
|
+ </view>
|
|
|
+ <view class="title" v-if="detail.title_c || detail.title">
|
|
|
+ {{ detail.title_c || detail.title }}
|
|
|
+ </view>
|
|
|
+ <block v-for="item in files" :key="item.attachmentid">
|
|
|
+ <image class="image" v-if="item.fileType == 'image'" :src="item.cover" mode="widthFix" lazy-load="true"
|
|
|
+ @click="previewImg(item)" />
|
|
|
+ <video v-else-if="item.fileType == 'video'" class="video" :poster="item.subfiles[0].url" :src="item.url" />
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ <view class="comment-box">
|
|
|
+ <view class="head">
|
|
|
+ <view class="label">
|
|
|
+ 评论
|
|
|
+ </view>
|
|
|
+ <view class="total">
|
|
|
+ 共{{ detail.commentcount || 0 }}条
|
|
|
</view>
|
|
|
- <block v-for="item in files" :key="item.attachmentid">
|
|
|
- <image class="image" v-if="item.fileType == 'image'" :src="item.cover" mode="widthFix" lazy-load="true"
|
|
|
- @click="previewImg(item)" />
|
|
|
- <video v-else-if="item.fileType == 'video'" class="video" :poster="item.subfiles[0].url"
|
|
|
- :src="item.url" />
|
|
|
- </block>
|
|
|
</view>
|
|
|
- <view class="comment-box">
|
|
|
- <view class="head">
|
|
|
- <view class="label">
|
|
|
- 评论
|
|
|
- </view>
|
|
|
- <view class="total">
|
|
|
- 共{{ detail.commentcount || 0 }}条
|
|
|
+ <view class="comment" v-for="item in comments" :key="item.sys_datacommentid">
|
|
|
+ <view class="user">
|
|
|
+ <image class="headpic"
|
|
|
+ :src="item.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
|
|
|
+ mode="aspectFill" />
|
|
|
+ <view class="name">
|
|
|
+ {{ item.name }}
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="comment" v-for="item in comments" :key="item.sys_datacommentid">
|
|
|
- <view class="user">
|
|
|
- <image class="headpic"
|
|
|
- :src="item.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
|
|
|
- mode="aspectFill" />
|
|
|
- <view class="name">
|
|
|
- {{ item.name }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="content">
|
|
|
- {{ item.content }}
|
|
|
- </view>
|
|
|
- <view class="time">
|
|
|
- <text class="createdate">{{ item.createdate }}</text>
|
|
|
- <view v-if="userid == item.userid" class="iconfont icon-shanchu" hover-class="navigator-hover"
|
|
|
- @click="delectComment(item)" />
|
|
|
- </view>
|
|
|
+ <view class="content">
|
|
|
+ {{ item.content }}
|
|
|
</view>
|
|
|
- <view v-if="comments.length == 0" style="padding-bottom: 200px;">
|
|
|
- <u-empty mode="data" />
|
|
|
+ <view class="time">
|
|
|
+ <text class="createdate">{{ item.createdate }}</text>
|
|
|
+ <view v-if="userid == item.userid" class="iconfont icon-shanchu" hover-class="navigator-hover"
|
|
|
+ @click="delectComment(item)" />
|
|
|
</view>
|
|
|
</view>
|
|
|
- </My_listbox>
|
|
|
+ <view v-if="comments.length == 0" style="padding-bottom: 200px;">
|
|
|
+ <u-empty mode="data" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
<view class="footer">
|
|
|
<view class="but" @click="loadings.like ? '' : handleCollect(2, detail.islike)">
|
|
@@ -105,7 +101,8 @@ export default {
|
|
|
loadings: {
|
|
|
collect: false,
|
|
|
like: false
|
|
|
- }
|
|
|
+ },
|
|
|
+ loadingGetList: false
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -115,6 +112,9 @@ export default {
|
|
|
onUnload() {
|
|
|
this.$Http.setCount && delete this.$Http.setCount
|
|
|
},
|
|
|
+ onReachBottom() {
|
|
|
+ if (!this.loadingGetList) this.getList();
|
|
|
+ },
|
|
|
methods: {
|
|
|
previewImg(item) {
|
|
|
viewImage(item.url)
|
|
@@ -128,7 +128,6 @@ export default {
|
|
|
"sat_sharematerialid": this.sat_sharematerialid
|
|
|
},
|
|
|
}).then(res => {
|
|
|
- this.$refs.List.RefreshToComplete()
|
|
|
console.log("设计实景详情", res)
|
|
|
if (this.cutoff(res.msg)) return;
|
|
|
this.files = formattedFiles(res.data.attinfos_pic.map(v => v.attinfos[0])).map(v => {
|
|
@@ -143,16 +142,20 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getList(init = false) {
|
|
|
- if (this.paging(this.content, init)) return;
|
|
|
+ this.loadingGetList = true;
|
|
|
+ if (this.paging(this.content, init)) return this.loadingGetList = false;
|
|
|
this.content.ownerid = this.sat_sharematerialid;
|
|
|
this.$Http.basic({
|
|
|
"id": 20240417161702,
|
|
|
content: this.content
|
|
|
}).then(res => {
|
|
|
+ this.loadingGetList = false;
|
|
|
console.log("获取评论列表", res)
|
|
|
if (this.cutoff(res.msg)) return;
|
|
|
this.comments = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
|
|
|
- this.content = this.$refs.List.paging(this.content, res)
|
|
|
+ this.content.pageNumber = res.pageNumber - 0 + 1;
|
|
|
+ this.content.pageTotal = res.pageTotal;
|
|
|
+ this.content.pageSize = res.pageSize;
|
|
|
})
|
|
|
},
|
|
|
changeComment(e) {
|
|
@@ -250,10 +253,10 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
.main {
|
|
|
width: 355px;
|
|
|
- margin: 10px auto;
|
|
|
+ margin: 0 auto;
|
|
|
|
|
|
.changeby-box {
|
|
|
display: flex;
|