forget.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. (function() {
  2. Vue.component('forget-form', {
  3. template: `<div><div class="container-fluid">
  4. <div class="container" id="head">
  5. <div class="top-banner">
  6. <img src="../../../images/doctor_logo_img.png" class="hlogo" />
  7. <span class="qr-container">
  8. <img src="../../../images/qr_code.png" class="qr_code" />
  9. <p class="c-f12 text-center">下载APP</p>
  10. </span>
  11. <span class="c-border-l return" @click="goLogin()">返回登录页</span>
  12. </div>
  13. </div>
  14. </div>
  15. <div class="container-fluid chahua-bg c-border-t">
  16. <div class="container ptb100">
  17. <div class="forget-form c-border">
  18. <div class="clearfix">
  19. <div v-for="step in indexArr" :key="step" class="fl step" :class="{'set-active': activeIndex >= step}">
  20. <div class="clearfix" :class="{'pl15': step == 1}">
  21. <p v-if="step > 1" class="fl clearfix">
  22. <em class="fl"></em>
  23. </p>
  24. <span class="fl">{{step}}</span>
  25. <p v-if="step < 4" class="fl">
  26. <em class="fl"></em>
  27. </p>
  28. </div>
  29. <label class="mt20" :class="setClass(step)">{{setTxt(step)}}</label>
  30. </div>
  31. </div>
  32. <div class="detail-form">
  33. <div class="container-fluid" v-if="activeIndex == 1">
  34. <p class="form-group clearfix">
  35. <label class="fl form-label">用户名称</label>
  36. <input class="fl form-control" placeholder="手机号码/用户名称" />
  37. </p>
  38. <p class="form-group clearfix">
  39. <label class="fl form-label">验证码</label>
  40. <input class="fl form-control" placeholder="输入图形验证码" />
  41. </p>
  42. <p class="form-group clearfix">
  43. <label class="fl form-label"></label>
  44. <img class="fl" height="30" src="">看不清&nbsp;?&nbsp;<span class="c-0ad8c8">换一张</span>
  45. </p>
  46. </div>
  47. <div class="container-fluid" v-if="activeIndex == 2">
  48. <p class="form-group clearfix">
  49. <label class="fl form-label">用户名称</label>
  50. <input class="fl form-control" readonly="true" placeholder="用户名称" />
  51. </p>
  52. <div class="form-group">
  53. <p class="m0 clearfix">
  54. <label class="fl form-label">手机号码</label>
  55. <input class="fl form-control" readonly="true" placeholder="手机号码" />
  56. </p>
  57. <p class="c-909090 c-f12 m0"><label class="form-label h0"></label>若该手机号码无法正常使用请<span class="c-37a6ed ml5 appeal" @click="goHelp()">账号申诉</span></p>
  58. </div>
  59. <p class="form-group clearfix">
  60. <label class="fl form-label">验证码</label>
  61. <input class="fl form-control" placeholder="短信验证码" />
  62. <span class="c-0ad8c8 send">发送验证码</span>
  63. </p>
  64. </div>
  65. <div class="container-fluid" v-if="activeIndex == 3">
  66. <p class="form-group clearfix">
  67. <label class="fl form-label">新的密码</label>
  68. <input class="fl form-control" placeholder="设置6-20位登录密码" />
  69. </p>
  70. <p class="form-group clearfix">
  71. <label class="fl form-label">重复密码</label>
  72. <input class="fl form-control" placeholder="请再次输入登录密码" />
  73. </p>
  74. </div>
  75. <div class="step4 container-fluid" v-if="activeIndex == 4">
  76. <h3 class="success">密码重置成功</h3>
  77. <p class="c-909090">下次请使用新密码登录</p>
  78. </div>
  79. </div>
  80. <div>
  81. <span class="btn" v-if="activeIndex != 4" @click="next()">下一步</span>
  82. <span class="btn" v-if="activeIndex == 4" @click="goLogin()">进入登录页</span>
  83. <div>
  84. </div>
  85. </div>
  86. </div></div>`,
  87. props: [],
  88. data: function() {
  89. return {
  90. indexArr: [1, 2, 3, 4],
  91. activeIndex: 1
  92. }
  93. },
  94. methods: {
  95. setTxt: function(index) {
  96. var str = ''
  97. switch(+index) {
  98. case 1: str = '填写账号名';break
  99. case 2: str = '验证身份';break
  100. case 3: str = '设置新密码';break
  101. case 4: str = '完成';break
  102. }
  103. return str
  104. },
  105. setClass: function(index) {
  106. var str = ''
  107. switch(+index) {
  108. case 1: str = '';break
  109. case 2: str = 'txt-center';break
  110. case 3: str = 'txt-center';break
  111. case 4: str = 'txt-right';break
  112. }
  113. return str
  114. },
  115. goHelp: function() {
  116. window.location.href = "appeal.html"
  117. },
  118. goLogin: function() {
  119. window.location.href = "login.html"
  120. },
  121. next: function() {
  122. this.activeIndex++
  123. }
  124. },
  125. watch: {
  126. // Password: function(newVal, oldVal) {
  127. // var val = newVal.toString();
  128. // var reg = /\s+/g; //去除空格
  129. // if(reg.test(val)) {
  130. // this.Password = oldVal;
  131. // }
  132. // }
  133. }
  134. })
  135. // function login(data) {
  136. // httpRequest.post('login/doctor', {
  137. // data: data
  138. // }).then(function(res) {
  139. // if(res.status == 200) {
  140. // var docInfo = res.data;
  141. // localoginlStorage.setItem(httpRequest.agentName, JSON.stringify({
  142. // id: docInfo.id,
  143. // uid: docInfo.uid,
  144. // token: docInfo.token,
  145. // imei: localStorage.getItem('WLYY_IMEI'),
  146. // platform: 4
  147. // }));
  148. // //将用户的角色信息单独存储在localstorage中
  149. // localStorage.setItem("userRole", JSON.stringify(docInfo.userRole));
  150. // window.location.href = "../../home/html/index.html";
  151. // } else {
  152. // tip(res.msg);
  153. // }
  154. // });
  155. // }
  156. })()