index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. <template>
  2. <view class="scan-page">
  3. <!-- 顶部导航栏 -->
  4. <view class="header-bg" :style="{ paddingTop: statusBarHeight + 'px' }">
  5. <view class="header-content">
  6. <view class="back-btn" @click="handleBack">
  7. <text class="back-icon">‹</text>
  8. </view>
  9. <text class="header-title">小程序扫描</text>
  10. <view class="placeholder"></view>
  11. </view>
  12. </view>
  13. <!-- 扫描区域 -->
  14. <view class="scan-area">
  15. <camera
  16. device-position="back"
  17. flash="off"
  18. class="camera"
  19. @error="handleCameraError"
  20. >
  21. </camera>
  22. <!-- 模式切换按钮 - 在底部操作栏上方 -->
  23. <view class="mode-switch-wrapper">
  24. <view class="mode-switch">
  25. <view
  26. class="mode-btn"
  27. :class="{ active: scanMode === 'single' }"
  28. @click="switchToSingle"
  29. >
  30. <text class="mode-text">单页</text>
  31. </view>
  32. <view
  33. class="mode-btn"
  34. :class="{ active: scanMode === 'multiple' }"
  35. @click="switchToMultiple"
  36. >
  37. <text class="mode-text">多页</text>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 多页模式缩略图列表 -->
  42. <view v-if="scanMode === 'multiple' && pdfDataList.length > 0" class="thumbnail-list">
  43. <scroll-view scroll-x class="thumbnail-scroll">
  44. <view class="thumbnail-wrapper">
  45. <view
  46. v-for="(item, index) in pdfDataList"
  47. :key="index"
  48. class="thumbnail-item"
  49. @click="handleViewAllPdf"
  50. >
  51. <view class="pdf-thumbnail-icon">
  52. <image src="/static/icon/pdf.svg" mode="aspectFit" class="pdf-icon-img" />
  53. </view>
  54. <view class="thumbnail-delete" @click.stop="handleDeletePdf(index)">
  55. <text class="delete-icon">×</text>
  56. </view>
  57. <view class="thumbnail-index">{{ index + 1 }}</view>
  58. </view>
  59. </view>
  60. </scroll-view>
  61. </view>
  62. <!-- 上传按钮(多页模式且有图片时显示) -->
  63. <view
  64. v-if="scanMode === 'multiple' && imageBase64List.length > 0"
  65. class="upload-btn"
  66. @click="handleMultipleUpload"
  67. >
  68. <text class="upload-text">上传</text>
  69. </view>
  70. <!-- PDF缩略图预览(右下角) -->
  71. <view v-if="showPdfThumbnail" class="pdf-thumbnail" @click="handleOpenPdf">
  72. <view class="pdf-close" @click.stop="handleClosePdf">
  73. <text class="close-icon">×</text>
  74. </view>
  75. <image class="pdf-icon" src="/static/icon/pdf.svg" mode="aspectFit" />
  76. <text class="pdf-text">PDF</text>
  77. </view>
  78. <!-- 底部操作按钮 -->
  79. <view class="action-buttons">
  80. <view class="action-btn" @click="handleSelectImage">
  81. <image class="btn-icon" src="/static/pages/scan/image.png" mode="aspectFit" />
  82. <text class="btn-text">导入图片</text>
  83. </view>
  84. <view class="capture-btn" @click="handleCapture">
  85. <view class="capture-inner"></view>
  86. </view>
  87. <view class="action-btn" @click="handleSelectFile">
  88. <image class="btn-icon" src="/static/pages/scan/file.png" mode="aspectFit" />
  89. <text class="btn-text">导入文档</text>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </template>
  95. <script setup>
  96. import { ref, onMounted, onUnmounted } from 'vue'
  97. import { useI18n } from 'vue-i18n'
  98. import { scanUpload } from '@/apis/scan'
  99. const { t } = useI18n()
  100. // 状态栏高度
  101. const statusBarHeight = ref(0)
  102. // 扫描模式:single-单页,multiple-多页
  103. const scanMode = ref('single')
  104. // 图片base64数组(用于多页模式)
  105. const imageBase64List = ref([])
  106. // 图片临时路径数组(用于显示缩略图)
  107. const imageTempPaths = ref([])
  108. // PDF数据数组(多页模式,包含路径和base64)
  109. const pdfDataList = ref([])
  110. // 缓存的ossId
  111. const cachedOssId = ref(null)
  112. // PDF文件路径(用于预览)
  113. const pdfFilePath = ref('')
  114. // 是否显示PDF缩略图
  115. const showPdfThumbnail = ref(false)
  116. // 相机上下文
  117. let cameraContext = null
  118. onMounted(() => {
  119. // 获取系统信息
  120. const windowInfo = uni.getWindowInfo()
  121. statusBarHeight.value = windowInfo.statusBarHeight || 0
  122. // 初始化相机上下文
  123. cameraContext = uni.createCameraContext()
  124. })
  125. onUnmounted(() => {
  126. // 清理资源
  127. })
  128. // 返回上一页
  129. const handleBack = () => {
  130. uni.reLaunch({
  131. url: '/pages/home/index'
  132. })
  133. }
  134. // 切换扫描模式
  135. const toggleScanMode = () => {
  136. scanMode.value = scanMode.value === 'single' ? 'multiple' : 'single'
  137. uni.showToast({
  138. title: scanMode.value === 'single' ? '已切换到单页模式' : '已切换到多页模式',
  139. icon: 'none',
  140. duration: 1500
  141. })
  142. }
  143. // 切换到单页模式
  144. const switchToSingle = () => {
  145. if (scanMode.value === 'single') return
  146. scanMode.value = 'single'
  147. uni.showToast({
  148. title: '已切换到单页模式',
  149. icon: 'none',
  150. duration: 1500
  151. })
  152. }
  153. // 切换到多页模式
  154. const switchToMultiple = () => {
  155. if (scanMode.value === 'multiple') return
  156. scanMode.value = 'multiple'
  157. uni.showToast({
  158. title: '已切换到多页模式',
  159. icon: 'none',
  160. duration: 1500
  161. })
  162. }
  163. // 相机错误处理
  164. const handleCameraError = (e) => {
  165. console.error('相机错误:', e)
  166. uni.showToast({
  167. title: '相机启动失败',
  168. icon: 'none'
  169. })
  170. }
  171. // 拍照
  172. const handleCapture = () => {
  173. if (!cameraContext) return
  174. cameraContext.takePhoto({
  175. quality: 'high',
  176. success: async (res) => {
  177. try {
  178. uni.showLoading({
  179. title: '处理中...',
  180. mask: true
  181. })
  182. // 将图片转换为base64
  183. const base64Data = await imageToBase64(res.tempImagePath)
  184. if (scanMode.value === 'single') {
  185. // 单页模式:直接上传
  186. await uploadSingleImage(base64Data)
  187. } else {
  188. // 多页模式:立即上传并扫描
  189. await uploadAndScanImage(base64Data)
  190. }
  191. } catch (error) {
  192. uni.hideLoading()
  193. console.error('处理图片失败:', error)
  194. uni.showToast({
  195. title: '处理失败',
  196. icon: 'none'
  197. })
  198. }
  199. },
  200. fail: (err) => {
  201. console.error('拍照失败:', err)
  202. uni.showToast({
  203. title: '拍照失败',
  204. icon: 'none'
  205. })
  206. }
  207. })
  208. }
  209. // 导入图片
  210. const handleSelectImage = async () => {
  211. uni.chooseImage({
  212. count: 1,
  213. sizeType: ['original', 'compressed'],
  214. sourceType: ['album'],
  215. success: async (res) => {
  216. try {
  217. uni.showLoading({
  218. title: '处理中...',
  219. mask: true
  220. })
  221. // 将图片转换为base64
  222. const base64Data = await imageToBase64(res.tempFilePaths[0])
  223. if (scanMode.value === 'single') {
  224. // 单页模式:直接上传
  225. await uploadSingleImage(base64Data)
  226. } else {
  227. // 多页模式:立即上传并扫描
  228. await uploadAndScanImage(base64Data)
  229. }
  230. } catch (error) {
  231. uni.hideLoading()
  232. console.error('处理图片失败:', error)
  233. uni.showToast({
  234. title: '处理失败',
  235. icon: 'none'
  236. })
  237. }
  238. }
  239. })
  240. }
  241. // 导入文档
  242. const handleSelectFile = () => {
  243. uni.chooseMessageFile({
  244. count: 1,
  245. type: 'file',
  246. success: (res) => {
  247. uni.showLoading({
  248. title: '处理中...',
  249. mask: true
  250. })
  251. // TODO: 上传文件到服务器
  252. setTimeout(() => {
  253. uni.hideLoading()
  254. uni.showToast({
  255. title: '文档导入成功',
  256. icon: 'success'
  257. })
  258. }, 1000)
  259. }
  260. })
  261. }
  262. // 将图片转换为base64
  263. const imageToBase64 = (filePath) => {
  264. return new Promise((resolve, reject) => {
  265. uni.getFileSystemManager().readFile({
  266. filePath: filePath,
  267. encoding: 'base64',
  268. success: (res) => {
  269. resolve(res.data)
  270. },
  271. fail: (err) => {
  272. reject(err)
  273. }
  274. })
  275. })
  276. }
  277. // 单页模式上传
  278. const uploadSingleImage = async (base64Data) => {
  279. try {
  280. // 调用上传接口(单个文件)
  281. const response = await scanUpload({
  282. file: base64Data
  283. })
  284. uni.hideLoading()
  285. if (response.code === 200 && response.data) {
  286. // 缓存ossId
  287. cachedOssId.value = response.data.ossId
  288. // 处理PDF预览
  289. if (response.data.fileBase64) {
  290. await handlePdfPreview(response.data.fileBase64)
  291. } else {
  292. uni.showToast({
  293. title: '上传成功',
  294. icon: 'success',
  295. duration: 2000
  296. })
  297. }
  298. } else {
  299. throw new Error(response.msg || '上传失败')
  300. }
  301. } catch (error) {
  302. uni.hideLoading()
  303. console.error('上传失败:', error)
  304. uni.showToast({
  305. title: error.message || '上传失败',
  306. icon: 'none'
  307. })
  308. }
  309. }
  310. // 多页模式批量上传
  311. const handleMultipleUpload = async () => {
  312. if (imageBase64List.value.length === 0) {
  313. uni.showToast({
  314. title: '请先添加图片',
  315. icon: 'none'
  316. })
  317. return
  318. }
  319. try {
  320. uni.showLoading({
  321. title: '上传中...',
  322. mask: true
  323. })
  324. // 调用上传接口
  325. const response = await scanUpload({
  326. files: imageBase64List.value
  327. })
  328. uni.hideLoading()
  329. if (response.code === 200 && response.data) {
  330. // 缓存ossId
  331. cachedOssId.value = response.data.ossId
  332. // 清空数组
  333. imageBase64List.value = []
  334. imageTempPaths.value = []
  335. // 处理PDF预览
  336. if (response.data.fileBase64) {
  337. await handlePdfPreview(response.data.fileBase64)
  338. } else {
  339. uni.showToast({
  340. title: '上传成功',
  341. icon: 'success',
  342. duration: 2000
  343. })
  344. }
  345. } else {
  346. throw new Error(response.msg || '上传失败')
  347. }
  348. } catch (error) {
  349. uni.hideLoading()
  350. console.error('上传失败:', error)
  351. uni.showToast({
  352. title: error.message || '上传失败',
  353. icon: 'none'
  354. })
  355. }
  356. }
  357. // 多页模式:上传并扫描单张图片
  358. const uploadAndScanImage = async (base64Data) => {
  359. try {
  360. // 调用上传接口(单个文件)
  361. const response = await scanUpload({
  362. file: base64Data
  363. })
  364. uni.hideLoading()
  365. if (response.code === 200 && response.data && response.data.fileBase64) {
  366. // 将PDF转换为临时文件
  367. const pdfPath = await base64ToTempFile(response.data.fileBase64)
  368. // 添加到PDF数据列表(包含路径和base64)
  369. pdfDataList.value.push({
  370. path: pdfPath,
  371. base64: response.data.fileBase64
  372. })
  373. uni.showToast({
  374. title: `已扫描第${pdfDataList.value.length}页`,
  375. icon: 'success',
  376. duration: 1500
  377. })
  378. } else {
  379. throw new Error(response.msg || '扫描失败')
  380. }
  381. } catch (error) {
  382. uni.hideLoading()
  383. console.error('扫描失败:', error)
  384. uni.showToast({
  385. title: error.message || '扫描失败',
  386. icon: 'none'
  387. })
  388. }
  389. }
  390. // 删除指定图片
  391. const handleDeleteImage = (index) => {
  392. imageBase64List.value.splice(index, 1)
  393. imageTempPaths.value.splice(index, 1)
  394. uni.showToast({
  395. title: '已删除',
  396. icon: 'success',
  397. duration: 1000
  398. })
  399. }
  400. // 删除指定PDF
  401. const handleDeletePdf = (index) => {
  402. pdfDataList.value.splice(index, 1)
  403. uni.showToast({
  404. title: '已删除',
  405. icon: 'success',
  406. duration: 1000
  407. })
  408. }
  409. // 查看所有PDF
  410. const handleViewAllPdf = () => {
  411. if (pdfDataList.value.length === 0) {
  412. uni.showToast({
  413. title: '暂无PDF',
  414. icon: 'none'
  415. })
  416. return
  417. }
  418. // 使用全局数据存储PDF数据(包含路径和base64)
  419. getApp().globalData.pdfData = pdfDataList.value
  420. uni.navigateTo({
  421. url: '/pages/scan/pdfViewer/index'
  422. })
  423. }
  424. // 处理PDF预览
  425. const handlePdfPreview = async (base64Data) => {
  426. try {
  427. // 将base64转换为临时文件
  428. const filePath = await base64ToTempFile(base64Data)
  429. pdfFilePath.value = filePath
  430. showPdfThumbnail.value = true
  431. uni.showToast({
  432. title: '上传成功',
  433. icon: 'success',
  434. duration: 2000
  435. })
  436. } catch (error) {
  437. console.error('处理PDF失败:', error)
  438. uni.showToast({
  439. title: '处理PDF失败',
  440. icon: 'none'
  441. })
  442. }
  443. }
  444. // 将base64转换为临时文件
  445. const base64ToTempFile = (base64Data) => {
  446. return new Promise((resolve, reject) => {
  447. const fs = uni.getFileSystemManager()
  448. const fileName = `scan_${Date.now()}.pdf`
  449. const filePath = `${wx.env.USER_DATA_PATH}/${fileName}`
  450. fs.writeFile({
  451. filePath: filePath,
  452. data: base64Data,
  453. encoding: 'base64',
  454. success: () => {
  455. resolve(filePath)
  456. },
  457. fail: (err) => {
  458. reject(err)
  459. }
  460. })
  461. })
  462. }
  463. // 打开PDF预览
  464. const handleOpenPdf = () => {
  465. if (!pdfFilePath.value) return
  466. uni.openDocument({
  467. filePath: pdfFilePath.value,
  468. fileType: 'pdf',
  469. showMenu: true,
  470. success: () => {
  471. // 预览成功
  472. },
  473. fail: (err) => {
  474. console.error('打开文档失败:', err)
  475. uni.showToast({
  476. title: '打开文档失败',
  477. icon: 'none'
  478. })
  479. }
  480. })
  481. }
  482. // 关闭PDF缩略图
  483. const handleClosePdf = () => {
  484. showPdfThumbnail.value = false
  485. pdfFilePath.value = ''
  486. }
  487. </script>
  488. <style lang="scss" scoped>
  489. .scan-page {
  490. width: 100%;
  491. height: 100vh;
  492. display: flex;
  493. flex-direction: column;
  494. background-color: #000000;
  495. // 顶部导航栏
  496. .header-bg {
  497. background: linear-gradient(180deg, #1ec9c9 0%, #1eb8b8 100%);
  498. position: relative;
  499. z-index: 100;
  500. .header-content {
  501. height: 88rpx;
  502. display: flex;
  503. align-items: center;
  504. justify-content: space-between;
  505. padding: 0 24rpx;
  506. .back-btn {
  507. width: 60rpx;
  508. height: 60rpx;
  509. display: flex;
  510. align-items: center;
  511. justify-content: flex-start;
  512. .back-icon {
  513. font-size: 56rpx;
  514. color: #ffffff;
  515. font-weight: 300;
  516. }
  517. }
  518. .header-title {
  519. flex: 1;
  520. text-align: center;
  521. font-size: 32rpx;
  522. font-weight: 600;
  523. color: #ffffff;
  524. }
  525. .placeholder {
  526. width: 60rpx;
  527. }
  528. }
  529. }
  530. // 扫描区域
  531. .scan-area {
  532. flex: 1;
  533. position: relative;
  534. display: flex;
  535. flex-direction: column;
  536. .camera {
  537. flex: 1;
  538. width: 100%;
  539. position: relative;
  540. }
  541. // 模式切换按钮 - 在底部操作栏上方
  542. .mode-switch-wrapper {
  543. position: absolute;
  544. bottom: 280rpx;
  545. left: 50%;
  546. transform: translateX(-50%);
  547. z-index: 10;
  548. .mode-switch {
  549. display: flex;
  550. background: rgba(0, 0, 0, 0.6);
  551. border-radius: 40rpx;
  552. padding: 6rpx;
  553. backdrop-filter: blur(10rpx);
  554. .mode-btn {
  555. padding: 12rpx 32rpx;
  556. border-radius: 34rpx;
  557. transition: all 0.3s;
  558. .mode-text {
  559. font-size: 26rpx;
  560. color: rgba(255, 255, 255, 0.6);
  561. font-weight: 500;
  562. transition: all 0.3s;
  563. }
  564. &.active {
  565. background: rgba(255, 255, 255, 0.9);
  566. .mode-text {
  567. color: #333333;
  568. font-weight: 600;
  569. }
  570. }
  571. &:active {
  572. transform: scale(0.95);
  573. }
  574. }
  575. }
  576. }
  577. // 多页模式缩略图列表
  578. .thumbnail-list {
  579. position: absolute;
  580. bottom: 220rpx;
  581. left: 0;
  582. right: 0;
  583. height: 160rpx;
  584. background: rgba(0, 0, 0, 0.6);
  585. backdrop-filter: blur(10rpx);
  586. .thumbnail-scroll {
  587. height: 100%;
  588. white-space: nowrap;
  589. .thumbnail-wrapper {
  590. display: inline-flex;
  591. padding: 20rpx;
  592. gap: 16rpx;
  593. .thumbnail-item {
  594. position: relative;
  595. width: 120rpx;
  596. height: 120rpx;
  597. border-radius: 12rpx;
  598. overflow: hidden;
  599. background: #ffffff;
  600. border: 2rpx solid #e0e0e0;
  601. .thumbnail-image {
  602. width: 100%;
  603. height: 100%;
  604. }
  605. .pdf-thumbnail-icon {
  606. width: 100%;
  607. height: 100%;
  608. display: flex;
  609. align-items: center;
  610. justify-content: center;
  611. background: #f5f5f5;
  612. .pdf-icon-img {
  613. width: 60rpx;
  614. height: 60rpx;
  615. }
  616. }
  617. .thumbnail-delete {
  618. position: absolute;
  619. top: 4rpx;
  620. right: 4rpx;
  621. width: 36rpx;
  622. height: 36rpx;
  623. border-radius: 50%;
  624. background: rgba(0, 0, 0, 0.7);
  625. display: flex;
  626. align-items: center;
  627. justify-content: center;
  628. .delete-icon {
  629. font-size: 32rpx;
  630. color: #ffffff;
  631. line-height: 1;
  632. }
  633. }
  634. .thumbnail-index {
  635. position: absolute;
  636. bottom: 4rpx;
  637. left: 4rpx;
  638. padding: 2rpx 8rpx;
  639. background: rgba(0, 0, 0, 0.7);
  640. border-radius: 8rpx;
  641. font-size: 20rpx;
  642. color: #ffffff;
  643. }
  644. }
  645. }
  646. }
  647. }
  648. // 上传按钮
  649. .upload-btn {
  650. position: absolute;
  651. bottom: 240rpx;
  652. right: 32rpx;
  653. width: 120rpx;
  654. height: 80rpx;
  655. background: #1ec9c9;
  656. border-radius: 40rpx;
  657. display: flex;
  658. align-items: center;
  659. justify-content: center;
  660. box-shadow: 0 4rpx 16rpx rgba(30, 201, 201, 0.4);
  661. z-index: 20;
  662. &:active {
  663. transform: scale(0.95);
  664. }
  665. .upload-text {
  666. font-size: 28rpx;
  667. font-weight: 600;
  668. color: #ffffff;
  669. }
  670. }
  671. // PDF缩略图
  672. .pdf-thumbnail {
  673. position: absolute;
  674. bottom: 240rpx;
  675. right: 32rpx;
  676. width: 140rpx;
  677. height: 140rpx;
  678. background: #ffffff;
  679. border-radius: 16rpx;
  680. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.15);
  681. display: flex;
  682. flex-direction: column;
  683. align-items: center;
  684. justify-content: center;
  685. z-index: 20;
  686. &:active {
  687. transform: scale(0.95);
  688. }
  689. .pdf-close {
  690. position: absolute;
  691. top: -8rpx;
  692. right: -8rpx;
  693. width: 40rpx;
  694. height: 40rpx;
  695. border-radius: 50%;
  696. background: #ff4444;
  697. display: flex;
  698. align-items: center;
  699. justify-content: center;
  700. box-shadow: 0 2rpx 8rpx rgba(255, 68, 68, 0.3);
  701. .close-icon {
  702. font-size: 36rpx;
  703. color: #ffffff;
  704. line-height: 1;
  705. font-weight: 300;
  706. }
  707. }
  708. .pdf-icon {
  709. width: 60rpx;
  710. height: 60rpx;
  711. margin-bottom: 8rpx;
  712. }
  713. .pdf-text {
  714. font-size: 24rpx;
  715. color: #666666;
  716. font-weight: 500;
  717. }
  718. }
  719. // 底部操作按钮
  720. .action-buttons {
  721. position: absolute;
  722. bottom: 0;
  723. left: 0;
  724. right: 0;
  725. background: #ffffff;
  726. padding: 32rpx 40rpx;
  727. padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
  728. display: flex;
  729. align-items: center;
  730. justify-content: space-between;
  731. .action-btn {
  732. display: flex;
  733. flex-direction: column;
  734. align-items: center;
  735. gap: 12rpx;
  736. .btn-icon {
  737. width: 48rpx;
  738. height: 48rpx;
  739. }
  740. .btn-text {
  741. font-size: 24rpx;
  742. color: #666666;
  743. }
  744. }
  745. .capture-btn {
  746. width: 120rpx;
  747. height: 120rpx;
  748. border-radius: 50%;
  749. background: #1ec9c9;
  750. display: flex;
  751. align-items: center;
  752. justify-content: center;
  753. box-shadow: 0 4rpx 16rpx rgba(30, 201, 201, 0.4);
  754. &:active {
  755. transform: scale(0.95);
  756. }
  757. .capture-inner {
  758. width: 100rpx;
  759. height: 100rpx;
  760. border-radius: 50%;
  761. background: #ffffff;
  762. }
  763. }
  764. }
  765. }
  766. }
  767. </style>