Commit cd166047 authored by Steven杜宇's avatar Steven杜宇

// fix

parent 6d106c28
......@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 60;
objectVersion = 70;
objects = {
/* Begin PBXBuildFile section */
......@@ -2727,7 +2727,7 @@
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
043F0ED92E02A60C003354EB /* Exceptions for "yinheReplayExt" folder in "yinheReplayExt" target */ = {
043F0ED92E02A60C003354EB /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
......@@ -2737,18 +2737,7 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
043F0ECD2E02A60C003354EB /* yinheReplayExt */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
043F0ED92E02A60C003354EB /* Exceptions for "yinheReplayExt" folder in "yinheReplayExt" target */,
);
explicitFileTypes = {
};
explicitFolders = (
);
path = yinheReplayExt;
sourceTree = "<group>";
};
043F0ECD2E02A60C003354EB /* yinheReplayExt */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (043F0ED92E02A60C003354EB /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = yinheReplayExt; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -7531,10 +7520,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks.sh\"\n";
......@@ -7548,10 +7541,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources.sh\"\n";
......@@ -8927,7 +8924,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8939,7 +8936,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8957,7 +8954,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8969,7 +8966,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -8987,7 +8984,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -8999,7 +8996,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9017,7 +9014,7 @@
CODE_SIGN_ENTITLEMENTS = yinheReplayExt/yinheReplayExt.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = RXHYW88XR7;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = yinheReplayExt/Info.plist;
......@@ -9029,7 +9026,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy.yinheReplayExt;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9106,7 +9103,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9134,7 +9131,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9255,7 +9252,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9283,7 +9280,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9466,7 +9463,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9494,7 +9491,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -9517,7 +9514,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
......@@ -9545,7 +9542,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.4;
MARKETING_VERSION = 2.3.5;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
......
......@@ -11,6 +11,8 @@ import UIKit
class YHNewProductCell: UITableViewCell {
static let cellReuseIdentifier = "YHNewProductCell"
var model: YHSelectGoodsModel = YHSelectGoodsModel()
var onImageHeightChanged: (() -> Void)?
lazy var imgView: UIImageView = {
let v = UIImageView()
......@@ -29,9 +31,29 @@ class YHNewProductCell: UITableViewCell {
}
func updateModel(_ model: YHSelectGoodsModel) {
self.imgView.sd_setImage(with: URL(string: model.image), placeholderImage: UIImage(named: "global_default_image"))
self.imgView.snp.updateConstraints { make in
make.height.equalTo(model.ratio * (KScreenWidth-20.0*2))
self.model = model
if let url = URL(string: model.image) {
imgView.sd_setImage(with: url, placeholderImage: UIImage(named: "plan_product_default")) { [weak self] image, _, _, resultUrl in
guard let self = self else {
return
}
guard resultUrl?.absoluteString == self.model.image else {
return
}
guard let image = image, image.size.width > 0, image.size.height > 0 else {
return
}
model.ratio = image.size.height / image.size.width
self.imgView.snp.updateConstraints { make in
make.height.equalTo(model.ratio * (KScreenWidth-20.0*2))
}
self.onImageHeightChanged?()
}
} else {
imgView.snp.updateConstraints { make in
make.height.equalTo(YHSelectGoodsModel.fix_new_productRatio * (KScreenWidth-20.0*2))
}
}
}
......
......@@ -195,6 +195,12 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
return UITableViewCell()
}
cell.updateModel(model)
cell.onImageHeightChanged = { [weak self] in
guard let self = self else { return }
UIView.performWithoutAnimation {
self.tableView.reloadRows(at: [indexPath], with: .none)
}
}
return cell
}
guard let cell = tableView.dequeueReusableCell(withIdentifier: YHSelectLookTableViewCell.cellReuseIdentifier, for: indexPath) as? YHSelectLookTableViewCell else {
......
......@@ -35,7 +35,7 @@ class YHSelectGoodModel: SmartCodable {
class YHSelectGoodsModel: SmartCodable {
static let fix_new_productRatio = 160.0/(KScreenWidth-20.0*2)
static let fix_new_productRatio = 160.0/335
var id: String = ""
var name: String = ""
......
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