Jelajahi Sumber

注册用户页面

natasha 1 bulan lalu
induk
melakukan
723ec50d3b
7 mengubah file dengan 1028 tambahan dan 132 penghapusan
  1. 21 0
      src/api/user.js
  2. TEMPAT SAMPAH
      src/assets/password1.png
  3. TEMPAT SAMPAH
      src/assets/password2.png
  4. 1 0
      src/store/modules/app.js
  5. 44 2
      src/views/login/index.vue
  6. 467 0
      src/views/login/userAgreement.vue
  7. 495 130
      src/views/register/index.vue

+ 21 - 0
src/api/user.js

@@ -16,3 +16,24 @@ export function login(data) {
 export function GetMyUserInfo(data) {
   return http.post(`${process.env.VUE_APP_FileServer}?MethodName=user_manager-GetMyUserInfo`, data);
 }
+
+// 注册页面机构列表
+export function orgIndexList (data) {
+  return http.post(`${process.env.VUE_APP_EepServer}?MethodName=org_manager-GetOrgList`, data, {
+    baseURL: process.env.VUE_APP_EEP,
+  });
+}
+
+// 注册页面发送验证码
+export function sendVerificationCode(data) {
+  return http.post(`${process.env.VUE_APP_EepServer}?MethodName=user_manager-SendVerificationCode`, data, {
+    baseURL: process.env.VUE_APP_EEP,
+  });
+}
+
+// 注册页面注册方法
+export function registerUser(data) {
+  return http.post(`${process.env.VUE_APP_EepServer}?MethodName=user_manager-RegisterUser`, data, {
+    baseURL: process.env.VUE_APP_EEP,
+  });
+}

TEMPAT SAMPAH
src/assets/password1.png


TEMPAT SAMPAH
src/assets/password2.png


+ 1 - 0
src/store/modules/app.js

@@ -14,6 +14,7 @@ const getDefaultSate = () => {
     },
     config: {
       logo_image_url: config?.logo_image_url ?? '',
+      title: config?.title ?? '',
     },
   };
 };

+ 44 - 2
src/views/login/index.vue

@@ -34,13 +34,27 @@
         <el-form-item>
           <div class="protocol">
             <span>
-              <el-checkbox v-model="isAgree" /> 我已阅读并同意<span style="color: #4d78ff">《用户协议》</span>
+              <el-checkbox v-model="isAgree" /> 我已阅读并同意<span
+                style="color: #4d78ff; cursor: pointer"
+                @click="viewUserAgreement"
+                >《用户协议》</span
+              >
             </span>
             <span style="color: #4d78ff; cursor: pointer">忘记密码?| <a @click="goRegister">注册</a></span>
           </div>
         </el-form-item>
       </el-form>
     </main>
+    <el-dialog
+      :visible.sync="showUseragreement"
+      width="80%"
+      append-to-body
+      :show-close="false"
+      :close-on-click-modal="false"
+      class="login-userAgree"
+    >
+      <userAgreement class="userAgree-login" :changeAgreement="changeAgreement" />
+    </el-dialog>
   </div>
 </template>
 
@@ -48,9 +62,10 @@
 import md5 from 'md5';
 import { GetVerificationCodeImage, GetLogo } from '@/api/app';
 import { setConfig } from '@/utils/auth';
-
+import UserAgreement from './userAgreement.vue';
 export default {
   name: 'LoginPage',
+  components: { UserAgreement },
   data() {
     return {
       isAgree: true, // 是否同意用户协议
@@ -80,6 +95,7 @@ export default {
         verification_code_image_text: [{ required: true, trigger: 'blur', message: '验证码不能为空' }],
       },
       image_content_base64: '',
+      showUseragreement: false,
     };
   },
   created() {
@@ -120,6 +136,13 @@ export default {
     goRegister() {
       this.$router.push({ path: '/register' });
     },
+    viewUserAgreement() {
+      this.showUseragreement = true;
+    },
+    changeAgreement(flag) {
+      this.isAgree = flag;
+      this.showUseragreement = false;
+    },
   },
 };
 </script>
@@ -220,3 +243,22 @@ export default {
   }
 }
 </style>
+<style lang="scss">
+.login-userAgree {
+  .el-dialog {
+    height: 70%;
+    border-radius: 8px;
+  }
+
+  .el-dialog__header {
+    padding: 0;
+  }
+
+  .el-dialog__body {
+    height: 100%;
+    padding: 0;
+    border-radius: 8px;
+    box-shadow: 0 4px 4px rgba(0, 0, 0, 25%);
+  }
+}
+</style>

+ 467 - 0
src/views/login/userAgreement.vue

@@ -0,0 +1,467 @@
+<template>
+  <div class="userAgreementBox">
+    <div class="userAgreement-inner">
+      <h1>{{ $store.state.app.config.title }}用户协议</h1>
+      <h2>
+        {{
+          $store.state.app.config.title
+        }}用户协议(以下简称“本协议”)由以下双方根据《中华人民共和国民法典》等相关法律法规签署并遵照执行。
+      </h2>
+      <p>
+        用户:在手机、平板电脑、电脑等注册成为平台(以下简称“平台“或“平台方”)的使用者,通过平台发布、查看、接收图文/音频/视频信息或其他文件,或与其他用户进行延时/实时交流的用户(以下简称“用户”)<br />
+        平台方:北京语言大学出版社有限公司(以下简称“平台方”)<br />
+        本协议所指“用户”包括但不限于教师身份用户、家长身份用户和学生身份用户。<br />
+        <br />
+      </p>
+      <h3>第一条 用户注册</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>
+          用户下载平台并根据平台的注册规则完成注册流程(包括但不限于设置用户名称及密码)后,即有权通过平台发布、查看、接收图文/音频/视频信息或其他文件,或与其他用户进行延时/实时交流。用户在平台上有效注册(或有效变更注册)的用户名及密码共同构成用户在平台的唯一有效身份证明。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>
+          用户一旦完成注册,则视为用户允许平台方通过短信、电子邮件、APP/服务器推送或其他方式向其发送与平台相关的信息。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>3.</b>
+        <p>
+          用户应当保证其完成上述注册(或变更注册)时所提供的身份信息及电话、电子邮箱等必要信息真实、准确、有效,如此类信息有任何变动,用户应当在三日内通过平台完成信息更新。因用户提供虚假或无效信息导致平台方或其他用户遭受损失的,用户应当承担全部责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>4.</b>
+        <p>
+          用户应自行妥善保管用户名及密码,除经平台方事先书面同意或本协议另有约定外,不得将其赠予、转让、出售或出借于他人使用;如用户发现其用户名及密码遭他人使用,应立即通知平台方以避免损失或损失扩大。因网络攻击、用户保管用户名及密码不当、转让或出借用户名及密码、怠于履行本协议及其他相关协议下的通知义务等情形或其他非平台方原因,导致用户未能正常使用平台或遭受任何损失的,由用户自行担责,平台方不承担任何责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>5.</b>
+        <p>
+          用户需自行确认,在开始注册使用平台前,其应当具备中华人民共和国法律规定的与其行为相适应的民事行为能力。若用户不具备前述与用户行为相适应的民事行为能力,则其监护人应依照法律规定承担此用户行为产生的一切法律后果(未成年人应在其监护人监督指导下使用平台)。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>6.</b>
+        <p>
+          用户注册的账户为用户自行设置并由用户自行保管,平台方任何时候均不会主动要求用户提供其账户密码。用户账户因用户的主动泄露或遭受他人攻击、诈骗等行为导致的损失及后果,平台方不承担责任,用户应自行通过司法、行政等救济途径向侵权行为人追偿。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>7.</b>
+        <p>如发生以下情形,平台方有权收回用户注册的账户,用户将不能再登录平台,相应服务同时终止;</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>7.1.</b>
+        <p>经发现非由注册用户本人实际使用的;</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>7.2.</b>
+        <p>连续三个月未用于登录平台;</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>7.3.</b>
+        <p>其他平台方认为有必要的情形。</p>
+      </div>
+      <div class="userAgreement-item">
+        <b>8.</b>
+        <p>
+          用户一旦完成注册,即视为完全了解、接受并同意遵守本协议项下的全部内容并受限于本协议相关条款。平台方有权根据法律法规、政策以及运营中的实际情况对协议进行修改,并对用户进行公布。修改后的协议条款一经平台方公布即替换本协议的原条款,构成用户与平台方之间就本协议的全部、最新协议。用户可随时在平台应用程序中查阅最新协议条款。如果用户不接受平台方修改后的最新协议条款,可选择停止使用平台并注销其账户。如用户选择继续使用平台,则视为用户门完全了角孕、接受并同意遵守平台方修改后的最新协议条款。用户承认并认可,已经完全了解并理解本协议相关内容,对本协议及相关内容不存在任何重大误解;同时认可本协议内容并不存在显失公平的情形,用户与平台方在协议中处于平等地位,用户对协议的接受与否具有自由选择的权利。
+        </p>
+      </div>
+      <br />
+      <h3>第二条 服务内容</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>平台方为用户提供发布、查看、接收图文/音频/视频信息或其他文件,或与其他用户进行延时/实时交流的服务。</p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>
+          平台方作为平台软件的设计/开发/所有/经营者,有权对于平台软件不时作出更新和调整,只要用户仍为平台的注册用户,即视为其同意平台方作出的任何更新和调整。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>3.</b>
+        <p>
+          平台方仅为用户提供发布、查看、接收图文/音频/视频信息或其他文件,或与其他用户进行延时/实时交流的技术支持,因用户自身原因造成的延迟确认、延迟回复、未按时保存、操作失误等情形,平台方不承担任何责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>4.</b>
+        <p>
+          用户应当知晓在使用平台软件的过程中可能存在由其他用户进行通知、提醒、审批、定时、评论、发起问卷、投票等行为设置,平台方仅为前述行为提供技术支持,前述行为均为用户自身行为,与平台方无关。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>5.</b>
+        <p>
+          用户应当知晓在使用平台软件的过程中可能涉及第三方服务软件的参与〈包括但不限于微信、QQ、支付宝等),因前述第三方服务软件所造成的信息提供错误、信息提供延误、信息泄露、连接错误、服务器故障等情形与平台方无关。
+        </p>
+      </div>
+      <br />
+      <h3>第三条 各方的权利义务</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>用户的权利义务</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>1.1.</b>
+        <p>用户应遵守中国有关的法律法规规定及本协议约定条款。</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>1.2.</b>
+        <p>
+          用户向平台提供的各类信息应真实、准确、完整,用户在平台发布的各类信息(包括但不限于图文、音频、视频等)应符合中国有关的法律法规;用户通过平台进行的延时/实时交流活动应当符合中国有关的法律法规。经平台方发现用户违反前述约定的,用户向平台提供/发布的信息将不再适用本合同有关隐私保护的约定,平台方有权公示、向政府部门进行举报或直接向用户追究法律责任。平台方在任何时候有权验证用户提供/发布的信息,由于用户提供虚假或不完整信息所导致的任何责任和损失,应由用户自行承担。
+        </p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>1.3.</b>
+        <p>
+          用户利用平台发布虚假、侵犯他人隐私、侵犯他人知识产权、侮辱他人、造谣诽谤等违反法律法规或公序良俗的内容从而给平台方、其他用户或第三方造成损害的,由前述用户承担全部法律后果及赔偿责任。
+        </p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>1.4.</b>
+        <p>
+          用户不得有任何损害平台方权益的行为,若用户损害平台方权益的,平台方有权要求用户承担赔偿责任,情节严重的平台方将保留追究其法律责任的权利。
+        </p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>1.5.</b>
+        <p>
+          平台方暂时免费向用户提供本协议约定之服务,但平台方保留将来向用户收取费用的权利。用户之间自行产生的任何费用支付均与平台方无关。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>平台方的权利义务</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>2.1.</b>
+        <p>在平台的变更、更新、优化后,及时通知用户。</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>2.2.</b>
+        <p>
+          平台无法保证其所提供的信息中没有任何错误、缺陷、恶意软件或病毒。对于因使用(或无法使用)平台导致的任何损害,平台不承担责任(除非此类损害是由平台的故意或重大疏忽造成的)。此外,对于因使用(或无法使用)与平台的电子通信手段导致的任何损害,包括但不限于因电子通信传达失败或延时、第三方或用于电子通信的计算机程序对电子通信的拦截或操纵,以及病毒传输导致的损害,平台不承担责任。
+        </p>
+      </div>
+      <br />
+      <h3>第四条 其他责任约定</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>
+          因不可抗力指本协议约定时不能预见、不能避免并不能克服的客观情况)导致平台方未能按约提供服务的,平台方不承担责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>服务过程中因协议双方以外的其他第三方原因造成的损失,由该第三方承担法律后果及赔偿责任。</p>
+      </div>
+      <br />
+      <h3>第五条 用户信息</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>用户信息包含用户个人信息和用户非个人信息。</p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>用户个人信息包括但不限于下列信息:用户真实姓名、性别、职业、任职/就读学校、头像、手机号码、IP地址等。</p>
+      </div>
+      <div class="userAgreement-item">
+        <b>3.</b>
+        <p>
+          用户非个人信息包括但不限下列信息:一切属于第5条所述的用户个人信息范围以外的信息,均为普通信息,不属于用户个人信息,包括但不限于用户对平台服务的操作状态、使用记录、使用习惯等反映在平台方服务器端的全部记录信息。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>4.</b>
+        <p>
+          重要提示:为向客户提供本协议所述服务,平台方将可能合理使用用户个人信息和非用户个人信息。用户一旦注册、登录、使用平台,将视为用户完全了解、同意并接受平台方通过包括但不限于收集、统计、分析、使用等方式合理使用用户信息,无需其他意思表示。为向用户完整地提供包括但不限于本协议所述的服务,平台方将可能要求用户上传用户信息(包括但不限于通讯录等),用户一旦选择上传用户信息,将视为用户完全了解、同意并接受平台方基于向用户提供服务的目的读取并合理使用用户信息。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>5.</b>
+        <p>
+          用户认可其已完全了解平台方使用用户信息的目的在于为用户提供包括本协议所述的服务或将来可能新增的服务,平台方使用用户信息的方式包括但不限于:收集、统计、分析、商业用途的使用等方式;平台方使用用户信息的范围包括但不限于本条第5.2条、5.3条、5.4条所定义的信息等。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>6.</b>
+        <p>
+          用户可以通过停止使用平台而不再向平台方提供用户信息。但是,在此之前已同意平台方使用的用户信息,平台方不承担主动删除、销毁的责任,并仍具有使用此类用户信息的权利。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>7.</b>
+        <p>
+          除非用户另有特别声明,平台方对用户信息的使用无需向用户支付任何费用,并且在用户同意本协议的基础上,无需向用户另行取得授权。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>8.</b>
+        <p>平台方尊重用户的合法权利,不会以违反法律、行政法规以及本协议约定的方式收集、使用用户信息。</p>
+      </div>
+      <div class="userAgreement-item">
+        <b>9.</b>
+        <p>
+          非因平台方违反本协议的约定而导致的用户信息的泄露与平台方无关。任何用户(包括但不限于教师身份用户、家长身份用户、学生身份用户)不得利用、泄露、散播通过平台获取的其他用户的用户信息,用户发生前述行为的,平台方不承担任何责任,由前述侵权用户承担全部责任。任何平台方、用户外的第三方不得利用、泄露、散播通过平台获取的其他用户的用户信息,第三方发生前述行为的,平台方不承担任何责任,由该第三方承担全部责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>10.</b>
+        <p>平台方对按照有关法律法规要求、按照相关政府主管部门/司法机关的要求而披露用户信息的行为不承担任何责任。</p>
+      </div>
+      <br />
+      <h3>第六条 知识产权</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>
+          本协议所指知识产权是指与平台服务相关的各类过去有效的、现行有效的或即将产生的知识产权,包括但不限于商标、著作权、计算机软件、发明、实用新型、外观设计以及提出相关申请的权利。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>
+          平台方为与平台服务相关的全部知识产权的权利人,对平台服务提供过程中包含的全部知识产权,包括但不限于文本、图片、图形、音频和或视频资料享有及保留完整、独立的全部权利。未经平台方同意,用户及第三方不得在任何媒体直接或间接发布、播放、出于播放或发布目的而改写或再发行平台方享有的知识产权或者平台方提供的任何资料和信息,也不得将前述资料和信息用于任何商业目的。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>3.</b>
+        <p>
+          对于用户本人创作并上传到平台的任何图文/音频/视频等,平台方保留对其内容进行监控的权利,并有权依平台方独立判断对任何违反本协议约定或涉嫌违法违规问题的内容实施删除操作。平台方对于删除此类用户作品引起的任何后果或导致用户的任何损失不负任何责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>4.</b>
+        <p>知识产权条款持续有效,不因用户关闭平台账户或者停止使用平台服务而失效。</p>
+      </div>
+      <br />
+      <h3>第七条 其他免责声明</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>
+          平台方或用户提供的全部信息仅依照此类信息提供时的现状提供并仅供用户参考,平台方不对前述信息的真实性、准确性、完整性、适用性等做任何承诺和保证。用户应对平台方或其他用户提供的信息自行判断,并承担因使用前述信息而引起的全部风险,包括因其对信息的真实性、准确性、完整性或适用性的任何依赖或信任而导致的风险。平台方无需对因用户使用信息的任何行为导致的任何损失承担责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>
+          对于因不可抗力或平台方不能预料、不能控制的原因(包括但不限于计算机病毒或黑客攻击、系统不稳定、用户不当使用账户、以及其他任何技术、互联网络、通信线路原因等)产生的包括但不限于用户计算机信息和数据的安全问题,用户个人信息的安全问题等给用户或任何第三方造成的损失,平台方不承担任何责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>3.</b>
+        <p>
+          用户因违法、违规或违反本协议约定使用平台的行为,包括但不限于提供违法、不真实、不正当信息,侵犯第三方任何合法权益等,给平台方或其他第三方造成的任何损失,由用户自身承担由此造成的全部法律后果及损害赔偿责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>4.</b>
+        <p>
+          用户完全了解并同意,在使用平台服务的过程中,可能存在来自任何其他用户的包括威胁性的、诽谤性的、令人反感的或非法的内容或行为,也可能存在对他人权利(包括知识产权)造成侵犯的匿名、冒名或伪造的各种信息或行为,用户须自行判断相关内容、信息、行为的安全性等风险,并自行独立承担因上述行为给平台方、其他用户或第三方造成损害的一切法律后果。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>5.</b>
+        <p>
+          平台方对其合作方通过平台提供的全部服务及内容不作任何形式的承诺或保证,不论是明确的或暗示的。前述承诺或保证包括但不限于:第三方通过平台提供的服务或内容的真实性、时效性、对特定用途的适用性、任何形式的所有权保证,非侵权保证等。平台方对因前述第三方服务内容导致的任何直接、间接、偶然、特殊及后续的损害,不承担任何责任。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>6.</b>
+        <p>
+          本平台在为用户提供信息存储空间服务的同时,十分重视互联网环境的绿色、健康以及其他用户的知识产权和其他合法权益的保护。用户在上传分享内容时,需注意不得侵犯任何个人、企事业单位或社会团体的合法权益,包括但不限于姓名权、名称权、名誉权、荣誉权、肖像权、隐私权、知识产权等权利,否则用户针对其自身行为及对由此产生的任何后果承担全部法律责任。本平台仅为用户提供上传服务供用户分享内容,除另行约定外,本平台对用户上传的内容不做任何修改或编辑,本平台坚决反对任何违反中华人民共和国法律法规的行为。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>7.</b>
+        <p>
+          如您认为本平台中由用户上传的内容(包含文字、图片等形式)侵犯了您的合法权益,或用户上传的内容违反了相关的法律法规,请按照以下步骤和要求提交相关材料进行举报,以尽可能地维护互联网的绿色环境、保护您的合法权益。本平台将根据权利人提交的材料,遵循相关法律法规,在审查核实后尽快予以处理。点击“举报”按钮,并按照系统的提示填写相应的信息。包括但不限于以下内容:
+        </p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>7.1.</b>
+        <p>权利人主体信息;</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>7.2.</b>
+        <p>权利人举报的侵权内容及要求:包括要求删除、断开链接的内容及其网页地址;</p>
+      </div>
+      <div class="userAgreement-item userAgreement-item-little">
+        <b>7.3.</b>
+        <p>
+          权利人的权利证明材料:如著作权、商标权、专利权等知识产权侵权,则应提供包括但不限于著作权登记证书、商标证、专利证书、作品首次公开发表或发行日期证明材料、创作手稿、经权威机构签发的作品创作时间戳、作品备案证书等能有效证明权利人拥有相关权利的权属证明;如名誉权、隐私权等其他合法权益侵权,则应提供相应有效证明材料;以及对涉嫌侵权行为和侵权事实的具体列明。权利人应当保证:其在举报界面中提供的信息及其他相关材料是真实、合法、有效的。由于举报人提供的相关材料、文件引起的一切后果皆由举报人承担。举报人保证承担和赔偿因本平台根据举报人的通知而删除或者断开有关内容的链接而给本平台造成的任何损失,包括但不限于本平台因向被投诉或对用户赔偿而产生的损失及本平台名誉、商誉损害等。本平台在收到符合上述要求的举报信息后,将在合理时间内审查,审查无误后将删除涉嫌侵权的内容。如不符合上述条件,我们会将举报信息驳回并请您补充提供相应信息和材料,但暂时不会采取包括删除或者断开等相应措施。由于举报信息涉及的内容不同,复杂程度亦不同,故所需周期也不同,请您耐心等待。
+        </p>
+      </div>
+      <br />
+      <h3>第八条 适用法律和争议解决</h3>
+      <div class="userAgreement-item">
+        <b>1.</b>
+        <p>
+          本协议的成立、生效、履行、解释及因本协议产生的任何争议,均适用中华人民共和国相关法律法规(不包括港澳台地区法律法规)。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>2.</b>
+        <p>
+          用户和平台方之间与本协议有关的任何争议,首先应友好协商解决,在争议发生之日起三十日内仍不能通过协商达成一致的,用户同意将前述争议提交平台方所在地的人民法院进行诉讼。
+        </p>
+      </div>
+      <div class="userAgreement-item">
+        <b>3.</b>
+        <p>如本协议中的任何条款因任何原因完全或部分无效或不具有执行力,均不影响本协议其他条款的效力。</p>
+      </div>
+      <div class="userAgreement-item">
+        <b>4.</b>
+        <p>本协议及本协议任何条款内容的最终解释权及修改权归平台方所有。</p>
+      </div>
+    </div>
+    <!-- 操作按钮 -->
+    <div class="userAgreement-btn">
+      <a @click="changeAgreement(false)">不同意</a>
+      <a @click="changeAgreement(true)">我已阅读并同意</a>
+    </div>
+  </div>
+</template>
+
+<script>
+//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+//例如:import 《组件名称》from ‘《组件路径》';
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: {},
+  props: ['changeAgreement'],
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //计算属性 类似于data概念
+  computed: {},
+  //监控data中数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  //生命周期-创建之前
+  beforeCreated() {},
+  //生命周期-挂载之前
+  beforeMount() {},
+  //生命周期-更新之前
+  beforUpdate() {},
+  //生命周期-更新之后
+  updated() {},
+  //生命周期-销毁之前
+  beforeDestory() {},
+  //生命周期-销毁完成
+  destoryed() {},
+  //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {},
+};
+</script>
+<style lang="scss" scoped>
+/* @import url(); 引入css类 */
+.userAgreementBox {
+  position: relative;
+  height: 100%;
+  padding: 24px 24px 72px;
+  text-align: justify;
+  background: #fff;
+  border-radius: 8px;
+
+  .userAgreement-inner {
+    height: 100%;
+    padding: 48px;
+    overflow: auto;
+    font-size: 14px;
+    line-height: 28px;
+    color: #000;
+    background: #f8f8f8;
+    border-radius: 8px;
+  }
+
+  h1 {
+    margin: 0;
+    font-size: 16px;
+    font-weight: 600;
+    line-height: 22px;
+    text-align: center;
+  }
+
+  h2 {
+    margin: 31px 0 16px;
+    font-size: 14px;
+    font-weight: 500;
+    color: #ce7c00;
+  }
+
+  h3 {
+    margin: 0;
+    font-weight: 500;
+  }
+
+  p {
+    margin: 0;
+    font-weight: 400;
+  }
+
+  .userAgreement-item {
+    display: flex;
+    padding-left: 18px;
+
+    b {
+      flex-shrink: 0;
+      width: 22px;
+      font-weight: normal;
+      text-align: center;
+    }
+
+    &-little {
+      padding-left: 40px;
+
+      b {
+        width: 28px;
+      }
+    }
+  }
+
+  .userAgreement-btn {
+    position: absolute;
+    bottom: 0;
+    left: 50%;
+    width: 416px;
+    height: 72px;
+    margin-left: -208px;
+
+    a {
+      display: inline-block;
+      width: 194px;
+      height: 40px;
+      margin: 16px 7px;
+      font-size: 16px;
+      font-weight: 500;
+      line-height: 40px;
+      color: #fff;
+      text-align: center;
+      cursor: pointer;
+      background: #8b8b8b;
+      border-radius: 4px;
+
+      &:nth-child(2) {
+        background: #f90;
+      }
+    }
+  }
+}
+
+::-webkit-scrollbar {
+  display: none;
+}
+</style>

+ 495 - 130
src/views/register/index.vue

@@ -1,66 +1,136 @@
 <template>
-  <div class="login">
-    <main class="login-container">
+  <div class="register">
+    <div class="header">
+      <div class="logo">
+        <el-image class="logo-image" :src="$store.state.app.config.logo_image_url" />
+      </div>
+      <div class="selectLoginOrRegistration" @click="goLogin">
+        <span>登录</span>
+      </div>
+    </div>
+    <main class="register-container">
       <div class="title">注册</div>
-      <el-form ref="loginForm" :model="form" :rules="rules" label-position="right">
-        <el-form-item prop="server_address" label="服务器地址">
-          <el-input v-model="form.server_address" placeholder="请输入服务器地址" />
-        </el-form-item>
+      <el-form ref="registerForm" :model="form" :rules="rules" label-width="100px" inline>
         <el-form-item prop="user_name" label="用户名">
           <el-input v-model="form.user_name" />
         </el-form-item>
-        <el-form-item prop="password" label="密码">
-          <el-input v-model="form.password" type="password" show-password />
+        <el-form-item prop="real_name" label="真实姓名">
+          <el-input v-model="form.real_name" />
         </el-form-item>
-        <el-form-item prop="user_type" label="用户类型">
-          <el-radio-group v-model="form.user_type">
-            <el-radio label="USER">机构用户</el-radio>
-            <el-radio label="ORG_MANAGER">机构管理员</el-radio>
-            <el-radio label="ADMIN">系统管理员</el-radio>
-          </el-radio-group>
+        <el-form-item prop="phone_or_email" label="邮箱">
+          <el-input v-model="form.phone_or_email" @change="ChangeEmail" />
         </el-form-item>
-
-        <el-form-item prop="verification_code_image_text" class="verification-code" label="验证码">
-          <el-input v-model="form.verification_code_image_text" @keyup.enter.native="signIn" />
-          <el-image
-            v-if="image_content_base64.length > 0"
-            :src="`data:image/jpg;base64,${image_content_base64}`"
-            @click="updateVerificationCode"
+        <el-form-item prop="verification_code" label="邮箱验证码">
+          <el-input style="width: 202px" v-model="form.verification_code" maxlength="6" />
+          <button v-if="VerificationCodeShow" class="waitTime" disabled>
+            {{ time + 's' }}
+          </button>
+          <button type="button" v-else @click.prevent="getVerificationCode" :class="['getVerification']">获取</button>
+        </el-form-item>
+        <el-form-item prop="org_id" label="机构">
+          <el-select v-model="form.org_id" filterable>
+            <el-option v-for="item in institutionList" :key="item.id" :value="item.id" :label="item.name"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="password" label="密码">
+          <el-input
+            v-model="form.password"
+            :type="parsswordType"
+            @change="changeParssword"
+            @input="trimInput('password')"
+            maxlength="12"
+          />
+          <img
+            v-show="parsswordType == 'password'"
+            @click="lookParssowrd(1)"
+            :class="['rightimg']"
+            src="@/assets/password1.png"
+            alt=""
+          />
+          <img
+            v-show="parsswordType == 'text'"
+            @click="lookParssowrd(1)"
+            :class="['rightimg']"
+            src="@/assets/password2.png"
+            alt=""
           />
+          <p :class="passwordError ? 'textRed' : 'psswordHint'">请输入8-12位大写字母、小写字母和数字组合。</p>
         </el-form-item>
-        <el-form-item>
-          <el-button class="submit" type="primary" @click="signIn">登录</el-button>
+        <el-form-item prop="confirmPwd" label="重复密码">
+          <el-input
+            v-model="form.confirmPwd"
+            :type="twoPasswordType"
+            @change="Changetowpassword"
+            @input="trimInput('confirmPwd')"
+            maxlength="12"
+          />
+          <img
+            v-show="twoPasswordType == 'password'"
+            @click="lookParssowrd(2)"
+            :class="['rightimg']"
+            src="@/assets/password1.png"
+            alt=""
+          />
+          <img
+            v-show="twoPasswordType == 'text'"
+            @click="lookParssowrd(2)"
+            :class="['rightimg']"
+            src="@/assets/password2.png"
+            alt=""
+          />
+          <p :class="passwordErrorTwo ? 'textRed' : 'psswordHint'">请再次输入密码。这两项必须相同。</p>
         </el-form-item>
+        <hr />
+
         <el-form-item>
           <div class="protocol">
             <span>
-              <el-checkbox v-model="isAgree" /> 我已阅读并同意<span style="color: #4d78ff">《用户协议》</span>
+              <el-checkbox v-model="isAgree" /> 我已阅读并同意<span
+                style="color: #4d78ff; cursor: pointer"
+                @click="viewUserAgreement"
+                >《用户协议》</span
+              >
             </span>
-            <span style="color: #4d78ff">忘记密码?| <a>注册</a></span>
           </div>
         </el-form-item>
+        <el-form-item>
+          <el-button :loading="isLogin" class="submit" type="primary" @click="submitForm('registerForm')"
+            >注册</el-button
+          >
+        </el-form-item>
       </el-form>
     </main>
+    <el-dialog
+      :visible.sync="showUseragreement"
+      width="80%"
+      append-to-body
+      :show-close="false"
+      :close-on-click-modal="false"
+      class="login-userAgree"
+    >
+      <userAgreement class="userAgree-login" :changeAgreement="changeAgreement" />
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import md5 from 'md5';
-import { GetVerificationCodeImage, GetLogo } from '@/api/app';
-import { setConfig } from '@/utils/auth';
-
+import { orgIndexList, sendVerificationCode, registerUser } from '@/api/user';
+import UserAgreement from '../login/userAgreement.vue';
 export default {
   name: 'RegisterPage',
+  components: { UserAgreement },
   data() {
     return {
-      isAgree: true, // 是否同意用户协议
       form: {
-        user_type: 'USER',
         user_name: '',
+        real_name: '',
+        org_id: '',
+        image_id: '',
         password: '',
-        is_password_md5: 'true',
-        verification_code_image_id: '',
-        verification_code_image_text: '',
+        verification_type: 'EMAIL',
+        phone_or_email: '',
+        verification_code: '',
+        confirmPwd: '',
       },
       rules: {
         user_name: [
@@ -70,6 +140,20 @@ export default {
             trigger: 'blur',
           },
         ],
+        real_name: [
+          {
+            required: true,
+            message: '请输入真实姓名',
+            trigger: 'blur',
+          },
+        ],
+        org_id: [
+          {
+            required: true,
+            message: '请选择机构',
+            trigger: 'blur',
+          },
+        ],
         password: [
           {
             required: true,
@@ -77,141 +161,422 @@ export default {
             trigger: 'blur',
           },
         ],
-        verification_code_image_text: [{ required: true, trigger: 'blur', message: '验证码不能为空' }],
+        verification_code: [{ required: true, trigger: 'blur', message: '验证码不能为空' }],
+        phone_or_email: [
+          {
+            required: true,
+            message: '请输入邮箱',
+            trigger: 'blur',
+          },
+        ],
+        confirmPwd: [
+          {
+            required: true,
+            message: '请输入重复密码',
+            trigger: 'blur',
+          },
+        ],
       },
-      image_content_base64: '',
+      VerificationCodeShow: false,
+      time: 60,
+      showUseragreement: false,
+      isAgree: true,
+      institutionList: [],
+      parsswordType: 'password',
+      twoPasswordType: 'password',
+      EmailError: null, //邮箱是否正确
+      passwordError: false,
+      passwordErrorTwo: false,
+      isLogin: false,
     };
   },
   created() {
-    this.updateVerificationCode();
-    this.getLogo();
+    this.getinstitutionList();
   },
   methods: {
-    updateVerificationCode() {
-      GetVerificationCodeImage().then(({ image_id, image_content_base64: image }) => {
-        this.form.verification_code_image_id = image_id;
-        this.image_content_base64 = image;
-      });
+    // 去除空格
+    trimInput(key) {
+      this.form[key] = this.form[key].trim();
     },
-
-    getLogo() {
-      GetLogo().then((res) => {
-        setConfig(res);
+    goLogin() {
+      this.$router.go(-1);
+    },
+    //   提交
+    submitForm(formName) {
+      let flag = false;
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+        } else {
+          flag = true;
+          return false;
+        }
       });
+      //   是否勾选了同意协议
+      if (!this.isAgree) {
+        // "阅读并同意用户协议"
+        this.$message.warning('阅读并同意用户协议');
+        return;
+      }
+      if (this.form.confirmPwd != this.form.password) {
+        //Key544
+        this.$message.warning('两次密码不一致');
+        return;
+      }
+      if (this.passwordError) {
+        this.$message.warning('密码格式不正确');
+        return;
+      }
+      if (flag) {
+        return;
+      }
+      this.isLogin = true;
+      registerUser(this.form)
+        .then((res) => {
+          if (res.status === 1) {
+            this.$message.success('success');
+            this.isLogin = false;
+          }
+        })
+        .catch((err) => {
+          this.isLogin = false;
+        });
     },
-
-    signIn() {
-      this.$refs.loginForm.validate((valid) => {
-        if (!valid) return false;
-
-        let _form = { ...this.form, password: md5(this.form.password).toUpperCase() };
-        this.$store
-          .dispatch('user/login', _form)
-          .then(() => {
-            this.$router.push({ path: '/' });
-          })
-          .catch(() => {
-            this.updateVerificationCode();
-          });
+    // 查看密码
+    lookParssowrd(number) {
+      if (number == 1) {
+        if (this.parsswordType == 'text') {
+          this.parsswordType = 'password';
+        } else {
+          this.parsswordType = 'text';
+        }
+      } else {
+        if (this.twoPasswordType == 'text') {
+          this.twoPasswordType = 'password';
+        } else {
+          this.twoPasswordType = 'text';
+        }
+      }
+    },
+    // 验证密码
+    changeParssword() {
+      if (this.form.password) {
+        //let reg = /^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*).{8,12}$/;
+        let reg = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z\d]{8,12}$/;
+        let result = reg.test(this.form.password);
+        if (result) {
+          this.passwordError = false;
+        } else {
+          this.passwordError = true;
+        }
+      }
+    },
+    // 验证第二次密码是否一样
+    Changetowpassword() {
+      if (this.form.confirmPwd) {
+        if (this.form.confirmPwd !== this.form.password) {
+          this.passwordErrorTwo = true;
+          return;
+        } else {
+          this.passwordErrorTwo = false;
+        }
+      }
+    },
+    // 验证邮箱
+    ChangeEmail() {
+      let reg = /^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; //验证邮箱的正则
+      this.EmailError = reg.test(this.form.phone_or_email);
+      if (!this.EmailError) {
+        this.EmailError = false;
+        // 邮箱格式不正确
+        this.$message.error('邮箱格式不正确');
+      }
+    },
+    // 获取验证码
+    getVerificationCode() {
+      if (!this.EmailError) {
+        this.EmailError = false;
+        this.$message.error('邮箱格式不正确');
+        return;
+      }
+      let this_ = this;
+      let timer;
+      if (this_.form.phone_or_email) {
+        let data = {
+          verification_type: 'EMAIL',
+          phone_or_email: this_.form.phone_or_email,
+        };
+        sendVerificationCode(data).then((res) => {
+          if (res.status === 1) {
+            this.$message.success('验证码发送成功');
+            this_.VerificationCodeShow = true;
+            timer = setInterval(() => {
+              this_.time--;
+              if (this_.time == 0) {
+                this_.VerificationCodeShow = false;
+                clearInterval(timer);
+                timer = null;
+                this_.time = 60;
+              }
+            }, 1000);
+          }
+        });
+      } else {
+        // 请先输入邮箱或手机号码"
+        this_.$message.warning('请先输入邮箱');
+      }
+    },
+    // 获取机构列表
+    getinstitutionList() {
+      let data = {
+        page_capacity: 10000,
+        cur_page: 1,
+      };
+      orgIndexList(data).then((res) => {
+        if (res.status === 1) {
+          this.institutionList = res.org_list;
+        }
       });
     },
+    viewUserAgreement() {
+      this.showUseragreement = true;
+    },
+    changeAgreement(flag) {
+      this.isAgree = flag;
+      this.showUseragreement = false;
+    },
   },
 };
 </script>
 
 <style lang="scss" scoped>
-.login {
-  position: relative;
-  width: 100%;
-  height: 100%;
+.header {
+  position: sticky;
+  top: 0;
+  left: 0;
+  display: flex;
+  column-gap: 24px;
+  align-items: center;
+  justify-content: space-between;
+  height: $header-h;
+  padding: 0 24px;
   overflow: hidden;
-  background: #2148c0 url('~@/assets/login/login-bg.png') no-repeat center center / cover;
+  background-color: #fff;
+  border-bottom: 1px solid #ebebeb;
+
+  .logo {
+    flex: 1;
+    height: 48px;
+    margin-right: 36px;
+
+    &-image {
+      height: 100%;
+    }
+  }
+
+  .selectLoginOrRegistration {
+    box-sizing: border-box;
+    display: flex;
+
+    // justify-content: space-evenly;
+    align-items: center;
+    height: 32px;
+    color: black;
+    cursor: pointer;
+    border: 1px solid black;
+    border-radius: 4px;
 
+    span {
+      min-width: 64px;
+      padding: 0 8px;
+      text-align: center;
+      cursor: pointer;
+    }
+  }
+}
+
+.register {
   &-container {
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    margin-top: -350px;
-    margin-left: -200px;
+    height: calc(100vh - 144px);
+    padding: 40px;
+    margin: 40px 60px;
+    overflow: auto;
+    background: #fff;
+    border-radius: 8px;
 
     .title {
-      margin-bottom: 28px;
+      margin-bottom: 50px;
       font-size: 24px;
-      color: #fff;
-      text-align: center;
+      color: #f90;
     }
+  }
 
-    :deep .el-form {
-      max-width: 400px;
-      padding: 24px 32px;
-      margin: 0 auto;
-      background-color: #fff;
-      border-radius: 16px;
-
-      &-item {
-        &__label {
-          margin-bottom: 4px;
-          font-size: 18px;
-          font-weight: bold;
-          color: #000;
-
-          &::before {
-            display: none;
-          }
-        }
+  hr {
+    width: 474px;
+    height: 1px;
+    margin: 0;
+    background: #d9d9d9;
+  }
+
+  .el-input,
+  .el-select {
+    width: 334px;
+  }
+
+  .el-form-item {
+    display: flex;
+    width: 1140px;
+
+    .lable {
+      display: flex;
+      width: 120px !important;
+      text-align: left;
+
+      img {
+        width: 24px;
+        height: 24px;
+        vertical-align: middle;
       }
 
-      .el-input {
-        &__inner {
-          height: 40px;
-          line-height: 40px;
-          background-color: #fff;
-        }
+      span {
+        margin: 0 10px;
+        line-height: 24px;
       }
+    }
+  }
 
-      .verification-code {
-        display: flex;
-        flex-direction: column;
+  .ruleForm .el-form-item::after {
+    left: -8px;
+  }
 
-        label {
-          text-align: left;
-        }
+  .getVerification {
+    box-sizing: border-box;
+    width: 116px;
+    height: 32px;
+    padding: 0;
+    margin-left: 16px;
+    line-height: 32px;
+    color: white;
+    cursor: pointer;
+    background: #f90;
+    border: 1px solid #f90;
+    border-radius: 4px;
 
-        .el-input {
-          width: calc(100% - 112px);
-          margin-right: 10px;
-        }
+    &.marginRight {
+      margin-right: 16px;
+      margin-left: 0;
+    }
+  }
 
-        .el-image {
-          height: 38px;
-          vertical-align: bottom;
-          cursor: pointer;
-        }
-      }
+  .waitTime {
+    box-sizing: border-box;
+    width: 116px;
+    height: 32px;
+    margin-left: 16px;
+    color: black;
+    cursor: pointer;
+    background: #f0f0f0;
+    border: none;
+    border-radius: 4px;
+  }
 
-      .submit {
-        width: 100%;
-      }
+  .rightimg {
+    position: absolute;
+    top: 6px;
+    right: 10px;
+    width: 20px;
+    cursor: pointer;
 
-      .protocol {
-        display: flex;
-        justify-content: space-between;
-        font-size: 12px;
-        color: #000;
-      }
+    &.posLeft {
+      right: auto;
+      left: 10px;
+    }
+  }
+
+  .psswordHint {
+    width: 334px;
+    padding: 0;
+    margin: 0;
+    margin-top: 5px;
+    font-size: 14px;
+    line-height: 20px;
+    color: #000;
+    opacity: 0.3;
+  }
+
+  .textRed {
+    width: 334px;
+    padding: 0;
+    margin: 0;
+    margin-top: 5px;
+    font-size: 14px;
+    line-height: 20px;
+    color: red;
+    opacity: 1;
+  }
+
+  .submit {
+    width: 337px;
+    height: 40px;
+    margin-left: 55px;
+    color: white;
+    cursor: pointer;
+    background: #f90;
+    border: none;
+    border-radius: 4px;
+    outline: none;
+  }
+
+  .agreementAndRemeberMeAndForgetparssword {
+    display: flex;
+    justify-content: flex-end;
+    width: 474px;
 
-      .el-form-item--small.el-form-item:last-child {
-        margin-bottom: 0;
+    > div {
+      position: relative;
+      width: 334px;
+      margin: 20px 0;
+    }
+
+    .agreement {
+      span {
+        color: #f90;
       }
     }
+  }
 
-    .not-tips {
-      margin-top: 20px;
-      font-size: 12px;
-      color: #fff;
-      text-align: center;
+  .remeberMeAndForgetparssword {
+    p {
+      margin: 0;
+      color: #f90;
+      text-align: right;
       cursor: pointer;
     }
   }
+
+  .Noafter::after {
+    content: '';
+  }
+}
+
+@keyframes rotated {
+  0% {
+    transform: rotateZ(0deg);
+  }
+
+  100% {
+    transform: rotateZ(360deg);
+  }
+}
+
+.el-form-item__content {
+  position: relative;
+}
+
+.error-notice {
+  position: absolute;
+  bottom: -27px;
+  left: 0;
+  font-size: 12px;
+  color: #ccc;
 }
 </style>