qingqiu chegngong
This commit is contained in:
28
yinmeng-ios/Modules/Auth/VM/AuthViewModel.swift
Normal file
28
yinmeng-ios/Modules/Auth/VM/AuthViewModel.swift
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// AuthViewModel.swift
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by MaiMang on 2024/2/22.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import RxSwift
|
||||
class AuthViewModel: NSObject {
|
||||
|
||||
let data = PublishSubject<Bool>()
|
||||
|
||||
func getSmsCode(phone:String, type:Int) {
|
||||
if let phoneDes = phone.encrypt() {
|
||||
let params:[String: Any] = ["mobile":phoneDes, "type":type]
|
||||
YMNetworkHelper.share.requestSend(type: .post, path: "sms/getCode", params: params, succeed: { data in
|
||||
self.data.onNext(true)
|
||||
}, fail: { code, msg in
|
||||
self.data.onNext(false)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func authPhoneCode(phone:String, code:String) {
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user