Commit b26f2218 authored by yuwenwen's avatar yuwenwen

修改部分BUG,修改登录背景图

parent ae2aba8a
...@@ -87,13 +87,15 @@ export default { ...@@ -87,13 +87,15 @@ export default {
watch: { watch: {
value: { value: {
handler(val) { handler(val) {
debugger
if (val) { if (val) {
// 首先将值转为数组 // 首先将值转为数组
const list = Array.isArray(val) ? val : this.value.split(','); const list = Array.isArray(val) ? val : this.value.split(',');
// 然后将数组转为对象数组 // 然后将数组转为对象数组
this.fileList = list.map(item => { this.fileList = list.map(item => {
debugger
if (typeof item === "string") { if (typeof item === "string") {
if (item.indexOf(this.baseUrl) === -1) { if (item.indexOf('http') === -1) {
item = { name: this.baseUrl + item, url: this.baseUrl + item }; item = { name: this.baseUrl + item, url: this.baseUrl + item };
} else { } else {
item = { name: item, url: item }; item = { name: item, url: item };
...@@ -154,6 +156,8 @@ export default { ...@@ -154,6 +156,8 @@ export default {
}, },
// 上传成功回调 // 上传成功回调
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
console.log(res, file)
debugger
if (res.code === 200) { if (res.code === 200) {
this.uploadList.push({ name: res.fileName, url: res.url }); this.uploadList.push({ name: res.fileName, url: res.url });
this.uploadedSuccessfully(); this.uploadedSuccessfully();
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.login { .login {
display: flex; display: flex;
justify-content: center; justify-content: flex-end;
align-items: center; align-items: center;
height: 100%; height: 100%;
background-image: url("../assets/images/login-background.jpg"); background-image: url("../assets/images/login-background.jpg");
...@@ -175,6 +175,7 @@ export default { ...@@ -175,6 +175,7 @@ export default {
background: #ffffff; background: #ffffff;
width: 400px; width: 400px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
margin-right: 240px;
.el-input { .el-input {
height: 38px; height: 38px;
input { input {
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<div class="text">{{ form.content }}</div> <div class="text">{{ form.content }}</div>
<div class="imgs" v-if="form.attachments && form.attachments.length > 0"> <div class="imgs" v-if="form.attachments && form.attachments.length > 0">
<template v-for="(item, index) in form.attachments"> <template v-for="(item, index) in form.attachments">
<img class="item" :src="item.url"></img> <el-image class="item" :src="item.url" :preview-src-list="[item.url]"></el-image>
<!-- <img class="item" :src="item.url"></img> -->
</template> </template>
</div> </div>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-input placeholder="请输入" v-model="queryParams.content" style="width: 220px;"></el-input> <el-input placeholder="请输入" v-model="queryParams.content" style="width: 220px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker placeholder="请选择" value-format="YYYY-MM-DD" <el-date-picker placeholder="请选择" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
v-model="queryParams.createTime"></el-date-picker> v-model="queryParams.createTime"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
......
<template> <template>
<el-dialog :visible.sync="visible" title="兑换明细" width="70%"> <el-dialog :visible.sync="visible" title="积分明细" width="70%">
<el-table :data="tableList" v-loading="loading"> <el-table :data="tableList" v-loading="loading">
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column> <el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column label="明细名称" prop="detailName" align="center" width="150"></el-table-column> <el-table-column label="明细名称" prop="detailName" align="center" width="150"></el-table-column>
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
inputPattern: /^[1-9]\d*$/, inputPattern: /^[1-9]\d*$/,
inputErrorMessage: '增加积分需大于0' inputErrorMessage: '增加积分需为大于0的正整数'
}).then(({ value }) => { }).then(({ value }) => {
let data = { let data = {
userName: row.userName, userName: row.userName,
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
inputPattern: /^[1-9]\d*$/, inputPattern: /^[1-9]\d*$/,
inputErrorMessage: '扣减积分需大于0' inputErrorMessage: '扣减积分需为大于0的正整数'
}).then(({ value }) => { }).then(({ value }) => {
let data = { let data = {
userName: row.userName, userName: row.userName,
......
<template> <template>
<el-dialog :visible.sync="visible" v-if="visible" :title="dialogTitle" width="28%" class="dialog" @close="handleClose"> <el-dialog :visible.sync="visible" v-if="visible" :title="dialogTitle" width="28%" class="dialog" @close="handleClose">
<el-form :model="form" ref="formRef" :rules="rules"> <el-form :model="form" ref="formRef" :rules="rules" @submit.native.prevent>
<el-form-item label="敏感词" prop="name"> <el-form-item label="敏感词" prop="name">
<el-input placeholder="请输入" v-model="form.name"></el-input> <el-input placeholder="请输入" v-model="form.name"></el-input>
</el-form-item> </el-form-item>
......
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="page-container"> <div class="page-container">
<el-form :model="queryParams" :inline="true" label-width="90"> <el-form :model="queryParams" :inline="true" label-width="90" @submit.native.prevent>
<el-form-item label="敏感词"> <el-form-item label="敏感词">
<el-input v-model="queryParams.name" placeholder="请输入"></el-input> <el-input v-model="queryParams.name" placeholder="请输入" @keyup.enter.native="handleQuery"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button> <el-button type="primary" @click="handleQuery">查询</el-button>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-button type="primary" @click="handleAdd">新增敏感词</el-button> <el-button type="primary" @click="handleAdd">新增敏感词</el-button>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-button type="primary" plain>批量导入敏感词</el-button> <el-button type="primary" plain @click="handleImport">批量导入敏感词</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="tableList"> <el-table :data="tableList">
...@@ -101,7 +101,11 @@ export default { ...@@ -101,7 +101,11 @@ export default {
pageSize: 10 pageSize: 10
} }
this.getList() this.getList()
} },
// 导入敏感词
handleImport(){
},
} }
} }
</script> </script>
......
...@@ -146,4 +146,12 @@ export function delComment(commentId){ ...@@ -146,4 +146,12 @@ export function delComment(commentId){
url:`moment/comment/delete/${commentId}`, url:`moment/comment/delete/${commentId}`,
method:'delete' method:'delete'
}) })
}
// 删除动态
export function delMonment(momentId){
return request({
url:`moment/delete/${momentId}`,
method:'delete'
})
} }
\ No newline at end of file
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<view class="item" v-if="form.isSelf==1" :class="{'active':activeIndex==1}" @click="handleChange(1)">管理全部评论 <view class="item" v-if="form.isSelf==1" :class="{'active':activeIndex==1}" @click="handleChange(1)">管理全部评论
</view> </view>
</view> </view>
<view class="empty-box" v-if="list.length == 0"> <view class="empty-box" v-if="commentList.length == 0">
<image src="/static/images/empty.png" class="icon"></image> <image src="/static/images/empty.png" class="icon"></image>
<view class="text">期待您的经常评论~</view> <view class="text">期待您的经常评论~</view>
</view> </view>
<view class="comment-display-box" v-else> <view class="comment-display-box" v-else>
<view class="comment-item" v-for="(item,index) in list"> <view class="comment-item" v-for="(item,index) in commentList">
<view class="user-info"> <view class="user-info">
<view class="username">{{item.nickName}}</view> <view class="username">{{item.nickName}}</view>
<view class="datetime">{{item.createTime}}</view> <view class="datetime">{{item.createTime}}</view>
...@@ -23,12 +23,15 @@ ...@@ -23,12 +23,15 @@
<view class="operation-text"> <view class="operation-text">
<view class="add-text" v-if="form.isSelf==1&&activeIndex==1 &&item.isFeatured==0" <view class="add-text" v-if="form.isSelf==1&&activeIndex==1 &&item.isFeatured==0"
@click="handleFeatured(item)">加入精选</view> @click="handleFeatured(item)">加入精选</view>
<view v-if="form.isSelf==1&&activeIndex==1 &&item.isFeatured==1" <view v-if="form.isSelf==1&&activeIndex==1 &&item.isFeatured==1" @click="handleFeatured(item)">
@click="handleFeatured(item)">取消精选</view> 取消精选</view>
<view v-if="form.isSelf==1&&activeIndex==1" @click="handleDelete(item)">删除</view> <view v-if="form.isSelf==1&&activeIndex==1" @click="handleDelete(item)">删除</view>
</view> </view>
</view> </view>
</view>
<view class="show-more-box" v-if="commentList.length < total" @click="loadMore">
加载更多
<image src="/static/images/down.png" class="icon"></image>
</view> </view>
</view> </view>
...@@ -41,26 +44,27 @@ ...@@ -41,26 +44,27 @@
import PublishComment from './PublishComment.vue'; import PublishComment from './PublishComment.vue';
import { import {
commentFeatured, commentFeatured,
delComment delComment,
dynamicDetailComments
} from '@/api/api.js' } from '@/api/api.js'
export default { export default {
name: "Comment-Item", name: "Comment-Item",
data() { data() {
return { return {
commentList: [], commentList: [],
activeIndex: 0 activeIndex: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
momentId: ''
},
total:0
}; };
}, },
components: { components: {
PublishComment PublishComment
}, },
props: { props: {
list: {
type: Object,
default: () => {
return []
}
},
form: { form: {
type: Object, type: Object,
default: () => { default: () => {
...@@ -68,39 +72,60 @@ ...@@ -68,39 +72,60 @@
} }
} }
}, },
watch: {
form(newVal, oldVal){
console.log(newVal, oldVal)
if(newVal.id){
this.queryParams.momentId = newVal.id;
this.getCommentList()
}
}
},
onLoad() {
},
methods: { methods: {
handleChange(index) { handleChange(index) {
this.activeIndex = index this.activeIndex = index
}, },
handleRefresh() { handleRefresh() {
console.log('222') this.queryParams.pageNum = 1;
this.$emit('refresh') this.getCommentList()
},
getCommentList() {
dynamicDetailComments(this.queryParams).then(res => {
this.commentList = [...this.commentList,...res.rows]
this.total = res.total
})
},
loadMore(){
this.queryParams.pageNum += 1;
this.getCommentList()
}, },
// 回复评论 // 回复评论
handleReplayComment(item) { handleReplayComment(item) {
this.$refs.publishCommentRef.openModal(item) this.$refs.publishCommentRef.openModal(item)
}, },
// 加入精选,取消精选 // 加入精选,取消精选
handleFeatured(item){ handleFeatured(item) {
let _this = this; let _this = this;
let text = item.isFeatured==1?'取消精选':'加入精选' let text = item.isFeatured == 1 ? '取消精选' : '加入精选'
let data = { let data = {
momentId:this.form.id, momentId: this.form.id,
commentId:item.id, commentId: item.id,
featuredStatus:item.isFeatured==1?0:1 featuredStatus: item.isFeatured == 1 ? 0 : 1
} }
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: `是否将评论:${item.content}${text}`, content: `是否将评论:${item.content}${text}`,
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
commentFeatured(data).then(res=>{ commentFeatured(data).then(res => {
if(res.code == 200){ if (res.code == 200) {
uni.showToast({ uni.showToast({
title:`${text}成功` title: `${text}成功`
}) })
_this.$emit('refresh') _this.getCommentList()
} }
}) })
} else if (res.cancel) { } else if (res.cancel) {
...@@ -109,19 +134,19 @@ ...@@ -109,19 +134,19 @@
} }
}); });
}, },
handleDelete(item){ handleDelete(item) {
let _this = this; let _this = this;
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: `是否确认删除评论:${item.content}?`, content: `是否确认删除评论:${item.content}?`,
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
delComment(item.id).then(res=>{ delComment(item.id).then(res => {
if(res.code == 200){ if (res.code == 200) {
uni.showToast({ uni.showToast({
title:`删除成功` title: `删除成功`
}) })
_this.$emit('refresh') _this.getCommentList()
} }
}) })
} else if (res.cancel) { } else if (res.cancel) {
...@@ -231,4 +256,17 @@ ...@@ -231,4 +256,17 @@
} }
} }
} }
</style>
.show-more-box{
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
color: #BBBBBB;
font-size: 24rpx;
.icon{
width: 32rpx;
height: 32rpx;
}
}
</style>
\ No newline at end of file
<template> <template>
<view> <view>
<view class="dynamic-item" @click="toDynamicDetailPage"> <view class="dynamic-item" @click="toDynamicDetailPage">
<view class="user-info-box"> <view class="user-info-box" style="position: relative;">
<image class="avatar" src="/static/images/default-avatar.png"></image> <image class="avatar" src="/static/images/default-avatar.png"></image>
<view class="user-name">{{form.nickName}}</view> <view class="user-name">{{form.nickName}}</view>
<image class="more-icon" src="/static/images/more-icon.png"></image> <image v-if="!deleteable" class="more-icon" src="/static/images/more-icon.png"></image>
<image v-if="deleteable" class="more-icon" @click.stop="handleDelDynamics"
src="/static/images/more-icon.png"></image>
<!-- 删除按钮 -->
<view class="del-btn" v-if="showDelBtn" @click.stop="handleDel" :style="'left:' + clientX + 'rpx;' +'top:' + clientY + 'rpx'">
删除动态</view>
</view> </view>
<view class="topics-box" v-if="form.topicNames && form.topicNames.length >0"> <view class="topics-box" v-if="form.topicNames && form.topicNames.length >0">
<template v-for="(name,index) in form.topicNames"> <template v-for="(name,index) in form.topicNames">
...@@ -15,7 +20,7 @@ ...@@ -15,7 +20,7 @@
<view class="text">{{form.content}}</view> <view class="text">{{form.content}}</view>
<view class="imgs" v-if="form.type=='IMAGE'&&form.attachments && form.attachments.length > 0"> <view class="imgs" v-if="form.type=='IMAGE'&&form.attachments && form.attachments.length > 0">
<template v-for="(item,index) in form.attachments"> <template v-for="(item,index) in form.attachments">
<image class="item" :src="item.url"></image> <image class="item" :src="item.url" @click.stop="preview(item.url)"></image>
</template> </template>
</view> </view>
<view class="imgs" v-if="form.type=='VIDEO'&&form.attachments && form.attachments.length > 0"> <view class="imgs" v-if="form.type=='VIDEO'&&form.attachments && form.attachments.length > 0">
...@@ -46,33 +51,41 @@ ...@@ -46,33 +51,41 @@
</view> </view>
<view class="pk-imgs" v-if="form.voteOptionType=='IMAGE' && form.voteOptions.length>0 "> <view class="pk-imgs" v-if="form.voteOptionType=='IMAGE' && form.voteOptions.length>0 ">
<template v-for="(item,index) in form.voteOptions"> <template v-for="(item,index) in form.voteOptions">
<image :src="item.imageUrl" class="img"></image> <image :src="item.imageUrl" @click.stop="preview(item.imageUrl)" class="img"></image>
</template> </template>
</view> </view>
<!-- 未投票 --> <!-- 未投票 -->
<view v-if="form.isVote==0"> <view v-if="form.isVote==0">
<view class="pk-btns" v-if="form.voteOptions.length>0 "> <view class="pk-btns" v-if="form.voteOptions.length>0 ">
<view class="btns red-btn" @click.stop="handleVote(form.voteOptions[0])"> <view class="btns red-btn" @click.stop="handleVote(form.voteOptions[0])">
{{form.voteOptions[0].name}}</view> {{form.voteOptions[0].name}}
</view>
<image src="/static/images/pk-img.png" class="img"></image> <image src="/static/images/pk-img.png" class="img"></image>
<view class="btns blue-btn" @click.stop="handleVote(form.voteOptions[1])"> <view class="btns blue-btn" @click.stop="handleVote(form.voteOptions[1])">
{{form.voteOptions[1].name}}</view> {{form.voteOptions[1].name}}
</view>
</view> </view>
<view class="pk-tips">点击上方按钮,选择你的观点</view> <view class="pk-tips">点击上方按钮,选择你的观点</view>
</view> </view>
<!-- 已投票,显示投票结果 --> <!-- 已投票,显示投票结果 -->
<view v-if="form.isVote==1" > <view v-if="form.isVote==1">
<view class="pk-results" > <view class="pk-results">
<view class="left" @click.stop="toPKDetailPage(0)"> <view class="left" @click.stop="toPKDetailPage(0)">
<view class="left-num">{{form.voteOptions[0].name}} {{form.voteOptions[0].voteCount}}</view> <view class="left-num">{{form.voteOptions[0].name}} {{form.voteOptions[0].voteCount}}</view>
<view class="results-item left-item"></view>
</view> </view>
<view class="right" @click.stop="toPKDetailPage(1)"> <view class="right" @click.stop="toPKDetailPage(1)">
<view class="right-num" >{{form.voteOptions[1].name}} {{form.voteOptions[1].voteCount}}</view> <view class="right-num">{{form.voteOptions[1].name}} {{form.voteOptions[1].voteCount}}
</view>
</view>
</view>
<view class="pk-results">
<view class="left" :style="'flex:' + form.voteOptions[0].voteCount" @click.stop="toPKDetailPage(0)">
<view class="results-item left-item"></view>
</view>
<view class="right" :style="'flex:' + form.voteOptions[1].voteCount" @click.stop="toPKDetailPage(1)">
<view class="results-item right-item"></view> <view class="results-item right-item"></view>
</view> </view>
</view> </view>
<view class="results-sum" @click.stop="toPKDetailPage(0)"> <view class="results-sum" @click.stop="toPKDetailPage(0)">
<view>{{form.voteCount}}人参与</view> <view>{{form.voteCount}}人参与</view>
<image src="/static/images/detail-icon.png" class="icon"></image> <image src="/static/images/detail-icon.png" class="icon"></image>
...@@ -87,7 +100,8 @@ ...@@ -87,7 +100,8 @@
<view class="username">{{item.nickName}}:</view> <view class="username">{{item.nickName}}:</view>
<view class="datetime">2025-07-01 04:21:21</view> <view class="datetime">2025-07-01 04:21:21</view>
</view> </view>
<view class="content" v-if="!item.replyNikeName" @click.stop="handleReplayComment(item)">{{item.content}}</view> <view class="content" v-if="!item.replyNikeName" @click.stop="handleReplayComment(item)">
{{item.content}}</view>
<view class="content" v-else @click.stop="handleReplayComment(item)"> <view class="content" v-else @click.stop="handleReplayComment(item)">
回复<span style="color: #0058B6;">{{item.replyNikeName}}:</span>:{{item.content}} 回复<span style="color: #0058B6;">{{item.replyNikeName}}:</span>:{{item.content}}
</view> </view>
...@@ -98,13 +112,15 @@ ...@@ -98,13 +112,15 @@
</view> </view>
<!-- 发布评论区 --> <!-- 发布评论区 -->
<publish-comment :form="form" ref="publishCommentRef" @refresh="$emit('refresh')"></publish-comment> <publish-comment :form="form" ref="publishCommentRef" @refresh="$emit('refresh')"></publish-comment>
</view> </view>
</template> </template>
<script> <script>
import { import {
dynamicLikeUnlike, dynamicLikeUnlike,
delMonment,
dynamicVote dynamicVote
} from '@/api/api.js' } from '@/api/api.js'
import PublishComment from './PublishComment.vue'; import PublishComment from './PublishComment.vue';
...@@ -115,15 +131,22 @@ ...@@ -115,15 +131,22 @@
commentList: [{}, {}], commentList: [{}, {}],
showComment: false, showComment: false,
commentContent: '', commentContent: '',
clientX: 0,
clientY: 0,
showDelBtn: false
}; };
}, },
components:{ components: {
PublishComment PublishComment
}, },
props: { props: {
form: { form: {
type: Object, type: Object,
default: {} default: {}
},
deleteable: {
type: Boolean,
default: false
} }
}, },
methods: { methods: {
...@@ -133,9 +156,17 @@ ...@@ -133,9 +156,17 @@
momentId: this.form.id, momentId: this.form.id,
likeStatus likeStatus
} }
if(likeStatus == '1'){
this.form.likeCount = this.form.likeCount + 1
this.form.isLike = 1
}
if(likeStatus == '0'){
this.form.likeCount = this.form.likeCount - 1
this.form.isLike = 0
}
dynamicLikeUnlike(data).then(res => { dynamicLikeUnlike(data).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$emit('refresh') // this.$emit('refresh')
} }
}) })
...@@ -146,11 +177,39 @@ ...@@ -146,11 +177,39 @@
this.$refs.publishCommentRef.openModal() this.$refs.publishCommentRef.openModal()
}, },
// 回复评论 // 回复评论
handleReplayComment(item){ handleReplayComment(item) {
console.log(item) console.log(item)
this.$refs.publishCommentRef.openModal(item) this.$refs.publishCommentRef.openModal(item)
}, },
// 展示删除动态按钮
handleDelDynamics(e) {
this.showDelBtn = !this.showDelBtn
this.clientX = (e.target.offsetLeft * 2 - 148);
this.clientY = ((e.target.offsetTop * 2) + 34);
},
// 删除动态
handleDel(){
let _this = this;
uni.showModal({
title: '提示',
content: '是否确认删除动态?',
success: function (res) {
if (res.confirm) {
delMonment(_this.form.id).then(res=>{
if(res.code == 200){
uni.showToast({
title:'删除成功',
})
_this.$emit('refresh');
uni.$emit('hanldeDynamicRefresh')
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
// 投票 // 投票
handleVote(item) { handleVote(item) {
let data = { let data = {
...@@ -167,9 +226,15 @@ ...@@ -167,9 +226,15 @@
} }
}) })
}, },
// 预览
preview(url) {
uni.previewImage({
urls: [url]
});
},
toDynamicDetailPage() { toDynamicDetailPage() {
let pathName = window.location.pathname let pathName = window.location.pathname
if(pathName.indexOf('/pages/dynamic-detail/dynamic-detail') > -1){ if (pathName.indexOf('/pages/dynamic-detail/dynamic-detail') > -1) {
return; return;
} }
uni.navigateTo({ uni.navigateTo({
...@@ -195,4 +260,17 @@ ...@@ -195,4 +260,17 @@
<style lang="scss"> <style lang="scss">
@import '@/static/styles/index.scss'; @import '@/static/styles/index.scss';
</style>
.del-btn {
position: absolute;
width: 168rpx;
height: 68rpx;
line-height: 68rpx;
border-radius: 6rpx;
background-color: rgba(255, 255, 255, 1);
color: rgba(102, 102, 102, 1);
font-size: 26rpx;
text-align: center;
box-shadow: 0px 2px 12rpx 0px rgba(0, 0, 0, 0.2);
}
</style>
\ No newline at end of file
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
width: 20px; width: 20px;
height: 20px; height: 20px;
border-radius: 100%; border-radius: 100%;
z-index: 999; z-index: 900;
} }
} }
......
<template> <template>
<view class="comment-dialog-shadow" v-if="showComment"> <view class="comment-dialog-shadow" v-if="showComment">
<view class="comment-edit-box"> <view class="comment-edit-box">
<textarea v-model="commentContent" :placeholder="placeholder" class="textarea"></textarea> <textarea v-model="commentContent" maxlength="120" :placeholder="placeholder" class="textarea"></textarea>
<view class="btns"> <view class="btns">
<button class="btn" size="mini" @click="handleCloseComment">取消</button> <button class="btn" size="mini" @click="handleCloseComment">取消</button>
<button class="btn" size="mini" type="primary" @click="handlePublishComment">确定</button> <button class="btn" size="mini" type="primary" @click="handlePublishComment">确定</button>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
return { return {
showComment:false, showComment:false,
commentContent:'', commentContent:'',
placeholder:'请输入评论', placeholder:'请输入评论(最多输入120字)',
parentId:'', parentId:'',
}; };
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="detail-page-container"> <view class="detail-page-container">
<dynamic-item :form="form" @refresh="handleRefresh"></dynamic-item> <dynamic-item :form="form" @refresh="handleRefresh"></dynamic-item>
<!-- 评论管理区 --> <!-- 评论管理区 -->
<comment-item :list="commentList" :form="form" @refresh="getCommentList"></comment-item> <comment-item :form="form" ></comment-item>
</view> </view>
</template> </template>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
this.momentId = momentId; this.momentId = momentId;
this.queryParams.momentId = momentId this.queryParams.momentId = momentId
this.getDetail() this.getDetail()
this.getCommentList() // this.getCommentList()
}, },
components: { components: {
DynamicItem, DynamicItem,
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<!-- 我发的动态 --> <!-- 我发的动态 -->
<scroll-view class="my-dynamics" scroll-y :show-scrollbar="false" v-if="list.length >0" @scrolltolower="loadMore"> <scroll-view class="my-dynamics" scroll-y :show-scrollbar="false" v-if="list.length >0" @scrolltolower="loadMore">
<template v-for="(item,index) in list"> <template v-for="(item,index) in list">
<dynamic-item :form="item" @refresh="getList"></dynamic-item> <dynamic-item :form="item" @refresh="handleRefresh" :deleteable="true"></dynamic-item>
</template> </template>
</scroll-view> </scroll-view>
<scroll-view class="my-dynamics" scroll-y :show-scrollbar="false" v-if="list.length==0"> <scroll-view class="my-dynamics" scroll-y :show-scrollbar="false" v-if="list.length==0">
...@@ -72,6 +72,8 @@ ...@@ -72,6 +72,8 @@
}, },
onShow() { onShow() {
this.getStatistics(); this.getStatistics();
this.list = [];
this.queryParams.pageNum = 1;
this.getList() this.getList()
}, },
methods: { methods: {
...@@ -88,6 +90,12 @@ ...@@ -88,6 +90,12 @@
this.analysisData = res.data this.analysisData = res.data
}) })
}, },
handleRefresh(){
this.getStatistics();
this.list = [];
this.queryParams.pageNum = 1;
this.getList()
},
// 获取当前用户动态列表 // 获取当前用户动态列表
getList() { getList() {
uni.showLoading({ uni.showLoading({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="page-container topics-page"> <view class="page-container topics-page">
<view class="search-box-common"> <view class="search-box-common">
<image src="/static/images/search-icon.png" class="search-icon"></image> <image src="/static/images/search-icon.png" class="search-icon"></image>
<input placeholder="搜索" placeholder-class="placeholder-class" /> <input placeholder="搜索" style="width: 100%;" placeholder-class="placeholder-class" />
</view> </view>
<view class="hot-container"> <view class="hot-container">
<view class="hot-tag-box"> <view class="hot-tag-box">
......
...@@ -193,7 +193,6 @@ ...@@ -193,7 +193,6 @@
.results-item{ .results-item{
width: 100%; width: 100%;
height: 12rpx; height: 12rpx;
background-color: rgba(238, 238, 238, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 28rpx; font-size: 28rpx;
...@@ -201,10 +200,12 @@ ...@@ -201,10 +200,12 @@
.left-item{ .left-item{
border-radius: 6rpx 0 0 6rpx; border-radius: 6rpx 0 0 6rpx;
margin-right: 10rpx; margin-right: 10rpx;
background-color: rgba(255, 100, 95, 1);
} }
.right-item{ .right-item{
border-radius: 0 6rpx 6rpx 0; border-radius: 0 6rpx 6rpx 0;
margin-left: 10rpx; margin-left: 10rpx;
background-color: rgba(52, 132, 253, 1);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment