修复朋友圈分享
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<div class="Detail" v-if="pageShow">
|
<div class="Detail" v-if="pageShow">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="item-top">
|
<div class="item-top">
|
||||||
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>{{ info.createUserName }}</h3>
|
<h3>{{ info.createUserName }}</h3>
|
||||||
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
|
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="value">{{ info.integralTaskInfo.type == 1 ? '报名得积分' : '打卡得积分' }}</div>
|
<div class="value">{{ info.integralTaskInfo.type == 1 ? '报名得积分' : '打卡得积分' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-flex">
|
<div class="info-flex">
|
||||||
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/time-icon.png" alt="">{{ info.integralTaskInfo.type == 1 ? '报名时间:' : '进场时间:'}}</div>
|
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/time-icon.png" alt="">{{ info.integralTaskInfo.type == 1 ? '报名时间:' : '进场时间:' }}</div>
|
||||||
<div class="value">{{ info.integralTaskInfo.intoBegintime }}至{{ info.integralTaskInfo.intoEndtime }}</div>
|
<div class="value">{{ info.integralTaskInfo.intoBegintime }}至{{ info.integralTaskInfo.intoEndtime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-flex" v-if="info.integralTaskInfo.type != 1">
|
<div class="info-flex" v-if="info.integralTaskInfo.type != 1">
|
||||||
@@ -34,12 +34,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="item-imgs" v-if="info.files && info.files.length">
|
<div class="item-imgs" v-if="info.files && info.files.length">
|
||||||
<image mode="aspectFill" @click="previewImage(item.url, info.files)" v-for="(item, index) in info.files" :key="index" :src="item.url" />
|
<image mode="aspectFill" @click="previewImage(item.url, info.files)" v-for="(item, index) in info.files" :key="index" :src="item.url"/>
|
||||||
</div>
|
</div>
|
||||||
<p>{{ info.createTime }}</p>
|
<p>{{ info.createTime }}</p>
|
||||||
<div class="item-bottom">
|
<div class="item-bottom">
|
||||||
<button open-type="share">
|
<button open-type="share">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png"/>
|
||||||
<i>{{ info.sharedCount }}</i>
|
<i>{{ info.sharedCount }}</i>
|
||||||
</button>
|
</button>
|
||||||
<div>
|
<div>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<i>{{ info.appreciateCount }}</i>
|
<i>{{ info.appreciateCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png"/>
|
||||||
<i>{{ info.commentCount }}</i>
|
<i>{{ info.commentCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<h2>评论</h2>
|
<h2>评论</h2>
|
||||||
<div class="comment-wrapper">
|
<div class="comment-wrapper">
|
||||||
<div class="comment-item" v-for="(item, index) in list" :key="index">
|
<div class="comment-item" v-for="(item, index) in list" :key="index">
|
||||||
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>{{ item.createUserName }}</h3>
|
<h3>{{ item.createUserName }}</h3>
|
||||||
<p>{{ item.content }}</p>
|
<p>{{ item.content }}</p>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="replay-list" v-if="item.replyList.length">
|
<div class="replay-list" v-if="item.replyList.length">
|
||||||
<div class="replay-item" v-for="replay in item.replyList" :key="replay.id">
|
<div class="replay-item" v-for="replay in item.replyList" :key="replay.id">
|
||||||
<image :src="replay.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
<image :src="replay.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||||
<div class="replay-item__right">
|
<div class="replay-item__right">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="replay-left">
|
<div class="replay-left">
|
||||||
@@ -93,11 +93,11 @@
|
|||||||
<div class="popup">
|
<div class="popup">
|
||||||
<div class="popup-title">
|
<div class="popup-title">
|
||||||
<h2>请选择</h2>
|
<h2>请选择</h2>
|
||||||
<image @click="isShow = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png" />
|
<image @click="isShow = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="popup-list">
|
<div class="popup-list">
|
||||||
<button open-type="share">
|
<button open-type="share">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-wechat.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-wechat.png"/>
|
||||||
<span>微信</span>
|
<span>微信</span>
|
||||||
</button>
|
</button>
|
||||||
<!-- <button open-type="share">
|
<!-- <button open-type="share">
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<div class="popup">
|
<div class="popup">
|
||||||
<div class="popup-title">
|
<div class="popup-title">
|
||||||
<h2>评论</h2>
|
<h2>评论</h2>
|
||||||
<image @click="isShowComment = false,focus = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png" />
|
<image @click="isShowComment = false,focus = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<textarea :maxlength="100" :cursor-spacing="10" :placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus" v-model="content"></textarea>
|
<textarea :maxlength="100" :cursor-spacing="10" :placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus" v-model="content"></textarea>
|
||||||
@@ -129,11 +129,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapState } from 'vuex'
|
import {mapActions, mapState} from 'vuex'
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: 'Detail',
|
name: 'Detail',
|
||||||
appName: '详情',
|
appName: '详情',
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: '',
|
id: '',
|
||||||
isShow: false,
|
isShow: false,
|
||||||
@@ -155,22 +156,17 @@
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState(['user', 'token'])
|
...mapState(['user', 'token'])
|
||||||
},
|
},
|
||||||
onLoad (query) {
|
onLoad(query) {
|
||||||
this.isFrom = query.isFrom
|
this.isFrom = query.isFrom
|
||||||
this.id = query.id
|
this.id = query.id
|
||||||
this.themeId = query.themeId
|
this.themeId = query.themeId
|
||||||
this.name = query.name || ''
|
this.name = query.name || ''
|
||||||
|
|
||||||
this.$loading()
|
this.$loading();
|
||||||
if (!this.token) {
|
(this.token ? Promise.resolve() : this.autoLogin()).finally(() => Promise.all([
|
||||||
this.autoLogin().then(() => {
|
this.getInfo(query.id),
|
||||||
this.getInfo(query.id)
|
|
||||||
this.getCommontList(query.id)
|
this.getCommontList(query.id)
|
||||||
})
|
])).finally(() => this.$hideLoading())
|
||||||
} else {
|
|
||||||
this.getInfo(query.id)
|
|
||||||
this.getCommontList(query.id)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['autoLogin']),
|
...mapActions(['autoLogin']),
|
||||||
@@ -186,13 +182,13 @@
|
|||||||
}
|
}
|
||||||
this.$linkTo(`/mods/AppNewFarmerBank/taskDetail?id=${this.info.integralTaskId}`)
|
this.$linkTo(`/mods/AppNewFarmerBank/taskDetail?id=${this.info.integralTaskId}`)
|
||||||
},
|
},
|
||||||
previewImage (url, files) {
|
previewImage(url, files) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: url,
|
current: url,
|
||||||
urls: files.map(v => v.url)
|
urls: files.map(v => v.url)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showComment () {
|
showComment() {
|
||||||
if (!this.user.areaId) {
|
if (!this.user.areaId) {
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||||
@@ -215,7 +211,7 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
replay (item) {
|
replay(item) {
|
||||||
if (!this.user.areaId) {
|
if (!this.user.areaId) {
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||||
@@ -239,19 +235,17 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getInfo (id) {
|
getInfo(id) {
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
return this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||||
withoutToken: !this.token,
|
withoutToken: !this.token,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res?.data) {
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
this.pageShow = true
|
this.pageShow = true
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.hideLoading()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
reciate () {
|
reciate() {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -262,7 +256,7 @@
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
send () {
|
send() {
|
||||||
if (!this.content) {
|
if (!this.content) {
|
||||||
return this.$toast('内容不能为空')
|
return this.$toast('内容不能为空')
|
||||||
}
|
}
|
||||||
@@ -292,7 +286,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toTopic (url) {
|
toTopic(url) {
|
||||||
if (this.isFrom === 'topic') {
|
if (this.isFrom === 'topic') {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
@@ -301,11 +295,10 @@
|
|||||||
this.$linkTo(url)
|
this.$linkTo(url)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getCommontList (id) {
|
getCommontList(id) {
|
||||||
if (this.isMore) return
|
if (this.isMore) return
|
||||||
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
return this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
||||||
withoutToken: !this.token,
|
withoutToken: !this.token,
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
@@ -313,40 +306,36 @@
|
|||||||
size: 10
|
size: 10
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res?.data) {
|
||||||
this.$hideLoading()
|
|
||||||
if (this.current > 1) {
|
if (this.current > 1) {
|
||||||
this.list = [...this.list, ...res.data.records]
|
this.list = [...this.list, ...res.data.records]
|
||||||
} else {
|
} else {
|
||||||
this.list = res.data.records
|
this.list = res.data.records
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.data.records.length < 10) {
|
if (res.data.records.length < 10) {
|
||||||
this.isMore = true
|
this.isMore = true
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.current = this.current + 1
|
this.current = this.current + 1
|
||||||
} else {
|
} else {
|
||||||
this.isMore = true
|
this.isMore = true
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).finally(() => {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom () {
|
onReachBottom() {
|
||||||
this.getCommontList()
|
this.getCommontList()
|
||||||
},
|
},
|
||||||
onShareTimeline () {
|
onShareTimeline() {
|
||||||
return {
|
return {
|
||||||
title: this.info.content,
|
title: this.info.content,
|
||||||
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShareAppMessage() {
|
||||||
onShareAppMessage () {
|
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/share?id=${this.id}`).then(res => {
|
this.$instance.post(`/app/appneighborhoodassistance/share?id=${this.id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
uni.$emit('updateList')
|
uni.$emit('updateList')
|
||||||
@@ -358,11 +347,11 @@
|
|||||||
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.Detail {
|
.Detail {
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
padding-bottom: 130px;
|
padding-bottom: 130px;
|
||||||
|
|
||||||
@@ -456,6 +445,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -733,8 +723,10 @@
|
|||||||
font-family: "PingFang SC";
|
font-family: "PingFang SC";
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
width: 160px;
|
width: 160px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@@ -742,6 +734,7 @@
|
|||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
width: calc(100% - 160px);
|
width: calc(100% - 160px);
|
||||||
color: #333;
|
color: #333;
|
||||||
@@ -764,5 +757,5 @@
|
|||||||
right: 32px;
|
right: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="Detail" v-if="pageShow">
|
<div class="Detail" v-if="pageShow">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="item-top">
|
<div class="item-top">
|
||||||
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>{{ info.createUserName }}</h3>
|
<h3>{{ info.createUserName }}</h3>
|
||||||
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
|
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="value">{{ info.integralTaskInfo.type == 1 ? '报名得积分' : '打卡得积分' }}</div>
|
<div class="value">{{ info.integralTaskInfo.type == 1 ? '报名得积分' : '打卡得积分' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-flex">
|
<div class="info-flex">
|
||||||
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/time-icon.png" alt="">{{ info.integralTaskInfo.type == 1 ? '报名时间:' : '进场时间:'}}</div>
|
<div class="label"><img src="https://cdn.cunwuyun.cn/fengdu/time-icon.png" alt="">{{ info.integralTaskInfo.type == 1 ? '报名时间:' : '进场时间:' }}</div>
|
||||||
<div class="value">{{ info.integralTaskInfo.intoBegintime }}至{{ info.integralTaskInfo.intoEndtime }}</div>
|
<div class="value">{{ info.integralTaskInfo.intoBegintime }}至{{ info.integralTaskInfo.intoEndtime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-flex" v-if="info.integralTaskInfo.type != 1">
|
<div class="info-flex" v-if="info.integralTaskInfo.type != 1">
|
||||||
@@ -34,12 +34,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="item-imgs" v-if="info.files && info.files.length">
|
<div class="item-imgs" v-if="info.files && info.files.length">
|
||||||
<image mode="aspectFill" @click="previewImage(item.url, info.files)" v-for="(item, index) in info.files" :key="index" :src="item.url" />
|
<image mode="aspectFill" @click="previewImage(item.url, info.files)" v-for="(item, index) in info.files" :key="index" :src="item.url"/>
|
||||||
</div>
|
</div>
|
||||||
<p>{{ info.createTime }}</p>
|
<p>{{ info.createTime }}</p>
|
||||||
<div class="item-bottom">
|
<div class="item-bottom">
|
||||||
<button open-type="share">
|
<button open-type="share">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-zhuanfa.png"/>
|
||||||
<i>{{ info.sharedCount }}</i>
|
<i>{{ info.sharedCount }}</i>
|
||||||
</button>
|
</button>
|
||||||
<div>
|
<div>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<i>{{ info.appreciateCount }}</i>
|
<i>{{ info.appreciateCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-pinglun.png"/>
|
||||||
<i>{{ info.commentCount }}</i>
|
<i>{{ info.commentCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<h2>评论</h2>
|
<h2>评论</h2>
|
||||||
<div class="comment-wrapper">
|
<div class="comment-wrapper">
|
||||||
<div class="comment-item" v-for="(item, index) in list" :key="index">
|
<div class="comment-item" v-for="(item, index) in list" :key="index">
|
||||||
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
<image :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<h3>{{ item.createUserName }}</h3>
|
<h3>{{ item.createUserName }}</h3>
|
||||||
<p>{{ item.content }}</p>
|
<p>{{ item.content }}</p>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="replay-list" v-if="item.replyList.length">
|
<div class="replay-list" v-if="item.replyList.length">
|
||||||
<div class="replay-item" v-for="replay in item.replyList" :key="replay.id">
|
<div class="replay-item" v-for="replay in item.replyList" :key="replay.id">
|
||||||
<image :src="replay.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
|
<image :src="replay.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'"/>
|
||||||
<div class="replay-item__right">
|
<div class="replay-item__right">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="replay-left">
|
<div class="replay-left">
|
||||||
@@ -93,11 +93,11 @@
|
|||||||
<div class="popup">
|
<div class="popup">
|
||||||
<div class="popup-title">
|
<div class="popup-title">
|
||||||
<h2>请选择</h2>
|
<h2>请选择</h2>
|
||||||
<image @click="isShow = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png" />
|
<image @click="isShow = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="popup-list">
|
<div class="popup-list">
|
||||||
<button open-type="share">
|
<button open-type="share">
|
||||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-wechat.png" />
|
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-wechat.png"/>
|
||||||
<span>微信</span>
|
<span>微信</span>
|
||||||
</button>
|
</button>
|
||||||
<!-- <button open-type="share">
|
<!-- <button open-type="share">
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<div class="popup">
|
<div class="popup">
|
||||||
<div class="popup-title">
|
<div class="popup-title">
|
||||||
<h2>评论</h2>
|
<h2>评论</h2>
|
||||||
<image @click="isShowComment = false, focus = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png" />
|
<image @click="isShowComment = false, focus = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<textarea :maxlength="100" :cursor-spacing="10" :placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus" v-model="content"></textarea>
|
<textarea :maxlength="100" :cursor-spacing="10" :placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus" v-model="content"></textarea>
|
||||||
@@ -129,12 +129,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapState } from 'vuex'
|
import {mapActions, mapState} from 'vuex'
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: 'Detail',
|
name: 'Detail',
|
||||||
appName: '详情',
|
appName: '详情',
|
||||||
|
data() {
|
||||||
data () {
|
|
||||||
return {
|
return {
|
||||||
id: '',
|
id: '',
|
||||||
isShow: false,
|
isShow: false,
|
||||||
@@ -153,32 +153,23 @@
|
|||||||
replyName: ''
|
replyName: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user', 'token'])
|
...mapState(['user', 'token'])
|
||||||
},
|
},
|
||||||
|
onLoad(query) {
|
||||||
onLoad (query) {
|
|
||||||
this.isFrom = query.isFrom
|
this.isFrom = query.isFrom
|
||||||
this.id = query.id
|
this.id = query.id
|
||||||
this.themeId = query.themeId
|
this.themeId = query.themeId
|
||||||
this.name = query.name || ''
|
this.name = query.name || ''
|
||||||
|
|
||||||
this.$loading()
|
this.$loading();
|
||||||
if (!this.token) {
|
(this.token ? Promise.resolve() : this.autoLogin()).finally(() => Promise.all([
|
||||||
this.autoLogin().then(() => {
|
this.getInfo(query.id),
|
||||||
this.getInfo(query.id)
|
|
||||||
this.getCommontList(query.id)
|
this.getCommontList(query.id)
|
||||||
})
|
])).finally(() => this.$hideLoading())
|
||||||
} else {
|
|
||||||
this.getInfo(query.id)
|
|
||||||
this.getCommontList(query.id)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['autoLogin']),
|
...mapActions(['autoLogin']),
|
||||||
|
|
||||||
toTask() {
|
toTask() {
|
||||||
if (!this.user.areaId) {
|
if (!this.user.areaId) {
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
@@ -191,15 +182,13 @@
|
|||||||
}
|
}
|
||||||
this.$linkTo(`/mods/AppNewFarmerBank/taskDetail?id=${this.info.integralTaskId}`)
|
this.$linkTo(`/mods/AppNewFarmerBank/taskDetail?id=${this.info.integralTaskId}`)
|
||||||
},
|
},
|
||||||
|
previewImage(url, files) {
|
||||||
previewImage (url, files) {
|
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: url,
|
current: url,
|
||||||
urls: files.map(v => v.url)
|
urls: files.map(v => v.url)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
showComment() {
|
||||||
showComment () {
|
|
||||||
if (!this.user.areaId) {
|
if (!this.user.areaId) {
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||||
@@ -222,8 +211,7 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
replay(item) {
|
||||||
replay (item) {
|
|
||||||
if (!this.user.areaId) {
|
if (!this.user.areaId) {
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||||
@@ -247,21 +235,17 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getInfo(id) {
|
||||||
getInfo (id) {
|
return this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
|
||||||
withoutToken: !this.token,
|
withoutToken: !this.token,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res?.data) {
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
this.pageShow = true
|
return this.pageShow = true
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.hideLoading()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
reciate() {
|
||||||
reciate () {
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -272,12 +256,10 @@
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
send() {
|
||||||
send () {
|
|
||||||
if (!this.content) {
|
if (!this.content) {
|
||||||
return this.$toast('内容不能为空')
|
return this.$toast('内容不能为空')
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(!this.commentId ? `/app/appneighborhoodassistance/addComment` : `/app/appneighborhoodassistance/addReply`, {
|
this.$instance.post(!this.commentId ? `/app/appneighborhoodassistance/addComment` : `/app/appneighborhoodassistance/addReply`, {
|
||||||
content: this.content,
|
content: this.content,
|
||||||
@@ -285,7 +267,6 @@
|
|||||||
type: this.commentId ? 1 : 0,
|
type: this.commentId ? 1 : 0,
|
||||||
commentId: this.commentId || ''
|
commentId: this.commentId || ''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
uni.hideLoading()
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.isShowComment = false
|
this.isShowComment = false
|
||||||
this.$toast('提交成功')
|
this.$toast('提交成功')
|
||||||
@@ -296,15 +277,13 @@
|
|||||||
|
|
||||||
this.isMore = false
|
this.isMore = false
|
||||||
this.current = 1
|
this.current = 1
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getCommontList(this.id)
|
this.getCommontList(this.id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
toTopic(url) {
|
||||||
toTopic (url) {
|
|
||||||
if (this.isFrom === 'topic') {
|
if (this.isFrom === 'topic') {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
@@ -313,12 +292,10 @@
|
|||||||
this.$linkTo(url)
|
this.$linkTo(url)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getCommontList(id) {
|
||||||
getCommontList (id) {
|
|
||||||
if (this.isMore) return
|
if (this.isMore) return
|
||||||
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
return this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
||||||
withoutToken: !this.token,
|
withoutToken: !this.token,
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
@@ -326,8 +303,7 @@
|
|||||||
size: 10
|
size: 10
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res?.data) {
|
||||||
this.$hideLoading()
|
|
||||||
if (this.current > 1) {
|
if (this.current > 1) {
|
||||||
this.list = [...this.list, ...res.data.records]
|
this.list = [...this.list, ...res.data.records]
|
||||||
} else {
|
} else {
|
||||||
@@ -344,24 +320,19 @@
|
|||||||
} else {
|
} else {
|
||||||
this.isMore = true
|
this.isMore = true
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).finally(() => this.$hideLoading())
|
||||||
this.$hideLoading()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
onReachBottom () {
|
|
||||||
this.getCommontList()
|
this.getCommontList()
|
||||||
},
|
},
|
||||||
|
onShareTimeline() {
|
||||||
onShareTimeline () {
|
|
||||||
return {
|
return {
|
||||||
title: this.info.content,
|
title: this.info.content,
|
||||||
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShareAppMessage() {
|
||||||
onShareAppMessage () {
|
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/share?id=${this.id}`).then(res => {
|
this.$instance.post(`/app/appneighborhoodassistance/share?id=${this.id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
uni.$emit('updateList')
|
uni.$emit('updateList')
|
||||||
@@ -373,11 +344,11 @@
|
|||||||
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
path: `/pages/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.Detail {
|
.Detail {
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
padding-bottom: 130px;
|
padding-bottom: 130px;
|
||||||
|
|
||||||
@@ -471,6 +442,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -748,8 +720,10 @@
|
|||||||
font-family: "PingFang SC";
|
font-family: "PingFang SC";
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
width: 160px;
|
width: 160px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@@ -757,6 +731,7 @@
|
|||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
width: calc(100% - 160px);
|
width: calc(100% - 160px);
|
||||||
color: #333;
|
color: #333;
|
||||||
@@ -779,5 +754,5 @@
|
|||||||
right: 32px;
|
right: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -173,13 +173,11 @@ export default {
|
|||||||
this.id = query.id
|
this.id = query.id
|
||||||
this.themeId = query.themeId
|
this.themeId = query.themeId
|
||||||
this.name = query.name || ''
|
this.name = query.name || ''
|
||||||
this.$loading()
|
this.$loading();
|
||||||
Promise.resolve(this.token || this.autoLogin()).then(() =>
|
(this.token ? Promise.resolve() : this.autoLogin()).finally(() => Promise.all([
|
||||||
Promise.all([
|
|
||||||
this.getInfo(query.id),
|
this.getInfo(query.id),
|
||||||
this.getCommontList(query.id)
|
this.getCommontList(query.id)
|
||||||
])
|
])).finally(() => this.$hideLoading())
|
||||||
).finally(() => this.$hideLoading())
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['autoLogin']),
|
...mapActions(['autoLogin']),
|
||||||
@@ -254,18 +252,15 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getInfo(id) {
|
getInfo(id) {
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
return this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||||
withoutToken: !this.token,
|
withoutToken: !this.token,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res?.data) {
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
this.pageShow = true
|
return this.pageShow = true
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.hideLoading()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
reciate() {
|
reciate() {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
||||||
@@ -323,7 +318,7 @@ export default {
|
|||||||
if (this.isMore) return
|
if (this.isMore) return
|
||||||
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
return this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
||||||
withoutToken: !this.token,
|
withoutToken: !this.token,
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
@@ -331,7 +326,7 @@ export default {
|
|||||||
size: 10
|
size: 10
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res?.data) {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
if (this.current > 1) {
|
if (this.current > 1) {
|
||||||
this.list = [...this.list, ...res.data.records]
|
this.list = [...this.list, ...res.data.records]
|
||||||
@@ -347,7 +342,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.isMore = true
|
this.isMore = true
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).finally(() => {
|
||||||
this.$hideLoading()
|
this.$hideLoading()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -357,12 +352,12 @@ export default {
|
|||||||
this.getCommontList()
|
this.getCommontList()
|
||||||
},
|
},
|
||||||
|
|
||||||
// onShareTimeline() {
|
onShareTimeline() {
|
||||||
// return {
|
return {
|
||||||
// title: this.info.content,
|
title: this.info.content,
|
||||||
// // path: `/mods/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
path: `/mods/AppCircle/Detail?id=${this.id}&themeId=${this.themeId}&name=${this.name}`
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/share?id=${this.id}`).then(res => {
|
this.$instance.post(`/app/appneighborhoodassistance/share?id=${this.id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user