index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. <template>
  2. <view class="folder-select-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">{{ t('upload.title') }}</text>
  10. <view class="placeholder"></view>
  11. </view>
  12. </view>
  13. <!-- 项目信息 -->
  14. <view class="project-info-bar">
  15. <text class="project-label">{{ t('projectSelect.message.currentProject') }}:</text>
  16. <text class="project-name">{{ projectName }}</text>
  17. </view>
  18. <!-- 选择表单 -->
  19. <view class="form-container">
  20. <view v-if="loading" class="loading-tip">
  21. <text class="loading-text">{{ t('upload.message.loading') }}</text>
  22. </view>
  23. <view v-else class="form-content">
  24. <!-- 国家-中心联动选择 -->
  25. <view class="form-item">
  26. <view class="form-label">{{ t('upload.form.countryCenter') }}:</view>
  27. <picker
  28. mode="multiSelector"
  29. :range="pickerRange"
  30. :value="[selectedCountryIndex, selectedCenterIndex]"
  31. @change="handleMultiPickerChange"
  32. @columnchange="handleColumnChange"
  33. >
  34. <view class="picker-display">
  35. <text class="picker-text" :class="{ placeholder: selectedCountryIndex === -1 || selectedCenterIndex === -1 }">
  36. {{ getDisplayText() }}
  37. </text>
  38. <text class="picker-arrow">›</text>
  39. </view>
  40. </picker>
  41. </view>
  42. <!-- 名称和生效日期合并 -->
  43. <view class="form-item highlight-item">
  44. <view class="form-label required">{{ t('upload.form.name') }}:</view>
  45. <view class="input-wrapper highlight">
  46. <input
  47. v-model="documentName"
  48. type="text"
  49. :placeholder="t('upload.form.documentName')"
  50. class="input-field"
  51. @input="handleDocumentNameInput"
  52. />
  53. </view>
  54. <view class="date-picker-wrapper">
  55. <picker
  56. mode="date"
  57. :value="effectiveDate"
  58. @change="handleDateChange"
  59. >
  60. <view class="picker-display">
  61. <text class="picker-text" :class="{ placeholder: !effectiveDate }">
  62. {{ effectiveDate || t('upload.form.effectiveDate') }}
  63. </text>
  64. <text class="picker-arrow">›</text>
  65. </view>
  66. </picker>
  67. </view>
  68. <view class="final-name-preview">
  69. <text class="preview-label">{{ t('upload.form.namePreview') }}:</text>
  70. <text class="preview-text">{{ getFinalName() }}</text>
  71. </view>
  72. </view>
  73. <!-- 提交按钮 -->
  74. <button
  75. class="confirm-btn"
  76. :disabled="selectedCountryIndex < 0 || selectedCenterIndex < 0 || !documentName.trim()"
  77. @click="handleSubmit"
  78. >
  79. {{ t('upload.form.submit') }}
  80. </button>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. import { getFolderList, uploadScanFile } from '@/apis/scan'
  87. import { useI18n } from 'vue-i18n'
  88. export default {
  89. setup() {
  90. const { t } = useI18n()
  91. return { t }
  92. },
  93. data() {
  94. return {
  95. statusBarHeight: 0,
  96. projectId: 0,
  97. projectName: '',
  98. projectCode: '',
  99. rawData: null,
  100. loading: false,
  101. showRawData: false,
  102. // 原始数据列表(用于查找独立的中心)
  103. allFolders: [],
  104. // 国家列表
  105. countryList: [],
  106. selectedCountryIndex: 0, // 默认选中第一个(NA)
  107. // 中心列表
  108. centerList: [],
  109. selectedCenterIndex: 0, // 默认选中第一个(NA)
  110. // 文档名称输入
  111. documentName: '',
  112. // 生效日期
  113. effectiveDate: ''
  114. }
  115. },
  116. computed: {
  117. // 构建选择器的 range 数据
  118. pickerRange() {
  119. // 第一列:国家名称数组
  120. const countryNames = this.countryList.map(item => item.name)
  121. // 第二列:中心显示名称数组
  122. const centerNames = this.centerList.map(item => item.displayName || item.name)
  123. return [countryNames, centerNames]
  124. }
  125. },
  126. onLoad(options) {
  127. this.projectId = parseInt(options.projectId) || 0
  128. this.projectName = decodeURIComponent(options.projectName || '')
  129. this.projectCode = decodeURIComponent(options.projectCode || '')
  130. },
  131. onReady() {
  132. // 获取系统信息
  133. const windowInfo = uni.getWindowInfo()
  134. this.statusBarHeight = windowInfo.statusBarHeight || 0
  135. // 加载数据
  136. if (this.projectId) {
  137. this.loadFolderList()
  138. } else {
  139. console.error('projectId 为空,无法加载文件夹列表')
  140. }
  141. },
  142. methods: {
  143. // 返回上一页
  144. handleBack() {
  145. uni.navigateBack()
  146. },
  147. // 加载文件夹列表
  148. async loadFolderList() {
  149. if (this.loading) return
  150. try {
  151. this.loading = true
  152. const response = await getFolderList({
  153. projectId: this.projectId
  154. })
  155. // 保存原始数据
  156. this.rawData = response
  157. // 解析数据
  158. if (response.code === 200 && response.data && Array.isArray(response.data)) {
  159. this.allFolders = response.data
  160. this.parseCountryList(response.data)
  161. }
  162. } catch (error) {
  163. console.error('加载失败:', error)
  164. uni.showToast({
  165. title: this.t('upload.message.loadFailed'),
  166. icon: 'none'
  167. })
  168. } finally {
  169. this.loading = false
  170. }
  171. },
  172. // 解析国家列表(type === 1 为国家)
  173. parseCountryList(data) {
  174. const countries = data.filter(item => {
  175. return item.type === 1 // 国家类型
  176. })
  177. // 在列表开头添加 NA 选项
  178. this.countryList = [
  179. { id: 'NA', name: 'NA', type: 1, children: [], displayName: 'NA' },
  180. ...countries
  181. ]
  182. // 初始化时加载第一个国家(NA)的中心列表
  183. if (this.countryList.length > 0) {
  184. this.loadCenterList(0)
  185. }
  186. },
  187. // 加载中心列表
  188. loadCenterList(countryIndex) {
  189. if (countryIndex >= 0 && this.countryList[countryIndex]) {
  190. const country = this.countryList[countryIndex]
  191. // 如果选择的是 NA(第一个选项)
  192. if (country.id === 'NA') {
  193. // 获取所有不属于任何国家的中心
  194. this.centerList = this.getIndependentCenters()
  195. } else {
  196. // 选择了具体国家,显示该国家下的所有中心(包括子中心)
  197. const allCenters = this.getAllCentersRecursive(country.children || [])
  198. // 在列表开头添加 NA 选项
  199. this.centerList = [
  200. { id: 'NA', name: 'NA', type: 2, displayName: 'NA' },
  201. ...allCenters
  202. ]
  203. }
  204. } else {
  205. this.centerList = [{ id: 'NA', name: 'NA', type: 2, displayName: 'NA' }]
  206. }
  207. },
  208. // 递归获取所有中心(包括子中心)
  209. getAllCentersRecursive(nodes, prefix = '') {
  210. let centers = []
  211. nodes.forEach(node => {
  212. // 如果是中心类型(type === 2)
  213. if (node.type === 2) {
  214. // 添加当前中心,名称带层级前缀
  215. const displayName = prefix ? `${prefix} > ${node.name}` : node.name
  216. centers.push({
  217. ...node,
  218. displayName: displayName, // 用于显示的名称
  219. originalName: node.name // 保留原始名称
  220. })
  221. // 如果有子节点,递归获取
  222. if (node.children && node.children.length > 0) {
  223. const subCenters = this.getAllCentersRecursive(node.children, displayName)
  224. centers = centers.concat(subCenters)
  225. }
  226. } else if (node.children && node.children.length > 0) {
  227. // 如果不是中心但有子节点,继续递归
  228. const subCenters = this.getAllCentersRecursive(node.children, prefix)
  229. centers = centers.concat(subCenters)
  230. }
  231. })
  232. return centers
  233. },
  234. // 多列选择器列变化
  235. handleColumnChange(e) {
  236. const column = e.detail.column // 哪一列变化了
  237. const value = e.detail.value // 变化后的值
  238. // 如果是第一列(国家)变化
  239. if (column === 0) {
  240. this.selectedCountryIndex = value
  241. // 重新加载中心列表
  242. this.loadCenterList(value)
  243. // 重置中心选择为第一个
  244. this.selectedCenterIndex = 0
  245. }
  246. },
  247. // 多列选择器确认
  248. handleMultiPickerChange(e) {
  249. const values = e.detail.value
  250. this.selectedCountryIndex = values[0]
  251. this.selectedCenterIndex = values[1]
  252. },
  253. // 获取显示文本
  254. getDisplayText() {
  255. if (this.selectedCountryIndex >= 0 && this.selectedCenterIndex >= 0) {
  256. const country = this.countryList[this.selectedCountryIndex]
  257. const center = this.centerList[this.selectedCenterIndex]
  258. if (country && center) {
  259. const centerName = center.displayName || center.name
  260. return `${country.name} - ${centerName}`
  261. }
  262. }
  263. return this.t('upload.form.selectCountryCenter')
  264. },
  265. // 日期选择变化
  266. handleDateChange(e) {
  267. this.effectiveDate = e.detail.value
  268. },
  269. // 处理文档名称输入,禁止输入 "-" 字符
  270. handleDocumentNameInput(e) {
  271. const value = e.detail.value
  272. // 检测是否包含 "-" 字符
  273. if (value.includes('-')) {
  274. // 移除所有 "-" 字符
  275. const filteredValue = value.replace(/-/g, '')
  276. this.documentName = filteredValue
  277. // 提示用户
  278. uni.showToast({
  279. title: this.t('upload.message.noHyphen'),
  280. icon: 'none',
  281. duration: 1500
  282. })
  283. } else {
  284. this.documentName = value
  285. }
  286. },
  287. // 格式化日期为 YYYYMMDD 格式(用于显示)
  288. formatDate(dateStr) {
  289. if (!dateStr) return ''
  290. // 将 2026-01-21 转换为 20260121
  291. return dateStr.replace(/-/g, '')
  292. },
  293. // 格式化日期为 YYYY-MM-DD HH:mm:ss 格式(用于提交)
  294. formatDateTimeForSubmit(dateStr) {
  295. if (!dateStr) return ''
  296. // 将 2026-01-21 转换为 2026-01-21 00:00:00
  297. return `${dateStr} 00:00:00`
  298. },
  299. // 获取文件夹ID(folder参数的逻辑)
  300. getFolderId() {
  301. const selectedCountry = this.countryList[this.selectedCountryIndex]
  302. const selectedCenter = this.centerList[this.selectedCenterIndex]
  303. // 如果选择了中心(且不是NA),使用中心ID
  304. if (selectedCenter && selectedCenter.id !== 'NA') {
  305. return selectedCenter.id
  306. }
  307. // 如果选择了国家(且不是NA),使用国家ID
  308. if (selectedCountry && selectedCountry.id !== 'NA') {
  309. return selectedCountry.id
  310. }
  311. // 否则使用0
  312. return 0
  313. },
  314. // 获取完整名称(用于提交)
  315. // 格式:{项目编号}-{国家名/NA}-{中心号/NA}-[具体文档名]-[生效日期]
  316. getFullNameForSubmit() {
  317. const projectCode = this.projectCode || 'NA'
  318. const country = this.countryList[this.selectedCountryIndex]
  319. const countryName = country && country.id !== 'NA' ? country.name : 'NA'
  320. const center = this.centerList[this.selectedCenterIndex]
  321. const centerId = center && center.id !== 'NA' ? center.id : 'NA'
  322. const docName = this.documentName.trim() || `[${this.t('upload.form.documentName')}]`
  323. const date = this.formatDate(this.effectiveDate) || `[${this.t('upload.form.effectiveDate')}]`
  324. return `${projectCode}-${countryName}-${centerId}-${docName}-${date}`
  325. },
  326. // 获取显示名称(用于前端显示,NA时隐藏)
  327. // 格式:{项目编号}-[国家名(如果不是NA)]-[中心号(如果不是NA)]-[具体文档名]-[生效日期]
  328. getFinalName() {
  329. const projectCode = this.projectCode || 'NA'
  330. const country = this.countryList[this.selectedCountryIndex]
  331. const countryName = country && country.id !== 'NA' ? country.name : ''
  332. const center = this.centerList[this.selectedCenterIndex]
  333. const centerId = center && center.id !== 'NA' ? center.id : ''
  334. const docName = this.documentName.trim() || `[${this.t('upload.form.documentName')}]`
  335. const date = this.formatDate(this.effectiveDate) || `[${this.t('upload.form.effectiveDate')}]`
  336. // 构建名称数组,过滤掉空值
  337. const nameParts = [projectCode, countryName, centerId, docName, date].filter(part => part !== '')
  338. return nameParts.join('-')
  339. },
  340. // 获取所有不属于任何国家的中心
  341. getIndependentCenters() {
  342. // 收集所有国家下的中心ID
  343. const centerIdsInCountries = new Set()
  344. this.allFolders.forEach(folder => {
  345. if (folder.type === 1 && folder.children) { // 国家类型
  346. this.collectAllCenterIds(folder.children, centerIdsInCountries)
  347. }
  348. })
  349. // 找出所有不在国家下的中心(直接在根目录下的中心)
  350. const independentCenters = this.allFolders.filter(folder => {
  351. return folder.type === 2 && !centerIdsInCountries.has(folder.id)
  352. })
  353. // 递归获取这些独立中心及其子中心
  354. const allIndependentCenters = this.getAllCentersRecursive(independentCenters)
  355. // 在列表开头添加 NA 选项
  356. return [
  357. { id: 'NA', name: 'NA', type: 2, displayName: 'NA' },
  358. ...allIndependentCenters
  359. ]
  360. },
  361. // 收集所有中心ID(递归)
  362. collectAllCenterIds(nodes, centerIds) {
  363. nodes.forEach(node => {
  364. if (node.type === 2) {
  365. centerIds.add(node.id)
  366. }
  367. if (node.children && node.children.length > 0) {
  368. this.collectAllCenterIds(node.children, centerIds)
  369. }
  370. })
  371. },
  372. // 中心选择变化(保留以防需要)
  373. handleCenterChange(e) {
  374. const index = parseInt(e.detail.value)
  375. this.selectedCenterIndex = index
  376. },
  377. // 提交
  378. async handleSubmit() {
  379. if (this.selectedCountryIndex < 0) {
  380. uni.showToast({
  381. title: this.t('upload.message.selectCountry'),
  382. icon: 'none'
  383. })
  384. return
  385. }
  386. if (this.selectedCenterIndex < 0) {
  387. uni.showToast({
  388. title: this.t('upload.message.selectCenter'),
  389. icon: 'none'
  390. })
  391. return
  392. }
  393. if (!this.documentName.trim()) {
  394. uni.showToast({
  395. title: this.t('upload.message.inputDocumentName'),
  396. icon: 'none'
  397. })
  398. return
  399. }
  400. if (!this.effectiveDate) {
  401. uni.showToast({
  402. title: this.t('upload.message.inputEffectiveDate'),
  403. icon: 'none'
  404. })
  405. return
  406. }
  407. const selectedCountry = this.countryList[this.selectedCountryIndex]
  408. const selectedCenter = this.centerList[this.selectedCenterIndex]
  409. // 从全局数据中获取扫描的fileBase64List
  410. const fileBase64List = getApp().globalData.scannedFileBase64List
  411. if (!fileBase64List || fileBase64List.length === 0) {
  412. uni.showToast({
  413. title: this.t('upload.message.noScanFile'),
  414. icon: 'none'
  415. })
  416. return
  417. }
  418. try {
  419. uni.showLoading({
  420. title: this.t('upload.message.submitting'),
  421. mask: true
  422. })
  423. // 构建请求参数
  424. const fullName = this.getFullNameForSubmit() // 完整名称用于提交
  425. const folderId = this.getFolderId()
  426. const params = {
  427. projectId: this.projectId,
  428. folder: folderId,
  429. specificName: this.documentName.trim(),
  430. name: fullName,
  431. effectiveDate: this.formatDateTimeForSubmit(this.effectiveDate),
  432. files: fileBase64List
  433. }
  434. // 调用上传接口
  435. const response = await uploadScanFile(params)
  436. uni.hideLoading()
  437. if (response.code === 200) {
  438. uni.showToast({
  439. title: this.t('upload.message.submitSuccess'),
  440. icon: 'success',
  441. duration: 2000
  442. })
  443. // 清空全局数据
  444. getApp().globalData.scannedFileBase64List = []
  445. // 延迟返回首页
  446. setTimeout(() => {
  447. uni.reLaunch({
  448. url: '/pages/home/index'
  449. })
  450. }, 2000)
  451. } else {
  452. throw new Error(response.msg || this.t('upload.message.submitFailed'))
  453. }
  454. } catch (error) {
  455. uni.hideLoading()
  456. console.error('提交失败:', error)
  457. uni.showToast({
  458. title: error.message || this.t('upload.message.submitFailed'),
  459. icon: 'none'
  460. })
  461. }
  462. },
  463. // 确认选择(保留旧方法以防其他地方调用)
  464. handleConfirm() {
  465. this.handleSubmit()
  466. }
  467. }
  468. }
  469. </script>
  470. <style lang="scss" scoped>
  471. .folder-select-page {
  472. width: 100%;
  473. height: 100vh;
  474. display: flex;
  475. flex-direction: column;
  476. background-color: #f5f5f5;
  477. // 顶部导航栏
  478. .header-bg {
  479. background: linear-gradient(180deg, #1ec9c9 0%, #1eb8b8 100%);
  480. position: relative;
  481. z-index: 100;
  482. .header-content {
  483. height: 88rpx;
  484. display: flex;
  485. align-items: center;
  486. justify-content: space-between;
  487. padding: 0 24rpx;
  488. .back-btn {
  489. width: 60rpx;
  490. height: 60rpx;
  491. display: flex;
  492. align-items: center;
  493. justify-content: flex-start;
  494. .back-icon {
  495. font-size: 56rpx;
  496. color: #ffffff;
  497. font-weight: 300;
  498. }
  499. }
  500. .header-title {
  501. flex: 1;
  502. text-align: center;
  503. font-size: 32rpx;
  504. font-weight: 600;
  505. color: #ffffff;
  506. }
  507. .placeholder {
  508. width: 60rpx;
  509. }
  510. }
  511. }
  512. // 项目信息栏
  513. .project-info-bar {
  514. padding: 24rpx;
  515. background: #ffffff;
  516. display: flex;
  517. align-items: center;
  518. border-bottom: 1rpx solid #f5f5f5;
  519. .project-label {
  520. font-size: 28rpx;
  521. color: #666666;
  522. margin-right: 8rpx;
  523. }
  524. .project-name {
  525. font-size: 28rpx;
  526. font-weight: 600;
  527. color: #1ec9c9;
  528. }
  529. }
  530. // 表单容器
  531. .form-container {
  532. flex: 1;
  533. overflow-y: auto;
  534. }
  535. .form-content {
  536. padding: 32rpx;
  537. }
  538. .form-item {
  539. margin-bottom: 32rpx;
  540. &.highlight-item {
  541. .form-label {
  542. font-size: 32rpx;
  543. color: #1ec9c9;
  544. &.required::after {
  545. content: ' *';
  546. color: #ff4444;
  547. }
  548. }
  549. }
  550. .form-label {
  551. font-size: 28rpx;
  552. color: #333333;
  553. font-weight: 600;
  554. margin-bottom: 16rpx;
  555. }
  556. .date-picker-wrapper {
  557. margin-top: 16rpx;
  558. }
  559. .final-name-preview {
  560. margin-top: 16rpx;
  561. padding: 20rpx 24rpx;
  562. background: #f5f5f5;
  563. border-radius: 12rpx;
  564. border: 2rpx dashed #cccccc;
  565. .preview-label {
  566. font-size: 24rpx;
  567. color: #666666;
  568. display: block;
  569. margin-bottom: 8rpx;
  570. }
  571. .preview-text {
  572. font-size: 26rpx;
  573. color: #333333;
  574. font-weight: 500;
  575. word-break: break-all;
  576. }
  577. }
  578. .input-wrapper {
  579. background: #ffffff;
  580. border: 2rpx solid #e0e0e0;
  581. border-radius: 12rpx;
  582. padding: 24rpx;
  583. transition: all 0.3s;
  584. &.highlight {
  585. border: 3rpx solid #1ec9c9;
  586. background: linear-gradient(135deg, #f0fffe 0%, #ffffff 100%);
  587. box-shadow: 0 4rpx 12rpx rgba(30, 201, 201, 0.15);
  588. padding: 28rpx;
  589. }
  590. &:focus-within {
  591. border-color: #1ec9c9;
  592. box-shadow: 0 0 0 4rpx rgba(30, 201, 201, 0.1);
  593. }
  594. .input-field {
  595. width: 100%;
  596. font-size: 28rpx;
  597. color: #333333;
  598. &::placeholder {
  599. color: #999999;
  600. }
  601. }
  602. }
  603. .picker-display {
  604. background: #ffffff;
  605. border: 2rpx solid #e0e0e0;
  606. border-radius: 12rpx;
  607. padding: 24rpx;
  608. display: flex;
  609. align-items: center;
  610. justify-content: space-between;
  611. transition: all 0.3s;
  612. &.disabled {
  613. background: #f5f5f5;
  614. opacity: 0.6;
  615. }
  616. .picker-text {
  617. flex: 1;
  618. font-size: 28rpx;
  619. color: #333333;
  620. &.placeholder {
  621. color: #999999;
  622. }
  623. }
  624. .picker-arrow {
  625. font-size: 40rpx;
  626. color: #999999;
  627. font-weight: 300;
  628. margin-left: 16rpx;
  629. }
  630. }
  631. }
  632. .confirm-btn {
  633. width: 100%;
  634. height: 88rpx;
  635. background: linear-gradient(135deg, #1ec9c9 0%, #1eb8b8 100%);
  636. color: #ffffff;
  637. font-size: 32rpx;
  638. font-weight: 600;
  639. border-radius: 16rpx;
  640. border: none;
  641. margin-top: 32rpx;
  642. transition: all 0.3s;
  643. box-shadow: 0 6rpx 20rpx rgba(30, 201, 201, 0.3);
  644. &:disabled {
  645. background: #cccccc;
  646. box-shadow: none;
  647. opacity: 0.6;
  648. }
  649. &:active:not(:disabled) {
  650. opacity: 0.9;
  651. transform: scale(0.98);
  652. }
  653. &::after {
  654. border: none;
  655. }
  656. }
  657. // 调试信息
  658. .debug-section {
  659. margin-top: 48rpx;
  660. padding: 24rpx;
  661. background: #fff3cd;
  662. border-radius: 12rpx;
  663. border: 1rpx solid #ffc107;
  664. .debug-title {
  665. font-size: 28rpx;
  666. font-weight: 600;
  667. color: #856404;
  668. margin-bottom: 12rpx;
  669. }
  670. .debug-item {
  671. font-size: 24rpx;
  672. color: #856404;
  673. line-height: 1.8;
  674. }
  675. }
  676. // 原始数据
  677. .raw-data-section {
  678. margin-top: 32rpx;
  679. .raw-data-title {
  680. font-size: 28rpx;
  681. font-weight: 600;
  682. color: #666666;
  683. padding: 16rpx;
  684. background: #f5f5f5;
  685. border-radius: 8rpx;
  686. cursor: pointer;
  687. &:active {
  688. background: #e0e0e0;
  689. }
  690. }
  691. .json-display {
  692. margin-top: 16rpx;
  693. background: #f5f5f5;
  694. padding: 24rpx;
  695. border-radius: 8rpx;
  696. font-size: 22rpx;
  697. color: #333333;
  698. font-family: 'Courier New', monospace;
  699. line-height: 1.6;
  700. word-break: break-all;
  701. white-space: pre-wrap;
  702. }
  703. }
  704. .loading-tip {
  705. padding: 200rpx 0;
  706. text-align: center;
  707. .loading-text {
  708. font-size: 28rpx;
  709. color: #999999;
  710. }
  711. }
  712. }
  713. </style>