PhoneStepSelect.vue 12 KB

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