zs 1 anno fa
parent
commit
e36ccc44ed

+ 2 - 0
.env.development

@@ -5,3 +5,5 @@ VITE_APP_HOST="https://broadcast.waityou24.cn"
 VITE_APP_PAGE_SIZE=12
 VITE_APP_ROUTER="web"
 VITE_APP_ENV = 'development'
+# 代理前缀
+VITE_APP_BASE_API = '/ts/frame/api'

+ 2 - 0
.env.production

@@ -5,3 +5,5 @@ VITE_APP_HOST="https://broadcast.waityou24.cn"
 VITE_APP_PAGE_SIZE=12
 VITE_APP_ROUTER="web"
 VITE_APP_ENV = 'production'
+# 代理前缀
+VITE_APP_BASE_API = '/ts/frame/api'

+ 4 - 1
src/components/head.vue

@@ -84,7 +84,8 @@ const selectMenu = (item) => {
 };
 // 登录|注册
 const toLogin = (status) => {
-  router.push({ path: '/login', query: { status } });
+  if (status === 1) router.push({ path: '/login' });
+  else router.push({ path: '/register' });
 };
 // 帮助中心
 const toHelp = (type) => {
@@ -129,6 +130,7 @@ const toHelp = (type) => {
         }
       }
     }
+
     :deep(.ant-tabs-nav) {
       margin: 0 !important;
     }
@@ -136,6 +138,7 @@ const toHelp = (type) => {
     :deep(.ant-tabs-nav::before) {
       border: 0 !important;
     }
+
     .top_3 {
       display: flex;
       justify-content: space-between;

+ 1 - 1
src/views/login/index.vue

@@ -150,7 +150,7 @@ const toRegister = () => {
     background-image: url(@/assets/loginbg.jpeg);
     background-position: center center;
     background-repeat: no-repeat;
-    height: 590px;
+    height: calc(100vh - 20vh);
     width: 100%;
     background-size: cover;
     display: flex;

+ 8 - 258
src/views/register/index.vue

@@ -7,270 +7,18 @@
             <el-col :span="24" class="two">
               <div class="loginform">
                 <el-col :span="24" class="tab">
-                  <el-col :span="5" class="title" @click="toTab(0)" :class="[activeName == '0' ? 'tab0' : 'tab1']">个人用户</el-col>
+                  <el-col :span="5" class="title" @click="toTab(0)" :class="[activeName == '0' ? 'tab0' : 'tab1']">平台用户</el-col>
                   <el-col :span="5" class="title" @click="toTab(1)" :class="[activeName == '1' ? 'tab0' : 'tab1']">企业用户</el-col>
                   <el-col :span="5" class="title" @click="toTab(2)" :class="[activeName == '2' ? 'tab0' : 'tab1']">科研单位</el-col>
                 </el-col>
                 <el-col :span="24" class="content" v-show="activeName == '0'">
-                  <el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form" label-position="left">
-                    <el-form-item label="账号" prop="account">
-                      <el-input v-model="form.account" placeholder="请输入账号">
-                        <template #prefix>
-                          <el-icon>
-                            <User />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="用户名" prop="nick_name">
-                      <el-input v-model="form.nick_name" placeholder="请输入用户名">
-                        <template #prefix>
-                          <el-icon>
-                            <Avatar />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="工作单位" prop="unit">
-                      <el-input v-model="form.tel" placeholder="请输入工作单位">
-                        <template #prefix>
-                          <el-icon>
-                            <OfficeBuilding />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="联系电话" prop="tel">
-                      <el-input v-model="form.tel" placeholder="请输入联系电话">
-                        <template #prefix>
-                          <el-icon>
-                            <Iphone />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="身份证号" prop="id_card">
-                      <el-input v-model="form.id_card" placeholder="请输入身份证号">
-                        <template #prefix>
-                          <el-icon>
-                            <ScaleToOriginal />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="联系邮箱" prop="email">
-                      <el-input v-model="form.email" placeholder="请输入联系邮箱">
-                        <template #prefix>
-                          <el-icon>
-                            <Message />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="密码" prop="password">
-                      <el-input v-model="form.password" type="password" show-password placeholder="请输入登录密码">
-                        <template #prefix>
-                          <el-icon>
-                            <Unlock />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="确认密码" prop="refpassword">
-                      <el-input v-model="form.refpassword" type="password" show-password placeholder="请再次确认输入密码">
-                        <template #prefix>
-                          <el-icon>
-                            <Unlock />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-col :span="24" class="remark">
-                      <span @click="toLogin">已有账号去登录</span>
-                      <span @click="toBack">返回首页</span>
-                    </el-col>
-                    <el-col :span="24" class="button">
-                      <el-button type="primary" @click="submitForm(ruleFormRef)">注册</el-button>
-                    </el-col>
-                    <el-col :span="24" class="agree">
-                      <el-checkbox v-model="isAgree"></el-checkbox>
-                      <span style="margin: 0 0 0 5px">我已阅读并同意</span><span @click="dialog = true">《{{ siteInfo.zhTitle }}使用协议》</span>
-                    </el-col>
-                  </el-form>
+                  <component :is="user" :form="form" :rules="rules" :isAgree="isAgree" @toLogin="toLogin" @toBack="toBack"> </component>
                 </el-col>
                 <el-col :span="24" class="content" v-show="activeName == '1'">
-                  <el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form" label-position="left">
-                    <el-form-item label="账号" prop="account">
-                      <el-input v-model="form.account" placeholder="请输入账号">
-                        <template #prefix>
-                          <el-icon>
-                            <User />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="用户名" prop="nick_name">
-                      <el-input v-model="form.nick_name" placeholder="请输入用户名">
-                        <template #prefix>
-                          <el-icon>
-                            <Avatar />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="工作单位" prop="unit">
-                      <el-input v-model="form.tel" placeholder="请输入工作单位">
-                        <template #prefix>
-                          <el-icon>
-                            <OfficeBuilding />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="联系电话" prop="tel">
-                      <el-input v-model="form.tel" placeholder="请输入联系电话">
-                        <template #prefix>
-                          <el-icon>
-                            <Iphone />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="身份证号" prop="id_card">
-                      <el-input v-model="form.id_card" placeholder="请输入身份证号">
-                        <template #prefix>
-                          <el-icon>
-                            <ScaleToOriginal />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="联系邮箱" prop="email">
-                      <el-input v-model="form.email" placeholder="请输入联系邮箱">
-                        <template #prefix>
-                          <el-icon>
-                            <Message />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="密码" prop="password">
-                      <el-input v-model="form.password" type="password" show-password placeholder="请输入登录密码">
-                        <template #prefix>
-                          <el-icon>
-                            <Unlock />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="确认密码" prop="refpassword">
-                      <el-input v-model="form.refpassword" type="password" show-password placeholder="请再次确认输入密码">
-                        <template #prefix>
-                          <el-icon>
-                            <Unlock />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-col :span="24" class="remark">
-                      <span @click="toLogin">已有账号去登录</span>
-                      <span @click="toBack">返回首页</span>
-                    </el-col>
-                    <el-col :span="24" class="button">
-                      <el-button type="primary" @click="submitForm(ruleFormRef)">注册</el-button>
-                    </el-col>
-                    <el-col :span="24" class="agree">
-                      <el-checkbox v-model="isAgree"></el-checkbox>
-                      <span style="margin: 0 0 0 5px">我已阅读并同意</span><span @click="dialog = true">《{{ siteInfo.zhTitle }}使用协议》</span>
-                    </el-col>
-                  </el-form>
+                  <component :is="user" :form="form" :rules="rules" :isAgree="isAgree" @toLogin="toLogin" @toBack="toBack"> </component>
                 </el-col>
                 <el-col :span="24" class="content" v-show="activeName == '2'">
-                  <el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form" label-position="left">
-                    <el-form-item label="账号" prop="account">
-                      <el-input v-model="form.account" placeholder="请输入账号">
-                        <template #prefix>
-                          <el-icon>
-                            <User />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="用户名" prop="nick_name">
-                      <el-input v-model="form.nick_name" placeholder="请输入用户名">
-                        <template #prefix>
-                          <el-icon>
-                            <Avatar />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="工作单位" prop="unit">
-                      <el-input v-model="form.tel" placeholder="请输入工作单位">
-                        <template #prefix>
-                          <el-icon>
-                            <OfficeBuilding />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="联系电话" prop="tel">
-                      <el-input v-model="form.tel" placeholder="请输入联系电话">
-                        <template #prefix>
-                          <el-icon>
-                            <Iphone />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="身份证号" prop="id_card">
-                      <el-input v-model="form.id_card" placeholder="请输入身份证号">
-                        <template #prefix>
-                          <el-icon>
-                            <ScaleToOriginal />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="联系邮箱" prop="email">
-                      <el-input v-model="form.email" placeholder="请输入联系邮箱">
-                        <template #prefix>
-                          <el-icon>
-                            <Message />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="密码" prop="password">
-                      <el-input v-model="form.password" type="password" show-password placeholder="请输入登录密码">
-                        <template #prefix>
-                          <el-icon>
-                            <Unlock />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-form-item label="确认密码" prop="refpassword">
-                      <el-input v-model="form.refpassword" type="password" show-password placeholder="请再次确认输入密码">
-                        <template #prefix>
-                          <el-icon>
-                            <Unlock />
-                          </el-icon>
-                        </template>
-                      </el-input>
-                    </el-form-item>
-                    <el-col :span="24" class="remark">
-                      <span @click="toLogin">已有账号去登录</span>
-                      <span @click="toBack">返回首页</span>
-                    </el-col>
-                    <el-col :span="24" class="button">
-                      <el-button type="primary" @click="submitForm(ruleFormRef)">注册</el-button>
-                    </el-col>
-                    <el-col :span="24" class="agree">
-                      <el-checkbox v-model="isAgree"></el-checkbox>
-                      <span style="margin: 0 0 0 5px">我已阅读并同意</span><span @click="dialog = true">《{{ siteInfo.zhTitle }}使用协议》</span>
-                    </el-col>
-                  </el-form>
+                  <component :is="user" :form="form" :rules="rules" :isAgree="isAgree" @toLogin="toLogin" @toBack="toBack"> </component>
                 </el-col>
               </div>
             </el-col>
@@ -282,6 +30,8 @@
   </div>
 </template>
 <script setup lang="ts">
+// 组件
+import user from './parts/user.vue';
 // 基础
 import type { Ref } from 'vue';
 import { onMounted, ref, reactive } from 'vue';
@@ -351,7 +101,7 @@ const toBack = () => {
     background-image: url(@/assets/loginbg.jpeg);
     background-position: center center;
     background-repeat: no-repeat;
-    height: 590px;
+    height: calc(100vh - 20vh);
     width: 100%;
     background-size: cover;
     display: flex;
@@ -361,7 +111,7 @@ const toBack = () => {
       position: absolute;
       top: 50%;
       left: 50%;
-      height: 460px;
+      min-height: 460px;
       padding: 20px 85px;
       background: hsla(0, 0%, 100%, 0.6);
       box-shadow: 0 0 30px 0 rgba(51, 51, 51, 0.2);

+ 156 - 0
src/views/register/parts/company.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="user">
+    <el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form" label-position="left">
+      <el-form-item label="账号" prop="account">
+        <el-input v-model="form.account" placeholder="请输入账号">
+          <template #prefix>
+            <el-icon>
+              <User />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="密码" prop="password">
+        <el-input v-model="form.password" type="password" show-password placeholder="请输入登录密码">
+          <template #prefix>
+            <el-icon>
+              <Unlock />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="确认密码" prop="refpassword">
+        <el-input v-model="form.refpassword" type="password" show-password placeholder="请再次确认输入密码">
+          <template #prefix>
+            <el-icon>
+              <Unlock />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="用户名" prop="nick_name">
+        <el-input v-model="form.nick_name" placeholder="请输入用户名">
+          <template #prefix>
+            <el-icon>
+              <Avatar />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="联系电话" prop="phone">
+        <el-input v-model="form.phone" placeholder="请输入联系电话">
+          <template #prefix>
+            <el-icon>
+              <Iphone />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-col :span="24" class="remark">
+        <span @click="toLogin">已有账号去登录</span>
+        <span @click="toBack">返回首页</span>
+      </el-col>
+      <el-col :span="24" class="button">
+        <el-button type="primary" @click="submitForm(ruleFormRef)">注册</el-button>
+      </el-col>
+      <el-col :span="24" class="agree">
+        <el-checkbox v-model="isAgree"></el-checkbox>
+        <span style="margin: 0 0 0 5px">我已阅读并同意</span><span @click="dialog = true">《{{ siteInfo.zhTitle }}使用协议》</span>
+      </el-col>
+    </el-form>
+  </div>
+</template>
+<script setup lang="ts">
+import { ref, toRefs } from 'vue';
+import { useRouter } from 'vue-router';
+import type { FormInstance } from 'element-plus';
+import { siteInfo } from '@/layout/site';
+const router = useRouter();
+const props = defineProps({
+  form: { type: Object },
+  rules: { type: Object },
+  isAgree: { type: Boolean, default: false }
+});
+const { form, rules, isAgree } = toRefs(props);
+const ruleFormRef = ref<FormInstance>();
+// 选择菜单
+const emit = defineEmits(['submitForm', 'toLogin', 'toBack']);
+// 注册
+const submitForm = async (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  await formEl.validate((valid, fields) => {
+    if (valid) {
+      console.log('submit!');
+    } else {
+      console.log('error submit!', fields);
+    }
+  });
+};
+// 去登录
+const toLogin = () => {
+  emit('toLogin');
+};
+// 返回
+const toBack = () => {
+  emit('toBack');
+};
+</script>
+<style scoped lang="scss">
+.user {
+  margin: 30px 30px 0 30px;
+  height: 340px;
+  overflow-y: auto;
+
+  .remark {
+    display: flex;
+    justify-content: space-between;
+
+    span {
+      cursor: pointer;
+      font-family: PingFangSC-Regular;
+      font-size: 14px;
+      color: #333333;
+      letter-spacing: -0.09px;
+      text-align: right;
+      line-height: 32px;
+    }
+
+    span:hover {
+      color: #2374ff;
+    }
+  }
+
+  .button {
+    padding: 10px 0;
+
+    :deep(.el-button) {
+      width: 100% !important;
+      height: 44px !important;
+      border: 0 !important;
+      color: #f8f8f8 !important;
+      font-size: 16px !important;
+      text-align: center !important;
+      line-height: 40px !important;
+      cursor: pointer !important;
+      font-family: PingFangSC-Regular !important;
+      background-color: #1492ff !important;
+    }
+  }
+
+  .agree {
+    display: flex;
+    align-items: center;
+    padding: 0 0 40px 0;
+    color: #999;
+    font-size: 12px;
+
+    span:last-child {
+      color: #2374ff;
+    }
+  }
+}
+
+.user::-webkit-scrollbar {
+  display: none;
+}
+</style>

+ 156 - 0
src/views/register/parts/unit.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="user">
+    <el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form" label-position="left">
+      <el-form-item label="账号" prop="account">
+        <el-input v-model="form.account" placeholder="请输入账号">
+          <template #prefix>
+            <el-icon>
+              <User />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="密码" prop="password">
+        <el-input v-model="form.password" type="password" show-password placeholder="请输入登录密码">
+          <template #prefix>
+            <el-icon>
+              <Unlock />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="确认密码" prop="refpassword">
+        <el-input v-model="form.refpassword" type="password" show-password placeholder="请再次确认输入密码">
+          <template #prefix>
+            <el-icon>
+              <Unlock />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="用户名" prop="nick_name">
+        <el-input v-model="form.nick_name" placeholder="请输入用户名">
+          <template #prefix>
+            <el-icon>
+              <Avatar />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="联系电话" prop="phone">
+        <el-input v-model="form.phone" placeholder="请输入联系电话">
+          <template #prefix>
+            <el-icon>
+              <Iphone />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-col :span="24" class="remark">
+        <span @click="toLogin">已有账号去登录</span>
+        <span @click="toBack">返回首页</span>
+      </el-col>
+      <el-col :span="24" class="button">
+        <el-button type="primary" @click="submitForm(ruleFormRef)">注册</el-button>
+      </el-col>
+      <el-col :span="24" class="agree">
+        <el-checkbox v-model="isAgree"></el-checkbox>
+        <span style="margin: 0 0 0 5px">我已阅读并同意</span><span @click="dialog = true">《{{ siteInfo.zhTitle }}使用协议》</span>
+      </el-col>
+    </el-form>
+  </div>
+</template>
+<script setup lang="ts">
+import { ref, toRefs } from 'vue';
+import { useRouter } from 'vue-router';
+import type { FormInstance } from 'element-plus';
+import { siteInfo } from '@/layout/site';
+const router = useRouter();
+const props = defineProps({
+  form: { type: Object },
+  rules: { type: Object },
+  isAgree: { type: Boolean, default: false }
+});
+const { form, rules, isAgree } = toRefs(props);
+const ruleFormRef = ref<FormInstance>();
+// 选择菜单
+const emit = defineEmits(['submitForm', 'toLogin', 'toBack']);
+// 注册
+const submitForm = async (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  await formEl.validate((valid, fields) => {
+    if (valid) {
+      console.log('submit!');
+    } else {
+      console.log('error submit!', fields);
+    }
+  });
+};
+// 去登录
+const toLogin = () => {
+  emit('toLogin');
+};
+// 返回
+const toBack = () => {
+  emit('toBack');
+};
+</script>
+<style scoped lang="scss">
+.user {
+  margin: 30px 30px 0 30px;
+  height: 340px;
+  overflow-y: auto;
+
+  .remark {
+    display: flex;
+    justify-content: space-between;
+
+    span {
+      cursor: pointer;
+      font-family: PingFangSC-Regular;
+      font-size: 14px;
+      color: #333333;
+      letter-spacing: -0.09px;
+      text-align: right;
+      line-height: 32px;
+    }
+
+    span:hover {
+      color: #2374ff;
+    }
+  }
+
+  .button {
+    padding: 10px 0;
+
+    :deep(.el-button) {
+      width: 100% !important;
+      height: 44px !important;
+      border: 0 !important;
+      color: #f8f8f8 !important;
+      font-size: 16px !important;
+      text-align: center !important;
+      line-height: 40px !important;
+      cursor: pointer !important;
+      font-family: PingFangSC-Regular !important;
+      background-color: #1492ff !important;
+    }
+  }
+
+  .agree {
+    display: flex;
+    align-items: center;
+    padding: 0 0 40px 0;
+    color: #999;
+    font-size: 12px;
+
+    span:last-child {
+      color: #2374ff;
+    }
+  }
+}
+
+.user::-webkit-scrollbar {
+  display: none;
+}
+</style>

+ 156 - 0
src/views/register/parts/user.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="user">
+    <el-form ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form" label-position="left">
+      <el-form-item label="账号" prop="account">
+        <el-input v-model="form.account" placeholder="请输入账号">
+          <template #prefix>
+            <el-icon>
+              <User />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="密码" prop="password">
+        <el-input v-model="form.password" type="password" show-password placeholder="请输入登录密码">
+          <template #prefix>
+            <el-icon>
+              <Unlock />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="确认密码" prop="refpassword">
+        <el-input v-model="form.refpassword" type="password" show-password placeholder="请再次确认输入密码">
+          <template #prefix>
+            <el-icon>
+              <Unlock />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="用户名" prop="nick_name">
+        <el-input v-model="form.nick_name" placeholder="请输入用户名">
+          <template #prefix>
+            <el-icon>
+              <Avatar />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="联系电话" prop="phone">
+        <el-input v-model="form.phone" placeholder="请输入联系电话">
+          <template #prefix>
+            <el-icon>
+              <Iphone />
+            </el-icon>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-col :span="24" class="remark">
+        <span @click="toLogin">已有账号去登录</span>
+        <span @click="toBack">返回首页</span>
+      </el-col>
+      <el-col :span="24" class="button">
+        <el-button type="primary" @click="submitForm(ruleFormRef)">注册</el-button>
+      </el-col>
+      <el-col :span="24" class="agree">
+        <el-checkbox v-model="isAgree"></el-checkbox>
+        <span style="margin: 0 0 0 5px">我已阅读并同意</span><span @click="dialog = true">《{{ siteInfo.zhTitle }}使用协议》</span>
+      </el-col>
+    </el-form>
+  </div>
+</template>
+<script setup lang="ts">
+import { ref, toRefs } from 'vue';
+import { useRouter } from 'vue-router';
+import type { FormInstance } from 'element-plus';
+import { siteInfo } from '@/layout/site';
+const router = useRouter();
+const props = defineProps({
+  form: { type: Object },
+  rules: { type: Object },
+  isAgree: { type: Boolean, default: false }
+});
+const { form, rules, isAgree } = toRefs(props);
+const ruleFormRef = ref<FormInstance>();
+// 选择菜单
+const emit = defineEmits(['submitForm', 'toLogin', 'toBack']);
+// 注册
+const submitForm = async (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  await formEl.validate((valid, fields) => {
+    if (valid) {
+      console.log('submit!');
+    } else {
+      console.log('error submit!', fields);
+    }
+  });
+};
+// 去登录
+const toLogin = () => {
+  emit('toLogin');
+};
+// 返回
+const toBack = () => {
+  emit('toBack');
+};
+</script>
+<style scoped lang="scss">
+.user {
+  margin: 30px 30px 0 30px;
+  height: 340px;
+  overflow-y: auto;
+
+  .remark {
+    display: flex;
+    justify-content: space-between;
+
+    span {
+      cursor: pointer;
+      font-family: PingFangSC-Regular;
+      font-size: 14px;
+      color: #333333;
+      letter-spacing: -0.09px;
+      text-align: right;
+      line-height: 32px;
+    }
+
+    span:hover {
+      color: #2374ff;
+    }
+  }
+
+  .button {
+    padding: 10px 0;
+
+    :deep(.el-button) {
+      width: 100% !important;
+      height: 44px !important;
+      border: 0 !important;
+      color: #f8f8f8 !important;
+      font-size: 16px !important;
+      text-align: center !important;
+      line-height: 40px !important;
+      cursor: pointer !important;
+      font-family: PingFangSC-Regular !important;
+      background-color: #1492ff !important;
+    }
+  }
+
+  .agree {
+    display: flex;
+    align-items: center;
+    padding: 0 0 40px 0;
+    color: #999;
+    font-size: 12px;
+
+    span:last-child {
+      color: #2374ff;
+    }
+  }
+}
+
+.user::-webkit-scrollbar {
+  display: none;
+}
+</style>

+ 4 - 5
vite.config.ts

@@ -15,14 +15,13 @@ export default defineConfig(({ mode }) => {
       port: 9009,
       host: '0.0.0.0',
       proxy: {
-        '/file': {
-          target: 'https://broadcast.waityou24.cn',
+        '/files': {
+          target: 'http://192.168.1.197', // https://broadcast.waityou24.cn
           changeOrigin: true
         },
-        '/field/v1/api': {
-          target: 'https://broadcast.waityou24.cn',
+        [env.VITE_APP_BASE_API]: {
           changeOrigin: true,
-          ws: false
+          target: 'http://192.168.1.113:9700'
         }
       },
       fs: { strict: false }