editInformation.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  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(100% - '+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">
  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">
  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. }
  249. }
  250. }
  251. }
  252. </script>
  253. <style scoped lang="scss">
  254. .information-box{
  255. background-repeat: no-repeat;//不平铺
  256. background-position: top center;//居中
  257. background-size: contain;//随容器大小
  258. width: 100vw;
  259. height: 100vh;
  260. .nav-right{
  261. font-size: 32rpx;
  262. }
  263. .information-data{
  264. background-color: rgba(0,0,0,0.6);
  265. .information-top{
  266. padding-bottom: 34rpx;
  267. //height: 444rpx;
  268. .top-head{
  269. margin-top: 70rpx;
  270. display: flex;
  271. justify-content: center;
  272. .head-box{
  273. width: 200rpx;
  274. height: 200rpx;
  275. border-radius: 50%;
  276. }
  277. .head-img{
  278. margin:22rpx ;
  279. width: 156rpx;
  280. height: 156rpx;
  281. border-radius: 50%;
  282. }
  283. }
  284. .information-proportion{
  285. margin-top: 16rpx;
  286. display: flex;
  287. justify-content: center;
  288. .proportion-text{
  289. background: rgba(0,0,0,0.29);
  290. border-radius: 20rpx;
  291. height: 56rpx;
  292. line-height: 56rpx;
  293. font-size: 28rpx;
  294. text-align: center;
  295. padding: 0 16rpx;
  296. }
  297. }
  298. .information-text{
  299. margin-top: 24rpx;
  300. text-align: center;
  301. font-size: 24rpx;
  302. }
  303. }
  304. .edit-data{
  305. border-radius: 30rpx 30rpx 0 0;
  306. background-color: #fff;
  307. padding: 32rpx 32rpx calc(32rpx + env(safe-area-inset-bottom)) 32rpx;
  308. .photograph-title{
  309. display: flex;
  310. justify-content: space-between;
  311. .title-data{
  312. .title-text{
  313. font-size: 32rpx;
  314. margin-right: 16rpx;
  315. }
  316. .num-text{
  317. font-size: 28rpx;
  318. }
  319. }
  320. .proportion-data{
  321. font-size: 28rpx;
  322. }
  323. }
  324. .photograph-list{
  325. height: 336rpx;
  326. margin-top: 26rpx;
  327. overflow-x: auto;
  328. overflow-y: hidden;
  329. display: flex;
  330. justify-content: flex-start;
  331. .photograph-item{
  332. margin-right: 16rpx;
  333. .photograph-img{
  334. width: 240rpx;
  335. height: 316rpx;
  336. border-radius: 16rpx;
  337. }
  338. }
  339. .photograph-add{
  340. width: 240rpx;
  341. height: 316rpx;
  342. border-radius: 16rpx;
  343. background-color: #F9F9F9;
  344. text-align: center;
  345. line-height: 316rpx;
  346. .iconfont{
  347. font-size: 70rpx;
  348. color: #999;
  349. }
  350. }
  351. }
  352. .photograph-describe{
  353. margin-top: 32rpx;
  354. font-size: 28rpx;
  355. text-align: center;
  356. color: #2F80ED;
  357. }
  358. .edit-item{
  359. margin-top: 40rpx;
  360. .item-title{
  361. padding-bottom: 24rpx;
  362. display: flex;
  363. justify-content: space-between;
  364. height: 44rpx;
  365. .item-title-text{
  366. font-size: 32rpx;
  367. }
  368. .item-title-proportion{
  369. font-size: 28rpx;
  370. }
  371. }
  372. .item-data{
  373. background-color: #F9F9F9;
  374. border-radius: 12rpx;
  375. display: flex;
  376. justify-content: space-between;
  377. padding: 24rpx;
  378. height: 44rpx;
  379. .row-text{
  380. font-size: 28rpx;
  381. }
  382. .row-icon{
  383. .iconfont{
  384. font-size: 28rpx;
  385. }
  386. }
  387. }
  388. .item-interest{
  389. padding: 24rpx;
  390. height: 172rpx;
  391. background: #F9F9F9;
  392. border-radius: 12rpx;
  393. overflow-x: auto;
  394. display: flex;
  395. justify-content: flex-start;
  396. .interest-item{
  397. margin-right: 16rpx;
  398. .interest-img{
  399. width: 120rpx;
  400. height: 120rpx;
  401. border-radius: 50%;
  402. }
  403. .interest-text{
  404. text-align: center;
  405. font-size: 26rpx;
  406. color: #BDBDBD;
  407. }
  408. }
  409. .interest-add{
  410. .interest-add-icon{
  411. background-color: #E0E0E0;
  412. width: 120rpx;
  413. height: 120rpx;
  414. border-radius: 50%;
  415. text-align: center;
  416. line-height: 120rpx;
  417. .iconfont{
  418. font-size:60rpx ;
  419. color: #999;
  420. }
  421. }
  422. .interest-text{
  423. text-align: center;
  424. font-size: 26rpx;
  425. color: #BDBDBD;
  426. margin-top: 8rpx;
  427. }
  428. }
  429. }
  430. .item-from{
  431. border-radius: 16rpx;
  432. background: #F9F9F9;
  433. .from-item{
  434. height: 44rpx;
  435. padding: 22rpx 24rpx;
  436. display: flex;
  437. justify-content: space-between;
  438. border-bottom: 1rpx solid #F2F2F2;
  439. .from-item-title{
  440. font-size: 28rpx;
  441. }
  442. .from-item-data{
  443. display: flex;
  444. justify-content: space-between;
  445. .item-data-text{
  446. font-size: 28rpx;
  447. }
  448. .item-data-icon{
  449. .iconfont{
  450. font-size: 28rpx;
  451. line-height: 50rpx;
  452. }
  453. }
  454. }
  455. }
  456. .from-item:last-child{
  457. border-bottom: none;
  458. }
  459. }
  460. }
  461. .edit-but{
  462. border-radius: 16rpx;
  463. height: 88rpx;
  464. line-height: 88rpx;
  465. text-align: center;
  466. font-size: 32rpx;
  467. }
  468. }
  469. }
  470. .popup-box{
  471. padding: 0 32rpx;
  472. .popup-title{
  473. display: flex;
  474. justify-content: space-between;
  475. height: 52rpx;
  476. .title-left{
  477. display: flex;
  478. justify-content: flex-start;
  479. align-items: center;
  480. .left-text{
  481. font-size: 32rpx;
  482. line-height: 52rpx;
  483. }
  484. .left-wire{
  485. width: 4rpx;
  486. height: 32rpx;
  487. background-color: #FFC107;
  488. margin-right: 8rpx;
  489. }
  490. }
  491. .title-right{
  492. padding: 0 24rpx;
  493. border-radius: 200rpx;
  494. border: 2rpx solid #141414;
  495. font-size:28rpx ;
  496. line-height: 50rpx;
  497. }
  498. }
  499. .popup-data{
  500. margin-top: 12rpx;
  501. padding-bottom: 50rpx;
  502. display: flex;
  503. flex-wrap: wrap;
  504. .popup-interest-item{
  505. margin-top: 32rpx;
  506. margin-right: 26rpx;
  507. width: calc((100vw - 116rpx)/3);
  508. height: 80rpx;
  509. border-radius: 12rpx;
  510. background-color: #F2F2F2;
  511. text-align: center;
  512. line-height: 80rpx;
  513. font-size: 28rpx;
  514. }
  515. .pitch-item{
  516. background-color: #FFC107;
  517. font-weight: 500;
  518. }
  519. .popup-interest-item:nth-of-type(3n+0){
  520. margin-right:0;
  521. }
  522. }
  523. }
  524. }
  525. </style>