edit.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  1. <template>
  2. <!-- 访客申请 -->
  3. <view class="container">
  4. <!-- 导航栏 -->
  5. <custom-navbar title="访客申请" :showBack="true"></custom-navbar>
  6. <!-- 表单内容 -->
  7. <view class="form-container">
  8. <!-- 第一块:对接人信息 -->
  9. <view class="section">
  10. <view class="section-title">
  11. <image class="title-icon" src="/static/images/person.png" mode="aspectFit"></image>
  12. 对接人信息
  13. </view>
  14. <view class="form-item" @tap="showDepartmentPicker" style="z-index: 999;">
  15. <text class="label">所属部门</text>
  16. <view class="input-wrapper" @tap="showDepartmentPicker">
  17. <text class="placeholder" v-if="!formData.department">请选择所属部门</text>
  18. <text v-else>{{ formData.department }}</text>
  19. <uni-icons type="right" size="16" color="#c0c4cc"></uni-icons>
  20. </view>
  21. </view>
  22. <view class="form-item" @tap="showEmployeeName">
  23. <text class="label">员工姓名</text>
  24. <view class="input-wrapper" @tap="showEmployeeName">
  25. <text class="placeholder" v-if="!formData.employeeName">请选择员工</text>
  26. <text v-else>{{ formData.employeeName }}</text>
  27. <uni-icons type="right" size="16" color="#c0c4cc"></uni-icons>
  28. </view>
  29. <!-- <input class="input" v-model="formData.employeeName" placeholder="请输入员工姓名"-->
  30. <!-- placeholder-style="color: #c0c4cc" />-->
  31. </view>
  32. </view>
  33. <!-- 第二块:访问信息 -->
  34. <view class="section">
  35. <view class="section-title">
  36. <image class="title-icon" src="/static/images/calendar.png" mode="aspectFit"></image>
  37. 访问信息
  38. </view>
  39. <view class="form-item">
  40. <text class="label">访问事由</text>
  41. <input class="input" v-model="formData.visitReason" placeholder="请输入访问事由"
  42. placeholder-style="color: #c0c4cc" />
  43. </view>
  44. <view class="form-item">
  45. <text class="label">到访时间</text>
  46. <uni-datetime-picker type="datetime" v-model="formData.visitTime" @change="onVisitTimeChange"
  47. :clear-icon="false" placeholder="请选择到访时间" format="YYYY-MM-DD HH:mm" :hide-second="true">
  48. <view class="input-wrapper">
  49. <text class="placeholder" v-if="!formData.visitTime">请选择到访时间</text>
  50. <text v-else>{{ formData.visitTime }}</text>
  51. <uni-icons type="calendar" size="16" color="#c0c4cc"></uni-icons>
  52. </view>
  53. </uni-datetime-picker>
  54. </view>
  55. <view class="form-item">
  56. <text class="label">访客姓名</text>
  57. <input class="input" v-model="formData.visitorName" placeholder="请输入访客姓名"
  58. placeholder-style="color: #c0c4cc" />
  59. </view>
  60. <view class="form-item">
  61. <text class="label">访客单位</text>
  62. <input class="input" v-model="formData.visitorCompany" placeholder="请输入访客单位"
  63. placeholder-style="color: #c0c4cc" />
  64. </view>
  65. <view class="form-item">
  66. <text class="label">手机号</text>
  67. <input class="input" v-model="formData.visitorPhone" placeholder="请输入手机号"
  68. placeholder-style="color: #c0c4cc" type="number" />
  69. </view>
  70. </view>
  71. <!-- 第三块:随行人员 -->
  72. <view class="section">
  73. <view class="section-title">随行人员</view>
  74. <view class="accompany-list">
  75. <view class="accompany-item" v-for="(item, index) in formData.accompanyPersons" :key="index">
  76. <view class="form-item">
  77. <text class="label">随行人员</text>
  78. <input class="input" v-model="item.name" placeholder="请输入随行人员姓名"
  79. placeholder-style="color: #c0c4cc" />
  80. </view>
  81. <view class="form-item">
  82. <text class="label">手机号</text>
  83. <input class="input" v-model="item.phone" placeholder="请输入手机号"
  84. placeholder-style="color: #c0c4cc" type="number" />
  85. </view>
  86. <view class="delete-btn" v-if="formData.accompanyPersons.length > 1"
  87. @click="removeAccompany(index)">
  88. <uni-icons type="trash" size="18" color="#ff4757"></uni-icons>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="add-accompany-btn" @click="addAccompany">
  93. <uni-icons type="plus" size="16" color="#007aff"></uni-icons>
  94. <text>添加随行人员</text>
  95. </view>
  96. </view>
  97. <!-- 第四块:使用车辆 -->
  98. <view class="section">
  99. <view class="vehicle-header">
  100. <view class="section-title">
  101. <image class="title-icon" src="/static/images/cart.png" mode="aspectFit"></image>
  102. 使用车辆
  103. </view>
  104. <switch :checked="formData.useVehicle" @change="onVehicleChange" color="#007aff" />
  105. </view>
  106. <view v-if="formData.useVehicle" class="vehicle-content">
  107. <view class="form-item">
  108. <text class="label">接客时间</text>
  109. <uni-datetime-picker type="datetime" v-model="formData.pickupTime" @change="onPickupTimeChange"
  110. :clear-icon="false" placeholder="请选择接客时间" format="YYYY-MM-DD HH:mm" :hide-second="true">
  111. <view class="input-wrapper">
  112. <text class="placeholder" v-if="!formData.pickupTime">请选择接客时间</text>
  113. <text v-else>{{ formData.pickupTime }}</text>
  114. <uni-icons type="calendar" size="16" color="#c0c4cc"></uni-icons>
  115. </view>
  116. </uni-datetime-picker>
  117. </view>
  118. <view class="form-item">
  119. <text class="label">接客地点</text>
  120. <input class="input" v-model="formData.pickupLocation" placeholder="请输入接客地点"
  121. placeholder-style="color: #c0c4cc" />
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 提交按钮 -->
  127. <view class="submit-container">
  128. <button class="submit-btn" @click="submitForm">提交</button>
  129. </view>
  130. <!-- 部门选择器 -->
  131. <uni-popup ref="departmentPopup" type="bottom" style="z-index: 999;">
  132. <view class="picker-container">
  133. <view class="picker-header">
  134. <text @click="$refs.departmentPopup.close()">取消</text>
  135. <text class="picker-title">选择所属部门</text>
  136. <text @click="confirmDepartment">确定</text>
  137. </view>
  138. <picker-view class="picker-view" :value="departmentIndex" @change="onDepartmentChange">
  139. <picker-view-column>
  140. <view class="picker-item" v-for="(item, index) in departments" :key="index">
  141. {{ item.deptName }}
  142. </view>
  143. </picker-view-column>
  144. </picker-view>
  145. </view>
  146. </uni-popup>
  147. <!-- <uni-popup ref="employeeNamePopup" type="bottom" style="z-index: 999;">-->
  148. <!-- <view class="picker-container">-->
  149. <!-- <view class="picker-header">-->
  150. <!-- <text @click="$refs.employeeNamePopup.close()">取消</text>-->
  151. <!-- <text class="picker-title">选择所属部门</text>-->
  152. <!-- <text @click="confirmDepartment">确定</text>-->
  153. <!-- </view>-->
  154. <!-- <picker-view class="picker-view" :value="departmentIndex" @change="onDepartmentChange">-->
  155. <!-- <picker-view-column>-->
  156. <!-- <view class="picker-item" v-for="(item, index) in departments" :key="index">-->
  157. <!-- {{ item.deptName }}-->
  158. <!-- </view>-->
  159. <!-- </picker-view-column>-->
  160. <!-- </picker-view>-->
  161. <!-- </view>-->
  162. <!-- </uni-popup>-->
  163. <!-- 提交成功弹框 -->
  164. <uni-popup ref="successPopup" type="center" :mask-click="false">
  165. <view class="success-popup">
  166. <view class="popup-content">
  167. <view class="success-icon">
  168. <uni-icons type="checkmarkempty" size="60" color="#52c41a"></uni-icons>
  169. </view>
  170. <view class="popup-title">申请提交成功</view>
  171. <view class="popup-message">您的申请已成功提交,请关注公众号即时查询审核结果</view>
  172. <view class="popup-buttons">
  173. <button class="cancel-btn" @click="closeSuccessPopup">取消</button>
  174. <button class="follow-btn" @click="showQRCode">关注</button>
  175. </view>
  176. </view>
  177. </view>
  178. </uni-popup>
  179. <!-- 二维码弹框 -->
  180. <uni-popup ref="qrcodePopup" type="center" :mask-click="false">
  181. <view class="qrcode-popup">
  182. <view class="qrcode-content">
  183. <view class="qrcode-title">扫描二维码关注公众号</view>
  184. <view class="qrcode-image" @click="previewQRCode">
  185. <image src="/static/images/qrcode.png" mode="aspectFit"></image>
  186. <view class="preview-tip">
  187. <uni-icons type="search" size="16" color="#fff"></uni-icons>
  188. <text>点击查看大图</text>
  189. </view>
  190. </view>
  191. <view class="qrcode-tip">扫描上方二维码,关注公众号获取审核结果</view>
  192. <button class="qrcode-close-btn" @click="closeQRCode">我知道了</button>
  193. </view>
  194. </view>
  195. </uni-popup>
  196. </view>
  197. </template>
  198. <script>
  199. import user from '../../store/modules/user';
  200. import {
  201. getDept,
  202. selectUser
  203. } from '@/config/api.js';
  204. export default {
  205. data() {
  206. return {
  207. type: '', // 从上一页传递过来的参数
  208. formData: {
  209. department: '',
  210. employeeName: '',
  211. visitReason: '',
  212. visitTime: '',
  213. visitorName: '',
  214. visitorCompany: '',
  215. visitorPhone: '',
  216. accompanyPersons: [{
  217. name: '',
  218. phone: ''
  219. }],
  220. useVehicle: false,
  221. pickupTime: '',
  222. pickupLocation: ''
  223. },
  224. // 部门假数据
  225. departments: [
  226. '技术部',
  227. '市场部',
  228. '人事部',
  229. '财务部',
  230. '运营部',
  231. '产品部',
  232. '设计部',
  233. '客服部'
  234. ],
  235. departmentIndex: [0],
  236. employeeName: '',
  237. tempDepartmentIndex: [0],
  238. }
  239. },
  240. onLoad(options) {
  241. // 获取传递过来的参数
  242. if (options.type) {
  243. this.type = options.type;
  244. }
  245. this.getDeptList()
  246. },
  247. methods: {
  248. async getDeptList() {
  249. console.log("获取DEPT")
  250. const res = await getDept()
  251. // console.log(res, "12")
  252. this.departments = res.data
  253. },
  254. // 显示部门选择器
  255. showEmployeeName() {
  256. this.$refs.departmentPopup.open();
  257. },
  258. // 部门选择改变
  259. onDepartmentChange(e) {
  260. console.log("e.detail.value", e)
  261. this.tempDepartmentIndex = e.detail.value;
  262. },
  263. // 确认选择部门
  264. async confirmDepartment() {
  265. this.departmentIndex = [...this.tempDepartmentIndex];
  266. const selectedDept = this.departments[this.departmentIndex[0]];
  267. this.formData.department = selectedDept.deptName; // 仅显示部门名称
  268. console.log(this.formData.department, "1221")
  269. const userRes = await selectUser({
  270. deptId: selectedDept.deptId // 使用部门对象的 deptId
  271. })
  272. console.log(userRes, "12222")
  273. this.$refs.departmentPopup.close();
  274. },
  275. showDepartmentPicker() {
  276. this.$refs.departmentPopup.open();
  277. },
  278. // 到访时间改变
  279. onVisitTimeChange(e) {
  280. this.formData.visitTime = e;
  281. },
  282. // 接客时间改变
  283. onPickupTimeChange(e) {
  284. this.formData.pickupTime = e;
  285. },
  286. // 获取当前日期时间
  287. getCurrentDatetime() {
  288. const now = new Date();
  289. const year = now.getFullYear();
  290. const month = String(now.getMonth() + 1).padStart(2, '0');
  291. const day = String(now.getDate()).padStart(2, '0');
  292. const hour = String(now.getHours()).padStart(2, '0');
  293. const minute = String(now.getMinutes()).padStart(2, '0');
  294. return `${year}-${month}-${day} ${hour}:${minute}`;
  295. },
  296. // 添加随行人员
  297. addAccompany() {
  298. this.formData.accompanyPersons.push({
  299. name: '',
  300. phone: ''
  301. });
  302. },
  303. // 删除随行人员
  304. removeAccompany(index) {
  305. if (this.formData.accompanyPersons.length > 1) {
  306. this.formData.accompanyPersons.splice(index, 1);
  307. }
  308. },
  309. // 车辆开关改变
  310. onVehicleChange(e) {
  311. this.formData.useVehicle = e.detail.value;
  312. if (!this.formData.useVehicle) {
  313. // 关闭车辆使用时清空相关信息
  314. this.formData.pickupTime = '';
  315. this.formData.pickupLocation = '';
  316. }
  317. },
  318. // 手机号格式校验
  319. validatePhone(phone) {
  320. const phoneRegex = /^1[3-9]\d{9}$/;
  321. return phoneRegex.test(phone);
  322. },
  323. // 表单验证
  324. validateForm() {
  325. if (!this.formData.department) {
  326. uni.showToast({
  327. title: '请选择所属部门',
  328. icon: 'none'
  329. });
  330. return false;
  331. }
  332. if (!this.formData.employeeName) {
  333. uni.showToast({
  334. title: '请输入员工姓名',
  335. icon: 'none'
  336. });
  337. return false;
  338. }
  339. if (!this.formData.visitReason) {
  340. uni.showToast({
  341. title: '请输入访问事由',
  342. icon: 'none'
  343. });
  344. return false;
  345. }
  346. if (!this.formData.visitTime) {
  347. uni.showToast({
  348. title: '请选择到访时间',
  349. icon: 'none'
  350. });
  351. return false;
  352. }
  353. if (!this.formData.visitorName) {
  354. uni.showToast({
  355. title: '请输入访客姓名',
  356. icon: 'none'
  357. });
  358. return false;
  359. }
  360. if (!this.formData.visitorCompany) {
  361. uni.showToast({
  362. title: '请输入访客单位',
  363. icon: 'none'
  364. });
  365. return false;
  366. }
  367. if (!this.formData.visitorPhone) {
  368. uni.showToast({
  369. title: '请输入手机号',
  370. icon: 'none'
  371. });
  372. return false;
  373. }
  374. // 校验访客手机号格式
  375. if (!this.validatePhone(this.formData.visitorPhone)) {
  376. uni.showToast({
  377. title: '请输入正确的手机号格式',
  378. icon: 'none'
  379. });
  380. return false;
  381. }
  382. // 验证随行人员信息
  383. for (let i = 0; i < this.formData.accompanyPersons.length; i++) {
  384. const person = this.formData.accompanyPersons[i];
  385. if (person.name && !person.phone) {
  386. uni.showToast({
  387. title: `请输入第${i + 1}个随行人员的手机号`,
  388. icon: 'none'
  389. });
  390. return false;
  391. }
  392. if (!person.name && person.phone) {
  393. uni.showToast({
  394. title: `请输入第${i + 1}个随行人员的姓名`,
  395. icon: 'none'
  396. });
  397. return false;
  398. }
  399. // 校验随行人员手机号格式
  400. if (person.phone && !this.validatePhone(person.phone)) {
  401. uni.showToast({
  402. title: `第${i + 1}个随行人员手机号格式不正确`,
  403. icon: 'none'
  404. });
  405. return false;
  406. }
  407. }
  408. // 验证车辆使用信息
  409. if (this.formData.useVehicle) {
  410. if (!this.formData.pickupTime) {
  411. uni.showToast({
  412. title: '请选择接客时间',
  413. icon: 'none'
  414. });
  415. return false;
  416. }
  417. if (!this.formData.pickupLocation) {
  418. uni.showToast({
  419. title: '请选择接客地点',
  420. icon: 'none'
  421. });
  422. return false;
  423. }
  424. }
  425. return true;
  426. },
  427. // 提交表单
  428. submitForm() {
  429. if (!this.validateForm()) {
  430. return;
  431. }
  432. // 过滤空的随行人员
  433. const validAccompanyPersons = this.formData.accompanyPersons.filter(person =>
  434. person.name && person.phone
  435. );
  436. const submitData = {
  437. ...this.formData,
  438. accompanyPersons: validAccompanyPersons,
  439. type: this.type
  440. };
  441. console.log('提交数据:', submitData);
  442. // TODO: 这里调用后端接口提交数据
  443. // this.submitToServer(submitData);
  444. // 显示提交成功弹框
  445. this.$refs.successPopup.open();
  446. },
  447. // 关闭成功弹框
  448. closeSuccessPopup() {
  449. this.$refs.successPopup.close();
  450. // 返回上一页
  451. uni.navigateBack();
  452. },
  453. // 显示二维码
  454. showQRCode() {
  455. this.$refs.successPopup.close();
  456. this.$refs.qrcodePopup.open();
  457. },
  458. // 关闭二维码弹框
  459. closeQRCode() {
  460. this.$refs.qrcodePopup.close();
  461. // 返回上一页
  462. uni.navigateBack();
  463. },
  464. // 预览二维码
  465. previewQRCode() {
  466. uni.previewImage({
  467. urls: ['/static/images/qrcode.png'],
  468. current: 0
  469. });
  470. },
  471. // 提交到服务器的方法(预留)
  472. async submitToServer(data) {
  473. // 这里是后端接口调用的预留方法
  474. // try {
  475. // const response = await this.$request.post('/api/visit/apply', data);
  476. // return response;
  477. // } catch (error) {
  478. // console.error('提交失败:', error);
  479. // throw error;
  480. // }
  481. }
  482. }
  483. }
  484. </script>
  485. <style lang="scss" scoped>
  486. .container {
  487. background-color: #f5f5f5;
  488. min-height: 100vh;
  489. padding-bottom: 120rpx;
  490. }
  491. .form-container {
  492. padding: 20rpx;
  493. }
  494. .section {
  495. background-color: #fff;
  496. border-radius: 12rpx;
  497. margin-bottom: 20rpx;
  498. padding: 30rpx;
  499. }
  500. .section-title {
  501. font-size: 32rpx;
  502. font-weight: 600;
  503. color: #333;
  504. margin-bottom: 30rpx;
  505. display: flex;
  506. align-items: center;
  507. }
  508. .title-icon {
  509. width: 40rpx;
  510. height: 40rpx;
  511. margin-right: 15rpx;
  512. }
  513. .form-item {
  514. display: flex;
  515. align-items: center;
  516. margin-bottom: 30rpx;
  517. position: relative;
  518. &:last-child {
  519. margin-bottom: 0;
  520. }
  521. }
  522. .label {
  523. width: 160rpx;
  524. font-size: 28rpx;
  525. color: #666;
  526. flex-shrink: 0;
  527. }
  528. .input {
  529. flex: 1;
  530. height: 70rpx;
  531. padding: 0 20rpx;
  532. background-color: #f8f8f8;
  533. border-radius: 8rpx;
  534. font-size: 28rpx;
  535. color: #333;
  536. }
  537. .input-wrapper {
  538. flex: 1;
  539. height: 70rpx;
  540. padding: 0 20rpx;
  541. background-color: #f8f8f8;
  542. border-radius: 8rpx;
  543. display: flex;
  544. align-items: center;
  545. justify-content: space-between;
  546. }
  547. .placeholder {
  548. color: #c0c4cc;
  549. font-size: 28rpx;
  550. }
  551. .accompany-list {
  552. .accompany-item {
  553. position: relative;
  554. padding: 20rpx;
  555. background-color: #f8f8f8;
  556. border-radius: 8rpx;
  557. margin-bottom: 20rpx;
  558. &:last-child {
  559. margin-bottom: 0;
  560. }
  561. .form-item {
  562. margin-bottom: 20rpx;
  563. &:last-child {
  564. margin-bottom: 0;
  565. }
  566. }
  567. }
  568. }
  569. .delete-btn {
  570. position: absolute;
  571. top: 10rpx;
  572. right: 10rpx;
  573. width: 60rpx;
  574. height: 60rpx;
  575. display: flex;
  576. align-items: center;
  577. justify-content: center;
  578. background-color: #fff;
  579. border-radius: 50%;
  580. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  581. }
  582. .add-accompany-btn {
  583. display: flex;
  584. align-items: center;
  585. justify-content: center;
  586. height: 80rpx;
  587. background-color: #f8f9fa;
  588. border: 2rpx dashed #c0c4cc;
  589. border-radius: 8rpx;
  590. color: #909399;
  591. font-size: 28rpx;
  592. text {
  593. margin-left: 10rpx;
  594. }
  595. }
  596. .vehicle-header {
  597. display: flex;
  598. align-items: center;
  599. margin-bottom: 30rpx;
  600. .section-title {
  601. flex: 1;
  602. margin-bottom: 0;
  603. margin-left: 15rpx;
  604. }
  605. }
  606. .vehicle-content {
  607. padding-top: 20rpx;
  608. border-top: 1rpx solid #eee;
  609. }
  610. .submit-container {
  611. position: fixed;
  612. bottom: 0;
  613. left: 0;
  614. right: 0;
  615. padding: 20rpx;
  616. background-color: #fff;
  617. box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.1);
  618. }
  619. .submit-btn {
  620. width: 100%;
  621. height: 88rpx;
  622. background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  623. border-radius: 44rpx;
  624. border: none;
  625. color: #fff;
  626. font-size: 32rpx;
  627. font-weight: 600;
  628. }
  629. .picker-container {
  630. background-color: #fff;
  631. border-radius: 20rpx 20rpx 0 0;
  632. }
  633. .picker-header {
  634. display: flex;
  635. align-items: center;
  636. justify-content: space-between;
  637. padding: 30rpx;
  638. border-bottom: 1rpx solid #eee;
  639. text {
  640. color: #007aff;
  641. font-size: 28rpx;
  642. }
  643. }
  644. .picker-title {
  645. font-size: 32rpx;
  646. font-weight: 600;
  647. color: #333 !important;
  648. }
  649. .picker-view {
  650. height: 400rpx;
  651. }
  652. .picker-item {
  653. display: flex;
  654. align-items: center;
  655. justify-content: center;
  656. height: 80rpx;
  657. font-size: 28rpx;
  658. color: #333;
  659. }
  660. // 提交成功弹框样式
  661. .success-popup {
  662. .popup-content {
  663. background-color: #fff;
  664. border-radius: 20rpx;
  665. padding: 60rpx 40rpx 40rpx;
  666. width: 560rpx;
  667. text-align: center;
  668. }
  669. .success-icon {
  670. margin-bottom: 30rpx;
  671. }
  672. .popup-title {
  673. font-size: 36rpx;
  674. font-weight: 600;
  675. color: #333;
  676. margin-bottom: 20rpx;
  677. }
  678. .popup-message {
  679. font-size: 28rpx;
  680. color: #666;
  681. line-height: 1.6;
  682. margin-bottom: 50rpx;
  683. }
  684. .popup-buttons {
  685. display: flex;
  686. gap: 20rpx;
  687. button {
  688. flex: 1;
  689. height: 80rpx;
  690. border-radius: 40rpx;
  691. font-size: 28rpx;
  692. border: none;
  693. }
  694. .cancel-btn {
  695. background-color: #f5f5f5;
  696. color: #666;
  697. }
  698. .follow-btn {
  699. background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  700. color: #fff;
  701. }
  702. }
  703. }
  704. // 二维码弹框样式
  705. .qrcode-popup {
  706. .qrcode-content {
  707. background-color: #fff;
  708. border-radius: 20rpx;
  709. padding: 50rpx 40rpx;
  710. width: 560rpx;
  711. text-align: center;
  712. }
  713. .qrcode-title {
  714. font-size: 32rpx;
  715. font-weight: 600;
  716. color: #333;
  717. margin-bottom: 40rpx;
  718. }
  719. .qrcode-image {
  720. width: 400rpx;
  721. height: 400rpx;
  722. margin: 0 auto 30rpx;
  723. border: 1rpx solid #eee;
  724. border-radius: 12rpx;
  725. overflow: hidden;
  726. position: relative;
  727. image {
  728. width: 100%;
  729. height: 100%;
  730. }
  731. .preview-tip {
  732. position: absolute;
  733. left: 0;
  734. right: 0;
  735. bottom: 0;
  736. height: 60rpx;
  737. background: rgba(0, 0, 0, 0.5);
  738. display: flex;
  739. align-items: center;
  740. justify-content: center;
  741. color: #fff;
  742. font-size: 24rpx;
  743. text {
  744. margin-left: 10rpx;
  745. }
  746. }
  747. &:active {
  748. opacity: 0.8;
  749. }
  750. }
  751. .qrcode-tip {
  752. font-size: 26rpx;
  753. color: #999;
  754. margin-bottom: 40rpx;
  755. line-height: 1.5;
  756. }
  757. .qrcode-close-btn {
  758. width: 100%;
  759. height: 80rpx;
  760. background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  761. border-radius: 40rpx;
  762. color: #fff;
  763. font-size: 28rpx;
  764. border: none;
  765. }
  766. }
  767. </style>