Commit 73d5dd4a authored by David黄金龙's avatar David黄金龙

1、每页20请求数据

2、添加webView下方保存按钮的button
parent 7312f476
......@@ -322,6 +322,7 @@
A5573EE92B317C0100D98EC0 /* galaxyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EE82B317C0100D98EC0 /* galaxyTests.swift */; };
A5573EF32B317C0100D98EC0 /* galaxyUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EF22B317C0100D98EC0 /* galaxyUITests.swift */; };
A5573EF52B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EF42B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift */; };
A567E5642BD6309700D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5632BD6309700D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift */; };
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */; };
A57F1F252B48F09200B644E6 /* ATAuthSDK_D.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04808C032B4686510056D53C /* ATAuthSDK_D.framework */; };
A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A580371D2BAD784B0031C312 /* YHMySchemeViewModel.swift */; };
......@@ -779,6 +780,7 @@
A5573EEE2B317C0100D98EC0 /* galaxyUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = galaxyUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
A5573EF22B317C0100D98EC0 /* galaxyUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = galaxyUITests.swift; sourceTree = "<group>"; };
A5573EF42B317C0100D98EC0 /* galaxyUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = galaxyUITestsLaunchTests.swift; sourceTree = "<group>"; };
A567E5632BD6309700D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebViewBottomForSavePicView.swift; sourceTree = "<group>"; };
A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractMainItemStatusCell.swift; sourceTree = "<group>"; };
A580371D2BAD784B0031C312 /* YHMySchemeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySchemeViewModel.swift; sourceTree = "<group>"; };
A58037202BAD7B2A0031C312 /* YHMySchemeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySchemeModel.swift; sourceTree = "<group>"; };
......@@ -2238,6 +2240,7 @@
A50A747D2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift */,
048787D22BCE6B7D0036E221 /* YHServiceOrderAlertView.swift */,
A53F05EC2BCE86E50071D35A /* YHAgreementAlertView.swift */,
A567E5632BD6309700D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -2780,6 +2783,7 @@
A592BFEF2B9AB720004C04A9 /* YHWholeScreenTipsView.swift in Sources */,
045EEEF42B9F171A0022A143 /* YHSpouseBasicInfoVC.swift in Sources */,
A5FD63C32B63438A00D1D9DA /* YHContactMainItemStatusModel.swift in Sources */,
A567E5642BD6309700D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift in Sources */,
045EEEEA2B9F171A0022A143 /* YHFamilyInitialInfo.swift in Sources */,
A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */,
045EEEA52B9F171A0022A143 /* YHImageViewController.swift in Sources */,
......
......@@ -51,7 +51,7 @@ extension AppDelegate: JPUSHRegisterDelegate {
#if DEBUG
YHHUD.flash(message: deviceTokenStr)
// YHHUD.flash(message: deviceTokenStr)
#elseif TESTENV
// YHHUD.flash(message: deviceTokenStr)
#else
......
......@@ -25,6 +25,12 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
var id: Int = 0
var vcTitle : String?
lazy var bottomViewForSavePic: YHHomeWebViewBottomForSavePicView = {
let view = YHHomeWebViewBottomForSavePicView()
view.isHidden = true
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
......
//
// YHHomeWebViewBottomForSavePicView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/22.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeWebViewBottomForSavePicView: UIView {
static let viewH : CGFloat = 98.0
override init(frame: CGRect) {
super.init(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: YHBasicInfoFillBottomView.viewH))
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
typealias Block = (Int) -> ()
var block: Block?
var saveButton: UIButton!
// var nextButton: UIButton!
}
private extension YHHomeWebViewBottomForSavePicView {
func setupUI() {
backgroundColor = .white
saveButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.contentBkgColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("保存图片到相册", for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.addTarget(self, action: #selector(save), for: .touchUpInside)
return button
}()
addSubview(saveButton)
saveButton.snp.makeConstraints { make in
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.top.equalTo(12)
make.height.equalTo(44)
}
// nextButton = {
// let button = UIButton(type: .custom)
// button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
// button.contentHorizontalAlignment = .center
// button.setTitle("保存清单图", for: .normal)
// button.setTitleColor(.white, for: .normal)
// button.layer.cornerRadius = kCornerRadius6
// button.clipsToBounds = true
// button.addTarget(self, action: #selector(submit), for: .touchUpInside)
// return button
// }()
// addSubview(nextButton)
// nextButton.snp.makeConstraints { make in
// make.right.equalTo(-kMargin)
// make.top.equalTo(8)
// make.height.equalTo(44)
// make.left.equalTo(kMargin)
// }
//
// nextButton.layoutIfNeeded()
// nextButton.addYinHeGradualLayer()
}
@objc func save() {
block?(0)
}
}
......@@ -17,11 +17,11 @@ class YHHomePageViewModel : YHBaseViewModel {
var hkList: [YHHKEventModel]?
//首页相关参数
private var curPageIndex : Int = 1
private var page_Size : Int = 6
private var page_Size : Int = 20
var totalCount : Int = 0
var hasMoreForHomeNews : Bool = true
// 搜索
let searchPageSize: Int = 10
let searchPageSize: Int = 20
}
//接口
......
......@@ -81,6 +81,9 @@ class YHNetRequest: NSObject {
requestHeader.add(name:"appid",value:"1")
let dateStr = String(Date().timeIntervalSince1970)
requestHeader.add(name:"timestamp",value:dateStr)
requestHeader.add(name:"appPlatform",value:"iOS")
let version = UIDevice.appVersion()
requestHeader.add(name:"appVersion",value:version)
requestHeader.add(name:"pass",value:"")
let appkey = "958364f87222c200a72414f492bf0e26"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment