PasswordStepSelect.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. <template>
  2. <div class="validation">
  3. <div class="container">
  4. <div class="content">
  5. <div class="content-top">
  6. <h3>密码重置</h3>
  7. <div class="step">
  8. <img src="/images/all/step01.png" alt=""/>
  9. <div class="step-item"><span class="active">账号验证</span><span>密码设置</span><span>设置完成</span></div>
  10. </div>
  11. </div>
  12. <div class="choose">
  13. <div v-if="$store.state.option.isLogin.data.content.isLogin"
  14. @click="chooseWay('before')">
  15. <img src="/images/all/icon03.png" alt="" class="first mob"/>
  16. <span>通过登录密码</span><i class="fa fa-angle-right second"></i>
  17. </div>
  18. <div v-show="hasValidPhoneWay"
  19. @click="chooseWay('mobile')">
  20. <img src="/images/all/icon01.png" alt="" class="first mob"/>
  21. <span>通过验证手机</span><i class="fa fa-angle-right second"></i>
  22. </div>
  23. <div v-show="hasValidEmailWay"
  24. @click="chooseWay('email')">
  25. <img src="/images/all/icon02.png" alt="" class="first"/>
  26. <span>通过验证邮箱</span><i class="fa fa-angle-right second"></i>
  27. </div>
  28. <!--修改密码隐藏人工申诉入口-->
  29. <!--<div v-show="showManualAppeal"-->
  30. <!--@click="goPasswordSetAppeal">-->
  31. <!--<img src="/images/all/icon04.png" alt="" class="first"/>-->
  32. <!--<span>通过人工申诉</span><i class="fa fa-angle-right second"></i>-->
  33. <!--</div>-->
  34. </div>
  35. </div>
  36. <loading v-show="isShowLoading"/>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. import Loading from '~components/common/loading/Loading.vue'
  42. export default {
  43. name: 'validation',
  44. components: {
  45. Loading
  46. },
  47. data () {
  48. return {
  49. isShowLoading: false,
  50. hasValidPhoneWay: false,
  51. hasValidEmailWay: false,
  52. mobile: '',
  53. email: ''
  54. }
  55. },
  56. mounted () {
  57. // 获取验证方式
  58. this.$nextTick(() => {
  59. this.getVerifyWay()
  60. })
  61. },
  62. methods: {
  63. // 选择验证方式
  64. chooseWay (type) {
  65. this.$emit('stepEvent', type)
  66. if (type === 'mobile') {
  67. this.$emit('setDataEvent', this.mobile)
  68. } else if (type === 'email') {
  69. this.$emit('setDataEvent', this.email)
  70. }
  71. },
  72. // 获取验证方式
  73. getVerifyWay () {
  74. console.log(this.$store.state.option.isLogin)
  75. this.$http.get('/sso/resetPwd/checkType/' + (this.$store.state.option.isLogin.data.content.isLogin ? 'update' : 'reset'))
  76. .then(response => {
  77. if (response.data.success) {
  78. console.log(response.data)
  79. if (!response.data.content) {
  80. this.hasValidPhoneWay = false
  81. this.hasValidEmailWay = false
  82. } else {
  83. if (response.data.content.mobile) {
  84. this.hasValidPhoneWay = true
  85. this.mobile = response.data.content.mobile
  86. }
  87. if (response.data.content.email) {
  88. this.hasValidEmailWay = true
  89. this.email = response.data.content.email
  90. }
  91. }
  92. } else {
  93. return Promise.reject(response.data)
  94. }
  95. }).catch(err => {
  96. this.$message.error(err.errMsg)
  97. })
  98. },
  99. // 跳转到人工申诉页面
  100. goPasswordSetAppeal () {
  101. window.location.href = '/appeals/passwordRestAppeal'
  102. }
  103. }
  104. }
  105. </script>
  106. <style lang="scss" scoped>
  107. .validation {
  108. margin: 0 auto;
  109. width: 100%;
  110. background: #eee;
  111. .container{
  112. padding-top: 50px;
  113. margin: 0 auto;
  114. width: 980px;
  115. text-align: center;
  116. .content{
  117. padding: 0 50px;
  118. margin: 50px auto 0;
  119. width: 100%;
  120. /*height: 540px;*/
  121. text-align: center;
  122. background: #fff;
  123. .content-top{
  124. height: 80px;
  125. line-height: 80px;
  126. h3{
  127. margin-bottom: 0;
  128. font-size: 24px;
  129. color: #000;
  130. border-bottom: 1px solid #dcdcdc;
  131. }
  132. .step{
  133. position: relative;
  134. margin-top: 10px;
  135. img{
  136. width: 315px;
  137. height: 46px;
  138. }
  139. .step-item{
  140. position: absolute;
  141. top: 45px;
  142. left: 265px;
  143. span{
  144. margin-right: 85px;
  145. font-size: 14px;
  146. color: #b4b4b4;
  147. }
  148. span.active {
  149. color: #0076ad;
  150. }
  151. }
  152. }
  153. }
  154. form {
  155. margin-top: 150px;
  156. padding-bottom: 44px;
  157. input{
  158. padding: 0 0 0 18px;
  159. width: 360px;
  160. height: 44px;
  161. line-height: 44px;
  162. font-size: 14px;
  163. color: #000;
  164. border-radius: 0;
  165. }
  166. input.answer {
  167. background: url("/images/all/more.png") no-repeat 325px center;
  168. cursor: pointer;
  169. }
  170. ul{
  171. display: none;
  172. position: absolute;
  173. top: 44px;
  174. left: 0;
  175. width: 360px;
  176. background: #fff;
  177. box-shadow: 0 0 5px rgba(0,0,0,.5);
  178. -moz-box-shadow: 0 0 5px rgba(0,0,0,.5);
  179. -o-box-shadow: 0 0 5px rgba(0,0,0,.5);
  180. -webkit-box-shadow: 0 0 5px rgba(0,0,0,.5);
  181. z-index: 10;
  182. li{
  183. padding-left: 18px;
  184. width: 100%;
  185. height: 30px;
  186. line-height: 30px;
  187. text-align: left;
  188. font-size: 14px;
  189. color: #000;
  190. cursor: pointer;
  191. &:hover{
  192. background: #0076ad;
  193. color: #fff;
  194. }
  195. }
  196. }
  197. span.tip{
  198. position: absolute;
  199. top: 0;
  200. right: -238px;
  201. font-size: 13px;
  202. color: #8c8c8c;
  203. a{
  204. font-size: 13px;
  205. color: #0076ad;
  206. }
  207. }
  208. span.tip.codeError-tip{
  209. position: absolute;
  210. top: 3px;
  211. left: 378px;
  212. width: 200px;
  213. text-align: left;
  214. color: #ff4949;
  215. font-size: 12px;
  216. }
  217. i{
  218. position: absolute;
  219. top: 13px;
  220. left: 20px;
  221. font-size: 20px;
  222. color: #a0a0a0;
  223. }
  224. .btn {
  225. margin: 34px 0 16px 0;
  226. width: 360px;
  227. height: 44px;
  228. line-height: 44px;
  229. font-size: 16px;
  230. color: #fff;
  231. background: #0076AD;
  232. border-radius: 3px;
  233. }
  234. }
  235. .content-bottom{
  236. margin: 155px auto 0;
  237. padding-bottom: 50px;
  238. width: 360px;
  239. div.warp{
  240. padding-bottom: 65px;
  241. }
  242. p{
  243. font-size: 24px;
  244. color: #323232;
  245. img{
  246. margin-right: 20px;
  247. width: 30px;
  248. height: 28px;
  249. }
  250. }
  251. p.pass{
  252. font-size: 24px;
  253. color: #e77405;
  254. img{
  255. height: 30px;
  256. }
  257. }
  258. p.passed {
  259. color: #2ab300;
  260. img{
  261. height: 30px;
  262. }
  263. }
  264. span{
  265. display: inline-block;
  266. font-size: 14px;
  267. color: #8b8b8b;
  268. }
  269. span.close-tip{
  270. margin: 15px 0 140px 0;
  271. }
  272. .close-btn{
  273. margin: 0 auto;
  274. width: 200px;
  275. height: 36px;
  276. line-height: 36px;
  277. font-size: 14px;
  278. text-align: center;
  279. color: #323232;
  280. border: 1px solid #d2d2d2;
  281. border-radius: 3px;
  282. cursor: pointer ;
  283. }
  284. span.use{
  285. display: inline-block;
  286. margin-bottom: 30px;
  287. width: 360px;
  288. font-size: 14px;
  289. color: #000;
  290. text-align: left;
  291. em{
  292. font-size: 14px;
  293. font-style: normal;
  294. color: #000;
  295. }
  296. }
  297. .form-group {
  298. margin: 0 auto 16px;
  299. position: relative;
  300. width: 360px;
  301. height: 44px;
  302. line-height: 44px;
  303. input{
  304. padding: 0 0 0 18px;
  305. width: 360px;
  306. height: 44px;
  307. line-height: 44px;
  308. font-size: 14px;
  309. color: #000;
  310. border-radius: 0;
  311. }
  312. input.msg{
  313. float: left;
  314. width: 210px;
  315. padding: 0 0 0 18px;
  316. height: 44px;
  317. line-height: 44px;
  318. font-size: 14px;
  319. color: #000;
  320. border-radius: 0;
  321. }
  322. span.msg{
  323. float: right;
  324. margin: 0;
  325. width: 130px;
  326. height: 44px;
  327. line-height: 44px;
  328. text-align: center ;
  329. font-size: 14px;
  330. color: #5a5a5a;
  331. background: #f4f4f4;
  332. border: 1px solid #dcdcdc;
  333. cursor: pointer;
  334. }
  335. span.msg.send{
  336. background: #d2d2d2;
  337. color: #fff;
  338. }
  339. }
  340. .btn {
  341. margin: 34px 0 10px 0;
  342. width: 360px;
  343. height: 44px;
  344. line-height: 44px;
  345. font-size: 16px;
  346. color: #fff;
  347. background: #0076AD;
  348. border-radius: 3px;
  349. }
  350. }
  351. .choose{
  352. margin: 155px auto 0;
  353. padding-bottom: 44px;
  354. div{
  355. padding: 0 15px;
  356. margin: 0 auto 16px;
  357. width: 360px;
  358. height: 60px;
  359. line-height: 60px;
  360. text-align: left;
  361. overflow: hidden;
  362. border: 1px solid #d2d2d2;
  363. cursor: pointer;
  364. &:hover,&.active{
  365. border-color: #0076ad;
  366. span{
  367. color: #0076ad;
  368. }
  369. i.second {
  370. color: #0076ad;
  371. }
  372. }
  373. img.first{
  374. float: left;
  375. margin: 24px 20px 0 0;
  376. font-size: 20px;
  377. color: #323232;
  378. }
  379. img.first.mob{
  380. margin: 22px 20px 0 5px;
  381. font-size: 28px;
  382. }
  383. i.second {
  384. float: right;
  385. margin: 20px 0 0 5px;
  386. font-size: 20px;
  387. color: #323232;
  388. }
  389. span{
  390. float: left;
  391. font-size: 14px;
  392. color: #323232;
  393. }
  394. }
  395. }
  396. a.return{
  397. position: absolute;
  398. left: 0;
  399. top: -15px;
  400. img{
  401. width: 34px !important;
  402. height: 34px !important;
  403. }
  404. }
  405. }
  406. }
  407. }
  408. </style>