Pārlūkot izejas kodu

认证通v1.7版本上测试

yuwenjun1997 3 gadi atpakaļ
vecāks
revīzija
82c76820e3

+ 17 - 4
components/SimpleDialog/index.vue

@@ -176,6 +176,7 @@ export default {
     position: fixed;
     top: 0;
     left: 0;
+    z-index: 10001;
     background: rgba(0, 0, 0, 0.39);
 
     .simple-dialog__container {
@@ -215,15 +216,27 @@ export default {
       }
 
       .simple-dialog__footer {
-        padding: 0 4.8vw 7vw;
-        .simple-dialog__confirm {
+        padding: 0 24px 24px;
+
+        .simple-dialog__btn {
           width: 100%;
           height: 8.8vw;
           text-align: center;
-          background: #f3920d;
-          color: #fff;
           line-height: 8.8vw;
           font-size: 3.6vw;
+          border-radius: 0.4vw;
+        }
+
+        .simple-dialog__confirm {
+          background: #f3920d;
+          color: #fff;
+        }
+
+        .simple-dialog__cancel {
+          color: #666666;
+          box-sizing: border-box;
+          border: 1px solid #c2c2c2;
+          margin-top: 2.8vw;
         }
       }
     }

+ 5 - 1
components/SimpleLogin/index.vue

@@ -168,7 +168,11 @@ export default {
           password: this.formData.password,
           authUserId: this.authUserId,
         })
-      } catch (error) {}
+        this.$toast('密码修改成功')
+        this.$emit('click', 'login')
+      } catch (error) {
+        console.log(error)
+      }
     },
 
     // 用户注册

+ 1 - 1
layouts/app.vue

@@ -102,7 +102,7 @@ export default {
       this.$store.commit('user/SET_AUTH_USER_ID', authUserId)
 
       // 设置页面主题
-      if (authUserId === parseInt(114)) {
+      if (authUserId === parseInt(12)) {
         this.$store.commit('app/SET_PAGE_THEME', 'ross')
       }
 

+ 1 - 1
pages/_template/app/approve/index.vue

@@ -2,7 +2,7 @@
   <div class="page">
     <div class="page-top flex flex-col justify-center items-center">
       <img class="logo" :src="supplierInfo.logo" />
-      <div class="name mt-2" v-text="supplierInfo.shopName"></div>
+      <div class="name mt-2" v-text="supplierInfo.shopName + '正品授权认证'"></div>
     </div>
     <div class="page-content">
       <div class="list">

+ 5 - 1
pages/_template/app/form/club-register.vue

@@ -7,7 +7,7 @@
         v-text="supplierInfo.shopName + '正品授权申请'"
       ></div>
     </div>
-    <div class="page-content">
+    <div class="page-content" v-if="!isRequest">
       <template>
         <!-- 进步条 -->
         <SimpleStep :list="stepList" :active="step" v-if="showStepBar" />
@@ -97,6 +97,7 @@ export default {
 
   data() {
     return {
+      isRequest: true,
       active: false,
       registerType: [3],
       step: 1,
@@ -175,6 +176,7 @@ export default {
   },
   created() {
     this.authId = this.$route.query.authId || ''
+    this.isRequest = true
     this.initPageForm()
   },
   methods: {
@@ -270,6 +272,7 @@ export default {
         authUserId: this.authUserId,
         authId: authId,
       })
+      this.isRequest = false
     },
 
     // 初始化从正常页面进入的表单
@@ -286,6 +289,7 @@ export default {
         // 未登录
         this.registerType.push(1, 2)
       }
+      this.isRequest = false
     },
 
     // 初始化表单

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

@@ -143,7 +143,11 @@
         />
       </el-form-item>
 
-      <el-form-item label="医疗许可证:" prop="medicalLicenseImage" v-if="formData.firstClubType === 1">
+      <el-form-item
+        label="医疗许可证:"
+        prop="medicalLicenseImage"
+        v-if="formData.firstClubType === 1"
+      >
         <br />
         <el-input v-show="false" v-model="formData.medicalLicenseImage" />
         <SimpleUploadImage
@@ -274,7 +278,7 @@ export default {
       mapVisiable: false,
       formData: {
         name: '',
-        address: [],
+        address: '',
         fullAddress: '',
         point: '',
         mobile: '',
@@ -476,7 +480,14 @@ export default {
         name: '',
         url: item,
       }))
-      this.licenseImageList = [{ name: '', url: formData.medicalLicenseImage }]
+
+      if (formData.medicalLicenseImage) {
+        this.licenseImageList = [
+          { name: '', url: formData.medicalLicenseImage },
+        ]
+      }
+
+      this.countAddress()
 
       this.formData.banner =
         this.bannerList.length > 0 ? this.bannerList.length : ''

+ 14 - 6
pages/_template/app/record/club/detail.vue

@@ -5,7 +5,7 @@
       <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
     </div>
     <div class="page-content">
-      <template v-if="true">
+      <template v-if="clubInfo">
         <div class="page-title">机构认证</div>
         <div class="row">
           <div class="col">机构名称:</div>
@@ -145,11 +145,12 @@ export default {
   },
   data() {
     return {
-      clubInfo: {},
+      clubInfo: null,
+      authId: ''
     }
   },
   computed: {
-    ...mapGetters(['supplierInfo', 'routePrefix', 'clubUserId']),
+    ...mapGetters(['supplierInfo', 'routePrefix', 'clubUserId', 'userInfo']),
   },
   created() {
     this.fetchAuthDetail()
@@ -161,16 +162,23 @@ export default {
         const result = await this.$http.api.fetchClubAuthInfo({
           clubUserId: this.clubUserId,
         })
+
+        if(!result.data.auth) return
+
+        this.authId = result.data.auth.authId
+
         const res = await this.$http.api.fetchClubAuthInfoData({
           authId: result.data.auth.authId,
         })
+        
         this.clubInfo = res.data
-        console.log(res)
-      } catch (error) {}
+      } catch (error) {
+        console.log(error)
+      }
     },
 
     onToDeviceList() {
-      this.$router.push(`${this.routePrefix}/record/device`)
+      this.$router.push(`${this.routePrefix}/record/device?authId=${this.authId}`)
     },
     onEdit() {
       this.$router.push(`${this.routePrefix}/record/club/edit`)

+ 4 - 1
pages/_template/app/record/club/edit.vue

@@ -49,6 +49,7 @@ export default {
         await this.$refs.formClubInfo.validate()
         this.formData.authUserId = this.authUserId
         this.formData.source = 2
+        this.formData.authId = this.clubInfo.authId
         await this.$http.api.authClubSave(this.formData)
         this.$toast('保存成功')
         this.$router.push(`${this.routePrefix}/record/club/detail`)
@@ -69,7 +70,9 @@ export default {
         })
         this.clubInfo = res.data
         this.$refs.formClubInfo.init(this.clubInfo)
-      } catch (error) {}
+      } catch (error) {
+        console.log(error)
+      }
     },
 
     onClubInfoFormStep(data) {

+ 35 - 23
pages/_template/app/record/device/index.vue

@@ -9,13 +9,16 @@
     >
       <div class="page-top flex flex-col justify-center items-center">
         <img class="logo" :src="supplierInfo.logo" />
-        <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
+        <div
+          class="name mt-2"
+          v-text="supplierInfo.shopName + '认证记录'"
+        ></div>
       </div>
       <div class="page-content">
-        <template v-if="list.length>0">
-
+        <template v-if="list.length > 0">
           <div class="page-title">设备认证</div>
-          <div class="device-list"
+          <div
+            class="device-list"
             v-for="item in list"
             :key="item.productId"
             @click="toEdit(item)"
@@ -23,11 +26,15 @@
             <div class="device">
               <div class="name">
                 <span class="label">设备名称:</span>
-                <span class="content">{{ item.productName ? item.productName : '' }}</span>
+                <span class="content">{{
+                  item.productName ? item.productName : ''
+                }}</span>
               </div>
               <div class="status" :class="auditStatusColor(item.auditStatus)">
                 <span class="label">状态:</span>
-                <span class="content">{{ item.auditStatus | auditStatusFilter }}</span>
+                <span class="content">{{
+                  item.auditStatus | auditStatusFilter
+                }}</span>
               </div>
             </div>
           </div>
@@ -36,7 +43,7 @@
           <SimpleEmpty name="icon-device-empty.png" description="暂无设备~" />
         </template>
       </div>
-     </van-list>
+    </van-list>
   </div>
 </template>
 
@@ -56,7 +63,7 @@ export default {
       list: [],
       listQuery: {
         authId: 0,
-        listType:2,
+        listType: 2,
         pageNum: 1,
         pageSize: 10,
       },
@@ -64,37 +71,41 @@ export default {
     }
   },
   filters: {
-		auditStatusFilter(value) {// 认证状态:0审核未通过,1审核通过,2待审核
+    auditStatusFilter(value) {
+      // 认证状态:0审核未通过,1审核通过,2待审核
       const map = {
-          0: '审核未通过',
-          1: '审核通过',
-          2: '待审核',
+        0: '审核未通过',
+        1: '审核通过',
+        2: '待审核',
       }
       return map[value]
-    }
-	},
+    },
+  },
   created() {
     this.initData()
   },
   computed: {
-    ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix','authId']),
+    ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix', 'authId']),
   },
   methods: {
     toEdit(item) {
-      this.$router.push(`${this.routePrefix}/record/device/detail?id=${item.productId}`)
+      this.$router.push(
+        `${this.routePrefix}/record/device/detail?id=${item.productId}`
+      )
     },
     initData() {
-      this.listQuery.authId = this.authId
+      this.listQuery.authId = this.$route.query.authId
+      if(!this.listQuery.authId) return
       this.authProductList()
     },
     // 获取机构列表
-    async authProductList () {
+    async authProductList() {
       try {
         this.isLoadingMore = true
         const res = await this.$http.api.getClubAuthProductList(this.listQuery)
         this.total = res.data.total
         this.list = [...this.list, ...res.data.list]
-         this.finished = !res.data.hasNextPage
+        this.finished = !res.data.hasNextPage
         this.isLoadingMore = false
         this.listQuery.pageNum += 1
       } catch (error) {
@@ -104,11 +115,12 @@ export default {
         this.isRequest = false
       }
     },
-    auditStatusColor(value) {// 认证状态:0 danger,1 success,2 warning
+    auditStatusColor(value) {
+      // 认证状态:0 danger,1 success,2 warning
       const map = {
-          0: 'danger',
-          1: 'success',
-          2: 'warning',
+        0: 'danger',
+        1: 'success',
+        2: 'warning',
       }
       return map[value]
     },