EmailStepSelect.vue 9.1 KB

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