success-case-upload.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  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. console.log('红娘信息:', matchmakerInfo)
  213. if (matchmakerInfo) {
  214. // 兼容不同字段名
  215. this.matchmakerId = matchmakerInfo.matchmakerId || matchmakerInfo.matchmaker_id || null
  216. console.log('获取到红娘ID:', this.matchmakerId)
  217. }
  218. if (!this.matchmakerId) {
  219. uni.showToast({ title: '未找到红娘信息', icon: 'none' })
  220. }
  221. }
  222. } catch (e) {
  223. console.error('获取红娘信息失败', e)
  224. uni.showToast({ title: '获取红娘信息失败', icon: 'none' })
  225. }
  226. },
  227. // 加载重新提交的数据进行回显
  228. async loadResubmitData(id) {
  229. try {
  230. const res = await api.successCaseUpload.getAuditRecordDetail(id)
  231. console.log('回显数据:', res)
  232. if (res) {
  233. // 回显表单数据
  234. this.formData.maleRealName = res.maleRealName || ''
  235. this.formData.femaleRealName = res.femaleRealName || ''
  236. this.formData.caseType = res.caseType || 2
  237. this.formData.caseDate = res.caseDate || ''
  238. // 回显凭证图片(存储格式为JSON数组字符串)
  239. if (res.proofImages) {
  240. try {
  241. const images = JSON.parse(res.proofImages)
  242. this.proofImages = Array.isArray(images) ? images : []
  243. } catch (e) {
  244. // 兼容逗号分隔格式
  245. this.proofImages = res.proofImages.split(',').filter(img => img)
  246. }
  247. }
  248. // 回显男方用户信息
  249. if (res.maleUserId) {
  250. const maleInfo = res.maleUserInfo || {}
  251. this.selectedMale = {
  252. userId: res.maleUserId,
  253. name: maleInfo.name || res.maleRealName,
  254. avatarUrl: maleInfo.avatarUrl || '',
  255. age: maleInfo.age || null
  256. }
  257. }
  258. // 回显女方用户信息
  259. if (res.femaleUserId) {
  260. const femaleInfo = res.femaleUserInfo || {}
  261. this.selectedFemale = {
  262. userId: res.femaleUserId,
  263. name: femaleInfo.name || res.femaleRealName,
  264. avatarUrl: femaleInfo.avatarUrl || '',
  265. age: femaleInfo.age || null
  266. }
  267. }
  268. }
  269. } catch (e) {
  270. console.error('加载回显数据失败', e)
  271. uni.showToast({ title: '加载数据失败', icon: 'none' })
  272. }
  273. },
  274. async loadResources() {
  275. if (!this.matchmakerId) {
  276. setTimeout(() => this.loadResources(), 500)
  277. return
  278. }
  279. try {
  280. // 加载男方用户列表(只查询已注册用户,user_id不为空)
  281. const maleRes = await api.myResource.getRegisteredDropdown(this.matchmakerId, 1)
  282. console.log('男方资源返回:', maleRes)
  283. this.maleUsers = Array.isArray(maleRes) ? maleRes : (maleRes?.data || [])
  284. // 加载女方用户列表(只查询已注册用户,user_id不为空)
  285. const femaleRes = await api.myResource.getRegisteredDropdown(this.matchmakerId, 2)
  286. console.log('女方资源返回:', femaleRes)
  287. this.femaleUsers = Array.isArray(femaleRes) ? femaleRes : (femaleRes?.data || [])
  288. } catch (e) {
  289. console.error('加载资源列表失败', e)
  290. }
  291. },
  292. openMalePicker() {
  293. this.pickerGender = 1
  294. this.searchKeyword = ''
  295. this.$refs.userPickerPopup.open()
  296. },
  297. openFemalePicker() {
  298. this.pickerGender = 2
  299. this.searchKeyword = ''
  300. this.$refs.userPickerPopup.open()
  301. },
  302. closeUserPicker() {
  303. this.$refs.userPickerPopup.close()
  304. },
  305. selectUser(user) {
  306. if (this.pickerGender === 1) {
  307. this.selectedMale = user
  308. // 自动填充真实姓名(每次选择都更新)
  309. this.formData.maleRealName = user.name || ''
  310. } else {
  311. this.selectedFemale = user
  312. // 自动填充真实姓名(每次选择都更新)
  313. this.formData.femaleRealName = user.name || ''
  314. }
  315. this.closeUserPicker()
  316. },
  317. onSearchInput() {
  318. // 防抖搜索
  319. if (this.searchTimer) {
  320. clearTimeout(this.searchTimer)
  321. }
  322. this.searchTimer = setTimeout(() => {
  323. this.searchResources()
  324. }, 300)
  325. },
  326. async searchResources() {
  327. if (!this.matchmakerId) return
  328. try {
  329. // 如果关键词为空,重新加载当前性别的完整列表
  330. if (!this.searchKeyword || !this.searchKeyword.trim()) {
  331. const res = await api.myResource.getRegisteredDropdown(this.matchmakerId, this.pickerGender)
  332. console.log('重新加载资源列表:', res)
  333. const users = Array.isArray(res) ? res : (res?.data || [])
  334. if (this.pickerGender === 1) {
  335. this.maleUsers = users
  336. } else {
  337. this.femaleUsers = users
  338. }
  339. return
  340. }
  341. // 使用已注册用户搜索接口(只返回user_id不为空的资源)
  342. const res = await api.myResource.searchRegistered(this.matchmakerId, this.searchKeyword.trim(), this.pickerGender)
  343. console.log('搜索资源返回:', res)
  344. const users = Array.isArray(res) ? res : (res?.data || [])
  345. if (this.pickerGender === 1) {
  346. this.maleUsers = users
  347. } else {
  348. this.femaleUsers = users
  349. }
  350. } catch (e) {
  351. console.error('搜索资源失败', e)
  352. }
  353. },
  354. async chooseImage() {
  355. try {
  356. // uni.chooseImage 在 Promise 模式下返回 [err, res] 格式
  357. const [err, res] = await uni.chooseImage({
  358. count: 9 - this.proofImages.length,
  359. sizeType: ['compressed'],
  360. sourceType: ['album', 'camera']
  361. })
  362. console.log('选择图片返回 err:', err)
  363. console.log('选择图片返回 res:', res)
  364. if (err) {
  365. console.error('选择图片失败', err)
  366. return
  367. }
  368. if (res && res.tempFilePaths && res.tempFilePaths.length > 0) {
  369. uni.showLoading({ title: '上传中...' })
  370. for (const tempPath of res.tempFilePaths) {
  371. console.log('准备上传图片:', tempPath)
  372. try {
  373. const uploadRes = await this.uploadImage(tempPath)
  374. console.log('上传结果:', uploadRes)
  375. if (uploadRes) {
  376. this.proofImages.push(uploadRes)
  377. }
  378. } catch (e) {
  379. console.error('上传图片失败', e)
  380. uni.showToast({ title: '图片上传失败', icon: 'none' })
  381. }
  382. }
  383. uni.hideLoading()
  384. console.log('当前图片列表:', this.proofImages)
  385. }
  386. } catch (e) {
  387. console.error('选择图片异常', e)
  388. }
  389. },
  390. async uploadImage(tempPath) {
  391. return new Promise((resolve, reject) => {
  392. uni.uploadFile({
  393. url: 'http://localhost:8083/api/success-case-upload/upload-image',
  394. filePath: tempPath,
  395. name: 'file',
  396. success: (res) => {
  397. try {
  398. const data = JSON.parse(res.data)
  399. if (data.code === 200 && data.data) {
  400. resolve(data.data)
  401. } else {
  402. uni.showToast({ title: data.message || '上传失败', icon: 'none' })
  403. reject(new Error(data.message))
  404. }
  405. } catch (e) {
  406. reject(e)
  407. }
  408. },
  409. fail: (err) => {
  410. reject(err)
  411. }
  412. })
  413. })
  414. },
  415. removeImage(index) {
  416. this.proofImages.splice(index, 1)
  417. },
  418. onDateChange(e) {
  419. this.formData.caseDate = e.detail.value
  420. },
  421. async submitForm() {
  422. // 表单验证
  423. if (!this.selectedMale) {
  424. uni.showToast({ title: '请选择男方用户', icon: 'none' })
  425. return
  426. }
  427. if (!this.selectedFemale) {
  428. uni.showToast({ title: '请选择女方用户', icon: 'none' })
  429. return
  430. }
  431. if (this.selectedMale.userId === this.selectedFemale.userId) {
  432. uni.showToast({ title: '男方和女方不能是同一人', icon: 'none' })
  433. return
  434. }
  435. if (!this.formData.maleRealName.trim()) {
  436. uni.showToast({ title: '请填写男方真实姓名', icon: 'none' })
  437. return
  438. }
  439. if (!this.formData.femaleRealName.trim()) {
  440. uni.showToast({ title: '请填写女方真实姓名', icon: 'none' })
  441. return
  442. }
  443. if (this.proofImages.length === 0) {
  444. uni.showToast({ title: '请上传至少一张成功凭证图片', icon: 'none' })
  445. return
  446. }
  447. this.submitting = true
  448. try {
  449. const submitData = {
  450. matchmakerId: this.matchmakerId,
  451. maleUserId: this.selectedMale.userId, // 传递users表的user_id
  452. femaleUserId: this.selectedFemale.userId, // 传递users表的user_id
  453. maleRealName: this.formData.maleRealName.trim(),
  454. femaleRealName: this.formData.femaleRealName.trim(),
  455. proofImages: this.proofImages,
  456. caseType: this.formData.caseType,
  457. caseDate: this.formData.caseDate || null
  458. }
  459. const res = await api.successCaseUpload.submit(submitData)
  460. console.log('提交结果:', res)
  461. // request函数成功时返回的是data字段的内容(这里是id)
  462. // 如果能走到这里说明请求成功了
  463. if (res !== undefined && res !== null) {
  464. uni.showToast({ title: '提交成功', icon: 'success' })
  465. setTimeout(() => {
  466. uni.navigateBack()
  467. }, 1500)
  468. } else {
  469. uni.showToast({ title: '提交失败', icon: 'none' })
  470. }
  471. } catch (e) {
  472. console.error('提交失败', e)
  473. uni.showToast({ title: '提交失败,请稍后重试', icon: 'none' })
  474. } finally {
  475. this.submitting = false
  476. }
  477. }
  478. }
  479. }
  480. </script>
  481. <style lang="scss" scoped>
  482. /* 确保所有元素使用border-box */
  483. * {
  484. box-sizing: border-box;
  485. }
  486. .success-case-upload {
  487. min-height: 100vh;
  488. background: linear-gradient(180deg, #f8e1f4 0%, #fff5f5 100%);
  489. display: flex;
  490. flex-direction: column;
  491. width: 100%;
  492. overflow-x: hidden;
  493. }
  494. .header {
  495. display: flex;
  496. align-items: center;
  497. justify-content: space-between;
  498. padding: 60rpx 30rpx 30rpx;
  499. background: linear-gradient(135deg, #d63384 0%, #9c27b0 100%);
  500. .back-btn {
  501. width: 60rpx;
  502. height: 60rpx;
  503. 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;
  504. background-size: contain;
  505. }
  506. .header-title {
  507. font-size: 36rpx;
  508. font-weight: bold;
  509. color: #fff;
  510. }
  511. .placeholder {
  512. width: 60rpx;
  513. }
  514. }
  515. .content {
  516. flex: 1;
  517. padding: 30rpx 30rpx 30rpx 30rpx;
  518. box-sizing: border-box;
  519. }
  520. .form-container {
  521. display: flex;
  522. flex-direction: column;
  523. gap: 30rpx;
  524. width: 100%;
  525. }
  526. .form-section {
  527. background: #fff;
  528. border-radius: 20rpx;
  529. padding: 30rpx;
  530. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  531. box-sizing: border-box;
  532. width: 100%;
  533. }
  534. .section-title {
  535. display: flex;
  536. align-items: center;
  537. margin-bottom: 30rpx;
  538. .title-icon {
  539. font-size: 36rpx;
  540. margin-right: 16rpx;
  541. &.male { color: #2196F3; }
  542. &.female { color: #E91E63; }
  543. &.proof { color: #FF9800; }
  544. &.info { color: #9C27B0; }
  545. }
  546. .title-text {
  547. font-size: 32rpx;
  548. font-weight: bold;
  549. color: #333;
  550. }
  551. }
  552. .form-item {
  553. margin-bottom: 30rpx;
  554. &:last-child {
  555. margin-bottom: 0;
  556. }
  557. }
  558. .form-label {
  559. display: block;
  560. font-size: 28rpx;
  561. color: #666;
  562. margin-bottom: 16rpx;
  563. .required {
  564. color: #E91E63;
  565. }
  566. }
  567. .form-hint {
  568. display: block;
  569. font-size: 24rpx;
  570. color: #999;
  571. margin-bottom: 16rpx;
  572. }
  573. .form-input {
  574. width: 100%;
  575. height: 88rpx;
  576. background: #f5f5f5;
  577. border-radius: 12rpx;
  578. padding: 0 24rpx;
  579. font-size: 28rpx;
  580. box-sizing: border-box;
  581. border: none;
  582. }
  583. .form-textarea {
  584. width: 100%;
  585. height: 200rpx;
  586. background: #f5f5f5;
  587. border-radius: 12rpx;
  588. padding: 24rpx;
  589. font-size: 28rpx;
  590. box-sizing: border-box;
  591. }
  592. .char-count {
  593. display: block;
  594. text-align: right;
  595. font-size: 24rpx;
  596. color: #999;
  597. margin-top: 8rpx;
  598. }
  599. .picker-wrapper {
  600. display: flex;
  601. align-items: center;
  602. justify-content: space-between;
  603. height: 88rpx;
  604. background: #f5f5f5;
  605. border-radius: 12rpx;
  606. padding: 0 24rpx;
  607. .placeholder-text {
  608. color: #999;
  609. font-size: 28rpx;
  610. }
  611. .arrow-down {
  612. width: 24rpx;
  613. height: 24rpx;
  614. border-right: 4rpx solid #999;
  615. border-bottom: 4rpx solid #999;
  616. transform: rotate(45deg);
  617. }
  618. }
  619. .selected-user {
  620. display: flex;
  621. align-items: center;
  622. flex: 1;
  623. .user-avatar {
  624. width: 56rpx;
  625. height: 56rpx;
  626. border-radius: 50%;
  627. margin-right: 16rpx;
  628. }
  629. .user-name {
  630. font-size: 28rpx;
  631. color: #333;
  632. margin-right: 16rpx;
  633. }
  634. .user-age {
  635. font-size: 24rpx;
  636. color: #999;
  637. }
  638. }
  639. .image-upload-area {
  640. display: flex;
  641. flex-wrap: wrap;
  642. gap: 20rpx;
  643. }
  644. .image-item {
  645. position: relative;
  646. width: 200rpx;
  647. height: 200rpx;
  648. .uploaded-image {
  649. width: 100%;
  650. height: 100%;
  651. border-radius: 12rpx;
  652. }
  653. .delete-btn {
  654. position: absolute;
  655. top: -16rpx;
  656. right: -16rpx;
  657. width: 40rpx;
  658. height: 40rpx;
  659. background: #E91E63;
  660. border-radius: 50%;
  661. color: #fff;
  662. font-size: 28rpx;
  663. display: flex;
  664. align-items: center;
  665. justify-content: center;
  666. }
  667. }
  668. .add-image-btn {
  669. width: 200rpx;
  670. height: 200rpx;
  671. background: #f5f5f5;
  672. border: 2rpx dashed #ccc;
  673. border-radius: 12rpx;
  674. display: flex;
  675. flex-direction: column;
  676. align-items: center;
  677. justify-content: center;
  678. .add-icon {
  679. font-size: 60rpx;
  680. color: #999;
  681. }
  682. .add-text {
  683. font-size: 24rpx;
  684. color: #999;
  685. margin-top: 8rpx;
  686. }
  687. }
  688. .radio-group {
  689. display: flex;
  690. gap: 40rpx;
  691. }
  692. .radio-item {
  693. display: flex;
  694. align-items: center;
  695. padding: 20rpx 40rpx;
  696. background: #f5f5f5;
  697. border-radius: 12rpx;
  698. &.active {
  699. background: linear-gradient(135deg, #d63384 0%, #9c27b0 100%);
  700. .radio-circle {
  701. border-color: #fff;
  702. &::after {
  703. content: '';
  704. width: 16rpx;
  705. height: 16rpx;
  706. background: #fff;
  707. border-radius: 50%;
  708. }
  709. }
  710. .radio-text {
  711. color: #fff;
  712. }
  713. }
  714. .radio-circle {
  715. width: 32rpx;
  716. height: 32rpx;
  717. border: 4rpx solid #999;
  718. border-radius: 50%;
  719. margin-right: 16rpx;
  720. display: flex;
  721. align-items: center;
  722. justify-content: center;
  723. }
  724. .radio-text {
  725. font-size: 28rpx;
  726. color: #333;
  727. }
  728. }
  729. .date-picker {
  730. display: flex;
  731. align-items: center;
  732. justify-content: space-between;
  733. height: 88rpx;
  734. background: #f5f5f5;
  735. border-radius: 12rpx;
  736. padding: 0 24rpx;
  737. .date-text {
  738. font-size: 28rpx;
  739. color: #333;
  740. }
  741. .placeholder-text {
  742. font-size: 28rpx;
  743. color: #999;
  744. }
  745. .calendar-icon {
  746. font-size: 36rpx;
  747. }
  748. }
  749. .submit-section {
  750. margin-top: 20rpx;
  751. padding: 0 0 60rpx 0;
  752. width: 100%;
  753. box-sizing: border-box;
  754. }
  755. .submit-btn {
  756. width: 100%;
  757. height: 96rpx;
  758. background: linear-gradient(135deg, #d63384 0%, #9c27b0 100%);
  759. border-radius: 48rpx;
  760. color: #fff;
  761. font-size: 32rpx;
  762. font-weight: bold;
  763. display: flex;
  764. align-items: center;
  765. justify-content: center;
  766. border: none;
  767. &[disabled] {
  768. opacity: 0.6;
  769. }
  770. }
  771. .submit-hint {
  772. display: block;
  773. text-align: center;
  774. font-size: 24rpx;
  775. color: #999;
  776. margin-top: 20rpx;
  777. }
  778. /* 用户选择弹窗 */
  779. .user-picker-popup {
  780. background: #fff;
  781. border-radius: 30rpx 30rpx 0 0;
  782. max-height: 80vh;
  783. display: flex;
  784. flex-direction: column;
  785. }
  786. .popup-header {
  787. display: flex;
  788. align-items: center;
  789. justify-content: space-between;
  790. padding: 30rpx;
  791. border-bottom: 1rpx solid #eee;
  792. .popup-title {
  793. font-size: 32rpx;
  794. font-weight: bold;
  795. color: #333;
  796. }
  797. .close-btn {
  798. font-size: 48rpx;
  799. color: #999;
  800. line-height: 1;
  801. }
  802. }
  803. .search-box {
  804. display: flex;
  805. align-items: center;
  806. margin: 20rpx 30rpx;
  807. background: #f5f5f5;
  808. border-radius: 40rpx;
  809. padding: 0 30rpx;
  810. .search-input {
  811. flex: 1;
  812. height: 80rpx;
  813. font-size: 28rpx;
  814. }
  815. .search-icon {
  816. font-size: 36rpx;
  817. }
  818. }
  819. .user-list {
  820. flex: 1;
  821. max-height: 60vh;
  822. padding: 0 30rpx;
  823. }
  824. .user-item {
  825. display: flex;
  826. align-items: center;
  827. padding: 24rpx 0;
  828. border-bottom: 1rpx solid #f5f5f5;
  829. .user-avatar {
  830. width: 80rpx;
  831. height: 80rpx;
  832. border-radius: 50%;
  833. margin-right: 24rpx;
  834. }
  835. .user-info {
  836. flex: 1;
  837. .user-name {
  838. display: block;
  839. font-size: 30rpx;
  840. color: #333;
  841. margin-bottom: 8rpx;
  842. }
  843. .user-detail {
  844. font-size: 24rpx;
  845. color: #999;
  846. }
  847. }
  848. }
  849. .empty-tip {
  850. padding: 60rpx 0;
  851. text-align: center;
  852. color: #999;
  853. font-size: 28rpx;
  854. }
  855. </style>