basicInfo.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. <template>
  2. <view class="basic-info">
  3. <!-- 顶部导航栏 -->
  4. <view class="navbar">
  5. <view class="navbar-content">
  6. <view class="navbar-left" @click="goBack">
  7. <u-icon name="arrow-leftward" size="42" color="#333"></u-icon>
  8. </view>
  9. <view class="navbar-title">基本信息</view>
  10. <view class="navbar-right"></view>
  11. </view>
  12. </view>
  13. <!-- 表单内容 -->
  14. <view class="form-content">
  15. <!-- 头像 -->
  16. <view class="form-item">
  17. <view class="form-label">头像</view>
  18. <view class="avatar-container">
  19. <image src="../../static/logo.png" class="user-avatar" mode="aspectFill"></image>
  20. <view class="edit-avatar-icon">
  21. <image src="../../static/images/index/Combined-Shape.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- 姓名 -->
  26. <view class="form-item">
  27. <view class="form-label">
  28. <text class="required-mark">*</text>
  29. <text>姓名</text>
  30. </view>
  31. <input class="form-input" type="text" placeholder="请输入姓名" value="罗维靖" />
  32. </view>
  33. <!-- 性别 -->
  34. <view class="form-item">
  35. <view class="form-label">
  36. <text class="required-mark">*</text>
  37. <text>性别</text>
  38. </view>
  39. <u-radio-group v-model="gender" direction="row">
  40. <u-radio name="male" activeColor="#007AFF">男</u-radio>
  41. <u-radio name="female" activeColor="#007AFF">女</u-radio>
  42. </u-radio-group>
  43. </view>
  44. <!-- 联系方式 -->
  45. <view class="form-item">
  46. <view class="form-label">联系方式</view>
  47. <view class="form-display">188******39</view>
  48. </view>
  49. <!-- 微信号码 -->
  50. <view class="form-item">
  51. <view class="form-label">微信号码</view>
  52. <input class="form-input" type="text" placeholder="请输入微信号码,方便给求职者交换微信联系" />
  53. </view>
  54. <!-- 出生年月 -->
  55. <view class="form-item">
  56. <view class="form-label">
  57. <text class="required-mark">*</text>
  58. <text>出生年月</text>
  59. </view>
  60. <view class="date-picker" @click="showDatePicker = true">
  61. <text class="date-text">{{ birthDateText }}</text>
  62. <u-icon name="arrow-down" color="#999" size="24"></u-icon>
  63. </view>
  64. <u-picker
  65. v-model="showDatePicker"
  66. mode="time"
  67. :params="dateParams"
  68. @confirm="onDateConfirm"
  69. ></u-picker>
  70. </view>
  71. <!-- 求职状态 -->
  72. <view class="form-item">
  73. <view class="form-label">
  74. <text class="required-mark">*</text>
  75. <text>求职状态</text>
  76. </view>
  77. <view class="select-picker" @click="showJobStatusPicker">
  78. <text class="select-text">{{ selectedJobStatus }}</text>
  79. <u-icon name="arrow-down" color="#999" size="24"></u-icon>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 保存按钮 -->
  84. <view class="save-button">
  85. <text class="save-text">保存</text>
  86. </view>
  87. <!-- 求职状态选择器 -->
  88. <u-popup v-model="showJobStatusModal" mode="bottom" border-radius="42" height="auto" :safe-area-inset-bottom="true">
  89. <view class="job-status-picker">
  90. <view class="picker-header">
  91. <text class="picker-title">求职状态</text>
  92. </view>
  93. <view class="picker-content">
  94. <view
  95. class="status-option"
  96. :class="{ active: selectedJobStatus === item.text }"
  97. v-for="item in jobStatusList"
  98. :key="item.value"
  99. @click="selectJobStatus(item)"
  100. >
  101. <view class="option-left">
  102. <view class="radio-btn" :class="{ checked: selectedJobStatus === item.text }">
  103. <u-icon v-if="selectedJobStatus === item.text" name="checkmark" color="#ffffff" size="28"></u-icon>
  104. </view>
  105. <text class="option-text">{{ item.text }}</text>
  106. <view v-if="item.recommended" class="recommend-tag">
  107. <text>推荐</text>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </u-popup>
  114. </view>
  115. </template>
  116. <script>
  117. export default {
  118. data() {
  119. return {
  120. gender: 'male', // 默认选中男性
  121. birthDateText: '1991-11-29', // 显示的日期文本
  122. showDatePicker: false, // 控制日期选择器显示
  123. dateParams: {
  124. year: true,
  125. month: true,
  126. day: true
  127. },
  128. // 求职状态相关
  129. showJobStatusModal: false,
  130. selectedJobStatus: '离职-随时到岗',
  131. jobStatusList: [
  132. {
  133. value: 'unemployed_available',
  134. text: '离职-随时到岗',
  135. recommended: true
  136. },
  137. {
  138. value: 'employed_monthly',
  139. text: '在职-月内到岗',
  140. recommended: true
  141. },
  142. {
  143. value: 'employed_considering',
  144. text: '在职-考虑机会',
  145. recommended: false
  146. },
  147. {
  148. value: 'employed_not_considering',
  149. text: '在职-暂不考虑',
  150. recommended: false
  151. }
  152. ]
  153. }
  154. },
  155. methods: {
  156. goBack() {
  157. uni.navigateBack();
  158. },
  159. // 日期选择确认
  160. onDateConfirm(e) {
  161. const { year, month, day } = e;
  162. this.birthDateText = `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
  163. this.showDatePicker = false;
  164. },
  165. // 显示求职状态选择器
  166. showJobStatusPicker() {
  167. this.showJobStatusModal = true;
  168. },
  169. // 选择求职状态
  170. selectJobStatus(item) {
  171. this.selectedJobStatus = item.text;
  172. this.showJobStatusModal = false;
  173. // 可以在这里添加保存状态的逻辑
  174. console.log('选择的求职状态:', item);
  175. }
  176. }
  177. }
  178. </script>
  179. <style lang="scss" scoped>
  180. .basic-info {
  181. background-color: #fff;
  182. min-height: 100vh;
  183. }
  184. // 顶部导航栏
  185. .navbar {
  186. background: #fff;
  187. padding: 80rpx 0 40rpx 40rpx;
  188. margin-bottom: 30rpx;
  189. .navbar-content {
  190. display: flex;
  191. align-items: center;
  192. justify-content: space-between;
  193. padding: 0 30rpx;
  194. height: 60rpx;
  195. .navbar-left {
  196. width: 60rpx;
  197. height: 60rpx;
  198. display: flex;
  199. align-items: center;
  200. justify-content: center;
  201. }
  202. .navbar-title {
  203. color: var(--Grayscale/Grayscale 100, rgba(23, 23, 37, 1));
  204. font-family: DM Sans;
  205. font-size: 18px;
  206. font-weight: 700;
  207. line-height: 26px;
  208. letter-spacing: 0.5%;
  209. text-align: center;
  210. }
  211. .navbar-right {
  212. width: 60rpx;
  213. height: 60rpx;
  214. }
  215. }
  216. }
  217. // 表单内容
  218. .form-content {
  219. padding: 0 30rpx;
  220. .form-item {
  221. margin-bottom: 30rpx;
  222. .form-label {
  223. color: var(--Neutral/100, rgba(31, 44, 55, 1));
  224. font-family: DM Sans;
  225. font-size: 16px;
  226. font-weight: 500;
  227. line-height: 22px;
  228. letter-spacing: 0.5%;
  229. text-align: left;
  230. display: flex;
  231. align-items: center;
  232. margin-bottom: 20rpx;
  233. .required-mark {
  234. color: #FF3B30;
  235. font-size: 18px;
  236. font-weight: 600;
  237. margin-right: 8rpx;
  238. }
  239. text {
  240. color: var(--Neutral/100, rgba(31, 44, 55, 1));
  241. font-family: DM Sans;
  242. font-size: 16px;
  243. font-weight: 500;
  244. line-height: 22px;
  245. letter-spacing: 0.5%;
  246. text-align: left;
  247. }
  248. }
  249. .form-input {
  250. width: 100%;
  251. height: 75rpx;
  252. font-size: 14px;
  253. border: 1px solid rgba(227, 231, 236, 1);
  254. border-radius: 24px;
  255. color: rgba(23, 23, 37, 1);
  256. padding: 12px 16px;
  257. }
  258. .form-display {
  259. color: rgba(23, 23, 37, 1);
  260. font-family: DM Sans;
  261. font-size: 16px;
  262. font-weight: 400;
  263. line-height: 22px;
  264. letter-spacing: 0%;
  265. text-align: left;
  266. padding: 15px 0px;
  267. }
  268. // 头像样式
  269. .avatar-container {
  270. position: relative;
  271. display: inline-block;
  272. .user-avatar {
  273. width: 80rpx;
  274. height: 80rpx;
  275. border-radius: 50%;
  276. }
  277. .edit-avatar-icon {
  278. position: absolute;
  279. bottom: 10rpx;
  280. right: 5rpx;
  281. width: 25rpx;
  282. height: 25rpx;
  283. border-radius: 50%;
  284. display: flex;
  285. align-items: center;
  286. justify-content: center;
  287. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);
  288. }
  289. }
  290. // 日期选择器样式
  291. .date-picker {
  292. display: flex;
  293. align-items: center;
  294. justify-content: space-between;
  295. height: 75rpx;
  296. font-size: 14px;
  297. border: 1px solid rgba(227, 231, 236, 1);
  298. border-radius: 24px;
  299. color: rgba(23, 23, 37, 1);
  300. padding: 12px 16px;
  301. .date-text {
  302. color: rgba(23, 23, 37, 1);
  303. font-family: DM Sans;
  304. font-size: 14px;
  305. font-weight: 400;
  306. line-height: 22px;
  307. letter-spacing: 0%;
  308. text-align: left;
  309. }
  310. }
  311. // 下拉选择器样式
  312. .select-picker {
  313. display: flex;
  314. align-items: center;
  315. justify-content: space-between;
  316. height: 75rpx;
  317. font-size: 14px;
  318. border: 1px solid rgba(227, 231, 236, 1);
  319. border-radius: 24px;
  320. color: rgba(23, 23, 37, 1);
  321. padding: 12px 16px;
  322. .select-text {
  323. color: rgba(23, 23, 37, 1);
  324. font-family: DM Sans;
  325. font-size: 14px;
  326. font-weight: 400;
  327. line-height: 22px;
  328. letter-spacing: 0%;
  329. text-align: left;
  330. }
  331. }
  332. }
  333. }
  334. // 保存按钮
  335. .save-button {
  336. position: fixed;
  337. bottom: 60rpx;
  338. left: 0;
  339. right: 0;
  340. height: 120rpx;
  341. margin: 0 60rpx;
  342. border-radius: 24px;
  343. background: #007AFF;
  344. display: flex;
  345. align-items: center;
  346. justify-content: center;
  347. .save-text {
  348. color: rgba(255, 255, 255, 1);
  349. font-family: DM Sans;
  350. font-size: 18px;
  351. font-weight: 400;
  352. line-height: 24px;
  353. letter-spacing: 0.5%;
  354. text-align: left;
  355. }
  356. }
  357. // 求职状态选择器样式
  358. .job-status-picker {
  359. background: #fff;
  360. border-radius: 42rpx 42rpx 0 0;
  361. .picker-header {
  362. padding: 40rpx 40rpx 20rpx 40rpx;
  363. text-align: center;
  364. border-bottom: 1px solid #f0f0f0;
  365. .picker-title {
  366. color: rgba(23, 23, 37, 1);
  367. font-family: DM Sans;
  368. font-size: 18px;
  369. font-weight: 600;
  370. line-height: 26px;
  371. letter-spacing: 0%;
  372. text-align: center;
  373. }
  374. }
  375. .picker-content {
  376. padding: 20rpx 40rpx 40rpx 40rpx;
  377. .status-option {
  378. padding: 30rpx 0;
  379. border-bottom: 1px solid #f0f0f0;
  380. &:last-child {
  381. border-bottom: none;
  382. }
  383. &.active {
  384. background-color: rgba(0, 122, 255, 0.05);
  385. }
  386. .option-left {
  387. display: flex;
  388. align-items: center;
  389. .radio-btn {
  390. width: 40rpx;
  391. height: 40rpx;
  392. border-radius: 50%;
  393. border: 2px solid #e0e0e0;
  394. display: flex;
  395. align-items: center;
  396. justify-content: center;
  397. margin-right: 20rpx;
  398. &.checked {
  399. background-color: #007AFF;
  400. border-color: #007AFF;
  401. }
  402. }
  403. .option-text {
  404. flex: 1;
  405. color: rgba(23, 23, 37, 1);
  406. font-family: DM Sans;
  407. font-size: 16px;
  408. font-weight: 400;
  409. line-height: 22px;
  410. letter-spacing: 0%;
  411. text-align: left;
  412. }
  413. .recommend-tag {
  414. background-color: #007AFF;
  415. border-radius: 8rpx;
  416. padding: 4rpx 12rpx;
  417. margin-left: 16rpx;
  418. text {
  419. color: #fff;
  420. font-family: DM Sans;
  421. font-size: 12px;
  422. font-weight: 500;
  423. line-height: 16px;
  424. letter-spacing: 0%;
  425. text-align: center;
  426. }
  427. }
  428. }
  429. }
  430. }
  431. }
  432. </style>