Browse Source

v1.7版本接口调试

yuwenjun1997 2 years ago
parent
commit
604f72f1f1

+ 32 - 6
pages/_template/app/form/components/form-club-device.vue

@@ -115,7 +115,7 @@
       @confirm="active = false"
       @confirm="active = false"
       confirmText="好的"
       confirmText="好的"
       :cancel="false"
       :cancel="false"
-      description="请慎重填写机构信息,认证通过后将 无法更改!"
+      description="请慎重填写设备信息,认证通过后将无法更改!"
       :center="true"
       :center="true"
     />
     />
   </div>
   </div>
@@ -143,6 +143,24 @@ export default {
       }
       }
     }
     }
 
 
+    const paramListValidate = (rule, value, callback) => {
+      console.log(value)
+      const valid = value.some(
+        (item) =>
+          (item.paramName && !item.paramContent) ||
+          (!item.paramName && item.paramContent)
+      )
+
+      const isEmpty = value.every(
+        (item) => !item.paramName && !item.paramContent
+      )
+      if (valid || isEmpty) {
+        callback(new Error('参数列表不能为空'))
+      } else {
+        callback()
+      }
+    }
+
     return {
     return {
       active: true,
       active: true,
       uuid: 0, // 表单id
       uuid: 0, // 表单id
@@ -161,13 +179,21 @@ export default {
         snCode: [
         snCode: [
           { required: true, message: '设备SN码不能为空', trigger: ['blur'] },
           { required: true, message: '设备SN码不能为空', trigger: ['blur'] },
         ],
         ],
-        paramList: [{ required: true, message: '参数不能为空' }],
+        paramList: [
+          { required: true, message: '参数不能为空', trigger: ['blur'] },
+          { validator: paramListValidate, trigger: ['change'] },
+        ],
         purchaseWay: [
         purchaseWay: [
           {
           {
             required: true,
             required: true,
             message: '请输入购买渠道不能为空',
             message: '请输入购买渠道不能为空',
             trigger: ['blur'],
             trigger: ['blur'],
           },
           },
+          {
+            max: 50,
+            message: '最大长度为50个字符',
+            trigger: ['blur'],
+          },
         ],
         ],
         invoiceImage: [
         invoiceImage: [
           { required: true, message: '请上传发票', trigger: ['change'] },
           { required: true, message: '请上传发票', trigger: ['change'] },
@@ -343,9 +369,9 @@ export default {
 
 
     // 产品图片上传
     // 产品图片上传
     beforeProductImageUpload(file) {
     beforeProductImageUpload(file) {
-      const flag = file.size / 1024 / 1024 < 1
+      const flag = file.size / 1024 / 1024 < 5
       if (!flag) {
       if (!flag) {
-        this.$message.error('上传产品图片大小不能超过 1MB!')
+        this.$message.error('上传产品图片大小不能超过 5MB!')
       }
       }
       return flag
       return flag
     },
     },
@@ -360,9 +386,9 @@ export default {
 
 
     // 发票上传
     // 发票上传
     beforeInvoiceImageUpload(file) {
     beforeInvoiceImageUpload(file) {
-      const flag = file.size / 1024 / 1024 < 1
+      const flag = file.size / 1024 / 1024 < 5
       if (!flag) {
       if (!flag) {
-        this.$message.error('发票图片大小不能超过 1MB!')
+        this.$message.error('发票图片大小不能超过 5MB!')
       }
       }
       return flag
       return flag
     },
     },

+ 6 - 6
pages/_template/app/form/components/form-club-info.vue

@@ -523,9 +523,9 @@ export default {
       this.formData.logoImage = ''
       this.formData.logoImage = ''
     },
     },
     beforeLogoUpload(file) {
     beforeLogoUpload(file) {
-      const flag = file.size / 1024 < 500
+      const flag = file.size / 1024 / 1024 < 5
       if (!flag) {
       if (!flag) {
-        this.$message.error('上传logo图片大小不能超过 500kb!')
+        this.$message.error('上传logo图片大小不能超过 5MB!')
       }
       }
       return flag
       return flag
     },
     },
@@ -541,9 +541,9 @@ export default {
       this.formData.banner = fileList.length > 0 ? fileList.length : ''
       this.formData.banner = fileList.length > 0 ? fileList.length : ''
     },
     },
     beforeBannerUpload(file) {
     beforeBannerUpload(file) {
-      const flag = file.size / 1024 / 1024 < 1
+      const flag = file.size / 1024 / 1024 < 5
       if (!flag) {
       if (!flag) {
-        this.$message.error('上传banner图片大小不能超过 1MB!')
+        this.$message.error('上传banner图片大小不能超过 5MB!')
       }
       }
       return flag
       return flag
     },
     },
@@ -559,9 +559,9 @@ export default {
       this.formData.medicalLicenseImage = ''
       this.formData.medicalLicenseImage = ''
     },
     },
     beforeLicenseImageUpload(file) {
     beforeLicenseImageUpload(file) {
-      const flag = file.size / 1024 / 1024 < 1
+      const flag = file.size / 1024 / 1024 < 5
       if (!flag) {
       if (!flag) {
-        this.$message.error('医疗许可证图片大小不能超过 1MB!')
+        this.$message.error('医疗许可证图片大小不能超过 5MB!')
       }
       }
       return flag
       return flag
     },
     },

+ 32 - 9
pages/_template/app/record/club/detail.vue

@@ -27,21 +27,29 @@
           <div class="col max-width">logo:</div>
           <div class="col max-width">logo:</div>
           <div class="col">
           <div class="col">
             <el-image
             <el-image
+              v-if="clubInfo.logo"
               :src="clubInfo.logo"
               :src="clubInfo.logo"
               :preview-src-list="[clubInfo.logo]"
               :preview-src-list="[clubInfo.logo]"
-            ></el-image>
+            >
+            </el-image>
+            <span v-else>暂无图片</span>
           </div>
           </div>
         </div>
         </div>
         <div class="row">
         <div class="row">
           <div class="col max-width">门头照:</div>
           <div class="col max-width">门头照:</div>
           <div class="col">
           <div class="col">
-            <template v-for="(image, index) in clubInfo.bannerList">
-              <el-image
-                :key="index"
-                :src="image"
-                :preview-src-list="clubInfo.bannerList"
-              />
+            <template
+              v-if="clubInfo.bannerList && clubInfo.bannerList.length > 0"
+            >
+              <template v-for="(image, index) in clubInfo.bannerList">
+                <el-image
+                  :key="index"
+                  :src="image"
+                  :preview-src-list="clubInfo.bannerList"
+                />
+              </template>
             </template>
             </template>
+            <span v-else>暂无图片</span>
           </div>
           </div>
         </div>
         </div>
         <div class="row">
         <div class="row">
@@ -67,6 +75,17 @@
             }}
             }}
           </div>
           </div>
         </div>
         </div>
+        <div class="row" v-if="clubInfo.firstClubType === 1">
+          <div class="col max-width">医疗许可证:</div>
+          <div class="col">
+            <el-image
+              v-if="clubInfo.medicalLicenseImage"
+              :src="clubInfo.medicalLicenseImage"
+              :preview-src-list="[clubInfo.medicalLicenseImage]"
+            />
+            <span v-else>暂无图片</span>
+          </div>
+        </div>
         <div class="row">
         <div class="row">
           <div class="col">员工人数:</div>
           <div class="col">员工人数:</div>
           <div class="col">{{ clubInfo.empNum }}</div>
           <div class="col">{{ clubInfo.empNum }}</div>
@@ -185,7 +204,7 @@ export default {
     }
     }
   }
   }
   .page-content {
   .page-content {
-    width: 700px;
+    width: 600px;
     margin: 0 auto;
     margin: 0 auto;
     overflow: hidden;
     overflow: hidden;
     min-height: calc(100vh - 80px - 80px - 360px);
     min-height: calc(100vh - 80px - 80px - 360px);
@@ -220,8 +239,11 @@ export default {
 
 
       .col {
       .col {
         &:first-child {
         &:first-child {
-          width: 90px;
+          white-space: nowrap;
+          width: 110px;
           color: #666;
           color: #666;
+          text-align: right;
+          flex-shrink: 0;
         }
         }
 
 
         &:last-child {
         &:last-child {
@@ -322,6 +344,7 @@ export default {
         &:first-child {
         &:first-child {
           width: 17vw;
           width: 17vw;
           color: #666;
           color: #666;
+          // text-align: right;
 
 
           &.max-width {
           &.max-width {
             width: 100% !important;
             width: 100% !important;

+ 21 - 14
pages/_template/app/record/device/detail.vue

@@ -14,9 +14,11 @@
         <div class="col">设备图片:</div>
         <div class="col">设备图片:</div>
         <div class="col">
         <div class="col">
           <el-image
           <el-image
+            v-if="productInfo.productImage"
             :src="productInfo.productImage"
             :src="productInfo.productImage"
             :preview-src-list="[productInfo.productImage]"
             :preview-src-list="[productInfo.productImage]"
           ></el-image>
           ></el-image>
+          <span v-else>暂无图片</span>
         </div>
         </div>
       </div>
       </div>
       <div class="row">
       <div class="row">
@@ -25,15 +27,17 @@
       </div>
       </div>
       <div class="row">
       <div class="row">
         <div class="col">购买渠道:</div>
         <div class="col">购买渠道:</div>
-        <div class="col">{{ productInfo.purchaseWay }}</div>
+        <div class="col">{{ productInfo.purchaseWay || '暂无' }}</div>
       </div>
       </div>
       <div class="row">
       <div class="row">
         <div class="col">发票:</div>
         <div class="col">发票:</div>
         <div class="col">
         <div class="col">
           <el-image
           <el-image
+            v-if="productInfo.invoiceImage"
             :src="productInfo.invoiceImage"
             :src="productInfo.invoiceImage"
             :preview-src-list="[productInfo.invoiceImage]"
             :preview-src-list="[productInfo.invoiceImage]"
           ></el-image>
           ></el-image>
+          <span v-else>暂无图片</span>
         </div>
         </div>
       </div>
       </div>
       <div class="row">
       <div class="row">
@@ -49,7 +53,7 @@
               v-for="param in productInfo.paramList"
               v-for="param in productInfo.paramList"
               :key="param.productName"
               :key="param.productName"
             >
             >
-              <div class="param-name">{{ param.paramName }}</div>
+              <div class="param-name">{{ param.paramName }}</div>
               <div class="param-content">{{ param.paramContent }}</div>
               <div class="param-content">{{ param.paramContent }}</div>
             </div>
             </div>
           </div>
           </div>
@@ -171,7 +175,7 @@ export default {
     }
     }
   }
   }
   .page-content {
   .page-content {
-    width: 700px;
+    width: 600px;
     margin: 0 auto;
     margin: 0 auto;
     overflow: hidden;
     overflow: hidden;
     min-height: calc(100vh - 80px - 80px - 360px);
     min-height: calc(100vh - 80px - 80px - 360px);
@@ -187,12 +191,12 @@ export default {
 
 
     .params-list {
     .params-list {
       .param {
       .param {
-        display: flex;
-        justify-content: flex-start;
-        align-items: flex-start;
-        margin-bottom: 8px;
+        display: grid;
+        grid-template-columns: repeat(2, 1fr);
+        grid-column-gap: 8px;
+        grid-row-gap: 16px;
         .param-name {
         .param-name {
-          margin-right: 20px;
+          text-align: right;
         }
         }
       }
       }
     }
     }
@@ -215,8 +219,9 @@ export default {
           color: #f94b4b !important;
           color: #f94b4b !important;
         }
         }
         &:first-child {
         &:first-child {
-          width: 90px;
+          width: 100px;
           color: #666;
           color: #666;
+          text-align: right;
         }
         }
 
 
         &:last-child {
         &:last-child {
@@ -290,12 +295,12 @@ export default {
 
 
     .params-list {
     .params-list {
       .param {
       .param {
-        display: flex;
-        justify-content: flex-start;
-        align-items: flex-start;
-        margin-bottom: 8px;
+        display: grid;
+        grid-template-columns: repeat(2, 1fr);
+        grid-column-gap: 1.2vw;
+        grid-row-gap: 2.4vw;
         .param-name {
         .param-name {
-          margin-right: 10px;
+          text-align: right;
         }
         }
       }
       }
     }
     }
@@ -321,6 +326,8 @@ export default {
           width: 19vw;
           width: 19vw;
           color: #666;
           color: #666;
           white-space: nowrap;
           white-space: nowrap;
+          flex-shrink: 0;
+          // text-align: right;
         }
         }
 
 
         &:last-child {
         &:last-child {

+ 41 - 2
pages/_template/app/record/message.vue

@@ -20,9 +20,9 @@ export default {
   },
   },
   methods: {
   methods: {
     toClubRecord() {
     toClubRecord() {
-      if(this.accessToken){
+      if (this.accessToken) {
         this.$router.push(`${this.routePrefix}/record/club/detail`)
         this.$router.push(`${this.routePrefix}/record/club/detail`)
-      }else{
+      } else {
         this.$toast('请登录后查看')
         this.$toast('请登录后查看')
         this.$router.push(this.routePrefix)
         this.$router.push(this.routePrefix)
       }
       }
@@ -74,4 +74,43 @@ export default {
     }
     }
   }
   }
 }
 }
+
+@media screen and (max-width: 768px) {
+  .page-content {
+    padding: 0 9.2vw;
+    padding-top: 25.2vw;
+
+    .icon-submit-succsss {
+      width: 12vw;
+      height: 12vw;
+      background: url(https://static.caimei365.com/www/authentic/pc/icon-submit-success.png)
+        no-repeat center;
+      background-size: 12vw;
+    }
+
+    .tip {
+      font-size: 4.2vw;
+      font-weight: bold;
+      color: #1890ff;
+    }
+    .label {
+      font-size: 3.4vw;
+      color: #282828;
+      line-height: 1.6;
+    }
+    .record-btn {
+      width: 36vw;
+      height: 8.8vw;
+      color: #fff;
+      font-size: 3.2vw;
+      text-align: center;
+      line-height: 8.8vw;
+      border-radius: 0.4vw;
+      cursor: pointer;
+      @include themify($themes) {
+        background: themed('color');
+      }
+    }
+  }
+}
 </style>
 </style>