yuwenjun1997 пре 2 година
родитељ
комит
6477e4a02c

+ 29 - 12
pages/_template/app/form/club-register.vue

@@ -69,6 +69,14 @@
         <div class="record mt-2" @click="toRecord">认证记录</div>
         <div class="record mt-2" @click="toRecord">认证记录</div>
       </div>
       </div>
     </div>
     </div>
+
+    <SimpleDialog
+      v-model="active"
+      @confirm="onConfirm"
+      :cancel="false"
+      description="抱歉,该用户已进行过正品授权申请"
+      :center="true"
+    />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -89,6 +97,7 @@ export default {
 
 
   data() {
   data() {
     return {
     return {
+      active: false,
       registerType: [3],
       registerType: [3],
       step: 1,
       step: 1,
       stepList: [
       stepList: [
@@ -169,6 +178,10 @@ export default {
     this.initForm()
     this.initForm()
   },
   },
   methods: {
   methods: {
+    onConfirm() {
+      this.$router.push(this.routePrefix)
+    },
+
     async onNextStep() {
     async onNextStep() {
       const validateAction = {
       const validateAction = {
         1: this.$refs.userForm?.validate(),
         1: this.$refs.userForm?.validate(),
@@ -241,21 +254,25 @@ export default {
       this.$router.push(`${this.routePrefix}/record/club/detail`)
       this.$router.push(`${this.routePrefix}/record/club/detail`)
     },
     },
 
 
+    /***
+     * 已登录
+     *  1 机构 + 设备
+     *  2 设备
+     *
+     * 未登录
+     *  1 注册 + 机构 + 设备
+     *  2 注册 + 设备
+     */
+
     // 初始化表单
     // 初始化表单
     async initForm() {
     async initForm() {
-      if (this.authId) {
-        if (!this.accessToken) {
-          this.registerType.push(1)
-        }
+      if (this.accessToken) {
+        this.step = 2
+        await this.initClubInfo()
+        this.stepList = this.stepList.filter((item) => item.id !== 1)
       } else {
       } else {
-        // 判断用户是否登录
-        if (!this.accessToken) {
-          this.registerType.push(1, 2)
-        } else {
-          this.step = 2
-          this.stepList = this.stepList.filter((item) => item.id !== 1)
-          await this.initClubInfo()
-        }
+        this.registerType.push(1)
+        await this.initClubInfo()
       }
       }
     },
     },
 
 

+ 9 - 0
pages/_template/app/form/components/form-club-device.vue

@@ -102,6 +102,14 @@
       <div class="add-icon"></div>
       <div class="add-icon"></div>
       添加设备
       添加设备
     </div>
     </div>
+
+    <SimpleDialog
+      v-model="active"
+      @confirm="active = false"
+      :cancel="false"
+      description="请慎重填写机构信息,认证通过后将无法更改!"
+      :center="true"
+    />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -122,6 +130,7 @@ export default {
     }
     }
 
 
     return {
     return {
+      active: true,
       uuid: 0, // 表单id
       uuid: 0, // 表单id
       productImageList: [],
       productImageList: [],
       rules: {
       rules: {

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

@@ -167,6 +167,14 @@
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
+
+    <SimpleDialog
+      v-model="active"
+      @confirm="active = false"
+      :cancel="false"
+      description="请慎重填写设备信息,认证通过后将无法更改!"
+      :center="true"
+    />
   </div>
   </div>
 </template>
 </template>
 
 

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

@@ -22,12 +22,21 @@
         </div>
         </div>
       </el-form-item>
       </el-form-item>
       <el-form-item prop="password">
       <el-form-item prop="password">
-        <el-input v-model="formData.password" placeholder="密码"></el-input>
+        <el-input
+          type="password"
+          v-model="formData.password"
+          placeholder="密码"
+          maxlength="12"
+          show-word-limit
+        ></el-input>
       </el-form-item>
       </el-form-item>
       <el-form-item prop="confirmPwd">
       <el-form-item prop="confirmPwd">
         <el-input
         <el-input
+          type="password"
           v-model="formData.confirmPwd"
           v-model="formData.confirmPwd"
           placeholder="再次输入密码"
           placeholder="再次输入密码"
+          maxlength="12"
+          show-word-limit
         ></el-input>
         ></el-input>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
@@ -73,6 +82,7 @@ export default {
         ],
         ],
         password: [
         password: [
           { required: true, message: '密码不能为空', trigger: ['blur'] },
           { required: true, message: '密码不能为空', trigger: ['blur'] },
+          { min: 8, max: 12, message: '请输入8-12位密码', trigger: ['blur'] },
         ],
         ],
         confirmPwd: [
         confirmPwd: [
           { required: true, message: '请再次输入密码', trigger: ['blur'] },
           { required: true, message: '请再次输入密码', trigger: ['blur'] },