update
This commit is contained in:
Binary file not shown.
@@ -1258,8 +1258,8 @@
|
||||
filePath = "OrderScheduling/Common/View/AppUpdateTool.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "107"
|
||||
endingLineNumber = "107"
|
||||
startingLineNumber = "110"
|
||||
endingLineNumber = "110"
|
||||
landmarkName = "shouldPresentEntry()"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -1274,8 +1274,8 @@
|
||||
filePath = "OrderScheduling/Common/View/AppUpdateTool.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "109"
|
||||
endingLineNumber = "109"
|
||||
startingLineNumber = "112"
|
||||
endingLineNumber = "112"
|
||||
landmarkName = "shouldPresentEntry()"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -1306,8 +1306,8 @@
|
||||
filePath = "OrderScheduling/Common/View/AppUpdateTool.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "100"
|
||||
endingLineNumber = "100"
|
||||
startingLineNumber = "103"
|
||||
endingLineNumber = "103"
|
||||
landmarkName = "canUpdate(localVersion:onlineVersion:)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
@@ -2985,5 +2985,53 @@
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "285E2D1C-594E-4913-AC77-219409DF0F5F"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "OrderScheduling/Common/View/AppUpdateTool.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "80"
|
||||
endingLineNumber = "80"
|
||||
landmarkName = "init()"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "A3F56BBD-FBB7-46A4-9400-2FD7F2644730"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "OrderScheduling/Common/View/AppUpdateTool.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "116"
|
||||
endingLineNumber = "116"
|
||||
landmarkName = "openAppStore(by:)"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
uuid = "4BDDD6AA-D3F1-44A6-B6FD-7F4C207A6AC4"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "OrderScheduling/Common/View/AppUpdateTool.swift"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "77"
|
||||
endingLineNumber = "77"
|
||||
landmarkName = "init()"
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@@ -66,14 +66,17 @@ open class AppUpdateTool : NSObject {
|
||||
if response?.success == true {
|
||||
if self?.canUpdate(localVersion: TOOL.getVersion(), onlineVersion: response?.data?.appVersion ?? "0") == true {
|
||||
if type == .auto {
|
||||
if self?.shouldPresentEntry() == true {
|
||||
if response?.data?.update.code == .YES || self?.shouldPresentEntry() == true {
|
||||
if let appUpdateView = self?.appUpdateView {
|
||||
appUpdateView.isForce(isForce: response?.data?.update.code == .YES ? true : false)
|
||||
appUpdateView.contentLabel.text = response?.data?.description
|
||||
ENTRY.showAppUpdateEntry(view: appUpdateView,name: appUpdateEntry)
|
||||
}
|
||||
}
|
||||
}else if type == .manual {
|
||||
if let appUpdateView = self?.appUpdateView {
|
||||
appUpdateView.isForce(isForce: response?.data?.update.code == .YES ? true : false)
|
||||
appUpdateView.contentLabel.text = response?.data?.description
|
||||
ENTRY.showAppUpdateEntry(view: appUpdateView,name: appUpdateEntry)
|
||||
}
|
||||
}
|
||||
@@ -110,13 +113,10 @@ open class AppUpdateTool : NSObject {
|
||||
}
|
||||
|
||||
func openAppStore(by from:UIViewController?) {
|
||||
if ignoreFlag == true {
|
||||
}else{
|
||||
let vc = SKStoreProductViewController()
|
||||
vc.delegate = self
|
||||
vc.loadProduct(withParameters: [SKStoreProductParameterITunesItemIdentifier:AppItunesId])
|
||||
from?.present(vc, animated: true)
|
||||
}
|
||||
let vc = SKStoreProductViewController()
|
||||
vc.delegate = self
|
||||
vc.loadProduct(withParameters: [SKStoreProductParameterITunesItemIdentifier:AppItunesId])
|
||||
from?.present(vc, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ open class AppUpdateView : DDView {
|
||||
private let scrollView : DDScrollView
|
||||
private let scrollContentView : DDView
|
||||
public let contentLabel : DDLabel
|
||||
public let horizontalLine : DDView
|
||||
public let verticalLine : DDView
|
||||
public let ignoreButton : DDButton
|
||||
public let updateButton : DDButton
|
||||
public override init(frame: CGRect) {
|
||||
@@ -22,27 +24,32 @@ open class AppUpdateView : DDView {
|
||||
scrollView = DDScrollView()
|
||||
scrollContentView = DDView.init()
|
||||
contentLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(14)), textColor: .black.alpha(0.5))
|
||||
horizontalLine = DDView()
|
||||
verticalLine = DDView()
|
||||
ignoreButton = DDButton.dd_initCustom()
|
||||
updateButton = DDButton.dd_initCustom()
|
||||
super.init(frame: frame)
|
||||
radiusView.layer.cornerRadius = auto(10)
|
||||
radiusView.layer.masksToBounds = true
|
||||
addSubview(radiusView)
|
||||
radiusView.addSubview(scrollView)
|
||||
scrollView.addSubview(scrollContentView)
|
||||
contentLabel.numberOfLines = 0
|
||||
scrollContentView.addSubview(contentLabel)
|
||||
horizontalLine.backgroundColor = .hex("979797").alpha(0.35)
|
||||
radiusView.addSubview(horizontalLine)
|
||||
verticalLine.backgroundColor = .hex("979797").alpha(0.35)
|
||||
verticalLine.isHidden = true
|
||||
radiusView.addSubview(verticalLine)
|
||||
ignoreButton.setTitle("忽略", for: .normal)
|
||||
ignoreButton.titleLabel?.font = .mediumFont(auto(14))
|
||||
ignoreButton.backgroundColor = .white
|
||||
ignoreButton.setTitleColor(.black.alpha(0.3), for: .normal)
|
||||
ignoreButton.layer.borderColor = UIColor.hex("000000").alpha(0.3).cgColor
|
||||
ignoreButton.layer.borderWidth = 0.5
|
||||
ignoreButton.layer.cornerRadius = auto(15)
|
||||
radiusView.addSubview(ignoreButton)
|
||||
updateButton.setTitle("更新", for: .normal)
|
||||
updateButton.setTitleColor(.white, for: .normal)
|
||||
updateButton.titleLabel?.font = .mediumFont(auto(14))
|
||||
updateButton.backgroundColor = .hex("1C62D9")
|
||||
updateButton.layer.cornerRadius = auto(15)
|
||||
radiusView.addSubview(updateButton)
|
||||
|
||||
radiusView.snp.makeConstraints { make in
|
||||
@@ -51,7 +58,7 @@ open class AppUpdateView : DDView {
|
||||
|
||||
scrollView.snp.makeConstraints { make in
|
||||
make.top.left.right.equalToSuperview()
|
||||
make.bottom.equalToSuperview().offset(-auto(70))
|
||||
make.bottom.equalTo(horizontalLine.snp.top)
|
||||
}
|
||||
|
||||
scrollContentView.snp.makeConstraints { make in
|
||||
@@ -63,25 +70,56 @@ open class AppUpdateView : DDView {
|
||||
make.left.equalToSuperview().offset(auto(20))
|
||||
make.top.equalToSuperview().offset(auto(20))
|
||||
make.right.equalTo(-auto(20))
|
||||
make.bottom.equalTo(scrollContentView)
|
||||
make.bottom.equalTo(scrollContentView).offset(-auto(20))
|
||||
}
|
||||
|
||||
horizontalLine.snp.makeConstraints { make in
|
||||
make.bottom.equalToSuperview().offset(-auto(40))
|
||||
make.left.right.equalToSuperview()
|
||||
make.height.equalTo(1)
|
||||
}
|
||||
|
||||
verticalLine.snp.makeConstraints { make in
|
||||
make.centerX.equalToSuperview()
|
||||
make.top.equalTo(horizontalLine.snp.bottom)
|
||||
make.bottom.equalToSuperview()
|
||||
make.width.equalTo(1)
|
||||
}
|
||||
|
||||
ignoreButton.snp.makeConstraints { make in
|
||||
make.bottom.equalToSuperview().offset(-auto(20))
|
||||
make.width.equalTo(auto(80))
|
||||
make.height.equalTo(auto(30))
|
||||
make.centerX.equalToSuperview().offset(-auto(60))
|
||||
make.left.equalToSuperview()
|
||||
make.right.equalTo(verticalLine.snp.left)
|
||||
make.top.equalTo(horizontalLine.snp.bottom)
|
||||
make.bottom.equalToSuperview()
|
||||
}
|
||||
|
||||
updateButton.snp.makeConstraints { make in
|
||||
make.bottom.equalToSuperview().offset(-auto(20))
|
||||
make.width.equalTo(auto(80))
|
||||
make.height.equalTo(auto(30))
|
||||
make.centerX.equalToSuperview().offset(auto(60))
|
||||
make.bottom.equalToSuperview()
|
||||
make.right.equalToSuperview()
|
||||
make.top.equalTo(horizontalLine.snp.top)
|
||||
make.left.equalTo(verticalLine.snp.right)
|
||||
}
|
||||
}
|
||||
|
||||
public required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
func isForce(isForce:Bool) {
|
||||
if isForce == true {
|
||||
updateButton.snp.remakeConstraints { make in
|
||||
make.bottom.equalToSuperview()
|
||||
make.right.equalToSuperview()
|
||||
make.top.equalTo(horizontalLine.snp.top)
|
||||
make.left.equalToSuperview()
|
||||
}
|
||||
}else{
|
||||
updateButton.snp.remakeConstraints { make in
|
||||
make.bottom.equalToSuperview()
|
||||
make.right.equalToSuperview()
|
||||
make.top.equalTo(horizontalLine.snp.top)
|
||||
make.left.equalTo(verticalLine.snp.right)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ open class NotificationAuthView : DDView{
|
||||
private let scrollView : DDScrollView
|
||||
private let scrollContentView : DDView
|
||||
public let contentLabel : DDLabel
|
||||
public let horizontalLine : DDView
|
||||
public let verticalLine : DDView
|
||||
public let ignoreButton : DDButton
|
||||
public let setButton : DDButton
|
||||
public override init(frame: CGRect) {
|
||||
@@ -23,9 +25,13 @@ open class NotificationAuthView : DDView{
|
||||
scrollView = DDScrollView()
|
||||
scrollContentView = DDView.init()
|
||||
contentLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(17)), textColor: .black.alpha(0.5))
|
||||
horizontalLine = DDView()
|
||||
verticalLine = DDView()
|
||||
ignoreButton = DDButton.dd_initCustom()
|
||||
setButton = DDButton.dd_initCustom()
|
||||
super.init(frame: frame)
|
||||
radiusView.layer.cornerRadius = auto(10)
|
||||
radiusView.layer.masksToBounds = true
|
||||
addSubview(radiusView)
|
||||
radiusView.addSubview(scrollView)
|
||||
scrollView.addSubview(scrollContentView)
|
||||
@@ -33,19 +39,20 @@ open class NotificationAuthView : DDView{
|
||||
contentLabel.textAlignment = .center
|
||||
contentLabel.text = "当前应用未开启通知,建议开启"
|
||||
scrollContentView.addSubview(contentLabel)
|
||||
horizontalLine.backgroundColor = .hex("979797").alpha(0.35)
|
||||
radiusView.addSubview(horizontalLine)
|
||||
verticalLine.backgroundColor = .hex("979797").alpha(0.35)
|
||||
verticalLine.isHidden = true
|
||||
radiusView.addSubview(verticalLine)
|
||||
ignoreButton.setTitle("取消", for: .normal)
|
||||
ignoreButton.titleLabel?.font = .mediumFont(auto(14))
|
||||
ignoreButton.backgroundColor = .white
|
||||
ignoreButton.setTitleColor(.black.alpha(0.3), for: .normal)
|
||||
ignoreButton.layer.borderColor = UIColor.hex("000000").alpha(0.3).cgColor
|
||||
ignoreButton.layer.borderWidth = 0.5
|
||||
ignoreButton.layer.cornerRadius = auto(15)
|
||||
radiusView.addSubview(ignoreButton)
|
||||
setButton.setTitle("去设置", for: .normal)
|
||||
setButton.setTitleColor(.white, for: .normal)
|
||||
setButton.titleLabel?.font = .mediumFont(auto(14))
|
||||
setButton.backgroundColor = .hex("1C62D9")
|
||||
setButton.layer.cornerRadius = auto(15)
|
||||
radiusView.addSubview(setButton)
|
||||
|
||||
radiusView.snp.makeConstraints { make in
|
||||
@@ -69,18 +76,31 @@ open class NotificationAuthView : DDView{
|
||||
make.bottom.equalTo(scrollContentView)
|
||||
}
|
||||
|
||||
horizontalLine.snp.makeConstraints { make in
|
||||
make.bottom.equalToSuperview().offset(-auto(40))
|
||||
make.left.right.equalToSuperview()
|
||||
make.height.equalTo(1)
|
||||
}
|
||||
|
||||
verticalLine.snp.makeConstraints { make in
|
||||
make.centerX.equalToSuperview()
|
||||
make.top.equalTo(horizontalLine.snp.bottom)
|
||||
make.bottom.equalToSuperview()
|
||||
make.width.equalTo(1)
|
||||
}
|
||||
|
||||
ignoreButton.snp.makeConstraints { make in
|
||||
make.bottom.equalToSuperview().offset(-auto(20))
|
||||
make.width.equalTo(auto(80))
|
||||
make.height.equalTo(auto(30))
|
||||
make.centerX.equalToSuperview().offset(-auto(60))
|
||||
make.left.equalToSuperview()
|
||||
make.right.equalTo(verticalLine.snp.left)
|
||||
make.top.equalTo(horizontalLine.snp.bottom)
|
||||
make.bottom.equalToSuperview()
|
||||
}
|
||||
|
||||
setButton.snp.makeConstraints { make in
|
||||
make.bottom.equalToSuperview().offset(-auto(20))
|
||||
make.width.equalTo(auto(80))
|
||||
make.height.equalTo(auto(30))
|
||||
make.centerX.equalToSuperview().offset(auto(60))
|
||||
make.bottom.equalToSuperview()
|
||||
make.right.equalToSuperview()
|
||||
make.top.equalTo(horizontalLine.snp.top)
|
||||
make.left.equalTo(verticalLine.snp.right)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ open class Entry {
|
||||
)
|
||||
attributes.positionConstraints.size = .init(
|
||||
width: .constant(value: auto(326)),
|
||||
height: .constant(value: auto(285))
|
||||
height: .constant(value: auto(180))
|
||||
)
|
||||
attributes.positionConstraints.verticalOffset = 0
|
||||
attributes.positionConstraints.safeArea = .overridden
|
||||
|
||||
@@ -249,8 +249,16 @@ public class DispatchAppH5UrlDataModel : Decodable {
|
||||
public class VersionCheckDataModel : Decodable {
|
||||
var id : Int
|
||||
var appVersion : String
|
||||
var update : UpdateEnum
|
||||
var appType : AppTypeEnum
|
||||
var update : UpdateModel
|
||||
var appType : TypeModel
|
||||
class UpdateModel : Decodable {
|
||||
var code : UpdateEnum
|
||||
var label : String
|
||||
}
|
||||
class TypeModel : Decodable {
|
||||
var code : AppTypeEnum
|
||||
var label : String
|
||||
}
|
||||
enum UpdateEnum : Int,Decodable {
|
||||
case NO = 0
|
||||
case YES = 1
|
||||
|
||||
@@ -11,4 +11,4 @@ public let MAAppKey = "6e13671d1444633f9fd5a407a309555a"
|
||||
|
||||
public let JPushKey = "259b546bb2aaf5f02ffa2547"
|
||||
|
||||
public let AppItunesId = "1616776985"
|
||||
public let AppItunesId = "1469168177"
|
||||
|
||||
@@ -446,9 +446,11 @@ extension VehicleMonitoringController : JXCategoryListContainerViewDelegate {
|
||||
|
||||
extension VehicleMonitoringController : JXCategoryViewDelegate {
|
||||
public func categoryView(_ categoryView: JXCategoryBaseView!, didSelectedItemAt index: Int) {
|
||||
reloadData(index: index)
|
||||
if vehicleMonitoringView.vehicleMonitoringPannelView.tapButton.isSelected == true {
|
||||
vehicleMonitoringView.vehicleMonitoringPannelView.tapButton.sendActions(for: .touchUpInside)
|
||||
DispatchQueue.main.async {[weak self] in
|
||||
self?.reloadData(index: index)
|
||||
if self?.vehicleMonitoringView.vehicleMonitoringPannelView.tapButton.isSelected == true {
|
||||
self?.vehicleMonitoringView.vehicleMonitoringPannelView.tapButton.sendActions(for: .touchUpInside)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user