优化代码,并去掉分享朋友圈
This commit is contained in:
@@ -7,7 +7,9 @@
|
|||||||
<h3>{{ info.createUserName }}</h3>
|
<h3>{{ info.createUserName }}</h3>
|
||||||
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
|
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-btn" v-if="info.integralTaskId && info.integralTaskInfo.status != 2 && info.showSignBtn" @click="toTask">去参与</div>
|
<div class="top-btn" v-if="info.integralTaskId && info.integralTaskInfo.status != 2 && info.showSignBtn"
|
||||||
|
@click="toTask">去参与
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
<span v-if="name" @click="toTopic('./TopicDetail?themeId=' + themeId + '&name=' + name)">#【{{ name }}】</span>
|
<span v-if="name" @click="toTopic('./TopicDetail?themeId=' + themeId + '&name=' + name)">#【{{ name }}】</span>
|
||||||
@@ -24,7 +26,9 @@
|
|||||||
<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,7 +38,8 @@
|
|||||||
|
|
||||||
</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">
|
||||||
@@ -43,7 +48,9 @@
|
|||||||
<i>{{ info.sharedCount }}</i>
|
<i>{{ info.sharedCount }}</i>
|
||||||
</button>
|
</button>
|
||||||
<div>
|
<div>
|
||||||
<image :src="info.appreciateStatus ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png'" @click="reciate"/>
|
<image
|
||||||
|
:src="info.appreciateStatus ? 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan-active.png' : 'https://cdn.cunwuyun.cn/wxmp/fengdu/zan.png'"
|
||||||
|
@click="reciate"/>
|
||||||
<i>{{ info.appreciateCount }}</i>
|
<i>{{ info.appreciateCount }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -118,7 +125,9 @@
|
|||||||
<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>
|
||||||
<div>
|
<div>
|
||||||
<div class="send-btn" hover-class="hover-class" @click="send">发送</div>
|
<div class="send-btn" hover-class="hover-class" @click="send">发送</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,6 +139,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapActions, mapState} from 'vuex'
|
import {mapActions, mapState} from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Detail',
|
name: 'Detail',
|
||||||
appName: '详情',
|
appName: '详情',
|
||||||
@@ -163,19 +173,14 @@
|
|||||||
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) {
|
Promise.resolve(this.token || this.autoLogin()).then(() =>
|
||||||
this.autoLogin().then(() => {
|
Promise.all([
|
||||||
this.getInfo(query.id)
|
this.getInfo(query.id),
|
||||||
this.getCommontList(query.id)
|
this.getCommontList(query.id)
|
||||||
})
|
])
|
||||||
} else {
|
).finally(() => this.$hideLoading())
|
||||||
this.getInfo(query.id)
|
|
||||||
this.getCommontList(query.id)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['autoLogin']),
|
...mapActions(['autoLogin']),
|
||||||
|
|
||||||
@@ -250,7 +255,7 @@
|
|||||||
|
|
||||||
getInfo(id) {
|
getInfo(id) {
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||||
withoutToken: this.token ? false : true,
|
withoutToken: !this.token,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
@@ -319,7 +324,7 @@
|
|||||||
|
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
||||||
withoutToken: this.token ? false : true,
|
withoutToken: !this.token,
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
current: this.current,
|
current: this.current,
|
||||||
@@ -333,14 +338,12 @@
|
|||||||
} 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 = this.current + 1
|
|
||||||
} else {
|
} else {
|
||||||
this.isMore = true
|
this.isMore = true
|
||||||
}
|
}
|
||||||
@@ -354,12 +357,12 @@
|
|||||||
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) {
|
||||||
@@ -472,6 +475,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -749,8 +753,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;
|
||||||
@@ -758,6 +764,7 @@
|
|||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
width: calc(100% - 160px);
|
width: calc(100% - 160px);
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|||||||
Reference in New Issue
Block a user