|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- //
- // ContentView.swift
- // iOSFirst
- //
- // Created by 孙宇峰 on 2023/1/31.
- //
-
- import SwiftUI
-
- struct ContentView: View {
- var body: some View {
- VStack(alignment:.leading,spacing: 0) {
- HStack{
- Spacer()
- Image(systemName: "globe")
- .imageScale(.large)
- .foregroundColor(.accentColor)
- Text("设置").font(.system(size: 14))
- }
-
- Text("欢迎来到")
- .foregroundColor(.gray)
- .font(.system(size: 30))
- .multilineTextAlignment(.center)
- .bold()
- .padding(.top,20)
-
-
- HStack{
- Text("logo")
- .foregroundColor(.gray)
- .font(.system(size: 30))
- .multilineTextAlignment(.center)
- .bold()
- Image("txtlogo")
- .imageScale(.large)
- .foregroundColor(.accentColor)
- .frame(width: 240,height: 35)
- }
- .padding(.top,20)
- .padding(.bottom,100)
-
- VStack(alignment: .leading, spacing: 400) {
- HStack(alignment: .center, spacing: 15) {
- Image(systemName: "globe")
- .imageScale(.large)
- .foregroundColor(.accentColor)
-
- TextField("请输入手机号",text:.constant(""))
- .font(.system(size: 16))
- .frame(maxWidth: .infinity,alignment: .center)
-
- }
-
- }
- .frame(height: 80)
-
- Divider()
- VStack(alignment: .leading, spacing: 400) {
- HStack(alignment: .center, spacing: 15) {
- Image(systemName: "globe")
- .imageScale(.large)
- .foregroundColor(.accentColor)
-
- TextField("请输入密码",text:.constant(""))
- .font(.system(size: 16))
- .frame(maxWidth: .infinity,alignment: .center)
-
-
- }
-
- }.frame(height: 80)
- Divider().padding(.bottom,40)
-
-
- VStack(alignment: .trailing, spacing: 400) {
-
- VStack(alignment: .center, spacing: 15) {
- Button(action: {
- let msg="点击了登录按钮"
- print(msg)
- SUIToast.show(messageItem: .init(
- message: msg,
- bgColor: .gray,
- messageColor: .white
- ))
- }) {
- Text("登录")
- .font(.system(size: 17))
- .bold()
- .frame(minWidth: 0, maxWidth: .infinity)
- .padding()
- .foregroundColor(.white)
- .background(.blue)
- .cornerRadius(30)
- }
-
- }
-
- }
-
- HStack{
- Text("验证码登录").font(.system(size:15)).onTapGesture {
- let msg="点击了验证码登录"
- print(msg)
- SUIToast.show(messageItem: .init(
- message: msg,
- bgColor: .gray,
- messageColor: .white
- ))
- }
- Spacer ()
- Text("忘记密码?").font(.system(size:15)).onTapGesture {
- let msg="点击了密码"
- print(msg)
- SUIToast.show(messageItem: .init(
- message: msg,
- bgColor: .gray,
- messageColor: .white
- ))
-
-
- }.padding(.vertical,20).font(.system(size: 15))
-
-
- }
- Spacer()
-
- }.padding()
- .frame(width: .infinity,height: .infinity)
- }
-
- }
-
- struct ContentView_Previews: PreviewProvider {
- static var previews: some View {
- ContentView()
- }
- }
-
-
|