editInformation.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. <template>
  2. <view class="information-box" :style="{'background-image': 'url('+headPortrait+')'}">
  3. <en-nav :title="title" bgckground-box="rgba(0, 0, 0, 0.6)" :right-show="true" :right-type="2" @navHeight="setNavHeight">
  4. <template v-slot:right>
  5. <text class="nav-right sys-weight-600 sys-color-white">预览</text>
  6. </template>
  7. </en-nav>
  8. <scroll-view class="information-data" :scroll-y="true" :style="{'height':'calc(100vh - '+navHeight+'px)'}">
  9. <view class="information-top">
  10. <view class="top-head">
  11. <view class="head-box">
  12. <image class="head-img" src="/static/img/temporary/4.png" mode="aspectFill"></image>
  13. </view>
  14. </view>
  15. <view class="information-proportion">
  16. <view class="proportion-text sys-color-white sys-weight-400">资料已完善20%</view>
  17. </view>
  18. <view class="information-text sys-color-white sys-weight-400">
  19. 资料完整度越高,匹配率越高,社交能力越强哦
  20. </view>
  21. </view>
  22. <view class="edit-data ">
  23. <view class="photograph-data">
  24. <view class="photograph-title">
  25. <view class="title-data">
  26. <text class="title-text sys-height-44 sys-color-black sys-weight-600">个人照片</text>
  27. <text class="num-text sys-height-44 sys-color-gray-9">(1/9)</text>
  28. </view>
  29. <view class="proportion-data sys-height-44 sys-color-gray-9">
  30. +20%
  31. </view>
  32. </view>
  33. <view class="photograph-list">
  34. <view class="photograph-item" v-for="i in 1">
  35. <image class="photograph-img" src="/static/img/temporary/4.png" mode="aspectFill"></image>
  36. </view>
  37. <view class="photograph-add">
  38. <text class="iconfont"> &#xe627;</text>
  39. </view>
  40. </view>
  41. <view class="photograph-describe sys-weight-600">完成头像认证,收获更多曝光与喜欢</view>
  42. </view>
  43. <view class="edit-item">
  44. <view class="item-title">
  45. <view class="item-title-text sys-weight-600 sys-color-black sys-height-44">关于我</view>
  46. <view class="item-title-proportion sys-weight-600 sys-color-black sys-height-44">+10%</view>
  47. </view>
  48. <view class="item-data" @click="goToUrl(5)">
  49. <view class="row-text sys-height-44 sys-color-gray-9">来写个性宣言,完成你的社交第一步</view>
  50. <view class="row-icon">
  51. <text class="iconfont sys-height-44 sys-color-gray-9"> &#xe62b;</text>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="edit-item">
  56. <view class="item-title">
  57. <view class="item-title-text sys-weight-600 sys-color-black sys-height-44">交友目的</view>
  58. <view class="item-title-proportion sys-weight-600 sys-color-black sys-height-44">+10%</view>
  59. </view>
  60. <view class="item-data" @click="goToUrl(6)">
  61. <view class="row-text sys-height-44 sys-color-gray-9">认识朋友</view>
  62. <view class="row-icon">
  63. <text class="iconfont sys-height-44 sys-color-gray-9"> &#xe62b;</text>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="edit-item" >
  68. <view class="item-title">
  69. <view class="item-title-text sys-weight-600 sys-color-black sys-height-44">添加微信</view>
  70. <view class="item-title-proportion sys-weight-600 sys-color-black sys-height-44">+10%</view>
  71. </view>
  72. <view class="item-data" @click="goToUrl(4)">
  73. <view class="row-text sys-height-44 sys-color-gray-9">上传微信,赚取奖励</view>
  74. <view class="row-icon">
  75. <text class="iconfont sys-height-44 sys-color-gray-9"> &#xe62b;</text>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="edit-item">
  80. <view class="item-title">
  81. <view class="item-title-text sys-weight-600 sys-color-black sys-height-44">兴趣</view>
  82. <view class="item-title-proportion sys-weight-600 sys-color-black sys-height-44">+10%</view>
  83. </view>
  84. <view class="item-interest" @click="showPopup">
  85. <view class="interest-item" v-for="i in 2">
  86. <image class="interest-img" src="/static/img/temporary/4.png" mode="aspectFill"></image>
  87. <view class="interest-text sys-height-44">游泳</view>
  88. </view>
  89. <view class="interest-add" >
  90. <view class="interest-add-icon"> <text class="iconfont"> &#xe627;</text></view>
  91. <view class="interest-text sys-height-44">添加</view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="edit-item">
  96. <view class="item-title">
  97. <view class="item-title-text sys-weight-600 sys-color-black sys-height-44">基础信息</view>
  98. <view class="item-title-proportion sys-weight-600 sys-color-black sys-height-44">+30%</view>
  99. </view>
  100. <view class="item-from">
  101. <view class="from-item" @click="goToUrl(1)">
  102. <view class="from-item-title sys-height-44 sys-weight-400">昵称</view>
  103. <view class="from-item-data">
  104. <view class="item-data-text sys-height-44 sys-color-gray-9 sys-weight-400">江湖救急</view>
  105. <view class="item-data-icon">
  106. <text class="iconfont sys-color-gray-9 sys-weight-400"> &#xe62b;</text>
  107. </view>
  108. </view>
  109. </view>
  110. <view class="from-item" @click="goToUrl(2)">
  111. <view class="from-item-title sys-height-44 sys-weight-400" >出生日期</view>
  112. <view class="from-item-data">
  113. <view class="item-data-text sys-height-44 sys-color-gray-9 sys-weight-400">江湖救急</view>
  114. <view class="item-data-icon">
  115. <text class="iconfont sys-color-gray-9 sys-weight-400"> &#xe62b;</text>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="from-item" @click="goToUrl(2)">
  120. <view class="from-item-title sys-height-44 sys-weight-400" >年龄</view>
  121. <view class="from-item-data">
  122. <view class="item-data-text sys-height-44 sys-color-gray-9 sys-weight-400">江湖救急</view>
  123. <view class="item-data-icon">
  124. <text class="iconfont sys-color-gray-9 sys-weight-400"> &#xe62b;</text>
  125. </view>
  126. </view>
  127. </view>
  128. <view class="from-item" @click="goToUrl(2)">
  129. <view class="from-item-title sys-height-44 sys-weight-400" >星座</view>
  130. <view class="from-item-data">
  131. <view class="item-data-text sys-height-44 sys-color-gray-9 sys-weight-400">江湖救急</view>
  132. <view class="item-data-icon">
  133. <text class="iconfont sys-color-gray-9 sys-weight-400"> &#xe62b;</text>
  134. </view>
  135. </view>
  136. </view>
  137. <view class="from-item" @click="goToUrl(3)">
  138. <view class="from-item-title sys-height-44 sys-weight-400">学校</view>
  139. <view class="from-item-data">
  140. <view class="item-data-text sys-height-44 sys-color-gray-9 sys-weight-400">江湖救急</view>
  141. <view class="item-data-icon">
  142. <text class="iconfont sys-color-gray-9 sys-weight-400"> &#xe62b;</text>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="from-item" @click="showSelect(1)">
  147. <view class="from-item-title sys-height-44 sys-weight-400">家乡</view>
  148. <view class="from-item-data">
  149. <view class="item-data-text sys-height-44 sys-color-gray-9 sys-weight-400">江湖救急</view>
  150. <view class="item-data-icon">
  151. <text class="iconfont sys-color-gray-9 sys-weight-400"> &#xe62b;</text>
  152. </view>
  153. </view>
  154. </view>
  155. <view class="from-item" @click="showSelect(2)">
  156. <view class="from-item-title sys-height-44 sys-weight-400">职业</view>
  157. <view class="from-item-data">
  158. <view class="item-data-text sys-height-44 sys-color-gray-9 sys-weight-400">江湖救急</view>
  159. <view class="item-data-icon">
  160. <text class="iconfont sys-color-gray-9 sys-weight-400"> &#xe62b;</text>
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. <view class="edit-but sys-background-black sys-weight-600 sys-color-white">保存</view>
  167. </view>
  168. <en-picker v-show="selectShow" ref="selectPicker" :local-data="selectData" :label="selectTitle" @change="setSelectData"></en-picker>
  169. <en-popup ref="popupObj">
  170. <template v-slot:popupInfo>
  171. <view class="popup-box">
  172. <view class="popup-title">
  173. <view class="title-left">
  174. <view class="left-wire"></view>
  175. <view class="left-text sys-color-black-3 sys-weight-600">选择兴趣</view>
  176. </view>
  177. <view class="title-right sys-color-black sys-weight-600" @click="closedPopup">保存</view>
  178. </view>
  179. <view class="popup-data">
  180. <view class="popup-interest-item sys-weight-400" :class="{'pitch-item':i%3===0}" v-for="i in 10">
  181. 兴趣{{i}}
  182. </view>
  183. </view>
  184. </view>
  185. </template>
  186. </en-popup>
  187. </scroll-view>
  188. </view>
  189. </template>
  190. <script>
  191. import EnNav from "@/components/en-utils/en-nav/en-nav";
  192. import EnSelect from "@/components/en-from/en-select/en-select";
  193. import EnPicker from "@/components/en-utils/en-popup/en-picker";
  194. import EnPopup from "@/components/en-utils/en-popup/en-popup";
  195. export default {
  196. components: {EnPopup, EnPicker, EnSelect, EnNav},
  197. data() {
  198. return {
  199. title:'编辑资料',
  200. headPortrait:'/static/img/temporary/3.png',
  201. navHeight:0,
  202. selectData:[{'text':'媒体/公关','value':'1'},{'text':'健康/美容','value':'2'},{'text':'IT/互联网','value':'3'}],
  203. selectTitle:'职业',
  204. selectShow:false,
  205. selectType:1,
  206. }
  207. },
  208. methods: {
  209. setNavHeight(navHeight){
  210. this.navHeight=navHeight
  211. },
  212. setSelectData(value){
  213. console.log('value',value)
  214. this.$refs.selectPicker.setPopupClosed()
  215. },
  216. showSelect(type){
  217. this.selectType=type
  218. if(type===1){
  219. this.selectTitle='家乡'
  220. }else if(type===2){
  221. this.selectTitle='职业'
  222. }
  223. this.$refs.selectPicker.showPickerObj()
  224. },
  225. showPopup(){
  226. this.$refs.popupObj.open()
  227. },
  228. closedPopup(){
  229. this.$refs.popupObj.close()
  230. },
  231. goToUrl(type){
  232. if(type===1){
  233. uni.navigateTo({
  234. 'url':'./edit/nickname'
  235. })
  236. }else if(type===2){
  237. uni.navigateTo({
  238. 'url':'./edit/age'
  239. })
  240. }else if(type===3){
  241. uni.navigateTo({
  242. 'url':'./edit/school'
  243. })
  244. }else if(type===4){
  245. uni.navigateTo({
  246. 'url':'./edit/we-chat'
  247. })
  248. }else if(type===5){
  249. uni.navigateTo({
  250. 'url':'./edit/about-me'
  251. })
  252. }else if(type===6){
  253. uni.navigateTo({
  254. 'url':'./edit/making-friends'
  255. })
  256. }
  257. }
  258. }
  259. }
  260. </script>
  261. <style scoped lang="scss">
  262. .information-box{
  263. background-repeat: no-repeat;//不平铺
  264. background-position: top center;//居中
  265. background-size: contain;//随容器大小
  266. width: 100vw;
  267. height: 100vh;
  268. .nav-right{
  269. font-size: 32rpx;
  270. }
  271. .information-data{
  272. background-color: rgba(0,0,0,0.6);
  273. .information-top{
  274. padding-bottom: 34rpx;
  275. //height: 444rpx;
  276. .top-head{
  277. margin-top: 70rpx;
  278. display: flex;
  279. justify-content: center;
  280. .head-box{
  281. width: 200rpx;
  282. height: 200rpx;
  283. border-radius: 50%;
  284. }
  285. .head-img{
  286. margin:22rpx ;
  287. width: 156rpx;
  288. height: 156rpx;
  289. border-radius: 50%;
  290. }
  291. }
  292. .information-proportion{
  293. margin-top: 16rpx;
  294. display: flex;
  295. justify-content: center;
  296. .proportion-text{
  297. background: rgba(0,0,0,0.29);
  298. border-radius: 20rpx;
  299. height: 56rpx;
  300. line-height: 56rpx;
  301. font-size: 28rpx;
  302. text-align: center;
  303. padding: 0 16rpx;
  304. }
  305. }
  306. .information-text{
  307. margin-top: 24rpx;
  308. text-align: center;
  309. font-size: 24rpx;
  310. }
  311. }
  312. .edit-data{
  313. border-radius: 30rpx 30rpx 0 0;
  314. background-color: #fff;
  315. padding: 32rpx 32rpx calc(32rpx + env(safe-area-inset-bottom)) 32rpx;
  316. .photograph-title{
  317. display: flex;
  318. justify-content: space-between;
  319. .title-data{
  320. .title-text{
  321. font-size: 32rpx;
  322. margin-right: 16rpx;
  323. }
  324. .num-text{
  325. font-size: 28rpx;
  326. }
  327. }
  328. .proportion-data{
  329. font-size: 28rpx;
  330. }
  331. }
  332. .photograph-list{
  333. height: 336rpx;
  334. margin-top: 26rpx;
  335. overflow-x: auto;
  336. overflow-y: hidden;
  337. display: flex;
  338. justify-content: flex-start;
  339. .photograph-item{
  340. margin-right: 16rpx;
  341. .photograph-img{
  342. width: 240rpx;
  343. height: 316rpx;
  344. border-radius: 16rpx;
  345. }
  346. }
  347. .photograph-add{
  348. width: 240rpx;
  349. height: 316rpx;
  350. border-radius: 16rpx;
  351. background-color: #F9F9F9;
  352. text-align: center;
  353. line-height: 316rpx;
  354. .iconfont{
  355. font-size: 70rpx;
  356. color: #999;
  357. }
  358. }
  359. }
  360. .photograph-describe{
  361. margin-top: 32rpx;
  362. font-size: 28rpx;
  363. text-align: center;
  364. color: #2F80ED;
  365. }
  366. .edit-item{
  367. margin-top: 40rpx;
  368. .item-title{
  369. padding-bottom: 24rpx;
  370. display: flex;
  371. justify-content: space-between;
  372. height: 44rpx;
  373. .item-title-text{
  374. font-size: 32rpx;
  375. }
  376. .item-title-proportion{
  377. font-size: 28rpx;
  378. }
  379. }
  380. .item-data{
  381. background-color: #F9F9F9;
  382. border-radius: 12rpx;
  383. display: flex;
  384. justify-content: space-between;
  385. padding: 24rpx;
  386. height: 44rpx;
  387. .row-text{
  388. font-size: 28rpx;
  389. }
  390. .row-icon{
  391. .iconfont{
  392. font-size: 28rpx;
  393. }
  394. }
  395. }
  396. .item-interest{
  397. padding: 24rpx;
  398. height: 172rpx;
  399. background: #F9F9F9;
  400. border-radius: 12rpx;
  401. overflow-x: auto;
  402. display: flex;
  403. justify-content: flex-start;
  404. .interest-item{
  405. margin-right: 16rpx;
  406. .interest-img{
  407. width: 120rpx;
  408. height: 120rpx;
  409. border-radius: 50%;
  410. }
  411. .interest-text{
  412. text-align: center;
  413. font-size: 26rpx;
  414. color: #BDBDBD;
  415. }
  416. }
  417. .interest-add{
  418. .interest-add-icon{
  419. background-color: #E0E0E0;
  420. width: 120rpx;
  421. height: 120rpx;
  422. border-radius: 50%;
  423. text-align: center;
  424. line-height: 120rpx;
  425. .iconfont{
  426. font-size:60rpx ;
  427. color: #999;
  428. }
  429. }
  430. .interest-text{
  431. text-align: center;
  432. font-size: 26rpx;
  433. color: #BDBDBD;
  434. margin-top: 8rpx;
  435. }
  436. }
  437. }
  438. .item-from{
  439. border-radius: 16rpx;
  440. background: #F9F9F9;
  441. .from-item{
  442. height: 44rpx;
  443. padding: 22rpx 24rpx;
  444. display: flex;
  445. justify-content: space-between;
  446. border-bottom: 1rpx solid #F2F2F2;
  447. .from-item-title{
  448. font-size: 28rpx;
  449. }
  450. .from-item-data{
  451. display: flex;
  452. justify-content: space-between;
  453. .item-data-text{
  454. font-size: 28rpx;
  455. }
  456. .item-data-icon{
  457. .iconfont{
  458. font-size: 28rpx;
  459. line-height: 50rpx;
  460. }
  461. }
  462. }
  463. }
  464. .from-item:last-child{
  465. border-bottom: none;
  466. }
  467. }
  468. }
  469. .edit-but{
  470. border-radius: 16rpx;
  471. height: 88rpx;
  472. line-height: 88rpx;
  473. text-align: center;
  474. font-size: 32rpx;
  475. }
  476. }
  477. }
  478. .popup-box{
  479. padding: 0 32rpx;
  480. .popup-title{
  481. display: flex;
  482. justify-content: space-between;
  483. height: 52rpx;
  484. .title-left{
  485. display: flex;
  486. justify-content: flex-start;
  487. align-items: center;
  488. .left-text{
  489. font-size: 32rpx;
  490. line-height: 52rpx;
  491. }
  492. .left-wire{
  493. width: 4rpx;
  494. height: 32rpx;
  495. background-color: #FFC107;
  496. margin-right: 8rpx;
  497. }
  498. }
  499. .title-right{
  500. padding: 0 24rpx;
  501. border-radius: 200rpx;
  502. border: 2rpx solid #141414;
  503. font-size:28rpx ;
  504. line-height: 50rpx;
  505. }
  506. }
  507. .popup-data{
  508. margin-top: 12rpx;
  509. padding-bottom: 50rpx;
  510. display: flex;
  511. flex-wrap: wrap;
  512. .popup-interest-item{
  513. margin-top: 32rpx;
  514. margin-right: 26rpx;
  515. width: calc((100vw - 116rpx)/3);
  516. height: 80rpx;
  517. border-radius: 12rpx;
  518. background-color: #F2F2F2;
  519. text-align: center;
  520. line-height: 80rpx;
  521. font-size: 28rpx;
  522. }
  523. .pitch-item{
  524. background-color: #FFC107;
  525. font-weight: 500;
  526. }
  527. .popup-interest-item:nth-of-type(3n+0){
  528. margin-right:0;
  529. }
  530. }
  531. }
  532. }
  533. </style>