推广小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

328 lines
7.1 KiB

2 months ago
  1. <template>
  2. <view>
  3. <view class="head-box"></view>
  4. <uv-navbar autoBack title="个人资料" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
  5. <view class="content">
  6. <view class="img-box">
  7. <image src="@/static/image/center/3.png" mode=""></image>
  8. <view>点击更换头像</view>
  9. </view>
  10. <view class="name-box">
  11. <view class="name-val">但愿不过瞻仰</view>
  12. <view class="sex-box">
  13. <image src="@/static/image/center/nan-icon.png" mode=""></image>
  14. </view>
  15. <view class="age-box">36</view>
  16. <!-- <image src="@/static/image/center/nv-icon.png" mode=""></image> -->
  17. </view>
  18. <view class="form-box">
  19. <view class="form-box-line">
  20. <view class="label-box">
  21. <image src="@/static/image/center/user-icon-1.png" mode="widthFix"></image>
  22. <view>国籍</view>
  23. </view>
  24. <view class="value-box">
  25. 中国
  26. </view>
  27. </view>
  28. <view class="form-box-line">
  29. <view class="label-box">
  30. <image src="@/static/image/center/user-icon-2.png" mode="widthFix"></image>
  31. <view>学历</view>
  32. </view>
  33. <view class="value-box">
  34. 本科
  35. </view>
  36. </view>
  37. <view class="form-box-line">
  38. <view class="label-box">
  39. <image src="@/static/image/center/user-icon-3.png" mode="widthFix"></image>
  40. <view>行业</view>
  41. </view>
  42. <view class="value-box">
  43. 暂无
  44. </view>
  45. </view>
  46. <view class="form-box-line">
  47. <view class="label-box">
  48. <image src="@/static/image/center/user-icon-4.png" mode="widthFix"></image>
  49. <view>电话</view>
  50. </view>
  51. <view class="value-box">
  52. 123321123
  53. </view>
  54. </view>
  55. <view class="form-box-line">
  56. <view class="label-box">
  57. <image src="@/static/image/center/user-icon-5.png" mode="widthFix"></image>
  58. <view>性别</view>
  59. </view>
  60. <view class="value-box">
  61. </view>
  62. </view>
  63. </view>
  64. <view class="tips-box">
  65. <view class="title-box">标签</view>
  66. <view class="tips-val">
  67. <view class="tips-item tips-1">单身</view>
  68. <view class="tips-item tips-2">985</view>
  69. <view class="tips-item tips-3">设计师</view>
  70. <view class="tips-item tips-4">行业大牛</view>
  71. </view>
  72. </view>
  73. <view class="about-box">
  74. <uv-divider text="关于我" textSize="28rpx"></uv-divider>
  75. <view class="about-box-val">我目前居住在上海是一名工程师在一家互联网公司工作虽然工作很忙但我总能找到时间享受我的爱好旅行和摄影每到假期我就</view>
  76. </view>
  77. </view>
  78. <view class="btn-box">
  79. <uv-button text="编辑信息" @click="editClick" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. export default{
  85. data() {
  86. return {
  87. btnCustomStyle:{
  88. color:'#FF5858'
  89. },
  90. bgColor:'transparent',
  91. info:{
  92. name:'',
  93. phone:'',
  94. idCard:'',
  95. jianli:''
  96. },
  97. }
  98. },
  99. onPageScroll(e) {
  100. if(e.scrollTop > 50) {
  101. this.bgColor = '#49070c'
  102. }else{
  103. this.bgColor = 'transparent'
  104. }
  105. },
  106. methods:{
  107. editClick() {
  108. uni.navigateTo({
  109. url:'/pages_my/user-msg'
  110. })
  111. }
  112. }
  113. }
  114. </script>
  115. <style lang="scss">
  116. page {
  117. background-color: #060504;
  118. }
  119. </style>
  120. <style lang="scss" scoped>
  121. .head-box {
  122. background: url('@/static/image/nav-bg.png') no-repeat;
  123. background-size: 100% 100%;
  124. width: 100%;
  125. height: 534rpx;
  126. position: absolute;
  127. z-index: -1;
  128. }
  129. .content {
  130. padding: 0 30rpx 170rpx;
  131. padding-top: calc(var(--status-bar-height) + 110rpx);
  132. .img-box {
  133. display: flex;
  134. flex-direction: column;
  135. align-items: center;
  136. justify-content: center;
  137. margin-bottom: 40rpx;
  138. image {
  139. width: 176rpx;
  140. height: 176rpx;
  141. border-radius: 50%;
  142. }
  143. view {
  144. font-weight: 400;
  145. font-size: 24rpx;
  146. color: #CCCCCC;
  147. margin-top: 20rpx;
  148. }
  149. }
  150. .name-box {
  151. display: flex;
  152. align-items: center;
  153. .name-val {
  154. font-weight: 600;
  155. font-size: 32rpx;
  156. color: #E6E6E6;
  157. margin-right: 18rpx;
  158. }
  159. .sex-box {
  160. background-color: #0D1A20;
  161. width: 69rpx;
  162. height: 36rpx;
  163. border-radius: 18rpx;
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. margin-right: 10rpx;
  168. image {
  169. width: 25rpx;
  170. height: 25rpx;
  171. }
  172. }
  173. .age-box {
  174. width: 85rpx;
  175. height: 36rpx;
  176. background: #261705;
  177. border-radius: 18rpx;
  178. display: flex;
  179. align-items: center;
  180. justify-content: center;
  181. font-weight: 400;
  182. font-size: 23rpx;
  183. color: #FFA200;
  184. }
  185. }
  186. .form-box {
  187. background: #1B1713;
  188. border-radius: 27rpx;
  189. padding:0 40rpx;
  190. margin-top: 25rpx;
  191. margin-bottom: 44rpx;
  192. .form-box-line {
  193. height: 112rpx;
  194. border-bottom: 1px solid #403D3A;
  195. display: flex;
  196. align-items: center;
  197. justify-content: space-between;
  198. &:last-child {
  199. border: none;
  200. }
  201. .label-box {
  202. font-weight: 400;
  203. font-size: 31rpx;
  204. color: #CCCCCC;
  205. display: flex;
  206. align-items: center;
  207. image {
  208. width: 35rpx;
  209. height: 35rpx;
  210. margin-right: 23rpx;
  211. }
  212. }
  213. .value-box {
  214. font-weight: 400;
  215. font-size: 28rpx;
  216. color: #CCCCCC;
  217. }
  218. }
  219. .form-title {
  220. font-weight: 500;
  221. font-size: 28rpx;
  222. color: #CCCCCC;
  223. padding-top: 32rpx;
  224. }
  225. .choose-box {
  226. margin-top: 28rpx;
  227. display: flex;
  228. flex-wrap: wrap;
  229. .choose-item {
  230. width: 137rpx;
  231. height: 67rpx;
  232. border-radius: 13rpx;
  233. border: 1rpx solid #CCCCCC;
  234. text-align: center;
  235. line-height: 67rpx;
  236. font-weight: 500;
  237. font-size: 26rpx;
  238. color: #CCCCCC;
  239. margin-right: 15rpx;
  240. margin-bottom: 24rpx;
  241. &:nth-child(4n){
  242. margin-right: 0;
  243. }
  244. }
  245. .choose-class {
  246. background-color: #341616;
  247. color: #FF4747;
  248. border: 1rpx solid #FF4747;
  249. }
  250. }
  251. }
  252. .title-box {
  253. font-weight: 500;
  254. font-size: 27rpx;
  255. color: #666666;
  256. }
  257. .tips-box {
  258. margin-top: 30rpx;
  259. margin-bottom: 27rpx;
  260. .tips-val {
  261. display: flex;
  262. align-items: center;
  263. margin-top: 27rpx;
  264. .tips-item {
  265. width: 147rpx;
  266. height: 72rpx;
  267. border-radius: 13rpx;
  268. font-weight: 500;
  269. font-size: 28rpx;
  270. line-height: 72rpx;
  271. text-align: center;
  272. margin-right: 20rpx;
  273. margin-bottom: 10rpx;
  274. flex-wrap: wrap;
  275. &:nth-child(4n) {
  276. margin-right: 0;
  277. }
  278. }
  279. .tips-1 {
  280. background-color: #1F1404;
  281. color: #E17E09;
  282. }
  283. .tips-2 {
  284. background-color: #1F0E0D;
  285. color: #FF4747;
  286. }
  287. .tips-3 {
  288. background-color: #051529;
  289. color: #0979E1;
  290. }
  291. .tips-4 {
  292. background-color: #191F0E;
  293. color: #4EB477;
  294. }
  295. }
  296. }
  297. .about-box {
  298. .about-box-val {
  299. margin-top: 36rpx;
  300. background: #171310;
  301. border-radius: 20rpx;
  302. padding: 60rpx 40rpx;
  303. font-weight: 400;
  304. font-size: 28rpx;
  305. color: #CCCCCC;
  306. line-height: 46rpx;
  307. }
  308. }
  309. }
  310. .btn-box {
  311. background-color: #060504;
  312. position: fixed;
  313. bottom: 0;
  314. left: 0;
  315. right: 0;
  316. padding: 20rpx 40rpx;
  317. height: 150rpx;
  318. z-index: 999;
  319. box-sizing: border-box;
  320. }
  321. </style>