|
@ -1,5 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view> |
|
|
|
|
|
|
|
|
<view class="commemt"> |
|
|
<view class="comment-list"> |
|
|
<view class="comment-list"> |
|
|
<commentItem |
|
|
<commentItem |
|
|
v-for="(item,index) in list" |
|
|
v-for="(item,index) in list" |
|
@ -9,21 +9,59 @@ |
|
|
|
|
|
|
|
|
<view class="submit-box"> |
|
|
<view class="submit-box"> |
|
|
<view class="top"> |
|
|
<view class="top"> |
|
|
<uv-icon |
|
|
|
|
|
color="#00cf05" |
|
|
|
|
|
size="50rpx" |
|
|
|
|
|
name="weixin-fill"></uv-icon> |
|
|
|
|
|
|
|
|
<button |
|
|
|
|
|
class="share" |
|
|
|
|
|
open-type="share"> |
|
|
|
|
|
<uv-icon |
|
|
|
|
|
color="#00cf05" |
|
|
|
|
|
size="50rpx" |
|
|
|
|
|
name="weixin-fill"></uv-icon> |
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
<input type="text" |
|
|
<input type="text" |
|
|
|
|
|
disabled |
|
|
|
|
|
@click="$refs.popup.open('bottom')" |
|
|
:placeholder="'评论给' + params.name" |
|
|
:placeholder="'评论给' + params.name" |
|
|
v-model="form.userValue"/> |
|
|
v-model="form.userValue"/> |
|
|
|
|
|
|
|
|
<view class="submit" |
|
|
|
|
|
|
|
|
<!-- <view class="submit" |
|
|
@click="submit"> |
|
|
@click="submit"> |
|
|
发布 |
|
|
发布 |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> --> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<uv-popup ref="popup" :round="30"> |
|
|
|
|
|
<view class="popup"> |
|
|
|
|
|
<view class="content-input"> |
|
|
|
|
|
<uv-textarea |
|
|
|
|
|
v-model="form.userValue" |
|
|
|
|
|
:maxlength="200" |
|
|
|
|
|
autoHeight |
|
|
|
|
|
count |
|
|
|
|
|
focus |
|
|
|
|
|
:placeholder="'评论给' + params.name"></uv-textarea> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="images box"> |
|
|
|
|
|
<uv-upload |
|
|
|
|
|
:fileList="fileList" |
|
|
|
|
|
:maxCount="imageMax" |
|
|
|
|
|
multiple |
|
|
|
|
|
width="150rpx" |
|
|
|
|
|
height="150rpx" |
|
|
|
|
|
@delete="deleteImage" |
|
|
|
|
|
@afterRead="afterRead" |
|
|
|
|
|
:previewFullImage="true"></uv-upload> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="uni-color-btn" |
|
|
|
|
|
@click="submit"> |
|
|
|
|
|
发布 |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uv-popup> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -37,6 +75,8 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
form : {}, |
|
|
form : {}, |
|
|
|
|
|
imageMax : 9, |
|
|
|
|
|
fileList : [], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -55,13 +95,12 @@ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// this.form.image = this.fileList.map((item) => item.url).join(",") |
|
|
|
|
|
// this.form.orderId = this.params.orderId |
|
|
|
|
|
// this.form.type = this.params.type |
|
|
|
|
|
|
|
|
data.userImage = this.fileList.map((item) => item.url).join(",") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$api('addComment', data, res => { |
|
|
this.$api('addComment', data, res => { |
|
|
if(res.code == 200){ |
|
|
if(res.code == 200){ |
|
|
|
|
|
this.$refs.popup.close() |
|
|
this.form.userValue = '' |
|
|
this.form.userValue = '' |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '发布成功!', |
|
|
title: '发布成功!', |
|
@ -71,11 +110,28 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
deleteImage(e){ |
|
|
|
|
|
this.fileList.splice(e.index, 1) |
|
|
|
|
|
}, |
|
|
|
|
|
afterRead(e){ |
|
|
|
|
|
let self = this |
|
|
|
|
|
e.file.forEach(file => { |
|
|
|
|
|
self.$Oss.ossUpload(file.url).then(url => { |
|
|
|
|
|
self.fileList.push({ |
|
|
|
|
|
url |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
|
|
|
.commemt{ |
|
|
|
|
|
padding-bottom: env(safe-area-inset-bottom); |
|
|
|
|
|
} |
|
|
.comment-list { |
|
|
.comment-list { |
|
|
margin-top: 20rpx; |
|
|
margin-top: 20rpx; |
|
|
padding-bottom: 150rpx; |
|
|
padding-bottom: 150rpx; |
|
@ -108,4 +164,18 @@ |
|
|
.submit {} |
|
|
.submit {} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
.popup{ |
|
|
|
|
|
.content-input{ |
|
|
|
|
|
min-height: 400rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.box{ |
|
|
|
|
|
padding: 0 20rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.images{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
padding: 20rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |