editInformation.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  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">
  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. </scroll-view>
  170. </view>
  171. </template>
  172. <script>
  173. import EnNav from "@/components/en-utils/en-nav/en-nav";
  174. import EnSelect from "@/components/en-from/en-select/en-select";
  175. import EnPicker from "@/components/en-utils/en-popup/en-picker";
  176. export default {
  177. components: {EnPicker, EnSelect, EnNav},
  178. data() {
  179. return {
  180. title:'编辑资料',
  181. headPortrait:'/static/img/temporary/3.png',
  182. navHeight:0,
  183. selectData:[{'text':'媒体/公关','value':'1'},{'text':'健康/美容','value':'2'},{'text':'IT/互联网','value':'3'}],
  184. selectTitle:'职业',
  185. selectShow:false,
  186. selectType:1,
  187. }
  188. },
  189. methods: {
  190. setNavHeight(navHeight){
  191. this.navHeight=navHeight
  192. },
  193. setSelectData(value){
  194. console.log('value',value)
  195. this.$refs.selectPicker.setPopupClosed()
  196. },
  197. showSelect(type){
  198. this.selectType=type
  199. if(type===1){
  200. this.selectTitle='家乡'
  201. }else if(type===2){
  202. this.selectTitle='职业'
  203. }
  204. this.$refs.selectPicker.showPickerObj()
  205. },
  206. goToUrl(type){
  207. if(type===1){
  208. uni.navigateTo({
  209. 'url':'./edit/nickname'
  210. })
  211. }else if(type===2){
  212. uni.navigateTo({
  213. 'url':'./edit/age'
  214. })
  215. }else if(type===3){
  216. uni.navigateTo({
  217. 'url':'./edit/school'
  218. })
  219. }
  220. }
  221. }
  222. }
  223. </script>
  224. <style scoped lang="scss">
  225. .information-box{
  226. background-repeat: no-repeat;//不平铺
  227. background-position: top center;//居中
  228. background-size: contain;//随容器大小
  229. width: 100vw;
  230. height: 100vh;
  231. .nav-right{
  232. font-size: 32rpx;
  233. }
  234. .information-data{
  235. background-color: rgba(0,0,0,0.6);
  236. .information-top{
  237. padding-bottom: 34rpx;
  238. //height: 444rpx;
  239. .top-head{
  240. margin-top: 70rpx;
  241. display: flex;
  242. justify-content: center;
  243. .head-box{
  244. width: 200rpx;
  245. height: 200rpx;
  246. border-radius: 50%;
  247. }
  248. .head-img{
  249. margin:22rpx ;
  250. width: 156rpx;
  251. height: 156rpx;
  252. border-radius: 50%;
  253. }
  254. }
  255. .information-proportion{
  256. margin-top: 16rpx;
  257. display: flex;
  258. justify-content: center;
  259. .proportion-text{
  260. background: rgba(0,0,0,0.29);
  261. border-radius: 20rpx;
  262. height: 56rpx;
  263. line-height: 56rpx;
  264. font-size: 28rpx;
  265. text-align: center;
  266. padding: 0 16rpx;
  267. }
  268. }
  269. .information-text{
  270. margin-top: 24rpx;
  271. text-align: center;
  272. font-size: 24rpx;
  273. }
  274. }
  275. .edit-data{
  276. border-radius: 30rpx 30rpx 0 0;
  277. background-color: #fff;
  278. padding: 32rpx 32rpx calc(32rpx + env(safe-area-inset-bottom)) 32rpx;
  279. .photograph-title{
  280. display: flex;
  281. justify-content: space-between;
  282. .title-data{
  283. .title-text{
  284. font-size: 32rpx;
  285. margin-right: 16rpx;
  286. }
  287. .num-text{
  288. font-size: 28rpx;
  289. }
  290. }
  291. .proportion-data{
  292. font-size: 28rpx;
  293. }
  294. }
  295. .photograph-list{
  296. height: 336rpx;
  297. margin-top: 26rpx;
  298. overflow-x: auto;
  299. overflow-y: hidden;
  300. display: flex;
  301. justify-content: flex-start;
  302. .photograph-item{
  303. margin-right: 16rpx;
  304. .photograph-img{
  305. width: 240rpx;
  306. height: 316rpx;
  307. border-radius: 16rpx;
  308. }
  309. }
  310. .photograph-add{
  311. width: 240rpx;
  312. height: 316rpx;
  313. border-radius: 16rpx;
  314. background-color: #F9F9F9;
  315. text-align: center;
  316. line-height: 316rpx;
  317. .iconfont{
  318. font-size: 70rpx;
  319. color: #999;
  320. }
  321. }
  322. }
  323. .photograph-describe{
  324. margin-top: 32rpx;
  325. font-size: 28rpx;
  326. text-align: center;
  327. color: #2F80ED;
  328. }
  329. .edit-item{
  330. margin-top: 40rpx;
  331. .item-title{
  332. padding-bottom: 24rpx;
  333. display: flex;
  334. justify-content: space-between;
  335. height: 44rpx;
  336. .item-title-text{
  337. font-size: 32rpx;
  338. }
  339. .item-title-proportion{
  340. font-size: 28rpx;
  341. }
  342. }
  343. .item-data{
  344. background-color: #F9F9F9;
  345. border-radius: 12rpx;
  346. display: flex;
  347. justify-content: space-between;
  348. padding: 24rpx;
  349. height: 44rpx;
  350. .row-text{
  351. font-size: 28rpx;
  352. }
  353. .row-icon{
  354. .iconfont{
  355. font-size: 28rpx;
  356. }
  357. }
  358. }
  359. .item-interest{
  360. padding: 24rpx;
  361. height: 172rpx;
  362. background: #F9F9F9;
  363. border-radius: 12rpx;
  364. overflow-x: auto;
  365. display: flex;
  366. justify-content: flex-start;
  367. .interest-item{
  368. margin-right: 16rpx;
  369. .interest-img{
  370. width: 120rpx;
  371. height: 120rpx;
  372. border-radius: 50%;
  373. }
  374. .interest-text{
  375. text-align: center;
  376. font-size: 26rpx;
  377. color: #BDBDBD;
  378. }
  379. }
  380. .interest-add{
  381. .interest-add-icon{
  382. background-color: #E0E0E0;
  383. width: 120rpx;
  384. height: 120rpx;
  385. border-radius: 50%;
  386. text-align: center;
  387. line-height: 120rpx;
  388. .iconfont{
  389. font-size:60rpx ;
  390. color: #999;
  391. }
  392. }
  393. .interest-text{
  394. text-align: center;
  395. font-size: 26rpx;
  396. color: #BDBDBD;
  397. margin-top: 8rpx;
  398. }
  399. }
  400. }
  401. .item-from{
  402. border-radius: 16rpx;
  403. background: #F9F9F9;
  404. .from-item{
  405. height: 44rpx;
  406. padding: 22rpx 24rpx;
  407. display: flex;
  408. justify-content: space-between;
  409. border-bottom: 1rpx solid #F2F2F2;
  410. .from-item-title{
  411. font-size: 28rpx;
  412. }
  413. .from-item-data{
  414. display: flex;
  415. justify-content: space-between;
  416. .item-data-text{
  417. font-size: 28rpx;
  418. }
  419. .item-data-icon{
  420. .iconfont{
  421. font-size: 28rpx;
  422. line-height: 50rpx;
  423. }
  424. }
  425. }
  426. }
  427. .from-item:last-child{
  428. border-bottom: none;
  429. }
  430. }
  431. }
  432. .edit-but{
  433. border-radius: 16rpx;
  434. height: 88rpx;
  435. line-height: 88rpx;
  436. text-align: center;
  437. font-size: 32rpx;
  438. }
  439. }
  440. }
  441. }
  442. </style>