index.uvue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. <template>
  2. <view class="login-page">
  3. <!-- 背景图 -->
  4. <image class="bg-image" src="/static/images/login/1.png" mode="aspectFill"></image>
  5. <scroll-view class="login-content">
  6. <!-- Logo 和标题 -->
  7. <view class="header">
  8. <image class="logo" src="/static/images/index/logo.png" mode="aspectFit"></image>
  9. <text class="title">EMCS</text>
  10. </view>
  11. <!-- 登录表单卡片 -->
  12. <view class="form-card">
  13. <!-- 账号输入 -->
  14. <view class="form-item">
  15. <text class="label">账号</text>
  16. <input class="input" type="text" placeholder="请输入您的账号" v-model="username" />
  17. </view>
  18. <!-- 密码输入 -->
  19. <view class="form-item">
  20. <text class="label">密码</text>
  21. <view class="input-wrapper">
  22. <input class="input" :type="showPassword ? 'text' : 'password'" placeholder="请输入您的密码" v-model="password" />
  23. <image class="eye-icon" :src="showPassword ? '/static/images/login/4.png' : '/static/images/login/3.png'" mode="aspectFit" @click="handleTogglePassword"></image>
  24. </view>
  25. </view>
  26. <!-- 记住密码 (可点击区域切换) -->
  27. <view class="remember-box" @click="handleRememberChange" style="cursor: pointer;">
  28. <checkbox :checked="rememberPassword" class="checkbox" />
  29. <text class="remember-text" style="margin-left: 8px;">记住密码</text>
  30. </view>
  31. <!-- 登录按钮 -->
  32. <button class="login-btn" @click="handleLogin">
  33. <text class="login-btn-text">{{ loading ? "登录中..." : "登录" }}</text>
  34. </button>
  35. </view>
  36. <!-- 底部信息 -->
  37. <view class="footer">
  38. <text class="version">v{{ version }}</text>
  39. <text class="company">韫珠科技</text>
  40. </view>
  41. </scroll-view>
  42. <!-- 自定义选择器弹窗 -->
  43. <view v-if="showPasswordPicker" class="picker-modal">
  44. <view class="modal-mask" @click="showPasswordPicker = false"></view>
  45. <view class="modal-content">
  46. <view class="modal-header">
  47. <text class="modal-title">修改密码</text>
  48. <text class="modal-close" @click="showPasswordPicker = false">取消</text>
  49. </view>
  50. <view class="form-item-input">
  51. <text class="label-picker">新密码</text>
  52. <view class="view-input-picker">
  53. <input class="input-picker" :type="showNewPassword ? 'text' : 'password'" placeholder="请输入新密码" v-model="newpassword" />
  54. <image class="eye-icon-picker" :src="showNewPassword ? '/static/images/login/4.png' : '/static/images/login/3.png'" mode="aspectFit" @click="handleToggleNewPassword"></image>
  55. </view>
  56. </view>
  57. <view class="form-item-input">
  58. <text class="label-picker">确认密码</text>
  59. <view class="view-input-picker">
  60. <input class="input-picker" :type="showConfirmPassword ? 'text' : 'password'" placeholder="请输入确认密码" v-model="confirmpassword" />
  61. <image class="eye-icon-picker" :src="showConfirmPassword ? '/static/images/login/4.png' : '/static/images/login/3.png'" mode="aspectFit" @click="handleToggleConfirmPassword"></image>
  62. </view>
  63. </view>
  64. <view class="form-item-btn">
  65. <button class="btn-primary" @click="handleRestPassword">
  66. 确认
  67. </button>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- 下载进度遮罩(仅更新数据不重建,无闪烁) -->
  72. <view v-if="isDownload" class="download-progress-mask">
  73. <view class="download-progress-box">
  74. <text class="download-progress-title">下载中...</text>
  75. <view class="download-progress-bar">
  76. <view class="download-progress-fill" :style="{ width: downloadProgress + '%' }"></view>
  77. </view>
  78. <text class="download-progress-text">{{ downloadProgress }}%</text>
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script setup lang="uts">
  84. import { ref, computed, onMounted } from 'vue'
  85. import { loginByAccount, loginSSO, getUserInfo, resetPassword , getIsKey} from '../../api/auth/login'
  86. import { getVersion } from '../../api/system/config.uts'
  87. import { getBaseUrl } from '../../utils/request'
  88. import {
  89. saveAccessToken,
  90. saveUserInfo,
  91. getRememberedAccount,
  92. saveRememberedAccount,
  93. clearRememberedAccount,
  94. saveStoreIsKey,
  95. getStoreIsKey
  96. } from '../../utils/storage'
  97. import { validatePassword } from '../../utils/validate'
  98. // @ts-ignore
  99. import manifest from '@/manifest.json'
  100. // 表单数据
  101. const username = ref<string>("")
  102. const password = ref<string>("")
  103. const newpassword = ref<string>("")
  104. const confirmpassword = ref<string>("")
  105. const rememberPassword = ref<boolean>(false)
  106. const showPassword = ref<boolean>(false)
  107. const showNewPassword = ref<boolean>(false)
  108. const showConfirmPassword = ref<boolean>(false)
  109. const loading = ref<boolean>(false)
  110. const isDownload = ref<boolean>(false)
  111. const downloadProgress = ref<number>(0)
  112. const showPasswordPicker = ref<boolean>(false)
  113. // 版本号
  114. const manifestVersion = manifest.versionName as string | null
  115. const version = ref<string>(manifestVersion != null ? manifestVersion : '1.0.0')
  116. const versionServer = ref<string>('1.0.0')
  117. // 是否可以登录
  118. const canLogin = computed((): boolean => {
  119. return username.value.length > 0 && password.value.length > 0 && !loading.value
  120. })
  121. // 记住密码切换
  122. const handleRememberChange = (): void => {
  123. rememberPassword.value = !rememberPassword.value
  124. }
  125. // 切换密码显示/隐藏
  126. const handleTogglePassword = (): void => {
  127. showPassword.value = !showPassword.value
  128. }
  129. // 切换密码显示/隐藏
  130. const handleToggleNewPassword = (): void => {
  131. showNewPassword.value = !showNewPassword.value
  132. }
  133. // 切换密码显示/隐藏
  134. const handleToggleConfirmPassword = (): void => {
  135. showConfirmPassword.value = !showConfirmPassword.value
  136. }
  137. const handleRestPassword = async (): Promise<void> => {
  138. try {
  139. if(newpassword.value != confirmpassword.value){
  140. uni.showToast({
  141. title: '两次输入的密码不一致',
  142. icon: 'error'
  143. })
  144. return;
  145. }
  146. await resetPassword(username.value, password.value, newpassword.value);
  147. showPasswordPicker.value = false;
  148. uni.showToast({
  149. title: '修改成功,请重新登录',
  150. icon: 'success'
  151. })
  152. newpassword.value = ""
  153. confirmpassword.value = "";
  154. } catch (e: any) {
  155. uni.showToast({
  156. title: e.message ?? '密码修改失败',
  157. icon: 'none',
  158. duration: 2000
  159. })
  160. }
  161. };
  162. const loginSuccess = async(result: any) : Promise<void> => {
  163. // 提取 data 部分
  164. const resultObj = result as UTSJSONObject
  165. // const data = resultObj['data'] as UTSJSONObject
  166. const isInitPassword = resultObj["isInitPassword"] as boolean | null;
  167. // console.log("================"+ code)
  168. if(isInitPassword==true){
  169. showPasswordPicker.value = true;
  170. return
  171. }
  172. uni.setStorageSync("login_key", "1")
  173. // 保存登录信息
  174. saveAccessToken(resultObj['token'] as string)
  175. const userInfoJson = await getUserInfo();
  176. console.log(userInfoJson);
  177. const userInfoObj = userInfoJson as UTSJSONObject
  178. const userInfo = userInfoObj['user'] as UTSJSONObject
  179. const deptInfo = userInfo['dept'] as UTSJSONObject
  180. const permissions = userInfoObj['permissions'] as any[]
  181. saveUserInfo({
  182. userId: userInfo['userId'],
  183. userName: userInfo['userName'],
  184. nickName: userInfo['nickName'],
  185. phone: userInfo['phonenumber'],
  186. deptName: deptInfo['deptName'],
  187. roleNames: userInfoObj['roleNames'],
  188. permissions: permissions
  189. })
  190. // 保存或清除记住的账号密码
  191. if (rememberPassword.value) {
  192. saveRememberedAccount(username.value, password.value)
  193. } else {
  194. clearRememberedAccount()
  195. }
  196. // 跳转到首页
  197. /*setTimeout(() => {
  198. uni.redirectTo({
  199. url: '/pages/index/index'
  200. })
  201. }, 1000)*/
  202. setTimeout(() => {
  203. uni.redirectTo({
  204. url: '/pages/index/index'
  205. })
  206. }, 1000)
  207. }
  208. // 登录处理
  209. const handleLogin = async (): Promise<void> => {
  210. // 验证输入
  211. if (username.value.trim().length == 0) {
  212. uni.showToast({
  213. title: '请输入账号',
  214. icon: 'none',
  215. duration: 2000
  216. })
  217. return
  218. }
  219. if (password.value.trim().length == 0) {
  220. uni.showToast({
  221. title: '请输入密码',
  222. icon: 'none',
  223. duration: 2000
  224. })
  225. return
  226. }
  227. try {
  228. loading.value = true
  229. /* const resultKey = await getIsKey();
  230. const resultKeyObj = resultKey as UTSJSONObject
  231. const isKey = resultKeyObj["data"] as string |'0'
  232. saveStoreIsKey(isKey); */
  233. const result = await loginByAccount(username.value, password.value)
  234. loginSuccess(result);
  235. uni.showToast({
  236. title: '登录成功',
  237. icon: 'success'
  238. })
  239. } catch (e: any) {
  240. uni.showToast({
  241. title: e.message ?? '登录失败',
  242. icon: 'none',
  243. duration: 2000
  244. })
  245. } finally {
  246. loading.value = false
  247. }
  248. }
  249. const handleLoginSSO = async (apptoken:string): Promise<void> => {
  250. try {
  251. /* const resultKey = await getIsKey();
  252. const resultKeyObj = resultKey as UTSJSONObject
  253. const isKey = resultKeyObj["data"] as string |'0'
  254. saveStoreIsKey(isKey); */
  255. let result = await loginSSO(apptoken)
  256. console.log('自动登录:', result)
  257. loginSuccess(result);
  258. } catch (e: any) {
  259. uni.showToast({
  260. title: e.message ?? '登录失败',
  261. icon: 'none',
  262. duration: 2000
  263. })
  264. } finally {
  265. loading.value = false
  266. }
  267. }
  268. const compareVersion = (newVersion: string, currentVersion: string): boolean => {
  269. const newVer = newVersion.split('.').map(item => parseInt(item))
  270. const currentVer = currentVersion.split('.').map(item => parseInt(item))
  271. const maxLength = Math.max(newVer.length, currentVer.length)
  272. for (let i = 0; i < maxLength; i++) {
  273. const newNum = i < newVer.length ? newVer[i] : 0
  274. const currentNum = i < currentVer.length ? currentVer[i] : 0
  275. if (newNum > currentNum) {
  276. return true
  277. } else if (newNum < currentNum) {
  278. return false
  279. }
  280. }
  281. return false
  282. }
  283. // 安装APK的单独函数
  284. const installApkFile = (filePath: string): void => {
  285. uni.installApk({
  286. filePath: filePath,
  287. success: () => {
  288. console.log('安装成功');
  289. uni.showToast({
  290. title: '安装成功',
  291. icon: 'success'
  292. });
  293. },
  294. fail: (error) => {
  295. console.error('安装失败:', error);
  296. uni.showToast({
  297. title: '安装失败',
  298. icon: 'none'
  299. });
  300. },
  301. complete: (res) => {
  302. console.log('安装完成:', res);
  303. }
  304. });
  305. }
  306. const installApkWithProgress = (): void => {
  307. // #ifdef APP-ANDROID
  308. isDownload.value = true;
  309. downloadProgress.value = 0;
  310. let donwloadUrl = '';
  311. donwloadUrl = getBaseUrl() + '/profile/app/emcs-release-'+versionServer.value+'.apk'
  312. // 下载APK
  313. const downloadTask = uni.downloadFile({
  314. url: donwloadUrl,
  315. filePath: `${uni.env.USER_DATA_PATH}/${Date.now()}_test.apk`, // 使用时间戳防止重名
  316. success: (downloadRes) => {
  317. isDownload.value = false;
  318. if (downloadRes.statusCode == 200) {
  319. // 确认安装
  320. uni.showModal({
  321. title: '安装提示',
  322. content: '下载完成,是否立即安装?',
  323. success: (modalRes) => {
  324. if (modalRes.confirm) {
  325. installApkFile(downloadRes.tempFilePath);
  326. }
  327. }
  328. });
  329. } else {
  330. uni.showToast({
  331. title: '下载失败',
  332. icon: 'error'
  333. });
  334. }
  335. },
  336. fail: (error) => {
  337. isDownload.value = false;
  338. uni.showToast({
  339. title: '下载失败',
  340. icon: 'none'
  341. });
  342. console.error('下载失败:', error);
  343. }
  344. });
  345. // 监听下载进度(更新页面内进度条,节流 5% 减轻渲染压力)
  346. let lastProgress = -5;
  347. downloadTask.onProgressUpdate((res) => {
  348. const p = Math.round(res.progress);
  349. if (p - lastProgress >= 5 || p >= 100) {
  350. lastProgress = p;
  351. downloadProgress.value = p;
  352. }
  353. });
  354. // #endif
  355. // #ifdef APP-HARMONY
  356. uni.showToast({
  357. title: '请登录PC端,扫描二维码下载并安装',
  358. icon: 'none'
  359. });
  360. // #endif
  361. // #ifdef APP-IOS
  362. uni.showToast({
  363. title: '请登录PC端,扫描二维码下载并安装',
  364. icon: 'none'
  365. });
  366. // #endif
  367. }
  368. const checkVersion = async (): Promise<void> => {
  369. const versionJSON = await getVersion() as UTSJSONObject
  370. versionServer.value = versionJSON['msg'] as string
  371. const hasNewVersion = compareVersion(versionServer.value, version.value) // true
  372. console.log("versionServer:"+versionServer.value)
  373. console.log("hasNewVersion:"+hasNewVersion)
  374. if(hasNewVersion){
  375. installApkWithProgress();
  376. }
  377. }
  378. onLoad((options: UTSJSONObject | null) => {
  379. console.log('URL参数:', options)
  380. // 延迟一点执行,确保App.vue已保存到缓存
  381. setTimeout(() => {
  382. // 1. 从缓存获取ICE的apptoken
  383. const iceToken = uni.getStorageSync('ice_apptoken')
  384. if (iceToken != null) {
  385. if (typeof iceToken == 'string') {
  386. if(iceToken.length > 0){
  387. console.log('从缓存获取ICE apptoken:', iceToken)
  388. handleLoginSSO(iceToken)
  389. }
  390. // 清除缓存,避免重复登录
  391. uni.removeStorageSync('ice_apptoken')
  392. return
  393. }
  394. }
  395. // 2. 从页面参数获取
  396. if (options != null) {
  397. const apptokenValue = options['apptoken']
  398. if (apptokenValue != null) {
  399. if (typeof apptokenValue == 'string') {
  400. if(apptokenValue.length > 0){
  401. const apptoken = apptokenValue as string
  402. console.log('获取到自动登录apptoken:', apptoken)
  403. handleLoginSSO(apptoken);
  404. }
  405. }
  406. }
  407. }
  408. console.log('未检测到ICE登录,显示普通登录界面')
  409. }, 500)
  410. })
  411. // 初始化:加载记住的账号密码
  412. onMounted(() => {
  413. checkVersion()
  414. const remembered = getRememberedAccount()
  415. if (remembered != null) {
  416. username.value = remembered['username'] as string
  417. password.value = remembered['password'] as string
  418. rememberPassword.value = true
  419. }
  420. })
  421. </script>
  422. <style lang="scss">
  423. .login-page {
  424. position: relative;
  425. flex: 1;
  426. padding-top: env(safe-area-inset-top);
  427. }
  428. .bg-image {
  429. position: absolute;
  430. top: 0;
  431. left: 0;
  432. width: 100%;
  433. height: 100%;
  434. z-index: 0;
  435. }
  436. .login-content {
  437. position: relative;
  438. flex: 1;
  439. padding: 60rpx 40rpx;
  440. z-index: 1;
  441. }
  442. .header {
  443. align-items: center;
  444. margin-bottom: 80rpx;
  445. }
  446. .logo {
  447. height: 200rpx;
  448. margin-bottom: 40rpx;
  449. border-radius:10px;
  450. }
  451. .title {
  452. font-size: 48rpx;
  453. color: #ffffff;
  454. font-weight: bold;
  455. // #ifndef APP-HARMONY
  456. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
  457. // #endif
  458. }
  459. .form-card {
  460. background: rgba(255, 255, 255, 0.95);
  461. border-radius: 24rpx;
  462. padding: 50rpx 40rpx;
  463. // #ifndef APP-HARMONY
  464. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
  465. // #endif
  466. margin-bottom: 100rpx;
  467. }
  468. .form-item {
  469. margin-bottom: 40rpx;
  470. }
  471. .label {
  472. font-size: 32rpx;
  473. color: #333333;
  474. font-weight: bold;
  475. margin-bottom: 20rpx;
  476. }
  477. .input-wrapper {
  478. position: relative;
  479. width: 100%;
  480. }
  481. .input {
  482. width: 100%;
  483. height: 90rpx;
  484. padding: 0 100rpx 0 30rpx;
  485. background-color: #f5f5f5;
  486. border-radius: 12rpx;
  487. font-size: 30rpx;
  488. color: #333333;
  489. border: 1rpx solid transparent;
  490. }
  491. .input:focus {
  492. border-color: #007aff;
  493. background-color: #ffffff;
  494. }
  495. .eye-icon {
  496. position: absolute;
  497. right: 30rpx;
  498. top: 50%;
  499. transform: translateY(-50%);
  500. width: 40rpx;
  501. height: 40rpx;
  502. }
  503. .remember-box {
  504. flex-direction: row;
  505. align-items: center;
  506. margin-bottom: 50rpx;
  507. }
  508. .checkbox {
  509. transform: scale(0.8);
  510. }
  511. .remember-text {
  512. font-size: 28rpx;
  513. color: #1677ff;
  514. margin-left: 12rpx;
  515. }
  516. .login-btn {
  517. width: 100%;
  518. height: 100rpx;
  519. line-height: 100rpx;
  520. background-color: #0081ff;
  521. border-radius: 50rpx;
  522. color: #ffffff;
  523. // #ifndef APP-HARMONY
  524. box-shadow: 0 8rpx 16rpx rgba(0, 122, 255, 0.3);
  525. // #endif
  526. }
  527. .login-btn-text {
  528. font-size: 36rpx;
  529. color: #ffffff !important;
  530. font-weight: bold;
  531. }
  532. .footer {
  533. position: fixed;
  534. bottom: 60rpx;
  535. left: 0;
  536. right: 0;
  537. align-items: center;
  538. z-index: 2;
  539. }
  540. .version {
  541. font-size: 28rpx;
  542. color: #333333;
  543. margin-bottom: 15rpx;
  544. }
  545. .company {
  546. font-size: 24rpx;
  547. color: #333333;
  548. }
  549. .picker-modal {
  550. position: fixed;
  551. top: 0;
  552. left: 0;
  553. right: 0;
  554. bottom: 0;
  555. z-index: 1000;
  556. }
  557. .modal-mask {
  558. position: absolute;
  559. top: 0;
  560. left: 0;
  561. right: 0;
  562. bottom: 0;
  563. background-color: rgba(0, 0, 0, 0.5);
  564. }
  565. .modal-content {
  566. position: absolute;
  567. bottom: 0;
  568. left: 0;
  569. right: 0;
  570. background-color: #ffffff;
  571. border-top-left-radius: 16rpx;
  572. border-top-right-radius: 16rpx;
  573. max-height: 1000rpx;
  574. }
  575. .modal-header {
  576. flex-direction: row;
  577. justify-content: space-between;
  578. align-items: center;
  579. padding: 30rpx;
  580. border-bottom: 1rpx solid #f0f0f0;
  581. }
  582. .modal-title {
  583. font-size: 32rpx;
  584. font-weight: bold;
  585. color: #333333;
  586. }
  587. .modal-close {
  588. font-size: 28rpx;
  589. color: #007aff;
  590. }
  591. .form-item-btn{
  592. flex: 1;
  593. align-items: center;
  594. margin-bottom: 10px;
  595. }
  596. .form-item-input{
  597. flex: 1;
  598. flex-direction: row;
  599. background-color: #ffffff;
  600. padding: 10px;
  601. }
  602. .btn-primary {
  603. z-index: 999;
  604. font-size: 15px;
  605. border-radius: 10rpx;
  606. width: 100px;
  607. padding: 5px;
  608. background-color: #165DFF;
  609. line-height: 45rpx;
  610. color: #ffffff;
  611. .btn-text{
  612. color: #ffffff;
  613. padding: 5px 15px;
  614. }
  615. }
  616. .label-picker{
  617. font-size: 32rpx;
  618. color: #333333;
  619. font-weight: bold;
  620. width: 180rpx;
  621. padding: 20rpx;
  622. }
  623. .input-picker {
  624. width: 70%;
  625. height: 90rpx;
  626. padding: 0 100rpx 0 30rpx;
  627. background-color: #f5f5f5;
  628. border-radius: 12rpx;
  629. font-size: 30rpx;
  630. color: #333333;
  631. border: 1rpx solid transparent;
  632. }
  633. .eye-icon-picker {
  634. position: absolute;
  635. right: 230rpx;
  636. top: 50%;
  637. transform: translateY(-50%);
  638. width: 40rpx;
  639. height: 40rpx;
  640. }
  641. .download-progress-mask {
  642. position: fixed;
  643. top: 0;
  644. left: 0;
  645. right: 0;
  646. bottom: 0;
  647. background-color: rgba(0, 0, 0, 0.5);
  648. z-index: 999;
  649. align-items: center;
  650. justify-content: center;
  651. }
  652. .download-progress-box {
  653. width: 500rpx;
  654. padding: 60rpx;
  655. background-color: #ffffff;
  656. border-radius: 24rpx;
  657. align-items: center;
  658. }
  659. .download-progress-title {
  660. font-size: 32rpx;
  661. color: #333333;
  662. margin-bottom: 30rpx;
  663. }
  664. .download-progress-bar {
  665. width: 100%;
  666. height: 16rpx;
  667. background-color: #f0f0f0;
  668. border-radius: 8rpx;
  669. overflow: hidden;
  670. margin-bottom: 20rpx;
  671. }
  672. .download-progress-fill {
  673. height: 100%;
  674. background-color: #0081ff;
  675. border-radius: 8rpx;
  676. transition: width 0.2s ease;
  677. }
  678. .download-progress-text {
  679. font-size: 28rpx;
  680. color: #666666;
  681. }
  682. </style>