index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. <template>
  2. <view class="matchmaker-page">
  3. <!-- 顶部导航栏 -->
  4. <view class="header">
  5. <view class="back-btn" @click="goBack">
  6. <text class="back-icon">←</text>
  7. </view>
  8. <text class="header-title">兼职红娘</text>
  9. <view class="placeholder"></view>
  10. </view>
  11. <scroll-view scroll-y class="content">
  12. <!-- 顶部Banner -->
  13. <view class="top-banner">
  14. <text class="banner-title">加入我们的红娘团队</text>
  15. <text class="banner-subtitle">成为传递幸福的使者,利用闲暇时间帮助更多人</text>
  16. <text class="banner-subtitle">找到生命中的另一半,还能获得丰厚报酬</text>
  17. </view>
  18. <!-- 申请成为红娘按钮 -->
  19. <view class="action-button" @click="scrollToForm">
  20. <text class="button-text">立即申请</text>
  21. </view>
  22. <!-- 特点列表 -->
  23. <view class="features-section">
  24. <view class="feature-card">
  25. <text class="feature-icon">⏰</text>
  26. <view class="feature-content">
  27. <text class="feature-title">时间灵活</text>
  28. <text class="feature-desc">利用碎片时间工作,不影响主业,轻松实现副业增收</text>
  29. </view>
  30. </view>
  31. <view class="feature-card">
  32. <text class="feature-icon">💰</text>
  33. <view class="feature-content">
  34. <text class="feature-title">丰厚报酬</text>
  35. <text class="feature-desc">每成功匹配一对,可获得高额佣金,多劳多得</text>
  36. </view>
  37. </view>
  38. <view class="feature-card">
  39. <text class="feature-icon">📚</text>
  40. <view class="feature-content">
  41. <text class="feature-title">免费培训</text>
  42. <text class="feature-desc">提供专业婚恋知识和匹配技巧培训,快速上手</text>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 申请表单 -->
  47. <view class="form-section" id="application-form">
  48. <view class="form-title">申请加入</view>
  49. <view class="form-group">
  50. <text class="form-label">姓名:</text>
  51. <input class="form-input" v-model="formData.name" placeholder="请输入您的姓名" />
  52. </view>
  53. <view class="form-group">
  54. <text class="form-label">手机号:</text>
  55. <input class="form-input" v-model="formData.phone" type="number" placeholder="请输入您的手机号" />
  56. </view>
  57. <view class="form-group">
  58. <text class="form-label">电子邮箱:</text>
  59. <input class="form-input" v-model="formData.email" placeholder="请输入您的电子邮箱" />
  60. </view>
  61. <view class="form-group">
  62. <text class="form-label">年龄:</text>
  63. <input class="form-input" v-model="formData.age" type="number" placeholder="请输入您的年龄" />
  64. </view>
  65. <view class="form-group">
  66. <text class="form-label">性别:</text>
  67. <view class="radio-group">
  68. <label class="radio-item" @click="formData.gender = 2">
  69. <view class="radio" :class="{ 'radio-checked': formData.gender === 2 }"></view>
  70. <text class="radio-label">女</text>
  71. </label>
  72. <label class="radio-item" @click="formData.gender = 1">
  73. <view class="radio" :class="{ 'radio-checked': formData.gender === 1 }"></view>
  74. <text class="radio-label">男</text>
  75. </label>
  76. </view>
  77. </view>
  78. <view class="form-group">
  79. <text class="form-label">所在城市:</text>
  80. <input class="form-input" v-model="formData.city" placeholder="请输入您的所在城市" />
  81. </view>
  82. <view class="form-group">
  83. <text class="form-label">婚姻介绍经验:</text>
  84. <input class="form-input" v-model="formData.experience" placeholder="请输入您的婚姻介绍经验" />
  85. </view>
  86. <view class="form-group">
  87. <text class="form-label">可服务时间:</text>
  88. <input class="form-input" v-model="formData.availableTime" placeholder="请输入您的工作时间" />
  89. </view>
  90. <view class="form-group">
  91. <text class="form-label">个人简介:</text>
  92. <textarea
  93. class="form-textarea"
  94. v-model="formData.introduction"
  95. placeholder="请简要介绍自己,包括您的性格特点、沟通能力、对红娘工作的理解等"
  96. maxlength="500"
  97. ></textarea>
  98. </view>
  99. <button class="submit-btn" @click="handleSubmit">提交申请</button>
  100. </view>
  101. <!-- 更多特点 -->
  102. <view class="more-features">
  103. <view class="feature-card">
  104. <text class="feature-icon">⏰</text>
  105. <view class="feature-content">
  106. <text class="feature-title">上传身边人信息</text>
  107. <text class="feature-desc">若您身边有单身朋友,可上传其信息至平台,成功匹配后也可获得奖励</text>
  108. </view>
  109. </view>
  110. <view class="feature-card">
  111. <text class="feature-icon">⏰</text>
  112. <view class="feature-content">
  113. <text class="feature-title">佣金提现</text>
  114. <text class="feature-desc">您的匹配佣金可随时申请提现,到账迅速,让您的努力及时获得回报</text>
  115. </view>
  116. </view>
  117. </view>
  118. </scroll-view>
  119. </view>
  120. </template>
  121. <script>
  122. export default {
  123. data() {
  124. return {
  125. formData: {
  126. name: '',
  127. phone: '',
  128. email: '',
  129. age: '',
  130. gender: 2, // 默认女
  131. city: '',
  132. experience: '',
  133. availableTime: '',
  134. introduction: ''
  135. }
  136. }
  137. },
  138. methods: {
  139. // 返回上一页
  140. goBack() {
  141. uni.navigateBack()
  142. },
  143. // 滚动到表单
  144. scrollToForm() {
  145. uni.pageScrollTo({
  146. selector: '#application-form',
  147. duration: 300
  148. })
  149. },
  150. // 提交申请
  151. handleSubmit() {
  152. // 表单验证
  153. if (!this.formData.name) {
  154. uni.showToast({
  155. title: '请输入姓名',
  156. icon: 'none'
  157. })
  158. return
  159. }
  160. if (!this.formData.phone) {
  161. uni.showToast({
  162. title: '请输入手机号',
  163. icon: 'none'
  164. })
  165. return
  166. }
  167. // 验证手机号格式
  168. const phoneReg = /^1[3-9]\d{9}$/
  169. if (!phoneReg.test(this.formData.phone)) {
  170. uni.showToast({
  171. title: '请输入正确的手机号',
  172. icon: 'none'
  173. })
  174. return
  175. }
  176. if (!this.formData.email) {
  177. uni.showToast({
  178. title: '请输入电子邮箱',
  179. icon: 'none'
  180. })
  181. return
  182. }
  183. // 验证邮箱格式
  184. const emailReg = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
  185. if (!emailReg.test(this.formData.email)) {
  186. uni.showToast({
  187. title: '请输入正确的邮箱',
  188. icon: 'none'
  189. })
  190. return
  191. }
  192. if (!this.formData.age) {
  193. uni.showToast({
  194. title: '请输入年龄',
  195. icon: 'none'
  196. })
  197. return
  198. }
  199. if (!this.formData.city) {
  200. uni.showToast({
  201. title: '请输入所在城市',
  202. icon: 'none'
  203. })
  204. return
  205. }
  206. uni.showModal({
  207. title: '提交申请',
  208. content: '确认提交兼职红娘申请吗?',
  209. success: (res) => {
  210. if (res.confirm) {
  211. uni.showLoading({
  212. title: '提交中...'
  213. })
  214. // TODO: 调用后端接口提交申请
  215. setTimeout(() => {
  216. uni.hideLoading()
  217. uni.showModal({
  218. title: '申请成功',
  219. content: '您的申请已提交,我们会在1-3个工作日内完成审核,请耐心等待。审核结果将通过短信或邮件通知您。',
  220. showCancel: false,
  221. success: () => {
  222. // 清空表单
  223. this.formData = {
  224. name: '',
  225. phone: '',
  226. email: '',
  227. age: '',
  228. gender: 2,
  229. city: '',
  230. experience: '',
  231. availableTime: '',
  232. introduction: ''
  233. }
  234. }
  235. })
  236. }, 1500)
  237. }
  238. }
  239. })
  240. }
  241. }
  242. }
  243. </script>
  244. <style lang="scss" scoped>
  245. * {
  246. box-sizing: border-box;
  247. }
  248. .matchmaker-page {
  249. min-height: 100vh;
  250. background: #F5F5F5;
  251. display: flex;
  252. flex-direction: column;
  253. }
  254. /* 顶部导航栏 */
  255. .header {
  256. display: flex;
  257. align-items: center;
  258. justify-content: space-between;
  259. padding: 25rpx 30rpx;
  260. padding-top: calc(25rpx + env(safe-area-inset-top));
  261. background: linear-gradient(135deg, #FF8A9B 0%, #FFB4C0 100%);
  262. .back-btn {
  263. width: 70rpx;
  264. height: 70rpx;
  265. display: flex;
  266. align-items: center;
  267. justify-content: center;
  268. background: rgba(255, 255, 255, 0.2);
  269. border-radius: 50%;
  270. .back-icon {
  271. font-size: 44rpx;
  272. color: #FFFFFF;
  273. font-weight: bold;
  274. }
  275. }
  276. .header-title {
  277. font-size: 38rpx;
  278. font-weight: bold;
  279. color: #FFFFFF;
  280. }
  281. .placeholder {
  282. width: 70rpx;
  283. }
  284. }
  285. .content {
  286. flex: 1;
  287. background: #F5F5F5;
  288. padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
  289. }
  290. /* 顶部Banner */
  291. .top-banner {
  292. background: linear-gradient(135deg, #E688A1 0%, #D97890 100%);
  293. padding: 50rpx 40rpx;
  294. text-align: center;
  295. .banner-title {
  296. display: block;
  297. font-size: 40rpx;
  298. font-weight: bold;
  299. color: #FFFFFF;
  300. margin-bottom: 25rpx;
  301. }
  302. .banner-subtitle {
  303. display: block;
  304. font-size: 26rpx;
  305. color: #FFFFFF;
  306. line-height: 1.6;
  307. opacity: 0.95;
  308. }
  309. }
  310. /* 兼职红娘按钮 */
  311. .action-button {
  312. margin: 35rpx 40rpx;
  313. padding: 25rpx;
  314. background: #FFFFFF;
  315. border: 3rpx solid #FF6B8A;
  316. border-radius: 15rpx;
  317. text-align: center;
  318. .button-text {
  319. font-size: 30rpx;
  320. color: #FF6B8A;
  321. font-weight: bold;
  322. }
  323. }
  324. /* 特点列表 */
  325. .features-section {
  326. padding: 0 40rpx 25rpx;
  327. }
  328. .more-features {
  329. padding: 0 40rpx 40rpx;
  330. }
  331. .features-section,
  332. .more-features {
  333. .feature-card {
  334. background: #F0F0F0;
  335. border-radius: 15rpx;
  336. padding: 30rpx;
  337. margin-bottom: 20rpx;
  338. display: flex;
  339. align-items: flex-start;
  340. .feature-icon {
  341. font-size: 42rpx;
  342. margin-right: 20rpx;
  343. flex-shrink: 0;
  344. }
  345. .feature-content {
  346. flex: 1;
  347. }
  348. .feature-title {
  349. display: block;
  350. font-size: 30rpx;
  351. font-weight: bold;
  352. color: #333333;
  353. margin-bottom: 12rpx;
  354. }
  355. .feature-desc {
  356. display: block;
  357. font-size: 24rpx;
  358. color: #666666;
  359. line-height: 1.5;
  360. }
  361. }
  362. }
  363. /* 申请表单 */
  364. .form-section {
  365. background: #FFFFFF;
  366. margin: 25rpx 40rpx;
  367. padding: 35rpx;
  368. border-radius: 15rpx;
  369. box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.05);
  370. box-sizing: border-box;
  371. .form-title {
  372. font-size: 34rpx;
  373. font-weight: bold;
  374. color: #333333;
  375. margin-bottom: 35rpx;
  376. text-align: center;
  377. }
  378. .form-group {
  379. margin-bottom: 30rpx;
  380. box-sizing: border-box;
  381. .form-label {
  382. display: block;
  383. font-size: 26rpx;
  384. color: #333333;
  385. margin-bottom: 12rpx;
  386. font-weight: 500;
  387. }
  388. .form-input {
  389. width: 100%;
  390. height: 70rpx;
  391. padding: 0 20rpx;
  392. border: 1rpx solid #E0E0E0;
  393. border-radius: 10rpx;
  394. font-size: 26rpx;
  395. background: #FAFAFA;
  396. box-sizing: border-box;
  397. &:focus {
  398. border-color: #FF8A9B;
  399. background: #FFFFFF;
  400. }
  401. }
  402. .form-textarea {
  403. width: 100%;
  404. min-height: 160rpx;
  405. padding: 15rpx 20rpx;
  406. border: 1rpx solid #E0E0E0;
  407. border-radius: 10rpx;
  408. font-size: 26rpx;
  409. line-height: 1.5;
  410. background: #FAFAFA;
  411. box-sizing: border-box;
  412. &:focus {
  413. border-color: #FF8A9B;
  414. background: #FFFFFF;
  415. }
  416. }
  417. .radio-group {
  418. display: flex;
  419. align-items: center;
  420. gap: 50rpx;
  421. .radio-item {
  422. display: flex;
  423. align-items: center;
  424. .radio {
  425. width: 36rpx;
  426. height: 36rpx;
  427. border: 3rpx solid #CCCCCC;
  428. border-radius: 50%;
  429. margin-right: 15rpx;
  430. position: relative;
  431. transition: all 0.3s;
  432. &.radio-checked {
  433. border-color: #FF6B8A;
  434. background: #FF6B8A;
  435. &::after {
  436. content: '';
  437. position: absolute;
  438. width: 16rpx;
  439. height: 16rpx;
  440. background: #FFFFFF;
  441. border-radius: 50%;
  442. top: 50%;
  443. left: 50%;
  444. transform: translate(-50%, -50%);
  445. }
  446. }
  447. }
  448. .radio-label {
  449. font-size: 28rpx;
  450. color: #333333;
  451. }
  452. }
  453. }
  454. }
  455. .submit-btn {
  456. width: 100%;
  457. height: 80rpx;
  458. background: linear-gradient(135deg, #FF8A9B 0%, #FF6B8A 100%);
  459. color: #FFFFFF;
  460. font-size: 30rpx;
  461. font-weight: bold;
  462. border: none;
  463. border-radius: 40rpx;
  464. margin-top: 30rpx;
  465. }
  466. }
  467. </style>