Browse Source

fix: 修复表单验证和显示问题

- 修改train.vue中的答案长度验证逻辑,使用numberWords作为判断条件
- 更新questionCard.vue中的占位符文本,显示numberWords
- 调整timelineService.vue中的订单编号显示样式
- 在clock/index.vue中添加内容输入框的必填验证
master
前端-胡立永 2 weeks ago
parent
commit
6e1a19576c
5 changed files with 13 additions and 7 deletions
  1. +1
    -1
      otherPages/authentication/components/questionCard.vue
  2. +1
    -1
      otherPages/authentication/examination/train.vue
  3. +6
    -0
      otherPages/myOrdersManage/clock/index.vue
  4. +1
    -1
      pages/myOrdersManage/components/timelineService.vue
  5. +4
    -4
      utils/getUrl.js

+ 1
- 1
otherPages/authentication/components/questionCard.vue View File

@ -14,7 +14,7 @@
</template>
<template v-else>
<view class="textarea">
<textarea v-model="value" :placeholder="`请输入您的答案,不得低于${min}个字`" :rows="10"
<textarea v-model="value" :placeholder="`请输入您的答案,不得低于${props.data.numberWords || 0}个字`" :rows="10"
@blur="onChange($event.detail.value)" :maxlength="2000"></textarea>
</view>
</template>


+ 1
- 1
otherPages/authentication/examination/train.vue View File

@ -69,7 +69,7 @@ const answered = computed(() => {
}
if(typeof item.value == 'string'){
return item.value.length >= 700
return item.value.length >= (item.numberWords || 0)
}
return true


+ 6
- 0
otherPages/myOrdersManage/clock/index.vue View File

@ -181,6 +181,7 @@
<view class="mt24">
<textarea cols="30" rows="10"
placeholder="请输入内容"
v-model="content"
:style="{color:'#999999',fontSize:'30rpx',backgroundColor:'#F5F5F5',borderRadius:'16rpx',width:'681rpx',height:'180rpx'}"
class="pd20 box-size" :disabled="isRead"></textarea>
</view>
@ -235,6 +236,7 @@
const itemOrderID = ref(0)
const serviceId = ref(0)
const isRead = ref(false)
const content = ref('')
const fileList = reactive({
@ -309,6 +311,10 @@
!fileList.urinalB || fileList.urinalB.length < 1) {
return msg('请上传猫砂盆、尿盆照片')
}
if(!content.value){
return msg('请填写补充信息')
}
saveDraft(true)
}


+ 1
- 1
pages/myOrdersManage/components/timelineService.vue View File

@ -48,7 +48,7 @@
<view class="section-title">
<view class="title-indicator"></view>
<text>服务日期</text>
<text style="margin-left: auto;font-weight: 500;">{{ item.orderId }}</text>
<text style="margin-left: auto;font-weight: 500;font-size: 24rpx;">订单编号{{ item.orderId }}</text>
</view>
<view class="section-content date-content" :class="{bgSuccessQ : item.status}">
{{ item.fullDate }}


+ 4
- 4
utils/getUrl.js View File

@ -1,10 +1,10 @@
let current = "release";
let current = "develop";
const accountInfo = wx.getAccountInfoSync();
current = accountInfo.miniProgram.envVersion;
// current = accountInfo.miniProgram.envVersion;
const api = {
// develop:"http://h5.xzaiyp.top",
develop:"https://api.catmdogd.com/prod-api",
develop:"http://h5.xzaiyp.top",
// develop:"https://api.catmdogd.com/prod-api",
// develop:"http://pet-admin.hhlm1688.com/api",
// develop: "http://youyi-test.natapp1.cc/prod-api", // 开发
trial: "https://api.catmdogd.com/prod-api", //测试


Loading…
Cancel
Save