充电管理
This commit is contained in:
@@ -49,6 +49,7 @@ open class WebViewTool : NSObject {
|
||||
case vehicleAlarmList = "车辆报警"
|
||||
case kpiCaseNew = "服务商案件和车辆情况统计"
|
||||
case managerPeople = "管理人员"
|
||||
case gjUrl = "充电管理"
|
||||
}
|
||||
|
||||
public override init() {
|
||||
@@ -168,6 +169,9 @@ open class WebViewTool : NSObject {
|
||||
case .managerPeople:
|
||||
vc = WebViewController(showNavBar:false, title: nil, url: "\((h5Models?.managerPeople)!)?token=\((USER.token)!)"+(appending ?? ""))
|
||||
break
|
||||
case .gjUrl:
|
||||
vc = WebViewController(showNavBar:true, title: nil, url: "\((h5Models?.gjUrl)!)?"+(appending ?? ""))
|
||||
break
|
||||
}
|
||||
|
||||
if let vc {
|
||||
|
||||
@@ -93,4 +93,6 @@ open class ApiList {
|
||||
public let vehicleMonitorInfo = "/supplierAppV2/dispatchApp/order/vehicleMonitorInfo"
|
||||
|
||||
public let selectCountBySupplierId = "/order/taskInvoiceBatch/selectCountBySupplierId"
|
||||
|
||||
public let gjTokenInfo = "/supplierAppV2/dispatchApp/user/gj/tokenInfo"
|
||||
}
|
||||
|
||||
@@ -192,4 +192,8 @@ open class RequestList {
|
||||
func selectCountBySupplierId<P:Encodable>(parameters:P) -> Single<ResponseModel<Int>?> {
|
||||
return DDAF.get(urlString: HOST+API.selectCountBySupplierId,parameters: parameters,encoding: URLEncodedFormParameterEncoder.default,headers: [tokenHeader()],responseType: ResponseModel<Int>.self)
|
||||
}
|
||||
|
||||
func gjTokenInfo() -> Single<ResponseModel<String>?> {
|
||||
return DDAF.post(urlString: HOST+API.gjTokenInfo,encoding: URLEncodedFormParameterEncoder.default,headers: [tokenHeader()],responseType: ResponseModel<String>.self)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,6 +293,7 @@ public class DispatchAppH5UrlDataModel : Decodable {
|
||||
var vehicleAlarmDetail : String
|
||||
var kpiCaseNew : String
|
||||
var managerPeople : String
|
||||
var gjUrl : String
|
||||
}
|
||||
|
||||
public class UpdateVersionDataModel : Decodable {
|
||||
|
||||
@@ -208,6 +208,25 @@ extension MineController {
|
||||
})
|
||||
.disposed(by: disposeBag)
|
||||
|
||||
mineView.chongdianGes.rx.event
|
||||
.observe(on: MainScheduler.instance)
|
||||
.do(onNext: {[weak self] _ in
|
||||
self?.view.dd_showHUD()
|
||||
})
|
||||
.flatMapLatest { _ in
|
||||
return RQ.gjTokenInfo()
|
||||
}
|
||||
.observe(on: MainScheduler.instance)
|
||||
.subscribe(onNext: {[weak self] response in
|
||||
self?.view.dd_hideHUD()
|
||||
if response?.success == true, let token = response?.data, let userId = USER.userId {
|
||||
WEBTOOL.open(name: .gjUrl, appending: "userId=zd\(userId)&token=\(token)")
|
||||
} else {
|
||||
self?.view.dd_makeToast(response?.msg ?? "获取失败")
|
||||
}
|
||||
})
|
||||
.disposed(by: disposeBag)
|
||||
|
||||
mineView.banbenjianceGes.rx.event
|
||||
.observe(on: MainScheduler.instance)
|
||||
.subscribe(onNext: { _ in
|
||||
@@ -273,6 +292,7 @@ open class MineController : ZDViewController {
|
||||
mineView.wendangziliao.titleLabel.text = "文档资料"
|
||||
mineView.ershouche.titleLabel.text = "二手车信息"
|
||||
mineView.canbao.titleLabel.text = "参保救援职业责任险"
|
||||
mineView.chongdian.titleLabel.text = "充电管理"
|
||||
mineView.banbenjiance.titleLabel.text = "版本检测"
|
||||
mineView.tongzhitixing.titleLabel.text = "通知提醒"
|
||||
|
||||
@@ -325,33 +345,31 @@ open class MineController : ZDViewController {
|
||||
|
||||
open override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
if WEBTOOL.bannerInMineDataSourcesContains(name: .indexList) || WEBTOOL.bannerInMineDataSourcesContains(name: .insuredPage) {
|
||||
mineView.usedCarRadiusView.isHidden = false
|
||||
mineView.usedCarRadiusView.isHidden = false
|
||||
|
||||
if WEBTOOL.bannerInMineDataSourcesContains(name: .indexList) {
|
||||
mineView.ershouche.isHidden = false
|
||||
mineView.ershouche.snp.updateConstraints { make in
|
||||
make.height.equalTo(auto(55))
|
||||
}
|
||||
}else{
|
||||
mineView.ershouche.isHidden = true
|
||||
mineView.ershouche.snp.updateConstraints { make in
|
||||
make.height.equalTo(0)
|
||||
}
|
||||
}
|
||||
if WEBTOOL.bannerInMineDataSourcesContains(name: .insuredPage) {
|
||||
mineView.canbao.isHidden = false
|
||||
mineView.canbao.snp.updateConstraints { make in
|
||||
make.height.equalTo(auto(55))
|
||||
}
|
||||
}else{
|
||||
mineView.canbao.isHidden = true
|
||||
mineView.canbao.snp.updateConstraints { make in
|
||||
make.height.equalTo(0)
|
||||
}
|
||||
if WEBTOOL.bannerInMineDataSourcesContains(name: .indexList) {
|
||||
mineView.ershouche.isHidden = false
|
||||
mineView.ershouche.snp.updateConstraints { make in
|
||||
make.height.equalTo(auto(55))
|
||||
}
|
||||
}else{
|
||||
mineView.usedCarRadiusView.isHidden = true
|
||||
mineView.ershouche.isHidden = true
|
||||
mineView.ershouche.snp.updateConstraints { make in
|
||||
make.height.equalTo(0)
|
||||
}
|
||||
}
|
||||
if WEBTOOL.bannerInMineDataSourcesContains(name: .insuredPage) {
|
||||
mineView.canbao.isHidden = false
|
||||
mineView.canbao.line.isHidden = false
|
||||
mineView.canbao.snp.updateConstraints { make in
|
||||
make.height.equalTo(auto(55))
|
||||
}
|
||||
}else{
|
||||
mineView.canbao.isHidden = true
|
||||
mineView.canbao.line.isHidden = true
|
||||
mineView.canbao.snp.updateConstraints { make in
|
||||
make.height.equalTo(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -398,6 +416,8 @@ open class MineView : DDView {
|
||||
public let ershouche : MineCell
|
||||
public let canbaoGes : UITapGestureRecognizer
|
||||
public let canbao : MineCell
|
||||
public let chongdianGes : UITapGestureRecognizer
|
||||
public let chongdian : MineCell
|
||||
public let banbenjianceGes : UITapGestureRecognizer
|
||||
public let banbenjiance : MineCell
|
||||
public let tongzhitixingGes : UITapGestureRecognizer
|
||||
@@ -446,6 +466,8 @@ open class MineView : DDView {
|
||||
ershouche = MineCell()
|
||||
canbaoGes = UITapGestureRecognizer()
|
||||
canbao = MineCell()
|
||||
chongdianGes = UITapGestureRecognizer()
|
||||
chongdian = MineCell()
|
||||
banbenjianceGes = UITapGestureRecognizer()
|
||||
banbenjiance = MineCell()
|
||||
tongzhitixingGes = UITapGestureRecognizer()
|
||||
@@ -529,9 +551,11 @@ open class MineView : DDView {
|
||||
ershouche.isHidden = true
|
||||
usedCarRadiusView.addSubview(ershouche)
|
||||
canbao.addGestureRecognizer(canbaoGes)
|
||||
canbao.line.isHidden = true
|
||||
canbao.isHidden = true
|
||||
usedCarRadiusView.addSubview(canbao)
|
||||
chongdian.addGestureRecognizer(chongdianGes)
|
||||
chongdian.line.isHidden = true
|
||||
usedCarRadiusView.addSubview(chongdian)
|
||||
banbenjiance.addGestureRecognizer(banbenjianceGes)
|
||||
settingsRadiusView.addSubview(banbenjiance)
|
||||
tongzhitixing.line.isHidden = true
|
||||
@@ -675,10 +699,16 @@ open class MineView : DDView {
|
||||
|
||||
canbao.snp.makeConstraints { make in
|
||||
make.top.equalTo(ershouche.snp.bottom)
|
||||
make.left.bottom.right.equalToSuperview()
|
||||
make.left.right.equalToSuperview()
|
||||
make.height.equalTo(0)
|
||||
}
|
||||
|
||||
chongdian.snp.makeConstraints { make in
|
||||
make.top.equalTo(canbao.snp.bottom)
|
||||
make.left.bottom.right.equalToSuperview()
|
||||
make.height.equalTo(auto(55))
|
||||
}
|
||||
|
||||
banbenjiance.snp.makeConstraints { make in
|
||||
make.left.top.right.equalToSuperview()
|
||||
make.height.equalTo(auto(55))
|
||||
|
||||
Reference in New Issue
Block a user