From b3b78917a492e6792c511a05a45d5d68bd6df616 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期三, 16 八月 2023 22:12:53 +0800 Subject: [PATCH] # --- index.html | 10 +++++ pages.json | 4 +- pages/LoginDemo/LoginDemo.vue | 85 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c3ff205..e7d7be9 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,16 @@ (coverSupport ? ', viewport-fit=cover' : '') + '" />') </script> <title></title> + <style> + * { + margin: 0; + padding: 0; + } + html,body,template { + height: 100%; + overflow: hidden; + } + </style> <!--preload-links--> <!--app-context--> </head> diff --git a/pages.json b/pages.json index 7c92dc8..7653942 100644 --- a/pages.json +++ b/pages.json @@ -1,9 +1,9 @@ { "pages": [ //pages鏁扮粍涓涓�椤硅〃绀哄簲鐢ㄥ惎鍔ㄩ〉锛屽弬鑰冿細https://uniapp.dcloud.io/collocation/pages { - "path": "pages/login/login", + "path": "pages/LoginDemo/LoginDemo", "style": { - "navigationBarTitleText": "uni-app" + "navigationBarTitleText": "鐧诲綍" } } ], diff --git a/pages/LoginDemo/LoginDemo.vue b/pages/LoginDemo/LoginDemo.vue new file mode 100644 index 0000000..2a4b096 --- /dev/null +++ b/pages/LoginDemo/LoginDemo.vue @@ -0,0 +1,85 @@ +<template> + <view class="main"> + <view class="left"> + <!-- logo --> + <view class="logo-box"> + <image src="../../static/img/logo.png" mode="aspectFit"></image> + </view> + </view> + <view class="right">right</view> + </view> +</template> + +<script> + export default { + data() { + return { + + } + }, + mounted() { + uni.getSystemInfo({ + success(res) { + console.log(res); + } + }) + }, + methods: { + + } + } +</script> + +<style> + @media screen and (orientation: portrait) { + /* 绔栧睆 */ + .main { + position: absolute; + height: 100%; + width: 100%; + background-color: crimson; + display: flex; + flex-direction: column; + } + .left { + height: 40%; + width: 100%; + background-color: aqua; + display: flex; + align-items: center; + justify-content: center; + } + .logo-box { + height: 60%; + background-color: aliceblue; + } + image { + height: 100%; + } + } + @media screen and (orientation: landscape) { + /* 妯睆 */ + .main { + position: absolute; + height: 100%; + width: 100%; + background-color: crimson; + display: flex; + } + .left { + height: 100%; + width: 50%; + background-color: aqua; + display: flex; + align-items: center; + justify-content: center; + } + .logo-box { + height: 40%; + background-color: aliceblue; + } + image { + height: 100%; + } + } +</style> \ No newline at end of file -- Gitblit v1.9.1