123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <template>
- <div class="simple-login">
- <van-overlay :show="show" @click="show = false">
- <div class="wrapper flex justify-center items-center" @click.stop>
- <div class="block flex items-center flex-col py-6">
- <div class="close" @click="onClose"></div>
- <div class="title pb-6">登录</div>
- <div class="forlogoutm">
- <div class="form-item mb-4">
- <input type="text" placeholder="手机号" />
- </div>
- <div class="form-item mb-4 code">
- <input type="text" placeholder="验证码" class="code" />
- <span class="send">获取验证码</span>
- </div>
- <div class="submit" @click="onSubmit">登录</div>
- </div>
- </div>
- </div>
- </van-overlay>
- </div>
- </template>
- <script>
- export default {
- name: 'simple-login',
- data() {
- return {
- show: false,
- }
- },
- methods: {
- onSubmit() {},
- onClose() {
- this.show = false
- },
- },
- }
- </script>
- <style scoped lang="scss">
- @media screen and (min-width: 768px) {
- .wrapper {
- height: 100vh;
- .block {
- position: relative;
- width: 400px;
- background: #fff;
- .close {
- position: absolute;
- right: 16px;
- top: 16px;
- width: 24px;
- height: 24px;
- background: url(https://static.caimei365.com/www/authentic/h5/icon-close.png)
- center no-repeat;
- background-size: 24px 24px;
- cursor: pointer;
- }
- .title {
- font-size: 24px;
- color: #101010;
- }
- .form-item {
- position: relative;
- width: 326px;
- input {
- width: 326px;
- display: block;
- padding: 14px 16px;
- font-size: 14px;
- border: 1px solid #d8d8d8;
- box-sizing: border-box;
- &.code {
- width: 225px;
- }
- }
- .send {
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- font-size: 16px;
- color: #bc1724;
- cursor: pointer;
- }
- }
- .submit {
- width: 326px;
- height: 46px;
- background: #bc1724;
- font-size: 16px;
- color: #fff;
- text-align: center;
- line-height: 46px;
- transition: all 0.4s;
- cursor: pointer;
- &:hover {
- background-color: #960915;
- }
- }
- }
- }
- }
- @media screen and (max-width: 768px) {
- .wrapper {
- height: 100vh;
- .block {
- position: relative;
- width: 76vw;
- background: #fff;
- .close {
- position: absolute;
- right: 2.4vw;
- top: 2.4vw;
- width: 5.6vw;
- height: 5.6vw;
- background: url(https://static.caimei365.com/www/authentic/h5/icon-close.png)
- center no-repeat;
- background-size: 4.8vw 4.8vw;
- cursor: pointer;
- }
- .title {
- font-size: 4.8vw;
- color: #101010;
- }
- .form-item {
- position: relative;
- width: 62vw;
- input {
- width: 62vw;
- display: block;
- padding: 1.8vw 2.4vw;
- font-size: 14px;
- border: 0.1vw solid #d8d8d8;
- box-sizing: border-box;
- &.code {
- width: 42.8vw;
- }
- }
- .send {
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- font-size: 3.2vw;
- color: #bc1724;
- cursor: pointer;
- }
- }
- .submit {
- width: 62vw;
- height: 8.8vw;
- background: #bc1724;
- font-size: 3.2vw;
- color: #fff;
- text-align: center;
- line-height: 8.8vw;
- transition: all 0.4s;
- &:hover {
- background-color: #b60c1a;
- }
- }
- }
- }
- }
- </style>
|