userInfo.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. <template>
  2. <view class="container">
  3. <view class="content">
  4. <view class="summary-section ">
  5. <view class="summary-header">
  6. <view class="summary-indicator"></view>
  7. <text class="summary-title">基础信息</text>
  8. </view>
  9. <view class="list">
  10. <view class="info-item" @click="toChangePassword">
  11. <view class="label">头像</view>
  12. <view class="right">
  13. <image class="img" src="/static/image/my_heads_icon.png" mode=""></image>
  14. <image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
  15. </view>
  16. </view>
  17. <view class="info-item" @click="toChangePassword">
  18. <view class="label">姓名</view>
  19. <view class="right">
  20. <text class="txt">王小明</text>
  21. </view>
  22. </view>
  23. <view class="info-item" @click="toChangePassword">
  24. <view class="label">性别</view>
  25. <view class="right">
  26. <text class="txt">男</text>
  27. <image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="summary-header">
  32. <view class="summary-indicator"></view>
  33. <text class="summary-title">岗位信息</text>
  34. </view>
  35. <view class="list">
  36. <view class="info-item" @click="toChangePassword">
  37. <view class="label">部门</view>
  38. <view class="right">
  39. <text class="txt ash">请选择部门</text>
  40. <image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
  41. </view>
  42. </view>
  43. <view class="info-item" @click="toChangePassword">
  44. <view class="label">岗位</view>
  45. <view class="right">
  46. <text class="txt ">办公室主任</text>
  47. <image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
  48. </view>
  49. </view>
  50. <view class="info-item" @click="toChangePassword">
  51. <view class="label">产品</view>
  52. <view class="right">
  53. <text class="txt ">301、201</text>
  54. <image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
  55. </view>
  56. </view>
  57. <view class="info-item" @click="toChangePassword">
  58. <view class="label">直属上级</view>
  59. <view class="right">
  60. <text class="txt ash">请选择</text>
  61. <image class="icon" src="/static/image/icon_my_more.png" mode=""></image>
  62. </view>
  63. </view>
  64. <view class="form-section">
  65. <view class="form-label">
  66. <text>证明材料</text>
  67. <text class="tip">工作证、OA信息截图、个人名片等</text>
  68. </view>
  69. <view class="upload-cover" @click="chooseCoverImage">
  70. <image v-if="formData.coverImage" :src="formData.coverImage" mode="aspectFill"></image>
  71. <image v-if="formData.coverImage" class="del" @click="del" src="/static/image/icon_img_delete.png"
  72. mode="aspectFill"></image>
  73. <view v-else class="upload-placeholder">
  74. <image class="icon" src="/static/image/icon_camera.png" mode="aspectFill"></image>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. export default {
  85. data() {
  86. return {
  87. formData: {
  88. coverImage: '/static/image/icon_camera.png',
  89. },
  90. }
  91. },
  92. computed: {
  93. },
  94. watch: {
  95. },
  96. onLoad() {
  97. },
  98. onReachBottom() {},
  99. methods: {
  100. chooseCoverImage() {
  101. uni.chooseImage({
  102. count: 1,
  103. sizeType: ['compressed'],
  104. sourceType: ['album', 'camera'],
  105. success: async (res) => {
  106. try {
  107. uni.showLoading({
  108. title: '上传中...'
  109. })
  110. const uploadRes = await uploadFile({
  111. file: res.tempFilePaths[0],
  112. type: 'cover'
  113. })
  114. uni.hideLoading()
  115. if (uploadRes.code === 200 && uploadRes.data) {
  116. this.formData.coverImage = uploadRes.data.url
  117. }
  118. } catch (e) {
  119. uni.hideLoading()
  120. uni.showToast({
  121. icon: 'none',
  122. title: '上传失败'
  123. })
  124. }
  125. }
  126. })
  127. },
  128. }
  129. }
  130. </script>
  131. <style lang="scss" scoped>
  132. .container {
  133. background-color: #ffffff;
  134. min-height: 100vh;
  135. display: flex;
  136. flex-direction: column;
  137. position: relative;
  138. .content {
  139. width: 100%;
  140. height: 100%;
  141. position: relative;
  142. z-index: 2;
  143. .title {
  144. font-weight: 600;
  145. font-size: 36rpx;
  146. color: #333333;
  147. height: 88rpx;
  148. text-align: center;
  149. line-height: 88rpx;
  150. }
  151. .summary-section {
  152. padding: 32rpx 24rpx;
  153. display: flex;
  154. flex-direction: column;
  155. .summary-header {
  156. display: flex;
  157. align-items: center;
  158. margin-bottom: 24rpx;
  159. .summary-indicator {
  160. width: 6rpx;
  161. height: 32rpx;
  162. background: #388BFF;
  163. border-radius: 40rpx;
  164. margin-right: 16rpx;
  165. }
  166. .summary-title {
  167. font-size: 36rpx;
  168. font-weight: bold;
  169. color: #333;
  170. }
  171. }
  172. }
  173. .list {
  174. margin-bottom: 40rpx;
  175. .info-item {
  176. height: 104upx;
  177. padding: 0 30upx;
  178. display: flex;
  179. align-items: center;
  180. justify-content: space-between;
  181. border-bottom: 1px solid #F5F6FA;
  182. &:last-child {
  183. border-bottom: none;
  184. }
  185. .label {
  186. font-size: 30upx;
  187. font-family: PingFang SC;
  188. font-weight: 400;
  189. color: #0F1826;
  190. }
  191. .right {
  192. display: flex;
  193. align-items: center;
  194. justify-content: center;
  195. .txt {
  196. font-size: 28rpx;
  197. color: #333333;
  198. margin-right: 8rpx;
  199. }
  200. .ash {
  201. color: #C8C9CC;
  202. }
  203. .img {
  204. width: 62rpx;
  205. height: 62rpx;
  206. border-radius: 50%;
  207. margin-right: 6rpx;
  208. }
  209. .icon {
  210. width: 36rpx;
  211. height: 36rpx;
  212. }
  213. }
  214. }
  215. .form-section {
  216. background: #fff;
  217. border-radius: 16rpx;
  218. padding: 24rpx;
  219. margin-bottom: 24rpx;
  220. .form-label {
  221. display: flex;
  222. align-items: center;
  223. font-size: 28rpx;
  224. color: #333;
  225. .tip {
  226. font-size: 24rpx;
  227. color: #999999;
  228. margin-left: 24rpx;
  229. }
  230. }
  231. .form-tips {
  232. font-size: 24rpx;
  233. color: #999;
  234. margin-bottom: 16rpx;
  235. }
  236. .form-input-wrapper {
  237. position: relative;
  238. .form-input {
  239. width: 100%;
  240. min-height: 120rpx;
  241. padding: 16rpx;
  242. background: #f5f5f5;
  243. border-radius: 8rpx;
  244. font-size: 28rpx;
  245. color: #333;
  246. }
  247. .char-count {
  248. position: absolute;
  249. right: 16rpx;
  250. bottom: 16rpx;
  251. font-size: 24rpx;
  252. color: #999;
  253. }
  254. }
  255. .form-select {
  256. display: flex;
  257. align-items: center;
  258. justify-content: space-between;
  259. height: 80rpx;
  260. padding: 0 24rpx;
  261. background: #f5f5f5;
  262. border-radius: 8rpx;
  263. font-size: 28rpx;
  264. color: #333;
  265. .placeholder {
  266. color: #999;
  267. }
  268. .arrow-right {
  269. font-size: 24rpx;
  270. color: #999;
  271. }
  272. }
  273. .upload-cover {
  274. width: 160rpx;
  275. height: 160rpx;
  276. border-radius: 16rpx;
  277. background: #F7F8FA;
  278. display: flex;
  279. align-items: center;
  280. justify-content: center;
  281. margin-top: 24rpx;
  282. position: relative;
  283. .del {
  284. position: absolute;
  285. right: 0;
  286. top: 0;
  287. width: 28rpx;
  288. height: 28rpx;
  289. }
  290. image {
  291. width: 100%;
  292. height: 100%;
  293. border-radius: 8rpx;
  294. }
  295. .upload-placeholder {
  296. .icon {
  297. width: 48rpx;
  298. height: 48rpx;
  299. }
  300. }
  301. }
  302. .attachment-list {
  303. .attachment-item {
  304. display: flex;
  305. align-items: center;
  306. padding: 16rpx;
  307. background: #f5f5f5;
  308. border-radius: 8rpx;
  309. margin-bottom: 16rpx;
  310. .attachment-icon {
  311. font-size: 32rpx;
  312. margin-right: 16rpx;
  313. }
  314. .attachment-info {
  315. flex: 1;
  316. display: flex;
  317. flex-direction: column;
  318. .attachment-name {
  319. font-size: 28rpx;
  320. color: #333;
  321. margin-bottom: 4rpx;
  322. }
  323. .attachment-size {
  324. font-size: 24rpx;
  325. color: #999;
  326. }
  327. }
  328. .attachment-delete {
  329. font-size: 40rpx;
  330. color: #999;
  331. width: 40rpx;
  332. height: 40rpx;
  333. display: flex;
  334. align-items: center;
  335. justify-content: center;
  336. }
  337. }
  338. .add-attachment {
  339. display: flex;
  340. align-items: center;
  341. justify-content: center;
  342. padding: 24rpx;
  343. background: #E3F2FD;
  344. border-radius: 8rpx;
  345. font-size: 28rpx;
  346. color: #388BFF;
  347. .add-icon {
  348. font-size: 32rpx;
  349. margin-right: 8rpx;
  350. }
  351. }
  352. }
  353. }
  354. }
  355. }
  356. }
  357. </style>