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

评论管理、小队管理数据校验

上级 c7ea2fb9
# 默认忽略的文件
/shelf/
/workspace.xml
此差异已折叠。
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -35,8 +35,8 @@ const validator = {
"format": "string"
}
],
"title": "用户id",
"label": "用户id"
"title": "用户",
"label": "用户"
},
"distance": {
"rules": [
......
......@@ -77,7 +77,8 @@ const validator = {
"contact": {
"rules": [
{
"format": " /^1[3|4|5|7|8][0-9]\d{8}$/"
"format": "^1[0-9]{10}$",
// "pattern": "^1[0-9]{10}$",
}
],
"title": "联系方式",
......
......@@ -86,7 +86,8 @@ const validator = {
"contact": {
"rules": [
{
"format": "string"
"format": "string",
"pattern": "/^1[0-9]{10}$/",
}
],
"title": "联系方式",
......
......@@ -2,16 +2,21 @@
<view class="uni-container">
<uni-forms ref="form" :model="formData" validateTrigger="bind">
<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="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="post_id" label="帖子id">
<uni-easyinput placeholder="帖子id" v-model="formData.post_id"></uni-easyinput>
<uni-easyinput placeholder="帖子id" v-model="formData.post_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>
......
......@@ -17,7 +17,7 @@
</uni-data-select>
</uni-forms-item>
<uni-forms-item name="owner_id" label="用户名">
<uni-easyinput placeholder="用户id" v-model="formData.owner_id" disabled></uni-easyinput>
<uni-easyinput placeholder="用户" v-model="formData.owner_id" disabled></uni-easyinput>
</uni-forms-item>
<uni-forms-item name="distance" label="距离">
<!-- <uni-easyinput placeholder="运动距离" type="number" v-model="formData.distance"></uni-easyinput> -->
......@@ -76,7 +76,8 @@
"pace": null,
"path_line": [],
"start_point": null,
"end_point": null
"end_point": null,
"name": ""
}
return {
formData,
......
......@@ -9,7 +9,7 @@
<uni-easyinput placeholder="小队名称" v-model="formData.name"></uni-easyinput>
</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="description" label="描述">
<uni-easyinput placeholder="小队描述" v-model="formData.description"></uni-easyinput>
......
......@@ -31,11 +31,11 @@
<!-- <uni-easyinput v-model="formData.type"></uni-easyinput> -->
</uni-forms-item>
<uni-forms-item name="total_running_distance" label="跑步总距离">
<uni-number-box :value="0.0" :step="0.01" v-model="formData.total_running_distance" />
<uni-number-box :value="0.0" :step="0.01" max="100000.00" value="100000.00" v-model="formData.total_running_distance" />
<!-- <uni-easyinput type="number" v-model="formData.total_running_distance"></uni-easyinput> -->
</uni-forms-item>
<uni-forms-item name="total_walking_distance" label="健走总距离">
<uni-number-box :value="0.0" :step="0.01" v-model="formData.total_walking_distance" />
<uni-number-box :value="0.0" :step="0.01" max="100000.00" value="100000.00" v-model="formData.total_walking_distance" />
<!-- <uni-easyinput type="number" v-model="formData.total_walking_distance"></uni-easyinput> -->
</uni-forms-item>
<view class="uni-button-group">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册