editInformation.vue 18 KB

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