This commit is contained in:
花有清香月有阴
2022-01-07 11:47:56 +08:00
parent a3a53a24a8
commit 519c9139ab
2 changed files with 112 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
<div class="areatop">
<u-form label-width="auto">
<u-form-item label="区域选择" right-icon="arrow-right" :border-bottom="false" class="addresss">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj" :name.sync="areaName"></AiAreaPicker>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj" style="color: #333" :name.sync="areaName"></AiAreaPicker>
</u-form-item>
</u-form>
</div>
@@ -103,6 +103,7 @@ export default {
this.getList()
uni.$on('update', () => {
this.current = 1
this.getList()
})
this.$dict.load('discussStatus')
@@ -134,8 +135,7 @@ export default {
},
change(e) {
console.log(e)
this.areaId = ''
this.areaId = this.user.areaId
this.datas = []
this.current = 1
this.currentTabs = e

View File

@@ -46,6 +46,26 @@
<div v-else-if="data.type == 1" class="comments"></div>
<div class="bottomInput">
<div class="leftInput" @click="showBottomInput = true">我来说两句...</div>
<div class="righticon">
<u-icon name="thumb-up"></u-icon>
<span class="icontext"></span>
</div>
</div>
<u-popup v-model="showBottomInput" height="300px" mode="bottom">
<u-input v-model="content" placeholder="写下你的想法" type="textarea" auto-height height="180" maxlength="200"> </u-input>
<div class="words">字数{{ content.length }}/200</div>
<div class="bottombtn">
<div class="emptys" @click="content = ''">清空内容</div>
<div class="publishs" @click="publish">发表</div>
</div>
</u-popup>
<div class="bottomBar">
<div v-if="data.status < 2" @click="handleComplete">结束公示</div>
</div>
@@ -61,6 +81,8 @@ export default {
data: {},
id: '',
timestamp: '',
showBottomInput: false,
content: '',
}
},
computed: {
@@ -78,31 +100,34 @@ export default {
document.title = '议事详情'
},
methods: {
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
getDetail() {
this.$http.post(`/app/appvillagediscuss/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.data = {
...res.data,
avatar: res.data.createUserName?.substr(0, 2) || '游客',
images: res.data.images,
// images: JSON.parse(res.data.images) || [],
messages: res.data.messages || [],
}
this.data.images = JSON.parse(res.data.images) || []
var discussTime = (new Date(res.data.discussDeadline).getTime() * 1) / 1000
var nowTime = (new Date().getTime() * 1) / 1000
if (discussTime >= nowTime) {
this.timestamp = discussTime - nowTime
}
console.log(res.data.discussDeadline, this.timestamp)
}
})
},
publish() {},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
handleSubmitComment(content) {
if (!!content) {
let { id } = this
@@ -261,5 +286,80 @@ export default {
}
}
}
.bottomInput {
position: fixed;
bottom: 0;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 24px 30px;
box-sizing: border-box;
border-top: 1px solid #eee;
.leftInput {
width: 86%;
height: 58px;
line-height: 58px;
text-align: center;
background: #f0f0f0;
border-radius: 30px;
}
.righticon {
.icontext {
margin-left: 10px;
}
}
}
::v-deep .u-drawer {
.u-drawer-content {
.u-drawer__scroll-view {
.uni-scroll-view {
// overflow: hidden;
overflow: inherit !important;
.u-input {
background: #f7f7f7;
border-radius: 8px 8px 0 0;
margin: 32px 30px 0 30px;
.uni-textarea-placeholder {
padding: 16px 0 0 16px;
}
}
.words {
background: #f7f7f7;
border-radius: 0 0 8px 8px;
margin: 0 30px;
padding-bottom: 10px;
text-align: right;
font-size: 26px;
color: #999999;
}
.bottombtn {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 30px;
padding: 20px 0;
.emptys {
padding: 20px 0;
font-size: 26px;
color: #666666;
}
.publishs {
width: 144px;
height: 64px;
line-height: 64px;
text-align: center;
background: #1365dd;
border-radius: 32px;
color: #fff;
}
}
}
}
}
}
}
</style>