12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <view class="content">
- <view class="title-text">
- 欢迎登录!
- </view>
- <view class="title-icon">
- </view>
- <loginPassword :themeColor="themeColor" :logoUrl="logoUrl" @loginFun="loginFun"></loginPassword>
- </view>
- </template>
- <script>
- import loginPassword from '@/components/ay-login/login-password.vue';
- import backImage from '@/static/home.png';
- export default {
- components: {
- loginPassword
- },
- data() {
- return {
- themeColor: '#33CCCC',
- logoUrl: 'https://cdn.pixabay.com/photo/2016/11/23/17/55/beach-1854072__340.jpg',
- }
- },
- onLoad() {
- },
- methods: {
- loginFun(data) {
- this.$http('common.login', data, '登录中', true).then((res) => {
- if (res.success == true) {
- uni.setStorageSync('token', res.data.token);
- uni.showToast({
- title: '登录成功',
- icon: 'none',
- success: function() {
- uni.navigateTo({
- url: '/pages/home/home',
- success: function(res) {}
- });
- }
- }, );
- }
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .content {
- width: 100%;
- height: 100%;
- background: url('../../static/loginback.png');
- background-size: 100% 100%;
- padding-top: 60rpx;
- position: relative;
- .title-text {
- width: 200rpx;
- height: 56rpx;
- font-family: PingFangSC-bold;
- font-weight: normal;
- font-size: 40rpx;
- margin-left: 50rpx;
- }
- .title-icon {
- position: absolute;
- right: 0rpx;
- top: 90rpx;
- width: 358rpx;
- height: 358rpx;
- background: url('../../static/icontitle.svg');
- background-size: 100% 100%;
- }
- }
- </style>
|