index.uvue 20 KB

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