index.vue 22 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723
<template>
  <view class="login-container">
    <!-- #ifdef APP-PLUS -->
    <!-- <view class="platform-switch" @tap="()=>changeSwitchShow('open')">
      <uv-text :text="t('app.login.platformSwitch')" color="#202328" size="28rpx"></uv-text>
      <uv-icon name="arrow-down-fill" color="#202328" size="16rpx" style="margin-left: 6rpx;"></uv-icon>
    </view>
    <view class="mark" v-if="platformSwitchShow">
      <view class="switch-block">
        <uv-icon name="close" class="c-icon" color="#202328" size="36rpx"
          @tap="()=>changeSwitchShow('close')"></uv-icon>
        <view class="s-inner">
          <view class="s-title">{{ t('app.login.platformSwitch') }}</view>
          <view class="s-desc">{{ t('app.login.platformSwitchTips') }}</view>
          <view class="plat-item flex" style="margin: 30rpx 0 36rpx;" :class="{'is-check':platType === 'saas'}"
            @tap="()=>handleChangeIP('saas')">
            <image src="/static/common/saas.png" class="p-img" mode="widthFix"></image>
            <text class="p-i-text">{{ t('app.login.saasPlatform') }}</text>
          </view>
          <view class="plat-item" :class="{'is-check':platType === 'private'}" @tap="()=>handleChangeIP('private')">
            <view class="flex">
              <image src="/static/common/private.png" class="p-img" mode="widthFix"></image>
              <text class="p-i-text">{{ t('app.login.privatePlatform') }}</text>
            </view>
            <view style="margin-top: 16rpx;" v-if="platType === 'private'">
              <uv-input v-model="privateIp" :placeholder="t('app.login.privatePlatformInputTips')"
                custom-style="height: 60rpx;background: #F2F3F6;border-radius: 8rpx;border:none;" />
            </view>
          </view>
          <view class="confirm-btn" @tap="handleChangePlat">{{ t('button.confirm') }}</view>
        </view>

      </view>
    </view> -->
    <!-- #endif -->
    <StatusBarVue />
    <view class="page-title-part">
      <!-- <image :src="loginLogo" style="width: 170rpx;height: 46rpx;margin-right: 18rpx;" mode=""></image> -->
      <view class="page-title">{{ t('app.login.welcome') }}</view>
    </view>
    <uv-form labelPosition="left" :model="formModel" :rules="rules" ref="formRef" labelWidth="0" :borderBottom="false">
      <!-- #ifdef APP-PLUS -->
      <!--      <uv-form-item label="">
        <uv-input class="login-input" v-model="serverIP" placeholder="请输入中心地址" border="none"
          customStyle="background-color: #F6F7F9;height: 96rpx;padding-left: 30rpx;"
          placeholderStyle="color: #6D778F;font-size: 28rpx">
        </uv-input>
      </uv-form-item> -->
      <!-- #endif -->
      <uv-form-item label="" prop="loginName">
        <!-- #ifdef MP-WEIXIN -->
        <uv-input class="login-input" v-model="formModel.loginName" :placeholder="t('rules.loginName')" border="none"
          customStyle="background-color: #F6F7F9;height: 96rpx;padding-left: 30rpx;flex: 0 1 auto"
          placeholderStyle="color: #6D778F;font-size: 28rpx">
        </uv-input>
        <!-- #endif -->
        <!-- #ifndef MP-WEIXIN -->
        <uv-input class="login-input" v-model="formModel.loginName" :placeholder="t('rules.loginName')" border="none"
          customStyle="background-color: #F6F7F9;height: 96rpx;padding-left: 30rpx;"
          placeholderStyle="color: #6D778F;font-size: 28rpx">
        </uv-input>
        <!-- #endif -->

        <!-- customStyle="background-color: #F6F7F9;height: 96rpx;padding-left: 30rpx" -->
      </uv-form-item>
      <uv-form-item label="" prop="password">
        <!-- #ifdef MP-WEIXIN -->
        <uv-input class="login-input" v-model="formModel.password" :password="isPasswordType"
          :placeholder="t('rules.password')" border="none"
          customStyle="background-color: #F6F7F9;height: 96rpx;padding-left: 30rpx;flex: 0 1 auto"
          placeholderStyle="color: #6D778F;font-size: 28rpx">
        <!-- #endif -->
          <!-- #ifndef MP-WEIXIN -->
          <uv-input class="login-input" v-model="formModel.password" :password="isPasswordType"
            :placeholder="t('rules.password')" border="none"
            customStyle="background-color: #F6F7F9;height: 96rpx;padding-left: 30rpx;"
            placeholderStyle="color: #6D778F;font-size: 28rpx">
          <!-- #endif -->
            <template v-slot:suffix>
              <view @click="togglePassword" style="margin-right: 34rpx;">
                <uv-icon v-if="!isPasswordType" name="eye" size="40rpx"></uv-icon>
                <uv-icon v-else name="eye-off-outline" size="40rpx"></uv-icon>
              </view>
            </template>
          </uv-input>
      </uv-form-item>

      <!-- 忘记密码 -->
      <view class="forget-password">
        <!-- <view v-if="!isLoginSuccess" class="login-info-tips">用户名或密码有误,登录失败!</view> -->
        <view class="remember-password">
          <uv-checkbox-group v-model="rememberValue" shape="square">
            <uv-checkbox shape="circle" activeColor="#387CF5" size="15" labelSize="26rpx" labelColor="#90949D" name="remember"
              :label="t('login.rememberPw')"></uv-checkbox>
          </uv-checkbox-group>
        </view>
        <view class="forget-password-text" @click="handleForgetPwd">{{ t('login.forgotPassword') }}?</view>
      </view>

      <uv-button type="primary" :text="t('login')" @click="handleSubmit"></uv-button>
      <!-- <uv-button type="primary" text="确定" @tap="handleLogin"></uv-button> -->

      <!-- 同意协议 -->
      <view class="agreement-box">
        <!-- <uv-radio name="agreement" activeColor="green" label="已阅读"></uv-radio> -->
        <uv-checkbox-group v-model="agreementValue" size="15" placement="column" customStyle="max-width: 20px;">
          <uv-checkbox activeColor="#3277FB" name="agree" label="" shape="circle"></uv-checkbox>
        </uv-checkbox-group>
        <text @click="toggleAgree" style="color: #90949D;">{{ t('app.login.readedAndAgree') }}</text>
        <!-- <text style="color: #4277F7;" @click="openLink('user')">《vStore用户协议》</text>和 -->
        <text style="color: #4277F7" @click="openLink('privacy')">《{{t('app.login.privacyAgreement')}}》</text>
        <!-- <uv-link style="padding: 0px; margin: 0px; max-width: 108px;" fontSize="12" href="https://www.uvui.cn" text="《vStore用户协议》"></uv-link>
				<uv-text text="和" size="12" style="margin: 0px;padding: 0px;max-width: 12px;"></uv-text>
				<uv-link style="padding: 0px; margin: 0px" fontSize="12" href="https://www.uvui.cn" text="《vStore隐藏协议》"></uv-link> -->
      </view>
    </uv-form>

    <!-- 同意协议 -->
    <uv-popup ref="agreementPopupRef" mode="center" round="8" custom-style="width: 80%;">
      <view style="padding: 23px;">
        <view class="popup-title"
          style="font-size: 23px;color: #202328;text-align: center;font-weight: 600;margin-bottom: 20px;">
          {{ t('app.login.accountPasswordLogin') }}
        </view>
        <view class="popup-content">
          {{ t('app.login.readedAndAgree') }}
          <!-- <uv-link style="padding: 0px; margin: 0px;display: inline-block;" fontSize="14" href="https://www.uvui.cn" text="《用户协议》"></uv-link> -->
          <!-- <text style="color: #4277F7;" @click="openLink('user')">《用户协议》</text>和 -->
          <text style="color: #4277F7" @click="openLink('privacy')">《{{t('app.login.privacyAgreement')}}》</text>
          {{t('app.login.verifyTips')}}
        </view>
        <view class="button-group" style="margin-top: 20px;">
          <uv-button type="primary" :text="t('app.login.agreeAndLogin')" style="margin-bottom: 10px;"
            @click="handleAgree"></uv-button>
          <uv-button :plain="true" :hairline="true" :text="t('app.login.disagree')" customStyle="border: none;"
            @click="handleRefuse"></uv-button>
        </view>
      </view>
    </uv-popup>

    <!-- 用户名和密码错误 -->
    <uv-modal ref="loginErrorModalRef" :content="t('Message.userNameOrPWDError')"></uv-modal>

    <view class="i18n-switch" @tap="handleSwitchI18n">
      <image :src="currentLangImg" style="width: 40rpx;" mode="widthFix"></image>
      <text>{{ currentLangText }}</text>
      <uv-icon name="arrow-down-fill" size="12"></uv-icon>
    </view>

    <I18nPopVue ref="i18nRef" reload-page="/pages/login/index" />
  </view>
</template>

<script setup>
  import {
    computed,
    nextTick,
    ref,
    watch,
  } from 'vue';
  import {
    onLoad
  } from '@dcloudio/uni-app';
  import {
    w_md5
  } from "@/utils"
  import {
    doLoginApi,
    doLoginCheckNameApi,
    getUserAccountsApi,
    getMallByGroupAndLabelApi,
    bindClientIdApi
  } from '@/api';
  import loginLogo from '@/static/login/login_2x_logo.png'
  import ipFileHooks from './ipFileHooks';
  import StatusBarVue from '@/components/StatusBar.vue';
  import I18nPopVue from '@/components/I18nPop.vue';
  import {
    t
  } from '@/plugins/index.js'

  const i18nRef = ref()
  const handleSwitchI18n = () => {
    i18nRef.value?.handleOpenI18n()
  }
  const currentLangText = computed(() => {
    return i18nRef.value?.currentLangText || ''
  })
  const currentLangImg = computed(() => {
    return i18nRef.value?.currentLangImg || ''
  })

  const {
    serverIP,
    platType,
    initServerConfig,
    validateIP,
    writeConfigFile,
    checkConfigFile
  } = ipFileHooks()

  // #ifdef APP-PLUS
  onLoad(async () => {
    // 1、读取文件判断有没有serverConfig.json的文件
    // 2、如果没有,生成serverConfig.js文件将https://store.keliuyun.com放在文件中
    // 3、读取serverConfig.json文件,将ip放在input框中
    // 4、点击登录,将ip存储在serverConfig.js文件中
    await initServerConfig()
  })
  // #endif



  // 登录功能
  const formModel = ref({
    // loginName: 'midea1',
    // password: 'midea1@123',
    // loginName: '陈岩',
    // password: 'Qwertyui1.',
    loginName: '',
    password: '',
  })
  const rules = computed(() => {
    return {
      loginName: {
        type: 'string',
        required: true,
        message: t('rules.loginName'),
        trigger: ['blur']
      },
      password: {
        type: 'string',
        required: true,
        message: t('rules.password'),
        trigger: ['blur']
      },
    }

  })

  const loginErrorModalRef = ref(null)
  const isLoginSuccess = ref(true) // 默认值
  // const isLoginSuccess = ref(false)
  const rememberValue = ref(uni.getStorageSync('remember_name') ? ['remember'] : [])
  const agreementValue = ref([])
  const formRef = ref(null)
  const agreementPopupRef = ref(null)

  // 密码框
  const isPasswordType = ref(true)
  const togglePassword = () => {
    isPasswordType.value = !isPasswordType.value
  }

  const handleSubmit = async () => {
    /**
     * 1. 判断已阅读是否勾选,未勾选则弹窗提示
     * 2. 弹至登陆验证页面,滑动验证
     * 3. 调用接口,登录系统
     */
    await checkLoginInfo()
  }
  const checkLoginInfo = () => {
    // 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true
    formRef.value.validate().then(async (res) => {
      if (!agreementValue.value.includes('agree')) {
        // 展示弹窗
        if (agreementPopupRef.value) {
          agreementPopupRef.value.open();
        }
        return false
      }


      // 记住密码
      if (rememberValue.value.includes('remember')) {
        uni.setStorageSync('remember_name', formModel.value.loginName)
        uni.setStorageSync('remember_password', formModel.value.password)
      } else {
        uni.removeStorageSync('remember_name')
        uni.removeStorageSync('remember_password')
      }

      const name = formModel.value.loginName;
      const pwd = w_md5.hex_md5_32(formModel.value.password + 'AdunceA');

      nextTick(() => {
        doLogin({
          loginName: name,
          password: pwd
        })
      })
      // uni.navigateTo({
      // 	url: `/pages/login/sliderVerify?loginName=${name}&password=${pwd}`,
      // })
    }).catch(errors => {
      console.log(errors);
      uni.showToast({
        icon: 'error',
        title: t('app.login.verifyError')
      })
    })
  }

  onLoad((options) => {
    // 设置登录失败提示
    if (options.isLoginSuccess === '0') {
      isLoginSuccess.value = false
      nextTick(() => {
        // TODO: 登录失败,不应有message信息提示了
        // 需要测试功能
        loginErrorModalRef.value.open()
      })
    }

    /* setTimeout(() => {
    	agreementPopupRef.value.open();
    }) */
    // console.log(w_md5.hex_md5_32('111111'));
    const auth = uni.getStorageSync('Authorization')
    if (auth) {
      uni.switchTab({
        url: '/pages/home/index'
      })
    } else {
      const rememberName = uni.getStorageSync('remember_name')
      const rememberPassword = uni.getStorageSync('remember_password')
      // 记住密码
      if (rememberName && rememberPassword) {
        formModel.value.loginName = rememberName
        formModel.value.password = rememberPassword
      } else if (options.loginName) {
        // 需显用户名
        formModel.value.loginName = options.loginName
      }
      //  else {
      // 	formModel.value.loginName = ''
      // }
    }
  })


  // 用户协议
  const handleAgree = () => {
    agreementValue.value = ['agree']
    agreementPopupRef.value.close();

    // 调用登录表单
    checkLoginInfo()
  }
  const handleRefuse = () => {
    agreementValue.value = []
    agreementPopupRef.value.close();
  }
  const toggleAgree = () => {
    if (agreementValue.value.length > 0) {
      agreementValue.value = []
    } else {
      agreementValue.value = ['agree']
    }
  }
  const openLink = (type) => {
    uni.navigateTo({
      url: `/subPackages/accountGroup/pages/privacy/index`,
    })

    // let url = 'https://vionvision.com/Privacy.html'

    // if (process.env.VUE_APP_PLATFORM === 'h5') {
    // 	window.open(url);
    // } else if (process.env.VUE_APP_PLATFORM === 'app-plus') {
    // 	plus.runtime.openURL(url);
    // } else {
    // 	plus.runtime.openURL(url);
    // }
  }

  // 忘记密码
  const handleForgetPwd = () => {
    uni.navigateTo({
      url: `/subPackages/accountGroup/pages/login/forget/index?loginName=${formModel.value.loginName}`,
    })
  }

  // 登录业务代码
  const doLogin = async (loginParams) => {
    try {
      uni.showLoading({
        mask: true,
        title: t('navData.load')
      })
      console.log('dologin');
      const {
        code,
        data
      } = await doLoginApi(loginParams)
      if (code === 200) {
        uni.hideLoading()
      }
      const {
        atoken,
        user
      } = data
      uni.setStorageSync('Authorization', atoken)
      uni.setStorageSync('user', JSON.stringify(user))

      const {
        data: accountList
      } = await getUserAccountsApi({
        status: 1
      })

      if (accountList.length > 0) {
        // 设置默认集团
        uni.setStorageSync('account', JSON.stringify(accountList[0]))
        uni.setStorageSync('account_num', `${accountList.length}`)
        initStoreStorageData(accountList[0])
      }
      // #ifdef APP-PLUS
      const clientInfo = uni.getDeviceInfo()
      await bindClientIdApi({
        clientId: uni.getStorageSync('clientId'),
        clientType: clientInfo.osName, // ios or android
        deviceInfo: JSON.stringify(clientInfo), // 备用传值
        language: uni.getStorageSync('lang') || '',
        status: 1 // 是否有效 1:有效  0: 无效
      })
      // #endif
      uni.switchTab({
        url: '/pages/home/index'
      })
    } catch (e) {
      console.log(e);
    } finally {
      uni.hideLoading()
    }
  }
  // 设置报表页面默认门店
  async function initStoreStorageData(account) {
    try {
      const {
        data: storeData
      } = await getMallByGroupAndLabelApi({
        accountId: account.id,
        groupId: -1
      })
      if (storeData.length > 0) {
        uni.setStorageSync('store', JSON.stringify(storeData?.[0]))
      }

    } catch (e) {
      console.log(e)
    }
  }
  // #ifdef APP-PLUS
  const platformSwitchShow = ref(false)
  // 判断是否进行了平台切换
  const originFlag = ref('')
  const changeFlag = ref('')
  const changeSwitchShow = async (type) => {
    if (type === 'open') {
      const fileExists = await checkConfigFile()
      console.log(fileExists)
    }

    if (!platformSwitchShow.value) {
      platType.value = uni.getStorageSync('platType')
      privateIp.value = platType.value === 'saas' ? '' : serverIP.value
    }
    platformSwitchShow.value = !platformSwitchShow.value

    if (type === 'open') {
      originFlag.value = platType.value
      changeFlag.value = platType.value
    }
  }

  const handleChangeIP = (type) => {
    platType.value = type
  }
  const privateIp = ref('')
  const handleChangePlat = async () => {
    try {
      if (platType.value === 'saas') {
        await writeConfigFile('https://store.keliuyun.com', 'saas', () => changeSwitchShow())
        uni.showToast({
          icon: 'none',
          title: t('app.login.usePlatformTips').replace('{value}', t('app.login.saasPlatform')) // '使用Saas云平台地址'
        })
      } else {
        if (!validateIP(privateIp.value)) {
          uni.showToast({
            icon: 'none',
            title: t('app.login.privatePlatformIpErrorTips') // '私有部署地址错误,请检查后重试'
          })
          return false
        } else {
          serverIP.value = privateIp.value
          await writeConfigFile(privateIp.value, platType.value, () => changeSwitchShow())
          uni.showToast({
            icon: 'none',
            title: t('app.login.usePlatformTips').replace('{value}', t('app.login.privatePlatform'))
          })
        }
      }
      changeFlag.value = platType.value
      if (changeFlag.value !== originFlag.value) {
        formModel.value = {
          loginName: '',
          password: '',
        }
        rememberValue.value = []
        uni.removeStorageSync('remember_name')
        uni.removeStorageSync('remember_password')

      }
    } catch (e) {
      console.log(e);
    } finally {
      console.log(1);
    }
  }
  // #endif
</script>

<style lang="scss" scoped>
  .login-container {
    padding: 200rpx 50rpx 20rpx 50rpx;
    background-color: #FFF;
    background-image: url('@/static/login/login-bg-2x.png');
    /* #ifdef MP-WEIXIN */
    // background-image: url('https://store.keliuyun.com/download/app/wechat/login/login-bg-2x.png');
    /* #endif */
    /* #ifndef MP-WEIXIN */
    // background-image: url('/static/login/login-bg-2x.png');
    /* #endif */
    background-repeat: no-repeat;
    background-size: contain;
    position: relative;
  }

  .mark {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    justify-content: center;

    .switch-block {
      background-color: #fff;
      overflow: hidden;
      width: 700rpx;
      height: fit-content;
      margin-top: 45%;
      padding: 44rpx 40rpx;
      border-radius: 20rpx;
      position: relative;

      .c-icon {
        position: absolute;
        right: 26rpx;
        top: 26rpx;
      }

      // &::before {
      //   display: block;
      //   position: absolute;
      //   top: 0;
      //   left: 0;
      //   content: '';
      //   width: 100%;
      //   height: 138rpx;
      //   z-index: 90;
      //   background: linear-gradient(180deg, #DAE9FF 0%, rgba(254, 254, 255, 0) 100%);
      // }

      .s-title {
        font-weight: 600;
        font-size: 36rpx;
        color: #202328;
        line-height: 50rpx;
        margin-bottom: 12rpx;
      }

      .s-desc {
        font-weight: 400;
        font-size: 24rpx;
        color: #90949D;
        line-height: 34rpx;
      }

      .plat-item {
        padding: 14rpx 20rpx;
        margin-bottom: 36rpx;
        width: 100%;
        border-radius: 12rpx;
        border: 2rpx solid #E1E4EA;

        .p-img {
          width: 68rpx;
          height: 68rpx;
        }

        .p-i-text {
          padding-left: 20rpx;
          font-weight: 400;
          font-size: 28rpx;
          color: #202328;
        }
      }

      .flex {
        display: flex;
        flex-direction: row;
        align-items: center;
      }

      .confirm-btn {
        width: 100%;
        height: 80rpx;
        line-height: 80rpx;
        text-align: center;
        font-size: 26rpx;
        background: linear-gradient(90deg, #719FF2 0%, #387CF5 100%);
        border-radius: 12rpx;
      }

      .is-check {
        border-color: #5088ff;
        position: relative;

        &::after {
          display: block;
          content: '';
          position: absolute;
          right: 0;
          top: 0;
          width: 48rpx;
          height: 48rpx;
          background: url('/static/common/platform-checked.png') no-repeat;
          background-size: 100% 100%;
        }
      }
    }
  }

  .platform-switch {
    position: absolute;
    right: 26rpx;
    top: calc(var(--status-bar-height) + 36rpx);
    display: flex;
    flex-direction: row;
  }

  .forget-password {
    display: flex;
    align-items: center;
    font-size: 26rpx;
    color: #202328;
    margin-bottom: 60rpx;

    display: flex;
    justify-content: space-between;

    .login-info-tips {
      color: #FF3000;
    }
  }

  .forget-password-text {
    text-align: right;
    color: #90949D;
  }

  .page-title-part {
    position: relative;
    margin-bottom: 60rpx;
    display: flex;
    align-items: center;
  }

  .page-title {
    font-size: 46rpx;
    font-weight: bold;
    // font-family: PingFang_Bold;
    color: #202328;
  }

  .page-underline {
    position: absolute;
    bottom: -2px;
    height: 16rpx;
    width: 120rpx;
    border-radius: 8rpx 4rpx 8rpx 4rpx;
    /* background-color: black; */
    background-image: linear-gradient(90deg, #387CF5, #CDDFFF);
  }

  .agreement-box {
    display: flex;
    flex-direction: row;
    justify-content: center;
    font-size: 26rpx;
    align-items: center;
    margin-top: 32rpx;
    margin-bottom: 28rpx;
  }

  .i18n-switch {
    position: fixed;
    bottom: 80rpx;
    left: 0;
    width: 750rpx;
    display: flex;
    justify-content: center;
    gap: 10rpx;
    align-items: center;
  }
</style>