123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- <template>
- <view>
- <!-- 头部 -->
- <headContent>
- <template #left>
- <view class="head-revers-back iconfont" @click.stop="reversBackBtn()"></view>
- </template>
- <template #content>
- <view class="haed-title">安全验证</view>
- </template>
- </headContent>
- <view class="page-content">
- <text class="login-title">谷歌验证</text>
- <text class="login-content">谷歌验证具有时效性,请于限时前输入</text>
- <view class="form-item">
- <input class="form-input" v-model="code" placeholder-class="form-input-place" :placeholder="`请输入验证码`" />
- </view>
- <view :class="['form-btn' , code ? '' : 'invalid-form-btn']" style="margin-top: 28rpx;"
- @click.stop="formSubmit">
- 确定
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- reverseBack
- } from "@/utils/common.js"
- import {
- Api_checkGoogle
- } from "@/api/index.js"
- export default {
- name: 'google-verification',
- data() {
- return {
- code: '',
- };
- },
- onLoad(opt) {
- },
- methods: {
- reversBackBtn() {
- reverseBack()
- },
- formSubmit() {
- uni.showLoading({
- title: '',
- mask: true
- });
- Api_checkGoogle({
- code: this.code
- }).then(res => {
- setTimeout(() => {
- uni.showToast({
- title: `验证成功`,
- icon: "none"
- })
- setTimeout(() => {
- uni.reLaunch({
- url: '/pages/content/mine'
- });
- }, 1000)
- }, 300)
- }).catch(err =>{}).finally(() => {
- setTimeout(() => {
- uni.hideLoading()
- }, 200)
- })
- // Api_checkGoogle().then(res => {
- // setTimeout(() => {
- // uni.showToast({
- // title: `验证成功`,
- // icon: "none"
- // })
- // setTimeout(() => {
- // uni.reLaunch({
- // url: '/pages/content/mine'
- // });
- // }, 1000)
- // }, 300)
- // }).catch(err => {
- // }).failly(() => {
- // setTimeout(() => {
- // uni.hideLoading()
- // }, 200)
- // })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .head-revers-back {
- font-size: 52rpx;
- color: #000;
- }
- .page-content {
- width: 100%;
- padding: 30rpx 60rpx 0;
- .login-title {
- display: block;
- font-size: 68rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #333333;
- line-height: 1.2;
- letter-spacing: 0.96rpx;
- }
- .login-content {
- display: block;
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #808080;
- line-height: 1.2;
- letter-spacing: 0.56rpx;
- padding: 20rpx 0 40rpx;
- }
- }
- .tab-box {
- padding-bottom: 44rpx;
- }
- .tab {
- width: 100%;
- display: flex;
- align-items: center;
- padding-top: 46rpx;
- .tab-item {
- font-size: 30rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #1a1a1a;
- line-height: 38rpx;
- letter-spacing: 0.6rpx;
- +.tab-item {
- margin-left: 50rpx;
- }
- }
- .active-tab-item {
- color: $Theme-Color;
- position: relative;
- &::before {
- position: absolute;
- left: 0;
- bottom: -11rpx;
- content: '';
- width: 100%;
- height: 6rpx;
- border-radius: 2rpx;
- background-color: $Theme-Color;
- }
- }
- }
- .form-lable-icon {
- margin-left: 4px;
- font-size: 18rpx;
- }
- .login-form {
- width: 100%;
- .form-item {
- width: 100%;
- height: 90rpx;
- padding: 0 20rpx;
- display: flex;
- align-items: center;
- background-color: $box-bg;
- border-radius: 6rpx;
- margin-top: 20rpx;
- &:first-child {
- margin-top: 0;
- }
- .form-lable {
- width: 140rpx;
- height: 100%;
- font-size: 24rpx;
- flex-wrap: 700;
- display: flex;
- align-items: center;
- }
- .form-input {
- flex: 1;
- height: 100%;
- font-size: 28rpx;
- }
- .form-input-place {
- font-size: 28rpx;
- color: #938989;
- }
- }
- }
- .form-agreement {
- width: 100%;
- display: flex;
- align-items: center;
- font-size: 26rpx;
- color: #938989;
- padding: 26rpx 0;
- .agreement-confirm {
- width: 30rpx;
- height: 30rpx;
- background-color: $box-bg;
- margin-right: 10rpx;
- border-radius: 6rpx;
- .confirm-icon {
- width: 100%;
- height: 100%;
- background-color: $Theme-Color;
- color: #fff;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 24rpx;
- }
- }
- .agreement-name {
- color: $Theme-Color;
- }
- }
- .form-btn {
- width: 100%;
- height: 90rpx;
- background-color: $Theme-Color;
- border-radius: 8rpx;
- text-align: center;
- line-height: 90rpx;
- color: #fff;
- font-size: 32rpx;
- font-weight: bold;
- }
- .invalid-form-btn {
- background-color: #e3e0e0;
- }
- .form-hint {
- width: 100%;
- padding: 46rpx 0 0;
- font-size: 24rpx;
- line-height: 1.2;
- color: #c1c1c1;
- display: flex;
- justify-content: center;
- align-items: stretch;
- .hint-btn {
- color: $Theme-Color;
- }
- .form-hint-link {
- margin: 0 10px;
- width: 1rpx;
- background-color: #cfcfcf;
- }
- }
- .code-box {
- width: 100%;
- margin-top: 50rpx;
- .code-hint {
- margin-top: 50rpx;
- font-size: 28rpx;
- display: inline-block;
- color: #666;
- }
- }
- .login-title {
- font-size: 34rpx !important;
- }
- .login-content {
- padding-bottom: 0 !important;
- }
- .form-lable {
- min-width: 100rpx;
- text-align: center;
- padding: 0 20rpx;
- flex-shrink: 0;
- }
- .form-item {
- width: 100%;
- min-height: 100rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid $border-color4;
- .form-input {
- flex: 1;
- font-size: 26rpx;
- }
- .form-input-place {
- font-size: 26rpx;
- font-weight: 800;
- }
- .form-code {
- flex-shrink: 0;
- padding-left: 10rpx;
- font-size: 26rpx;
- color: $Theme-Color;
- }
- }
- .form-btn {
- margin-top: 80rpx !important;
- }
- </style>
|