提交 c809a13c 编写于 作者: 0 052004122温宸杰

后台管理系统优化

上级 6528040b
......@@ -5,19 +5,25 @@
<uni-easyinput placeholder="帖子内容" v-model="formData.content"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="date" label="发布时间">
<uni-easyinput placeholder="帖子发布时间" v-model="formData.date"></uni-easyinput>
<!-- <uni-easyinput placeholder="帖子发布时间" v-model="formData.date"></uni-easyinput> -->
<uni-datetime-picker
type="datetime"
v-model="formData.date"
/>
</uni-forms-item>
<uni-forms-item name="likes" label="点赞数">
<uni-easyinput placeholder="帖子点赞数" type="number" v-model="formData.likes"></uni-easyinput>
<!-- <uni-easyinput placeholder="帖子点赞数" type="number" v-model="formData.likes"></uni-easyinput> -->
<uni-number-box :value="0" :step="1" max="100000" value="100000" v-model="formData.likes" />
</uni-forms-item>
<uni-forms-item name="owner_id" label="发帖人id">
<uni-easyinput placeholder="发帖人id" v-model="formData.owner_id"></uni-easyinput>
<uni-easyinput placeholder="发帖人id" v-model="formData.owner_id" disabled></uni-easyinput>
</uni-forms-item>
<!-- <uni-forms-item name="check_status" label="审核状态">
<switch @change="binddata('check_status', $event.detail.value)" :checked="formData.check_status"></switch>
</uni-forms-item> -->
<uni-forms-item name="comment_num" label="评论数">
<uni-easyinput placeholder="帖子评论数" type="number" v-model="formData.comment_num"></uni-easyinput>
<!-- <uni-easyinput placeholder="帖子评论数" type="number" v-model="formData.comment_num"></uni-easyinput> -->
<uni-number-box :value="0" :step="1" max="100000" value="100000" v-model="formData.comment_num" />
</uni-forms-item>
<!-- <uni-forms-item name="url" label="图片url">
<uni-data-checkbox :multiple="true" v-model="formData.url"></uni-data-checkbox>
......
......@@ -18,10 +18,13 @@
<uni-easyinput v-model="formData.phone_num"></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="team_id" label="小组 id">
<uni-easyinput v-model="formData.team_id"></uni-easyinput>
<uni-easyinput v-model="formData.team_id" disabled></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="school" label="学校">
<uni-easyinput v-model="formData.school"></uni-easyinput>
<!-- <uni-easyinput v-model="formData.school"></uni-easyinput> -->
<uni-data-select v-model="formData.school"
:localdata="place" >
</uni-data-select>
</uni-forms-item>
<uni-forms-item name="type" label="人员">
<uni-data-checkbox :localdata="types" v-model="formData.type" />
......@@ -86,6 +89,9 @@
{text: '', value: ''},
{text: '', value: ''}
],
place: [
{value:'福州大学',text:'福州大学'},
],
types: [
{text: '学生', value: '644a64c228064a7587cd79bf'},
{text: '老师', value: '644a64d2e766bb0085e6048e'}
......
......@@ -24,7 +24,7 @@ exports.main = async (event, context) => {
owner_id:event.userId
})
const res4 = await message_table.add({
const res5 = await message_table.add({
state:false,
types:"点赞",
content:"",
......@@ -49,6 +49,12 @@ exports.main = async (event, context) => {
likes:res.data[0]["likes"] - 1,
})
const deleteMessage = await message_table.where({
types:"点赞",
from_id:event.userId,
post_id:event.postId
}).remove()
const deleteLike = await like_table.doc(islike.data[0]["_id"]).remove()
if(deleteLike.deleted === 1){
return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册