success-case-upload.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  1. <template>
  2. <view class="success-case-upload">
  3. <!-- 顶部导航栏 -->
  4. <view class="header">
  5. <view class="back-btn" @click="goBack"></view>
  6. <text class="header-title">撮合成功审核</text>
  7. <view class="placeholder"></view>
  8. </view>
  9. <scroll-view scroll-y class="content">
  10. <view class="form-container">
  11. <!-- 男方信息 -->
  12. <view class="form-section">
  13. <view class="section-title">
  14. <text class="title-icon male">♂</text>
  15. <text class="title-text">男方信息</text>
  16. </view>
  17. <!-- 选择男方用户 -->
  18. <view class="form-item">
  19. <text class="form-label">选择男方用户 <text class="required">*</text></text>
  20. <view class="picker-wrapper" @click="openMalePicker">
  21. <view class="selected-user" v-if="selectedMale">
  22. <image class="user-avatar" :src="selectedMale.avatarUrl || '/static/default-avatar.svg'" mode="aspectFill"></image>
  23. <text class="user-name">{{ selectedMale.name }}</text>
  24. <text class="user-age" v-if="selectedMale.age">{{ selectedMale.age }}岁</text>
  25. </view>
  26. <text class="placeholder-text" v-else>请选择或搜索男方用户</text>
  27. <view class="arrow-down"></view>
  28. </view>
  29. </view>
  30. <!-- 男方真实姓名 -->
  31. <view class="form-item">
  32. <text class="form-label">男方真实姓名 <text class="required">*</text></text>
  33. <input class="form-input" v-model="formData.maleRealName" placeholder="请输入男方真实姓名" />
  34. </view>
  35. </view>
  36. <!-- 女方信息 -->
  37. <view class="form-section">
  38. <view class="section-title">
  39. <text class="title-icon female">♀</text>
  40. <text class="title-text">女方信息</text>
  41. </view>
  42. <!-- 选择女方用户 -->
  43. <view class="form-item">
  44. <text class="form-label">选择女方用户 <text class="required">*</text></text>
  45. <view class="picker-wrapper" @click="openFemalePicker">
  46. <view class="selected-user" v-if="selectedFemale">
  47. <image class="user-avatar" :src="selectedFemale.avatarUrl || '/static/default-avatar.svg'" mode="aspectFill"></image>
  48. <text class="user-name">{{ selectedFemale.name }}</text>
  49. <text class="user-age" v-if="selectedFemale.age">{{ selectedFemale.age }}岁</text>
  50. </view>
  51. <text class="placeholder-text" v-else>请选择或搜索女方用户</text>
  52. <view class="arrow-down"></view>
  53. </view>
  54. </view>
  55. <!-- 女方真实姓名 -->
  56. <view class="form-item">
  57. <text class="form-label">女方真实姓名 <text class="required">*</text></text>
  58. <input class="form-input" v-model="formData.femaleRealName" placeholder="请输入女方真实姓名" />
  59. </view>
  60. </view>
  61. <!-- 成功凭证 -->
  62. <view class="form-section">
  63. <view class="section-title">
  64. <text class="title-icon proof">📷</text>
  65. <text class="title-text">成功凭证</text>
  66. </view>
  67. <view class="form-item">
  68. <text class="form-label">上传凭证图片 <text class="required">*</text></text>
  69. <text class="form-hint">请上传结婚证、订婚照片等凭证(最多9张)</text>
  70. <view class="image-upload-area">
  71. <view class="image-item" v-for="(img, index) in proofImages" :key="index">
  72. <image class="uploaded-image" :src="img" mode="aspectFill"></image>
  73. <view class="delete-btn" @click="removeImage(index)">×</view>
  74. </view>
  75. <view class="add-image-btn" v-if="proofImages.length < 9" @click="chooseImage">
  76. <text class="add-icon">+</text>
  77. <text class="add-text">添加图片</text>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <!-- 案例信息 -->
  83. <view class="form-section">
  84. <view class="section-title">
  85. <text class="title-icon info">💕</text>
  86. <text class="title-text">案例信息</text>
  87. </view>
  88. <!-- 案例类型 -->
  89. <view class="form-item">
  90. <text class="form-label">案例类型 <text class="required">*</text></text>
  91. <view class="radio-group">
  92. <view class="radio-item" :class="{ active: formData.caseType === 1 }" @click="formData.caseType = 1">
  93. <view class="radio-circle"></view>
  94. <text class="radio-text">订婚</text>
  95. </view>
  96. <view class="radio-item" :class="{ active: formData.caseType === 2 }" @click="formData.caseType = 2">
  97. <view class="radio-circle"></view>
  98. <text class="radio-text">结婚</text>
  99. </view>
  100. </view>
  101. </view>
  102. <!-- 成功日期 -->
  103. <view class="form-item">
  104. <text class="form-label">成功日期</text>
  105. <picker mode="date" :value="formData.caseDate" @change="onDateChange">
  106. <view class="date-picker">
  107. <text class="date-text" v-if="formData.caseDate">{{ formData.caseDate }}</text>
  108. <text class="placeholder-text" v-else>请选择日期</text>
  109. <view class="calendar-icon">📅</view>
  110. </view>
  111. </picker>
  112. </view>
  113. </view>
  114. <!-- 提交按钮 -->
  115. <view class="submit-section">
  116. <button class="submit-btn" :disabled="submitting" @click="submitForm">
  117. <text v-if="submitting">提交中...</text>
  118. <text v-else>提交审核</text>
  119. </button>
  120. <text class="submit-hint">提交后将由平台审核,审核通过后可获得积分奖励</text>
  121. </view>
  122. </view>
  123. </scroll-view>
  124. <!-- 用户选择弹窗 -->
  125. <uni-popup ref="userPickerPopup" type="bottom">
  126. <view class="user-picker-popup">
  127. <view class="popup-header">
  128. <text class="popup-title">{{ pickerGender === 1 ? '选择男方用户' : '选择女方用户' }}</text>
  129. <view class="close-btn" @click="closeUserPicker">×</view>
  130. </view>
  131. <!-- 搜索框 -->
  132. <view class="search-box">
  133. <input class="search-input" v-model="searchKeyword" placeholder="搜索姓名或手机号" @input="onSearchInput" />
  134. <view class="search-icon">🔍</view>
  135. </view>
  136. <!-- 用户列表 -->
  137. <scroll-view scroll-y class="user-list">
  138. <view class="user-item" v-for="user in filteredUsers" :key="user.resourceId" @click="selectUser(user)">
  139. <image class="user-avatar" :src="user.avatarUrl || '/static/default-avatar.svg'" mode="aspectFill"></image>
  140. <view class="user-info">
  141. <text class="user-name">{{ user.name }}</text>
  142. <text class="user-detail">{{ user.age }}岁 · {{ user.phone }}</text>
  143. </view>
  144. </view>
  145. <view class="empty-tip" v-if="filteredUsers.length === 0">
  146. <text>暂无匹配的用户</text>
  147. </view>
  148. </scroll-view>
  149. </view>
  150. </uni-popup>
  151. </view>
  152. </template>
  153. <script>
  154. import api from '@/utils/api.js'
  155. export default {
  156. data() {
  157. return {
  158. matchmakerId: null,
  159. formData: {
  160. maleRealName: '',
  161. femaleRealName: '',
  162. caseType: 2, // 默认结婚
  163. caseDate: ''
  164. },
  165. selectedMale: null,
  166. selectedFemale: null,
  167. proofImages: [],
  168. submitting: false,
  169. resubmitId: null, // 重新提交时的原记录ID
  170. // 用户选择器
  171. pickerGender: 1, // 1-男 2-女
  172. searchKeyword: '',
  173. maleUsers: [],
  174. femaleUsers: [],
  175. searchTimer: null
  176. }
  177. },
  178. computed: {
  179. filteredUsers() {
  180. const users = this.pickerGender === 1 ? this.maleUsers : this.femaleUsers
  181. if (!this.searchKeyword) {
  182. return users
  183. }
  184. const keyword = this.searchKeyword.toLowerCase()
  185. return users.filter(u =>
  186. (u.name && u.name.toLowerCase().includes(keyword)) ||
  187. (u.phone && u.phone.includes(keyword))
  188. )
  189. }
  190. },
  191. onLoad(options) {
  192. this.loadMatchmakerInfo()
  193. // 检查是否是重新提交
  194. if (options.resubmitId) {
  195. this.resubmitId = options.resubmitId
  196. this.loadResubmitData(options.resubmitId)
  197. }
  198. },
  199. onShow() {
  200. this.loadResources()
  201. },
  202. methods: {
  203. goBack() {
  204. uni.navigateBack()
  205. },
  206. async loadMatchmakerInfo() {
  207. try {
  208. const userInfo = uni.getStorageSync('userInfo')
  209. if (userInfo && userInfo.userId) {
  210. // 通过userId获取红娘信息
  211. const matchmakerInfo = await api.matchmaker.getByUserId(userInfo.userId)
  212. if (matchmakerInfo) {
  213. // 兼容不同字段名
  214. this.matchmakerId = matchmakerInfo.matchmakerId || matchmakerInfo.matchmaker_id || null
  215. }
  216. if (!this.matchmakerId) {
  217. uni.showToast({ title: '未找到红娘信息', icon: 'none' })
  218. }
  219. }
  220. } catch (e) {
  221. uni.showToast({ title: '获取红娘信息失败', icon: 'none' })
  222. }
  223. },
  224. // 加载重新提交的数据进行回显
  225. async loadResubmitData(id) {
  226. try {
  227. const res = await api.successCaseUpload.getAuditRecordDetail(id)
  228. if (res) {
  229. // 回显表单数据
  230. this.formData.maleRealName = res.maleRealName || ''
  231. this.formData.femaleRealName = res.femaleRealName || ''
  232. this.formData.caseType = res.caseType || 2
  233. this.formData.caseDate = res.caseDate || ''
  234. // 回显凭证图片(存储格式为JSON数组字符串)
  235. if (res.proofImages) {
  236. try {
  237. const images = JSON.parse(res.proofImages)
  238. this.proofImages = Array.isArray(images) ? images : []
  239. } catch (e) {
  240. // 兼容逗号分隔格式
  241. this.proofImages = res.proofImages.split(',').filter(img => img)
  242. }
  243. }
  244. // 回显男方用户信息
  245. if (res.maleUserId) {
  246. const maleInfo = res.maleUserInfo || {}
  247. this.selectedMale = {
  248. userId: res.maleUserId,
  249. name: maleInfo.name || res.maleRealName,
  250. avatarUrl: maleInfo.avatarUrl || '',
  251. age: maleInfo.age || null
  252. }
  253. }
  254. // 回显女方用户信息
  255. if (res.femaleUserId) {
  256. const femaleInfo = res.femaleUserInfo || {}
  257. this.selectedFemale = {
  258. userId: res.femaleUserId,
  259. name: femaleInfo.name || res.femaleRealName,
  260. avatarUrl: femaleInfo.avatarUrl || '',
  261. age: femaleInfo.age || null
  262. }
  263. }
  264. }
  265. } catch (e) {
  266. uni.showToast({ title: '加载数据失败', icon: 'none' })
  267. }
  268. },
  269. async loadResources() {
  270. if (!this.matchmakerId) {
  271. setTimeout(() => this.loadResources(), 500)
  272. return
  273. }
  274. try {
  275. // 加载男方用户列表(只查询已注册用户,user_id不为空)
  276. const maleRes = await api.myResource.getRegisteredDropdown(this.matchmakerId, 1)
  277. this.maleUsers = Array.isArray(maleRes) ? maleRes : (maleRes?.data || [])
  278. // 加载女方用户列表(只查询已注册用户,user_id不为空)
  279. const femaleRes = await api.myResource.getRegisteredDropdown(this.matchmakerId, 2)
  280. this.femaleUsers = Array.isArray(femaleRes) ? femaleRes : (femaleRes?.data || [])
  281. } catch (e) {
  282. }
  283. },
  284. openMalePicker() {
  285. this.pickerGender = 1
  286. this.searchKeyword = ''
  287. this.$refs.userPickerPopup.open()
  288. },
  289. openFemalePicker() {
  290. this.pickerGender = 2
  291. this.searchKeyword = ''
  292. this.$refs.userPickerPopup.open()
  293. },
  294. closeUserPicker() {
  295. this.$refs.userPickerPopup.close()
  296. },
  297. selectUser(user) {
  298. if (this.pickerGender === 1) {
  299. this.selectedMale = user
  300. // 自动填充真实姓名(每次选择都更新)
  301. this.formData.maleRealName = user.name || ''
  302. } else {
  303. this.selectedFemale = user
  304. // 自动填充真实姓名(每次选择都更新)
  305. this.formData.femaleRealName = user.name || ''
  306. }
  307. this.closeUserPicker()
  308. },
  309. onSearchInput() {
  310. // 防抖搜索
  311. if (this.searchTimer) {
  312. clearTimeout(this.searchTimer)
  313. }
  314. this.searchTimer = setTimeout(() => {
  315. this.searchResources()
  316. }, 300)
  317. },
  318. async searchResources() {
  319. if (!this.matchmakerId) return
  320. try {
  321. // 如果关键词为空,重新加载当前性别的完整列表
  322. if (!this.searchKeyword || !this.searchKeyword.trim()) {
  323. const res = await api.myResource.getRegisteredDropdown(this.matchmakerId, this.pickerGender)
  324. const users = Array.isArray(res) ? res : (res?.data || [])
  325. if (this.pickerGender === 1) {
  326. this.maleUsers = users
  327. } else {
  328. this.femaleUsers = users
  329. }
  330. return
  331. }
  332. // 使用已注册用户搜索接口(只返回user_id不为空的资源)
  333. const res = await api.myResource.searchRegistered(this.matchmakerId, this.searchKeyword.trim(), this.pickerGender)
  334. const users = Array.isArray(res) ? res : (res?.data || [])
  335. if (this.pickerGender === 1) {
  336. this.maleUsers = users
  337. } else {
  338. this.femaleUsers = users
  339. }
  340. } catch (e) {
  341. }
  342. },
  343. async chooseImage() {
  344. try {
  345. // uni.chooseImage 在 Promise 模式下返回 [err, res] 格式
  346. const [err, res] = await uni.chooseImage({
  347. count: 9 - this.proofImages.length,
  348. sizeType: ['compressed'],
  349. sourceType: ['album', 'camera']
  350. })
  351. if (err) {
  352. return
  353. }
  354. if (res && res.tempFilePaths && res.tempFilePaths.length > 0) {
  355. uni.showLoading({ title: '上传中...' })
  356. for (const tempPath of res.tempFilePaths) {
  357. try {
  358. const uploadRes = await this.uploadImage(tempPath)
  359. if (uploadRes) {
  360. this.proofImages.push(uploadRes)
  361. }
  362. } catch (e) {
  363. uni.showToast({ title: '图片上传失败', icon: 'none' })
  364. }
  365. }
  366. uni.hideLoading()
  367. }
  368. } catch (e) {
  369. }
  370. },
  371. async uploadImage(tempPath) {
  372. return new Promise((resolve, reject) => {
  373. uni.uploadFile({
  374. url: 'https://api.zhongruanke.cn/api/success-case-upload/upload-image',
  375. filePath: tempPath,
  376. name: 'file',
  377. success: (res) => {
  378. try {
  379. const data = JSON.parse(res.data)
  380. if (data.code === 200 && data.data) {
  381. resolve(data.data)
  382. } else {
  383. uni.showToast({ title: data.message || '上传失败', icon: 'none' })
  384. reject(new Error(data.message))
  385. }
  386. } catch (e) {
  387. reject(e)
  388. }
  389. },
  390. fail: (err) => {
  391. reject(err)
  392. }
  393. })
  394. })
  395. },
  396. removeImage(index) {
  397. this.proofImages.splice(index, 1)
  398. },
  399. onDateChange(e) {
  400. this.formData.caseDate = e.detail.value
  401. },
  402. async submitForm() {
  403. // 表单验证
  404. if (!this.selectedMale) {
  405. uni.showToast({ title: '请选择男方用户', icon: 'none' })
  406. return
  407. }
  408. if (!this.selectedFemale) {
  409. uni.showToast({ title: '请选择女方用户', icon: 'none' })
  410. return
  411. }
  412. if (this.selectedMale.userId === this.selectedFemale.userId) {
  413. uni.showToast({ title: '男方和女方不能是同一人', icon: 'none' })
  414. return
  415. }
  416. if (!this.formData.maleRealName.trim()) {
  417. uni.showToast({ title: '请填写男方真实姓名', icon: 'none' })
  418. return
  419. }
  420. if (!this.formData.femaleRealName.trim()) {
  421. uni.showToast({ title: '请填写女方真实姓名', icon: 'none' })
  422. return
  423. }
  424. if (this.proofImages.length === 0) {
  425. uni.showToast({ title: '请上传至少一张成功凭证图片', icon: 'none' })
  426. return
  427. }
  428. this.submitting = true
  429. try {
  430. const submitData = {
  431. matchmakerId: this.matchmakerId,
  432. maleUserId: this.selectedMale.userId, // 传递users表的user_id
  433. femaleUserId: this.selectedFemale.userId, // 传递users表的user_id
  434. maleRealName: this.formData.maleRealName.trim(),
  435. femaleRealName: this.formData.femaleRealName.trim(),
  436. proofImages: this.proofImages,
  437. caseType: this.formData.caseType,
  438. caseDate: this.formData.caseDate || null
  439. }
  440. const res = await api.successCaseUpload.submit(submitData)
  441. // request函数成功时返回的是data字段的内容(这里是id)
  442. // 如果能走到这里说明请求成功了
  443. if (res !== undefined && res !== null) {
  444. uni.showToast({ title: '提交成功', icon: 'success' })
  445. setTimeout(() => {
  446. uni.navigateBack()
  447. }, 1500)
  448. } else {
  449. uni.showToast({ title: '提交失败', icon: 'none' })
  450. }
  451. } catch (e) {
  452. uni.showToast({ title: '提交失败,请稍后重试', icon: 'none' })
  453. } finally {
  454. this.submitting = false
  455. }
  456. }
  457. }
  458. }
  459. </script>
  460. <style lang="scss" scoped>
  461. /* 确保所有元素使用border-box */
  462. * {
  463. box-sizing: border-box;
  464. }
  465. .success-case-upload {
  466. min-height: 100vh;
  467. background: linear-gradient(180deg, #f8e1f4 0%, #fff5f5 100%);
  468. display: flex;
  469. flex-direction: column;
  470. width: 100%;
  471. overflow-x: hidden;
  472. }
  473. .header {
  474. display: flex;
  475. align-items: center;
  476. justify-content: space-between;
  477. padding: 60rpx 30rpx 30rpx;
  478. background: linear-gradient(135deg, #d63384 0%, #9c27b0 100%);
  479. .back-btn {
  480. width: 60rpx;
  481. height: 60rpx;
  482. background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E") no-repeat center;
  483. background-size: contain;
  484. }
  485. .header-title {
  486. font-size: 36rpx;
  487. font-weight: bold;
  488. color: #fff;
  489. }
  490. .placeholder {
  491. width: 60rpx;
  492. }
  493. }
  494. .content {
  495. flex: 1;
  496. padding: 30rpx 30rpx 30rpx 30rpx;
  497. box-sizing: border-box;
  498. }
  499. .form-container {
  500. display: flex;
  501. flex-direction: column;
  502. gap: 30rpx;
  503. width: 100%;
  504. }
  505. .form-section {
  506. background: #fff;
  507. border-radius: 20rpx;
  508. padding: 30rpx;
  509. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  510. box-sizing: border-box;
  511. width: 100%;
  512. }
  513. .section-title {
  514. display: flex;
  515. align-items: center;
  516. margin-bottom: 30rpx;
  517. .title-icon {
  518. font-size: 36rpx;
  519. margin-right: 16rpx;
  520. &.male { color: #2196F3; }
  521. &.female { color: #E91E63; }
  522. &.proof { color: #FF9800; }
  523. &.info { color: #9C27B0; }
  524. }
  525. .title-text {
  526. font-size: 32rpx;
  527. font-weight: bold;
  528. color: #333;
  529. }
  530. }
  531. .form-item {
  532. margin-bottom: 30rpx;
  533. &:last-child {
  534. margin-bottom: 0;
  535. }
  536. }
  537. .form-label {
  538. display: block;
  539. font-size: 28rpx;
  540. color: #666;
  541. margin-bottom: 16rpx;
  542. .required {
  543. color: #E91E63;
  544. }
  545. }
  546. .form-hint {
  547. display: block;
  548. font-size: 24rpx;
  549. color: #999;
  550. margin-bottom: 16rpx;
  551. }
  552. .form-input {
  553. width: 100%;
  554. height: 88rpx;
  555. background: #f5f5f5;
  556. border-radius: 12rpx;
  557. padding: 0 24rpx;
  558. font-size: 28rpx;
  559. box-sizing: border-box;
  560. border: none;
  561. }
  562. .form-textarea {
  563. width: 100%;
  564. height: 200rpx;
  565. background: #f5f5f5;
  566. border-radius: 12rpx;
  567. padding: 24rpx;
  568. font-size: 28rpx;
  569. box-sizing: border-box;
  570. }
  571. .char-count {
  572. display: block;
  573. text-align: right;
  574. font-size: 24rpx;
  575. color: #999;
  576. margin-top: 8rpx;
  577. }
  578. .picker-wrapper {
  579. display: flex;
  580. align-items: center;
  581. justify-content: space-between;
  582. height: 88rpx;
  583. background: #f5f5f5;
  584. border-radius: 12rpx;
  585. padding: 0 24rpx;
  586. .placeholder-text {
  587. color: #999;
  588. font-size: 28rpx;
  589. }
  590. .arrow-down {
  591. width: 24rpx;
  592. height: 24rpx;
  593. border-right: 4rpx solid #999;
  594. border-bottom: 4rpx solid #999;
  595. transform: rotate(45deg);
  596. }
  597. }
  598. .selected-user {
  599. display: flex;
  600. align-items: center;
  601. flex: 1;
  602. .user-avatar {
  603. width: 56rpx;
  604. height: 56rpx;
  605. border-radius: 50%;
  606. margin-right: 16rpx;
  607. }
  608. .user-name {
  609. font-size: 28rpx;
  610. color: #333;
  611. margin-right: 16rpx;
  612. }
  613. .user-age {
  614. font-size: 24rpx;
  615. color: #999;
  616. }
  617. }
  618. .image-upload-area {
  619. display: flex;
  620. flex-wrap: wrap;
  621. gap: 20rpx;
  622. }
  623. .image-item {
  624. position: relative;
  625. width: 200rpx;
  626. height: 200rpx;
  627. .uploaded-image {
  628. width: 100%;
  629. height: 100%;
  630. border-radius: 12rpx;
  631. }
  632. .delete-btn {
  633. position: absolute;
  634. top: -16rpx;
  635. right: -16rpx;
  636. width: 40rpx;
  637. height: 40rpx;
  638. background: #E91E63;
  639. border-radius: 50%;
  640. color: #fff;
  641. font-size: 28rpx;
  642. display: flex;
  643. align-items: center;
  644. justify-content: center;
  645. }
  646. }
  647. .add-image-btn {
  648. width: 200rpx;
  649. height: 200rpx;
  650. background: #f5f5f5;
  651. border: 2rpx dashed #ccc;
  652. border-radius: 12rpx;
  653. display: flex;
  654. flex-direction: column;
  655. align-items: center;
  656. justify-content: center;
  657. .add-icon {
  658. font-size: 60rpx;
  659. color: #999;
  660. }
  661. .add-text {
  662. font-size: 24rpx;
  663. color: #999;
  664. margin-top: 8rpx;
  665. }
  666. }
  667. .radio-group {
  668. display: flex;
  669. gap: 40rpx;
  670. }
  671. .radio-item {
  672. display: flex;
  673. align-items: center;
  674. padding: 20rpx 40rpx;
  675. background: #f5f5f5;
  676. border-radius: 12rpx;
  677. &.active {
  678. background: linear-gradient(135deg, #d63384 0%, #9c27b0 100%);
  679. .radio-circle {
  680. border-color: #fff;
  681. &::after {
  682. content: '';
  683. width: 16rpx;
  684. height: 16rpx;
  685. background: #fff;
  686. border-radius: 50%;
  687. }
  688. }
  689. .radio-text {
  690. color: #fff;
  691. }
  692. }
  693. .radio-circle {
  694. width: 32rpx;
  695. height: 32rpx;
  696. border: 4rpx solid #999;
  697. border-radius: 50%;
  698. margin-right: 16rpx;
  699. display: flex;
  700. align-items: center;
  701. justify-content: center;
  702. }
  703. .radio-text {
  704. font-size: 28rpx;
  705. color: #333;
  706. }
  707. }
  708. .date-picker {
  709. display: flex;
  710. align-items: center;
  711. justify-content: space-between;
  712. height: 88rpx;
  713. background: #f5f5f5;
  714. border-radius: 12rpx;
  715. padding: 0 24rpx;
  716. .date-text {
  717. font-size: 28rpx;
  718. color: #333;
  719. }
  720. .placeholder-text {
  721. font-size: 28rpx;
  722. color: #999;
  723. }
  724. .calendar-icon {
  725. font-size: 36rpx;
  726. }
  727. }
  728. .submit-section {
  729. margin-top: 20rpx;
  730. padding: 0 0 60rpx 0;
  731. width: 100%;
  732. box-sizing: border-box;
  733. }
  734. .submit-btn {
  735. width: 100%;
  736. height: 96rpx;
  737. background: linear-gradient(135deg, #d63384 0%, #9c27b0 100%);
  738. border-radius: 48rpx;
  739. color: #fff;
  740. font-size: 32rpx;
  741. font-weight: bold;
  742. display: flex;
  743. align-items: center;
  744. justify-content: center;
  745. border: none;
  746. &[disabled] {
  747. opacity: 0.6;
  748. }
  749. }
  750. .submit-hint {
  751. display: block;
  752. text-align: center;
  753. font-size: 24rpx;
  754. color: #999;
  755. margin-top: 20rpx;
  756. }
  757. /* 用户选择弹窗 */
  758. .user-picker-popup {
  759. background: #fff;
  760. border-radius: 30rpx 30rpx 0 0;
  761. max-height: 80vh;
  762. display: flex;
  763. flex-direction: column;
  764. }
  765. .popup-header {
  766. display: flex;
  767. align-items: center;
  768. justify-content: space-between;
  769. padding: 30rpx;
  770. border-bottom: 1rpx solid #eee;
  771. .popup-title {
  772. font-size: 32rpx;
  773. font-weight: bold;
  774. color: #333;
  775. }
  776. .close-btn {
  777. font-size: 48rpx;
  778. color: #999;
  779. line-height: 1;
  780. }
  781. }
  782. .search-box {
  783. display: flex;
  784. align-items: center;
  785. margin: 20rpx 30rpx;
  786. background: #f5f5f5;
  787. border-radius: 40rpx;
  788. padding: 0 30rpx;
  789. .search-input {
  790. flex: 1;
  791. height: 80rpx;
  792. font-size: 28rpx;
  793. }
  794. .search-icon {
  795. font-size: 36rpx;
  796. }
  797. }
  798. .user-list {
  799. flex: 1;
  800. max-height: 60vh;
  801. padding: 0 30rpx;
  802. }
  803. .user-item {
  804. display: flex;
  805. align-items: center;
  806. padding: 24rpx 0;
  807. border-bottom: 1rpx solid #f5f5f5;
  808. .user-avatar {
  809. width: 80rpx;
  810. height: 80rpx;
  811. border-radius: 50%;
  812. margin-right: 24rpx;
  813. }
  814. .user-info {
  815. flex: 1;
  816. .user-name {
  817. display: block;
  818. font-size: 30rpx;
  819. color: #333;
  820. margin-bottom: 8rpx;
  821. }
  822. .user-detail {
  823. font-size: 24rpx;
  824. color: #999;
  825. }
  826. }
  827. }
  828. .empty-tip {
  829. padding: 60rpx 0;
  830. text-align: center;
  831. color: #999;
  832. font-size: 28rpx;
  833. }
  834. </style>