| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- //
- // ResetPasswordUIView.swift
- // fiveConstant
- //
- // Created by 李建 on 2023/1/16.
- //
- import SwiftUI
- struct ResetPasswordUIView: View {
- @State var phone: String = ""
- @State var checkCode: String = ""
- @State var password: String = ""
- @Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
- var body: some View {
- VStack {
- HStack {
- Text("重置密码")
- .font(.title)
- Spacer()
- }
- VStack(spacing: 15) {
- VStack {
- HStack(spacing: 3) {
- Image(systemName: "phone.fill")
- .foregroundColor(Color("MainColor"))
- TextField("请输入您的手机号", text: $phone)
- .disableAutocorrection(true)
- .padding(8)
- }
- Divider().foregroundColor(Color.gray)
- .opacity(0.5)
- }
-
- CheckCodeInputView(checkCode: $checkCode)
- VStack {
- HStack(spacing: 3) {
- Image(systemName: "lock.fill")
- .foregroundColor(Color("MainColor"))
- SecureField("请输入密码", text: $password)
- .disableAutocorrection(true)
- .padding(8)
- }
- Divider().foregroundColor(Color.gray).opacity(0.5)
- }
- }
- Button(action: {
-
- }, label: {
- Text("确定")
- .foregroundColor(.white)
- .padding()
- .frame(maxWidth: .infinity)
- .background(
- Color("MainColor")
- .cornerRadius(8)
- )
- .border(Color("MainColor"), width: 0)
-
- }
- ).padding(.top, 20)
- Spacer()
- }
- .navigationBarBackButtonHidden(true)
- .navigationBarItems(leading: Button(action: {
- self.presentationMode.wrappedValue.dismiss()
- }, label: {
- Image(systemName: "chevron.left")
- .foregroundColor(.gray)
- }))
- .padding()
- }
- }
- struct ResetPasswordUIView_Previews: PreviewProvider {
- static var previews: some View {
- ResetPasswordUIView()
- }
- }
- struct CheckCodeInputView: View {
- @Binding var checkCode: String
- var body: some View {
- ZStack(alignment: .trailing) {
- VStack {
- HStack(spacing: 3) {
- Image(systemName: "envelope.fill")
- .foregroundColor(Color("MainColor"))
- TextField("请输入验证码", text: $checkCode)
- .disableAutocorrection(true)
- .padding(8)
- }
- Divider().foregroundColor(Color.gray)
- .opacity(0.5)
- }
- GetCheckCodeButton{
-
- }
- }
- }
- }
|