myEdit.uvue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <view class="container">
  3. <!-- 内容区 -->
  4. <scroll-view class="content-box" scroll-y>
  5. <!-- 头像+基础信息区 -->
  6. <view class="avatar-section">
  7. <view class="avatar-wrap">
  8. <image class="avatar-img" :src="userAvatar" mode="aspectFill">
  9. </image>
  10. <image class="avatar-tag" src="/static/imagesInfo/xiangji-icon.png" mode="aspectFit">
  11. </image>
  12. <!-- 头像角标 -->
  13. </view>
  14. <text class="user-name">
  15. 刘大锤
  16. </text>
  17. <text class="user-phone">
  18. 16709890987
  19. </text>
  20. </view>
  21. <!-- 信息列表容器 -->
  22. <view class="info-list">
  23. <!-- 年龄项(带开关) -->
  24. <view class="info-item" style="flex-direction: row;">
  25. <text class="info-label">
  26. 年龄
  27. </text>
  28. <view class="info-content" style="flex-direction: row;">
  29. <text class="content-text">
  30. 24岁
  31. </text>
  32. <switch class="info-switch" checked color="#FFCC00">
  33. </switch>
  34. </view>
  35. </view>
  36. <!-- 昵称项 -->
  37. <view class="info-item" style="flex-direction: row;">
  38. <text class="info-label">
  39. 昵称
  40. </text>
  41. <view class="info-content" style="flex-direction: row;">
  42. <text class="content-text">
  43. 熙熙
  44. </text>
  45. <image class="arrow-icon" src="/static/arrow.png" mode="aspectFit">
  46. </image>
  47. </view>
  48. </view>
  49. <!-- 生活照片项 -->
  50. <view class="info-item" style="flex-direction: row;">
  51. <text class="info-label">
  52. 生活照片
  53. </text>
  54. <view class="info-content" style="flex-direction: row;">
  55. <text class="content-text text-gray">
  56. 未添加
  57. </text>
  58. <image class="arrow-icon" src="/static/arrow.png" mode="aspectFit">
  59. </image>
  60. </view>
  61. </view>
  62. <!-- 商户简介项(审核失败) -->
  63. <view class="info-item" style="flex-direction: row;">
  64. <text class="info-label">
  65. 商户简介
  66. </text>
  67. <view class="info-content" style="flex-direction: row;">
  68. <text class="content-text text-red">
  69. 审核失败
  70. </text>
  71. <image class="arrow-icon" src="/static/arrow.png" mode="aspectFit">
  72. </image>
  73. </view>
  74. </view>
  75. <!-- 证件上传项(待审核+待处理) -->
  76. <view class="info-item" style="flex-direction: row;">
  77. <text class="info-label">
  78. 证件上传
  79. </text>
  80. <view class="info-content" style="flex-direction: row;">
  81. <view class="status-tag-wrap" style="flex-direction: row;">
  82. <text class="status-tag tag-gray">
  83. 待审核
  84. </text>
  85. <text class="status-tag tag-orange">
  86. 待处理
  87. </text>
  88. </view>
  89. <image class="arrow-icon" src="/static/arrow.png" mode="aspectFit">
  90. </image>
  91. </view>
  92. </view>
  93. <!-- 紧急联系人项 -->
  94. <view class="info-item" style="flex-direction: row;">
  95. <text class="info-label">
  96. 紧急联系人
  97. </text>
  98. <view class="info-content" style="flex-direction: row;">
  99. <image class="arrow-icon" src="/static/arrow.png" mode="aspectFit">
  100. </image>
  101. </view>
  102. </view>
  103. <!-- 我的负责人项 -->
  104. <view class="info-item" style="flex-direction: row;">
  105. <text class="info-label">
  106. 我的负责人
  107. </text>
  108. <view class="info-content" style="flex-direction: row;">
  109. <text class="content-text">
  110. 李景才-18709873290
  111. </text>
  112. <image class="arrow-icon" src="/static/arrow.png" mode="aspectFit">
  113. </image>
  114. </view>
  115. </view>
  116. <!-- 从业年份项 -->
  117. <view class="info-item" style="flex-direction: row;">
  118. <text class="info-label">
  119. 从业年份
  120. </text>
  121. <view class="info-content" style="flex-direction: row;">
  122. <image class="arrow-icon" src="/static/arrow.png" mode="aspectFit">
  123. </image>
  124. </view>
  125. </view>
  126. </view>
  127. </scroll-view>
  128. </view>
  129. </template>
  130. <script setup>
  131. import { ref } from 'vue';
  132. const userAvatar = ref('/static/imagesInfo/avatar.png');
  133. </script>
  134. <style>
  135. /* 页面容器:解决100vh兼容,全屏适配 */
  136. .page-container {
  137. /* min-height: 100%; */
  138. height: 100%;
  139. background-color: #f8f8f8;
  140. }
  141. /* 顶部导航栏:显式flex-direction:row,横向排版 */
  142. .nav-bar {
  143. display: flex;
  144. align-items: center;
  145. justify-content: space-between;
  146. padding: 20rpx 20rpx;
  147. background-color: #fff;
  148. border-bottom: 1px solid #eee;
  149. }
  150. /* 关闭图标 */
  151. .close-icon {
  152. width: 40rpx;
  153. height: 40rpx;
  154. }
  155. /* 导航标题 */
  156. .nav-title {
  157. font-size: 36rpx;
  158. font-weight: 700;
  159. /* 替换font-weight:600 */
  160. color: #333;
  161. }
  162. /* 占位空盒 */
  163. .empty-box {
  164. width: 40rpx;
  165. height: 40rpx;
  166. }
  167. /* 头像+基础信息区:居中排版 */
  168. .avatar-section {
  169. align-items: center;
  170. padding: 40rpx 20rpx;
  171. background-color: #f5f5f5;
  172. margin-bottom: 10rpx;
  173. }
  174. /* 头像容器:相对定位,容纳角标 */
  175. .avatar-wrap {
  176. position: relative;
  177. margin-bottom: 16rpx;
  178. }
  179. /* 头像图片 */
  180. .avatar-img {
  181. width: 120rpx;
  182. height: 120rpx;
  183. border-radius: 60rpx;
  184. }
  185. /* 头像角标 */
  186. .avatar-tag {
  187. position: absolute;
  188. bottom: 0;
  189. right: 0;
  190. width: 32rpx;
  191. height: 32rpx;
  192. }
  193. /* 用户名 */
  194. .user-name {
  195. font-size: 32rpx;
  196. font-weight: 700;
  197. color: #333;
  198. margin-bottom: 8rpx;
  199. }
  200. /* 手机号 */
  201. .user-phone {
  202. font-size: 24rpx;
  203. color: #666;
  204. /* 替换font-weight:500 */
  205. }
  206. /* 信息列表容器 */
  207. .info-list {
  208. display: flex;
  209. flex-direction: column;
  210. background-color: #fff;
  211. margin: 0 20rpx;
  212. /* 左右间距 */
  213. border-radius: 12rpx;
  214. box-shadow: 0 0 10rpx 2rpx rgba(0, 0, 0, 0.05);
  215. /* 四周阴影 */
  216. overflow: hidden;
  217. }
  218. /* 信息项:显式flex-direction:row,横向排版 */
  219. .info-item {
  220. display: flex;
  221. align-items: center;
  222. justify-content: space-between;
  223. padding: 24rpx 20rpx;
  224. border-bottom: 1px solid #f0f0f0;
  225. }
  226. /* 最后一个信息项去掉下边框 */
  227. .info-list .info-item:last-child {
  228. border-bottom: none;
  229. }
  230. /* 信息标签 */
  231. .info-label {
  232. font-size: 28rpx;
  233. color: #333;
  234. font-weight: 400;
  235. }
  236. /* 信息内容容器:显式flex-direction:row,横向排版 */
  237. .info-content {
  238. display: flex;
  239. align-items: center;
  240. justify-content: flex-end;
  241. }
  242. /* 内容文本 */
  243. .content-text {
  244. font-size: 28rpx;
  245. color: #333;
  246. margin-right: 12rpx;
  247. }
  248. /* 灰色文本(未添加) */
  249. .text-gray {
  250. color: #999;
  251. }
  252. /* 红色文本(审核失败) */
  253. .text-red {
  254. color: #ff4444;
  255. }
  256. /* 箭头图标 */
  257. .arrow-icon {
  258. width: 24rpx;
  259. height: 24rpx;
  260. }
  261. /* 开关样式 */
  262. .info-switch {
  263. transform: scale(0.9);
  264. }
  265. /* 状态标签容器:显式flex-direction:row,横向排版 */
  266. .status-tag-wrap {
  267. display: flex;
  268. margin-right: 12rpx;
  269. }
  270. /* 状态标签通用样式 */
  271. .status-tag {
  272. font-size: 22rpx;
  273. padding: 4rpx 8rpx;
  274. border-radius: 4rpx;
  275. margin-right: 8rpx;
  276. }
  277. /* 待审核标签(灰色) */
  278. .tag-gray {
  279. color: #999;
  280. background-color: #f0f0f0;
  281. }
  282. /* 待处理标签(橙色) */
  283. .tag-orange {
  284. color: #fff;
  285. background-color: #ff9900;
  286. }
  287. </style>