ChangeStepSelect.vue 9.5 KB

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