index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. <template>
  2. <div class="info">
  3. <div class="w-over-box">
  4. <div class="container">
  5. <div class="basic-nav">
  6. <span @click="activeTab = 0" :class="{active: activeTab === 0}">个人账号信息<em></em></span>
  7. <span @click="activeTab = 1" :class="{active: activeTab === 1}" v-show="user.userspace">绑定企业信息<em></em></span></div>
  8. <div class="basic-info" v-show="activeTab === 0">
  9. <div class="basic-top">
  10. <div class="line">
  11. <div class="people"><i class="man"></i><em v-text="user.user.vipName ? user.user.vipName : '用户名'"></em></div>
  12. <div class="time"><span>上次登录时间: {{user.user.lastLoginTime | time}}</span></div>
  13. </div>
  14. </div>
  15. <div class="basic-bottom">
  16. <div class="item">
  17. <div class="item-list">
  18. <div class="pwd-level">账号安全等级</div>
  19. <div class="pwd sm" v-show="user.user.passwordLevel === 1"><em></em><em></em><em></em><span>弱</span></div>
  20. <div class="pwd md" v-show="user.user.passwordLevel === 2"><em></em><em></em><em></em><span>中</span></div>
  21. <div class="pwd lar" v-show="user.user.passwordLevel === 3"><em></em><em></em><em></em><span>强</span></div>
  22. </div>
  23. </div>
  24. <div class="item items">
  25. <div class="item-list">
  26. <div class="bind-name">
  27. <img v-show="user.user.mobileValidCode === 2" src="/images/all/right.png" alt="">
  28. <img v-show="user.user.mobileValidCode != 2" src="/images/all/questions.png" alt="">
  29. <span>绑定手机</span>
  30. </div>
  31. <div class="bind-tip">您绑定的手机:{{secretMobile}}。若已丢失或停用,请立即更换,避免账户被盗。</div>
  32. <a href="/validation/phoneValidation" class="bind-btn" v-show="user.user.mobileValidCode === 2">修改</a>
  33. <a href="/validation/phoneValidation" class="go-btn" v-show="user.user.mobileValidCode != 2">设置</a>
  34. </div>
  35. </div>
  36. <div class="item items">
  37. <div class="item-list">
  38. <div class="bind-name">
  39. <img v-show="user.user.emailValidCode === 2" src="/images/all/right.png" alt="">
  40. <img v-show="user.user.emailValidCode != 2" src="/images/all/questions.png" alt="">
  41. <span>绑定邮箱</span>
  42. </div>
  43. <div class="bind-tip" v-show="user.user.emailValidCode === 2">{{secretEmail}}</div>
  44. <div class="bind-tip" v-show="user.user.emailValidCode != 2">您还没有绑定邮箱哦!</div>
  45. <a href="/validation/emailValidation" class="bind-btn" v-show="user.user.emailValidCode === 2">修改</a>
  46. <a href="/validation/emailValidation" class="go-btn" v-show="user.user.emailValidCode != 2">设置</a>
  47. </div>
  48. </div>
  49. <div class="item items">
  50. <div class="item-list">
  51. <div class="bind-name">
  52. <img v-show="user.user.passwordLevel === 2 || user.user.passwordLevel === 3" src="/images/all/right.png" alt="">
  53. <img v-show="user.user.passwordLevel === 1" src="/images/all/questions.png" alt="">
  54. <span>登录密码</span>
  55. </div>
  56. <div class="bind-tip">安全性高的密码可以使账号更安全,建议您定期更换密码,并且设置一个包含数字和字母,长度超过8位以上的密码。</div>
  57. <a href="/reset/changePasswordChooseStyle" class="bind-btn" v-show="user.user.passwordLevel === 2 || user.user.passwordLevel === 3">修改</a>
  58. <a href="/reset/changePasswordChooseStyle" class="go-btn" v-show="user.user.passwordLevel === 1">设置</a>
  59. </div>
  60. </div>
  61. <div class="item items">
  62. <div class="item-list">
  63. <div class="bind-name">
  64. <img v-show="user.user.hasQuestion" src="/images/all/right.png" alt="">
  65. <img v-show="!user.user.hasQuestion" src="/images/all/questions.png" alt="">
  66. <span>密保问题</span>
  67. </div>
  68. <div class="bind-tip">是您找回登录密码的方法之一。建议您设置一个容易记住,且最不容易被他人获取的问题及答案。</div>
  69. <a href="/encrypted-setting/EncryptedSetting" class="bind-btn" v-show="user.user.hasQuestion">修改</a>
  70. <a href="/encrypted-setting/EncryptedSetting" class="go-btn" v-show="!user.user.hasQuestion">设置</a>
  71. </div>
  72. </div>
  73. <div class="item items">
  74. <div class="item-list">
  75. <div class="bind-name">
  76. <img v-show="user.user.identityValidCode === 2" src="/images/all/right.png" alt="">
  77. <img v-show="user.user.identityValidCode != 2" src="/images/all/questions.png" alt="">
  78. <span>实名认证</span>
  79. </div>
  80. <div class="bind-tip">实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</div>
  81. <a href="/certification/realNameCertification" class="bind-btn" v-show="user.user.identityValidCode === 2">修改</a>
  82. <a href="/certification/realNameCertification" class="go-btn" v-show="user.user.identityValidCode != 2">设置</a>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="basic-info" v-show="activeTab === 1" v-if="user.userspace">
  88. <div class="basic-top">
  89. <div class="line">
  90. <div class="people"><i class="enterprise-img"></i><em v-text="user.userspace.spaceName ? user.userspace.spaceName : '企业名称'"></em></div>
  91. </div>
  92. </div>
  93. <div class="enterprise-bottom">
  94. <div class="enterprise">
  95. <div class="bind-info">管理员</div>
  96. <div class="bind-detail">{{user.userspace.admin.vipName || '-'}}<a href="/change/changeManager">修改</a></div>
  97. </div>
  98. <div class="enterprise">
  99. <div class="bind-info">企业认证</div>
  100. <div class="bind-detail">
  101. <em v-text="user.userspace.validCode === 2 ? '已认证' : '未认证'"></em>
  102. <a v-show="user.userspace.validCode != 2" href="/certification/enterpriseCertification">申请认证</a></div>
  103. </div>
  104. <div class="enterprise">
  105. <div class="bind-info">营业执照号</div>
  106. <div class="bind-detail">{{user.userspace.businessCode || '-'}}</div>
  107. </div>
  108. <div class="enterprise">
  109. <div class="bind-info">营业执照扫描件</div>
  110. <div class="bind-detail"
  111. v-show="user.userspace.businessCodeImage">
  112. 附件: <span>营业执照.jpg</span><i class="fa fa-eye" @click="showImg(user.userspace.businessCodeImage)"></i>
  113. </div>
  114. <div class="bind-detail"
  115. v-show="!user.userspace.businessCodeImage">未上传</div>
  116. </div>
  117. <div class="enterprise">
  118. <div class="bind-info">法定代表人</div>
  119. <div class="bind-detail">{{user.userspace.corporation || '-'}}</div>
  120. </div>
  121. <div class="enterprise">
  122. <div class="bind-info">注册地址</div>
  123. <div class="bind-detail">{{user.userspace.regAddress || '-'}}</div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <!--查看大图-->
  130. <div id="image-box" v-if="isShow">
  131. <div class="x-floating-wrap"></div>
  132. <div class="x-floating">
  133. <div id="item-content">
  134. <div class="x-close-wrap" @click="isShow = false"><a href="javascript:void(0);">&times;</a></div>
  135. <div class="img"><img :src="imgUrl"/></div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </template>
  141. <script>
  142. export default {
  143. layout: 'cloud',
  144. middleware: 'authenticated',
  145. data () {
  146. return {
  147. activeTab: 0,
  148. secretMobile: '',
  149. secretEmail: '',
  150. isShow: false,
  151. imgUrl: ''
  152. }
  153. },
  154. computed: {
  155. user () {
  156. let mobile = this.$store.state.option.userInfo.data.content.user.mobile
  157. if (mobile) {
  158. var reg = /^(\d{3})\d{6}(\d{2})$/
  159. this.secretMobile = mobile.replace(reg, '$1******$2')
  160. }
  161. let email = this.$store.state.option.userInfo.data.content.user.email
  162. if (email) {
  163. let getEmailIndex = email.indexOf('@')
  164. if (getEmailIndex > 3) {
  165. let len = email.substring(3, getEmailIndex)
  166. this.secretEmail = email.replace(len, '*')
  167. } else {
  168. this.getEmailArr = email.split('')
  169. this.getEmailSplit = this.getEmailArr.splice(getEmailIndex, 0, '*')
  170. this.secretEmail = this.getEmailArr.join('')
  171. }
  172. }
  173. return this.$store.state.option.userInfo.data.content
  174. }
  175. },
  176. filters: {
  177. time: function (time) {
  178. if (typeof time === 'number') {
  179. if (!time) {
  180. return '无'
  181. } else {
  182. let d = new Date(time)
  183. let year = d.getFullYear()
  184. let month = d.getMonth() + 1
  185. let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
  186. let hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours()
  187. let minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes()
  188. let seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : '' + d.getSeconds()
  189. return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
  190. }
  191. }
  192. }
  193. },
  194. methods: {
  195. showImg (imgUrl) {
  196. this.imgUrl = imgUrl
  197. this.isShow = true
  198. }
  199. }
  200. }
  201. </script>
  202. <style scoped type="text/scss" lang="scss">
  203. .info{
  204. padding:50px 0 112px 30px;
  205. background:#eee;
  206. }
  207. .w-over-box .basic-nav{
  208. margin: 0 auto 15px;
  209. padding: 0 245px;
  210. width: 1200px;
  211. height: 70px;
  212. line-height: 70px;
  213. text-align: center;
  214. background: #fff;
  215. span{
  216. position: relative;
  217. font-size: 20px;
  218. color: #8c8c8c;
  219. cursor: pointer;
  220. &:nth-child(1){
  221. float: left;
  222. }
  223. &:nth-child(2){
  224. float: right;
  225. }
  226. em{
  227. &:after{
  228. content: '';
  229. position: absolute;
  230. bottom: 0;
  231. left: 30px;
  232. width: 52px;
  233. height: 6px;
  234. background: transparent ;
  235. }
  236. }
  237. &:hover,&.active{
  238. color: #000;
  239. em {
  240. &:after{
  241. background: #0076ad;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. .w-over-box .basic-info i.man{
  248. display:inline-block;
  249. position:relative;
  250. top:5px;
  251. width:30px;
  252. height:20px;
  253. background: url('/img/over_account/man.png') no-repeat;
  254. }
  255. .w-over-box .basic-info i.enterprise-img{
  256. display:inline-block;
  257. position:relative;
  258. top:5px;
  259. width:30px;
  260. height:20px;
  261. background: url('/img/over_account/enter.png') no-repeat;
  262. }
  263. .w-over-box .basic-info p{
  264. font-weight: bold;
  265. font-size: 14px;
  266. color:#000;
  267. margin:0;
  268. }
  269. .w-over-box .basic-info span{
  270. font-size: 14px;
  271. color:#787878;
  272. }
  273. .w-over-box .basic-info{
  274. width: 1200px;
  275. background: #fff;
  276. .basic-top{
  277. padding: 0 40px;
  278. width: 100%;
  279. height: 70px;
  280. line-height: 70px;
  281. div.line{
  282. overflow: hidden;
  283. border-bottom: 2px solid #e5e5e5;
  284. div.people{
  285. float: left;
  286. margin-right: 30px;
  287. }
  288. div.time{
  289. float: left;
  290. }
  291. }
  292. em{
  293. font-style: normal;
  294. font-size: 18px;
  295. color: #000;
  296. }
  297. }
  298. .basic-bottom{
  299. width: 100%;
  300. padding: 20px 0;
  301. .item{
  302. height: 60px;
  303. line-height: 60px;
  304. .item-list{
  305. padding: 0 37px;
  306. width: 100%;
  307. overflow: hidden;
  308. .pwd-level{
  309. float: left;
  310. margin: 16px 19px 0 0;
  311. width: 120px;
  312. height: 28px;
  313. line-height: 28px;
  314. text-align: center;
  315. font-size: 14px;
  316. color: #797979;
  317. background: #eee;
  318. }
  319. .pwd{
  320. float: left;
  321. em{
  322. display: inline-block;
  323. margin: 0 8px 2px 0;
  324. width: 24px;
  325. height: 6px;
  326. &:first-child{
  327. margin-left: 10px;
  328. }
  329. }
  330. span{
  331. margin-left: 10px;
  332. font-size: 13px;
  333. }
  334. }
  335. .pwd.sm{
  336. color: #8c8c8c;
  337. em {
  338. background: #bfbfbf;
  339. &:first-child{
  340. background: #ff4e00;
  341. }
  342. }
  343. span{
  344. color: #ff4e00;
  345. }
  346. }
  347. .pwd.md{
  348. color: #8c8c8c;
  349. em {
  350. background: #22ac38;
  351. &:nth-child(3){
  352. background: #bfbfbf;
  353. }
  354. }
  355. span{
  356. color: #22ac38;
  357. }
  358. }
  359. .pwd.lar{
  360. color: #8c8c8c;
  361. em {
  362. background: #00a0e9;
  363. }
  364. span{
  365. color: #00a0e9;
  366. }
  367. }
  368. }
  369. }
  370. .items{
  371. &:hover{
  372. background: #eaf4f9;
  373. }
  374. .bind-name{
  375. float: left;
  376. margin-right: 55px;
  377. img{
  378. margin-right: 15px;
  379. width: 20px;
  380. height: 18px;
  381. }
  382. span{
  383. font-size: 14px;
  384. color: #000;
  385. }
  386. }
  387. .bind-tip{
  388. float: left;
  389. font-size: 14px;
  390. color: #787878;
  391. }
  392. .bind-btn {
  393. float: right;
  394. display: inline-block;
  395. width: 86px;
  396. text-align: center;
  397. font-size: 14px;
  398. color: #0076ad;
  399. }
  400. .go-btn{
  401. margin-top: 15px;
  402. float: right;
  403. display: inline-block;
  404. width: 86px;
  405. text-align: center;
  406. height: 30px;
  407. line-height: 30px;
  408. font-size: 14px;
  409. color: #fff;
  410. background: #0076ad;
  411. }
  412. }
  413. }
  414. .enterprise-bottom{
  415. width: 100%;
  416. padding: 38px 0 50px 0;
  417. .enterprise{
  418. margin-bottom: 45px;
  419. padding: 0 37px;
  420. height: 20px;
  421. overflow: hidden;
  422. &:last-child {
  423. margin-bottom: 0;
  424. }
  425. .bind-info{
  426. float: left;
  427. margin-right: 50px;
  428. width: 100px;
  429. font-size: 14px;
  430. color: #000;
  431. }
  432. .bind-detail{
  433. float: left;
  434. font-size: 14px;
  435. color: #787878;
  436. em{
  437. font-style: normal;
  438. font-size: 14px;
  439. color: #787878;
  440. }
  441. a{
  442. margin-left: 25px;
  443. font-size: 14px;
  444. color: #0076ad;
  445. }
  446. span{
  447. font-size: 14px;
  448. color: #0076ad;
  449. }
  450. i{
  451. margin-left: 12px;
  452. font-size: 18px;
  453. color: #000;
  454. cursor: pointer;
  455. }
  456. }
  457. }
  458. }
  459. }
  460. </style>