12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034 |
- <template>
- <view class="login-wrapper" :style="colorStyle">
- <view class="login-top"></view>
- <view class="shading">
- <image :src="logoUrl" />
- <!-- <image src="../static/logo2.png" v-else /> -->
- </view>
- <view class="whiteBg" v-if="formItem === 1">
- <view class="tips">
- <view class="tips-btn" :class="current == 1 ? 'on' : ''" @click="current = 1">
- <view>快速登录</view>
- <view :class="current == 1 ? 'line' : 'none'"></view>
- </view>
- <view class="tips-btn" :class="current == 0 ? 'on' : ''" @click="current = 0">
- <view>账号登录</view>
- <view :class="current == 0 ? 'line' : 'none'"></view>
- </view>
- </view>
- <view class="list" v-if="current !== 1">
- <form @submit.prevent="submit">
- <view class="item">
- <view class="acea-row row-middle">
- <image src="../static/phone_1.png" class="itemImg-add"></image>
- <input type="text" placeholder="输入手机号码" v-model="account" maxlength="11" required />
- </view>
- </view>
- <view class="item">
- <view class="acea-row row-middle">
- <image src="../static/code_1.png" class="item-img"></image>
- <input type="password" placeholder="填写登录密码" v-model="password" required />
- </view>
- </view>
- </form>
- <navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
- 忘记密码?
- </navigator>
- </view>
- <view class="list" v-if="current !== 0 || appLoginStatus || appleLoginStatus">
- <view class="item">
- <view class="acea-row row-middle">
- <image src="../static/phone_1.png" class="itemImg-add"></image>
- <input type="text" placeholder="输入手机号码" v-model="account" maxlength="11" />
- </view>
- </view>
- <view class="item">
- <view class="acea-row row-middle">
- <image src="../static/code_2.png" class="item-img"></image>
- <input type="text" placeholder="填写验证码" maxlength="6" class="codeIput" v-model="captcha" />
- <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
- {{ text }}
- </button>
- </view>
- </view>
- <!-- <view class="item" v-if="isShowCode">
- <view class="acea-row row-middle">
- <image src="../static/code_2.png" class="item-img"></image>
- <input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
- <view class="code" @click="again"><img :src="codeUrl" /></view>
- </view>
- </view> -->
- </view>
- <view class="logon" @click="loginMobile" v-if="current !== 0">登录</view>
- <view class="logon" @click="submit" v-if="current === 0">登录</view>
- <!-- #ifdef APP-PLUS -->
- <!-- <view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
- <view class="hds">
- <span class="line"></span>
- <p>其他方式登录</p>
- <span class="line"></span>
- </view>
- <view class="btn-wrapper">
- <view class="btn wx" @click="wxLogin">
- <span class="iconfont icon-s-weixindenglu1"></span>
- </view>
- <view class="btn pingguo" @click="appleLogin" v-if="appleShow">
- <view class="iconfont icon-s-pingguo"></view>
- </view>
- </view>
- </view> -->
- <!-- #endif -->
- <view class="protocol">
- <checkbox-group @change='ChangeIsDefault'>
- <checkbox :class="inAnimation?'trembling':''" @animationend='inAnimation=false'
- :checked="protocol ? true : false" />已阅读并同意 <text class="main-color"
- @click="privacy('user')">《用户协议》</text>
- 与<text class="main-color" @click="privacy('privacy ')">《隐私协议》</text>
- </checkbox-group>
- </view>
- </view>
- <view class="bottom"></view>
- <Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
- ref="verify"></Verify>
- <view class="copyright" v-if="copyrightContext">{{copyrightContext}}</view>
- <template v-else>
- <view class="copyright">Copyright ©2022 浙江易博网络科技有限公司 版权所有 <br /><text @click="domainTap('www.miit.gov.cn')">浙ICP备 2021013190号</text> </view>
- <!-- <view class="copyright" @click="domainTap('www.miit.gov.cn')"> </view> -->
- </template>
- </view>
- </template>
- <script>
- import dayjs from "@/plugin/dayjs/dayjs.min.js";
- import sendVerifyCode from "@/mixins/SendVerifyCode";
- import {
- loginH5,
- loginMobile,
- registerVerify,
- register,
- getCodeApi,
- getUserInfo,
- appleLogin
- } from "@/api/user";
- import attrs, {
- required,
- alpha_num,
- chs_phone
- } from "@/utils/validate";
- import {
- validatorDefaultCatch
- } from "@/utils/dialog";
- import {
- getLogo
- } from "@/api/public";
- // import cookie from "@/utils/store/cookie";
- import {
- VUE_APP_API_URL
- } from "@/utils";
- // #ifdef APP-PLUS
- import {
- wechatAppAuth
- } from '@/api/api.js'
- // #endif
- const BACK_URL = "login_back_url";
- import colors from '@/mixins/color.js';
- import Verify from '@/components/verify/verify.vue';
- export default {
- name: "Login",
- components: {
- Verify
- },
- mixins: [sendVerifyCode, colors],
- data: function() {
- return {
- inAnimation: false,
- protocol: false,
- navList: ["快速登录", "账号登录"],
- current: 1,
- account: "",
- password: "",
- captcha: "",
- formItem: 1,
- type: "login",
- logoUrl: "",
- keyCode: "",
- codeUrl: "",
- codeVal: "",
- isShowCode: false,
- appLoginStatus: false, // 微信登录强制绑定手机号码状态
- appUserInfo: null, // 微信登录保存的用户信息
- appleLoginStatus: false, // 苹果登录强制绑定手机号码状态
- appleUserInfo: null,
- appleShow: false, // 苹果登录版本必须要求ios13以上的
- keyLock: true,
- copyrightContext:''
- };
- },
- watch: {
- formItem: function(nval, oVal) {
- if (nval == 1) {
- this.type = 'login'
- } else {
- this.type = 'register'
- }
- }
- },
- onLoad() {
- let self = this
- uni.getSystemInfo({
- success: (res) => {
- if (res.platform.toLowerCase() == 'ios' && this.getSystem(res.system)) {
- self.appleShow = true
- }
- }
- });
- },
- mounted: function() {
- // this.getCode();
- this.getLogoImage();
- },
- methods: {
- domainTap(){
- let url = 'https://www.miit.gov.cn/'
- // #ifdef H5
- window.location.href = 'https://www.miit.gov.cn/'
- // #endif
- // #ifdef APP-PLUS || MP
- plus.runtime.openURL(
- url,
- function(err) {
- console.log(err);
- }
- );
- // #endif
- },
- changeMsg() {
- this.inAnimation = true;
- },
- ChangeIsDefault(e) {
- this.$set(this, 'protocol', !this.protocol);
- },
- // IOS 版本号判断
- getSystem(system) {
- let str
- system.toLowerCase().indexOf('ios') === -1 ? str = system : str = system.split(' ')[1]
- if (str.indexOf('.'))
- return str.split('.')[0] >= 13
- return str >= 13
- },
- // 苹果登录
- appleLogin() {
- let self = this
- this.account = ''
- this.captcha = ''
- if (!self.protocol) {
- this.inAnimation = true
- return self.$util.Tips({
- title: '请先阅读并同意协议'
- });
- }
- uni.showLoading({
- title: '登录中'
- })
- uni.login({
- provider: 'apple',
- timeout: 10000,
- success(loginRes) {
- uni.getUserInfo({
- provider: 'apple',
- success: function(infoRes) {
- self.appleUserInfo = infoRes.userInfo
- self.appleLoginApi()
- },
- fail() {
- uni.showToast({
- title: '获取用户信息失败',
- icon: 'none',
- duration: 2000
- })
- },
- complete() {
- uni.hideLoading()
- }
- });
- },
- fail(error) {
- console.log(error)
- }
- })
- },
- // 苹果登录Api
- appleLoginApi() {
- let self = this
- appleLogin({
- openId: self.appleUserInfo.openId,
- email: self.appleUserInfo.email || '',
- phone: this.account,
- captcha: this.captcha
- }).then(({
- data
- }) => {
- if (data.isbind) {
- uni.showModal({
- title: '提示',
- content: '请绑定手机号后,继续操作',
- showCancel: false,
- success: function(res) {
- if (res.confirm) {
- self.current = 1
- self.appleLoginStatus = true
- }
- }
- });
- } else {
- self.$store.commit("LOGIN", {
- 'token': data.token,
- 'time': data.expires_time - self.$Cache.time()
- });
- let backUrl = self.$Cache.get(BACK_URL) || "/pages/index/index";
- self.$Cache.clear(BACK_URL);
- self.$store.commit("SETUID", data.userInfo.uid);
- self.$store.commit("UPDATE_USERINFO", data.userInfo);
- uni.reLaunch({
- url: backUrl
- });
- }
- }).catch(error => {
- uni.showModal({
- title: '提示',
- content: `错误信息${error}`,
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- })
- },
- // App微信登录
- wxLogin() {
- if (!this.protocol) {
- this.inAnimation = true
- return this.$util.Tips({
- title: '请先阅读并同意协议'
- });
- }
- let self = this
- this.account = ''
- this.captcha = ''
- uni.showLoading({
- title: '登录中'
- })
- uni.login({
- provider: 'weixin',
- success: function(loginRes) {
- // 获取用户信息
- uni.getUserInfo({
- provider: 'weixin',
- success: function(infoRes) {
- self.appUserInfo = infoRes.userInfo
- self.wxLoginApi()
- },
- fail() {
- uni.showToast({
- title: '获取用户信息失败',
- icon: 'none',
- duration: 2000
- })
- },
- complete() {
- uni.hideLoading()
- }
- });
- },
- fail() {
- uni.showToast({
- title: '登录失败',
- icon: 'none',
- duration: 2000
- })
- }
- });
- },
- wxLoginApi() {
- let self = this
- wechatAppAuth({
- userInfo: self.appUserInfo,
- phone: this.account,
- code: this.captcha
- }).then(({
- data
- }) => {
- if (data.isbind) {
- uni.showModal({
- title: '提示',
- content: '请绑定手机号后,继续操作',
- showCancel: false,
- success: function(res) {
- if (res.confirm) {
- self.current = 1
- self.appLoginStatus = true
- }
- }
- });
- } else {
- self.$store.commit("LOGIN", {
- 'token': data.token,
- 'time': data.expires_time - self.$Cache.time()
- });
- let backUrl = self.$Cache.get(BACK_URL) || "/pages/index/index";
- self.$Cache.clear(BACK_URL);
- self.$store.commit("SETUID", data.userInfo.uid);
- self.$store.commit("UPDATE_USERINFO", data.userInfo);
- uni.reLaunch({
- url: backUrl
- });
- }
- }).catch(error => {
- uni.showModal({
- title: '提示',
- content: `错误信息${error}`,
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- })
- },
- again() {
- this.codeUrl =
- VUE_APP_API_URL +
- "/sms_captcha?" +
- "key=" +
- this.keyCode +
- Date.parse(new Date());
- },
- success(data) {
- this.$refs.verify.hide()
- getCodeApi()
- .then(res => {
- this.keyCode = res.data.key;
- this.getCode(data);
- })
- .catch(res => {
- this.$util.Tips({
- title: res
- });
- });
- },
- code() {
- let that = this
- if (!that.protocol) {
- this.inAnimation = true
- return that.$util.Tips({
- title: '请先阅读并同意协议'
- });
- }
- if (!that.account) return that.$util.Tips({
- title: '请填写手机号码'
- });
- if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
- title: '请输入正确的手机号码'
- });
- // getCodeApi()
- // .then(res => {
- // that.keyCode = res.data.key;
- // that.getCode();
- // })
- // .catch(res => {
- // that.$util.Tips({
- // title: res
- // });
- // });
- this.$refs.verify.show()
- },
- async getLogoImage() {
- let that = this;
- getLogo(2).then(res => {
- that.logoUrl = res.data.logo_url;
- that.copyrightContext = res.data.copyrightContext;
- });
- },
- async loginMobile() {
- let that = this;
- if (!that.protocol) {
- this.inAnimation = true
- return that.$util.Tips({
- title: '请先阅读并同意协议'
- });
- }
- if (!that.account) return that.$util.Tips({
- title: '请填写手机号码'
- });
- if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
- title: '请输入正确的手机号码'
- });
- if (!that.captcha) return that.$util.Tips({
- title: '请填写验证码'
- });
- if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
- title: '请输入正确的验证码'
- });
- if (that.appLoginStatus) {
- that.wxLoginApi()
- } else if (that.appleLoginStatus) {
- that.appleLoginApi()
- } else {
- if (this.keyLock) {
- this.keyLock = !this.keyLock
- } else {
- return that.$util.Tips({
- title: '请勿重复点击'
- });
- }
- loginMobile({
- phone: that.account,
- captcha: that.captcha,
- spread: that.$Cache.get("spread")
- })
- .then(res => {
- let data = res.data;
- that.$store.commit("LOGIN", {
- 'token': data.token,
- 'time': data.expires_time - this.$Cache.time()
- });
- let backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
- that.$Cache.clear(BACK_URL);
- getUserInfo().then(res => {
- this.keyLock = true
- that.$store.commit("SETUID", res.data.uid);
- that.$store.commit("UPDATE_USERINFO", res.data);
- if (backUrl.indexOf('/pages/users/login/index') !== -1) {
- backUrl = '/pages/index/index';
- }
- uni.reLaunch({
- url: backUrl
- });
- })
- })
- .catch(res => {
- this.keyLock = true
- that.$util.Tips({
- title: res
- });
- });
- }
- },
- async register() {
- let that = this;
- if (!that.account) return that.$util.Tips({
- title: '请填写手机号码'
- });
- if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
- title: '请输入正确的手机号码'
- });
- if (!that.captcha) return that.$util.Tips({
- title: '请填写验证码'
- });
- if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
- title: '请输入正确的验证码'
- });
- if (!that.password) return that.$util.Tips({
- title: '请填写密码'
- });
- if (/^([0-9]|[a-z]|[A-Z]){0,6}$/i.test(that.password)) return that.$util.Tips({
- title: '您输入的密码过于简单'
- });
- register({
- account: that.account,
- captcha: that.captcha,
- password: that.password,
- spread: that.$Cache.get("spread")
- })
- .then(res => {
- that.$util.Tips({
- title: res
- });
- that.formItem = 1;
- })
- .catch(res => {
- that.$util.Tips({
- title: res
- });
- });
- },
- async getCode(data){
- console.log('data-------',data);
- let that = this;
- if (!that.account) return that.$util.Tips({
- title: '请填写手机号码'
- });
- if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
- title: '请输入正确的手机号码'
- });
- if (that.formItem == 2) that.type = "register";
- await registerVerify({
- phone: that.account,
- type: that.type,
- key: that.keyCode,
- captchaType: 'blockPuzzle',
- captchaVerification: data.captchaVerification
- })
- .then(res => {
- that.$util.Tips({
- title: res.msg
- });
- that.sendCode();
- })
- .catch(res => {
- that.$util.Tips({
- title: res
- });
- });
- },
- navTap: function(index) {
- this.current = index;
- },
- async submit() {
- let that = this;
- if (!that.protocol) {
- this.inAnimation = true
- return that.$util.Tips({
- title: '请先阅读并同意协议'
- });
- }
- if (!that.account) return that.$util.Tips({
- title: '请填写账号'
- });
- if (!/^[\w\d]{5,16}$/i.test(that.account)) return that.$util.Tips({
- title: '请输入正确的账号'
- });
- if (!that.password) return that.$util.Tips({
- title: '请填写密码'
- });
- if (this.keyLock) {
- this.keyLock = !this.keyLock
- } else {
- return that.$util.Tips({
- title: '请勿重复点击'
- });
- }
- loginH5({
- account: that.account,
- password: that.password,
- spread: that.$Cache.get("spread")
- })
- .then(({
- data
- }) => {
- that.$store.commit("LOGIN", {
- 'token': data.token,
- 'time': data.expires_time - this.$Cache.time()
- });
- let backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
- that.$Cache.clear(BACK_URL);
- getUserInfo().then(res => {
- this.keyLock = true
- that.$store.commit("SETUID", res.data.uid);
- that.$store.commit("UPDATE_USERINFO", res.data);
- uni.reLaunch({
- url: backUrl
- });
- }).catch(error => {
- this.keyLock = true
- })
- })
- .catch(e => {
- this.keyLock = true
- that.$util.Tips({
- title: e
- });
- });
- },
- privacy(type) {
- uni.navigateTo({
- url: "/pages/users/privacy/index?type=" + type
- })
- }
- }
- };
- </script>
- <style lang="scss">
- .copyright{
- width: 650rpx;
- position: fixed;
- bottom: 30rpx;
- left:50%;
- margin-left: -325rpx;
- font-size: 20rpx;
- color: #999999;
- text-align: center;
- .domain{
- color: #478BF1;
- margin-left: 6rpx;
- }
- }
- .itemImg-add {
- width: 24rpx;
- height: 34rpx;
- }
- .item-img {
- width: 28rpx;
- height: 32rpx;
- }
- /deep/uni-checkbox .uni-checkbox-input{
- margin-top: -6rpx;
- }
- .appLogin {
- margin-top: 60rpx;
- .hds {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 24rpx;
- color: #B4B4B4;
- .line {
- width: 68rpx;
- height: 1rpx;
- background: #CCCCCC;
- }
- p {
- margin: 0 20rpx;
- }
- }
- .btn-wrapper {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 30rpx;
- .btn {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 68rpx;
- height: 68rpx;
- border-radius: 50%;
- }
- .apple-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 246rpx;
- height: 66rpx;
- margin-left: 30rpx;
- background: #EAEAEA;
- border-radius: 34rpx;
- font-size: 24rpx;
- .icon-s-pingguo {
- color: #333;
- margin-right: 10rpx;
- font-size: 34rpx;
- }
- }
- .iconfont {
- font-size: 40rpx;
- color: #fff;
- }
- .wx {
- background-color: #61C64F;
- }
- .mima {
- background-color: #28B3E9;
- }
- .yanzheng {
- background-color: #F89C23;
- }
- .pingguo {
- margin-left: 60rpx;
- background-color: #000;
- }
- }
- }
- .main-color {
- color: var(--view-theme);
- }
- .code img {
- width: 100%;
- height: 100%;
- }
- .acea-row.row-middle {
- input {
- margin-left: 20rpx;
- display: block;
- }
- }
- .login-wrapper {
- .login-top {
- height: 358rpx;
- background-color: var(--view-theme);
- background-image: url(../static/login.png);
- background-size: cover;
- background-repeat: no-repeat;
- image {
- width: 101%;
- height: 100%;
- }
- }
- .shading {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- margin-top: -230rpx;
- position: relative;
- image {
- width: 180rpx;
- height: 180rpx;
- top: 40rpx;
- }
- }
- .whiteBg {
- background-color: #fff;
- margin: -30rpx 56rpx 0rpx 56rpx;
- box-shadow: 0px 2px 14px 0px rgba(0, 0, 0, 0.08);
- border-radius: 8px;
- padding: 60rpx;
- .tips {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 50rpx;
- margin: 40rpx;
- color: #999;
- .tips-btn {
- margin: 0 31rpx 0 48rpx;
- color: #999999;
- font-weight: bold;
- font-size: 32rpx;
- /* Safari 与 Chrome */
- .line {
- width: 80rpx;
- height: 6rpx;
- background: linear-gradient(135deg, var(--view-minorColor) 0%, var(--view-theme) 100%);
- border-radius: 2px;
- margin: 10rpx auto 0 auto;
- animation: myfirst .3s;
- -webkit-animation: myfirst .3s;
- }
- .none {
- width: 80rpx;
- background: #fff;
- height: 6rpx;
- }
- }
- @keyframes myfirst {
- 0% {
- width: 0rpx;
- }
- 100% {
- width: 80rpx;
- }
- }
- @-webkit-keyframes myfirst
- /* Safari 与 Chrome */
- {
- 0% {
- width: 0rpx;
- }
- 100% {
- width: 80rpx;
- }
- }
- .tips-btn.on {
- font-size: 36rpx;
- color: var(--view-theme);
- }
- }
- .list {
- border-radius: 16rpx;
- overflow: hidden;
- .forgetPwd {
- text-align: right;
- margin-top: 10rpx;
- color: #666666;
- font-size: 24rpx;
- }
- .item {
- border-bottom: 1px solid #F0F0F0;
- background: #fff;
- .row-middle {
- position: relative;
- padding: 16rpx 25rpx;
- input {
- flex: 1;
- font-size: 28rpx;
- height: 80rpx;
- }
- .code {
- position: absolute;
- right: 30rpx;
- top: 50%;
- color: var(--view-theme);
- font-size: 26rpx;
- transform: translateY(-50%);
- }
- }
- }
- }
- .logon {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 86rpx;
- margin-top: 48rpx;
- background: linear-gradient(135deg, var(--view-minorColor) 0%, var(--view-theme) 100%);
- border-radius: 120rpx;
- color: #FFFFFF;
- font-size: 30rpx;
- }
- }
- .protocol {
- margin-top: 40rpx;
- color: #999999;
- font-size: 24rpx;
- }
- .trembling {
- animation: shake 0.6s;
- }
- @keyframes shake {
- 0%,
- 100% {
- -webkit-transform: translateX(0);
- }
- 10%,
- 30%,
- 50%,
- 70%,
- 90% {
- -webkit-transform: translateX(-5rpx);
- }
- 20%,
- 40%,
- 60%,
- 80% {
- -webkit-transform: translateX(5rpx);
- }
- }
- @-o-keyframes shake {
- /* Opera */
- 0%,
- 100% {
- -webkit-transform: translateX(0);
- }
- 10%,
- 30%,
- 50%,
- 70%,
- 90% {
- -webkit-transform: translateX(-5rpx);
- }
- 20%,
- 40%,
- 60%,
- 80% {
- -webkit-transform: translateX(5rpx);
- }
- }
- @-webkit-keyframes shake {
- /* Safari 和 Chrome */
- 0%,
- 100% {
- -webkit-transform: translateX(0);
- }
- 10%,
- 30%,
- 50%,
- 70%,
- 90% {
- -webkit-transform: translateX(-5rpx);
- }
- 20%,
- 40%,
- 60%,
- 80% {
- -webkit-transform: translateX(5rpx);
- }
- }
- @-moz-keyframes shake {
- /* Firefox */
- 0%,
- 100% {
- -moz-transform: translateX(0);
- }
- 10%,
- 30%,
- 50%,
- 70%,
- 90% {
- -moz-transform: translateX(-5rpx);
- }
- 20%,
- 40%,
- 60%,
- 80% {
- -moz-transform: translateX(5rpx);
- }
- }
- }
- </style>
|