ChangeStepSelect.vue 8.7 KB

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