index.vue 15 KB

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