Commit 633eaf09 authored by Alex朱枝文's avatar Alex朱枝文

Merge branch 'new_product' into qrcode

parents 7fd12ff1 90c1c835
......@@ -171,8 +171,6 @@ target 'galaxy' do
pod 'xxtea', '1.0.2'
#代码规范
pod 'SwiftLint', :configurations => ['Debug']
# 跟踪app性能
pod 'Sentry'
#腾讯IM
tencentIM_pods
#腾讯客服
......
......@@ -1318,6 +1318,7 @@
04DFB6F22E8BAA1C008EC0EB /* YHTagCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04DFB6F12E8BAA1C008EC0EB /* YHTagCollectionView.swift */; };
04DFB6F52E8BC896008EC0EB /* YHDynamicViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04DFB6F42E8BC896008EC0EB /* YHDynamicViewModel.swift */; };
04DFB6F72E8BC8C7008EC0EB /* YHDynamicItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04DFB6F62E8BC8C7008EC0EB /* YHDynamicItem.swift */; };
04DFB70E2E9BA461008EC0EB /* YHNewProductCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04DFB70D2E9BA461008EC0EB /* YHNewProductCell.swift */; };
04E0D3C82E866A6300F1824B /* YHCirclePhotoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E0D3C72E866A6300F1824B /* YHCirclePhotoCell.swift */; };
04E0D3CA2E866A9800F1824B /* YHCircleAddPhotoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E0D3C92E866A9800F1824B /* YHCircleAddPhotoCell.swift */; };
04E0D3CC2E877D4D00F1824B /* YHMediaUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E0D3CB2E877D4D00F1824B /* YHMediaUploadSheetView.swift */; };
......@@ -2706,6 +2707,7 @@
04DFB6F12E8BAA1C008EC0EB /* YHTagCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTagCollectionView.swift; sourceTree = "<group>"; };
04DFB6F42E8BC896008EC0EB /* YHDynamicViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDynamicViewModel.swift; sourceTree = "<group>"; };
04DFB6F62E8BC8C7008EC0EB /* YHDynamicItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDynamicItem.swift; sourceTree = "<group>"; };
04DFB70D2E9BA461008EC0EB /* YHNewProductCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNewProductCell.swift; sourceTree = "<group>"; };
04E0D3C72E866A6300F1824B /* YHCirclePhotoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCirclePhotoCell.swift; sourceTree = "<group>"; };
04E0D3C92E866A9800F1824B /* YHCircleAddPhotoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCircleAddPhotoCell.swift; sourceTree = "<group>"; };
04E0D3CB2E877D4D00F1824B /* YHMediaUploadSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMediaUploadSheetView.swift; sourceTree = "<group>"; };
......@@ -3540,6 +3542,7 @@
045C0B002D12CA5E00BD2DC0 /* YHStatusAdvantageBottomView.swift */,
045C0B012D12CA5E00BD2DC0 /* YHTalentProgramEvaluationView.swift */,
04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */,
04DFB70D2E9BA461008EC0EB /* YHNewProductCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -7361,7 +7364,6 @@
47BB31035D3DBEB9235AC809 /* [CP] Copy Pods Resources */,
04794DEC2D83D71100F14A4E /* SwiftLint */,
043F0ED42E02A60C003354EB /* Embed Foundation Extensions */,
820D18C0782D47DA8622DE7D /* Upload Debug Symbols to Sentry */,
);
buildRules = (
);
......@@ -7609,21 +7611,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
820D18C0782D47DA8622DE7D /* Upload Debug Symbols to Sentry */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}",
);
name = "Upload Debug Symbols to Sentry";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# This script is responsible for uploading debug symbols and source context for Sentry.\nif which sentry-cli >/dev/null; then\nexport SENTRY_ORG=galaxysentry\nexport SENTRY_PROJECT=galaxy-ios\nERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\nif [ ! $? -eq 0 ]; then\necho \"warning: sentry-cli - $ERROR\"\nfi\nelse\necho \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n";
};
E45A5FF5F7AF9C08C3CC4919 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......@@ -7721,6 +7708,7 @@
045C0FD92D12CA5F00BD2DC0 /* YHHomeCollectionViewCell.swift in Sources */,
045C0FDA2D12CA5F00BD2DC0 /* YHBasicContentView.swift in Sources */,
045C0FDB2D12CA5F00BD2DC0 /* YHSelectViewController.swift in Sources */,
04DFB70E2E9BA461008EC0EB /* YHNewProductCell.swift in Sources */,
047A96862D1698150033BB4E /* YHGCMySchemeViewModel.swift in Sources */,
04AE20312D13B6E500891D24 /* YHGCChildBasicInfoVC.swift in Sources */,
045C0FDC2D12CA5F00BD2DC0 /* YHMyNotifySettingVC.swift in Sources */,
......@@ -9159,7 +9147,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -9308,7 +9296,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -9519,7 +9507,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -9570,7 +9558,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......
......@@ -6,7 +6,6 @@
//
import UIKit
import Sentry
import ESTabBarController_swift
import IQKeyboardManagerSwift
......@@ -30,7 +29,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
configSentry()
Thread.sleep(forTimeInterval: 0.5) // 应产品同学Nick要求 启动页时间展示长点
setupAudionConfig()
......@@ -469,38 +467,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
extension AppDelegate {
private func configSentry() {
SentrySDK.start { options in
options.dsn = "https://41235d99f7163a287785964dae61d5a9@dev-sentry.galaxy-immi.com/7"
// Adds IP for users.
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
options.sendDefaultPii = true
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
// Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.
options.configureProfiling = {
$0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.
$0.lifecycle = .trace
}
#if DEBUG || TESTENV
// Uncomment the following lines to add more data to your events
options.attachScreenshot = true // This adds a screenshot to the error events
options.attachViewHierarchy = true // This adds the view hierarchy to the error events
options.debug = true // Enabled debug when first installing is always helpful
options.environment = "debug"
#else
options.debug = false // Enabled debug when first installing is always helpful
options.environment = "production"
options.attachViewHierarchy = true
#endif
}
// Remove the next line after confirming that your Sentry integration is working.
// SentrySDK.capture(message: "This app uses Sentry! :)")
}
private func thirdSetting() {
// 1.数据解析
#if DEBUG
......
......@@ -136,6 +136,36 @@ private extension YHHomeKingKongBlockView {
case 7:
// 生意星
gotoBusinessStar()
case 8:
// 银河新品
if !YHLoginManager.shared.isLogin() {
YHOneKeyLoginManager.shared.oneKeyLogin()
return
}
var url = YHBaseUrlManager.shared.businessH5Url() + "/yh-new-goods/detail"
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
let urlHasParam = String.hasQueryParameters(urlString: url)
if urlHasParam {
url = url + "&param=" + token
} else {
url = url + "?param=" + token
}
}
// 2.增加导航栏高度 https://test-hklife.galaxy-immi.com/superAppBridge.html#/goods/sales-detail?id=
var tUrl = url
if !url.contains("navigationH=") {
tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
if url.contains("?") {
tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
}
}
let vc = YHH5WebViewVC()
vc.url = tUrl
UIViewController.current?.navigationController?.pushViewController(vc)
default:
break
}
......
//
// YHNewProductCell.swift
// galaxy
//
// Created by Dufet on 2025/10/12.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHNewProductCell: UITableViewCell {
static let cellReuseIdentifier = "YHNewProductCell"
lazy var imgView: UIImageView = {
let v = UIImageView()
v.clipsToBounds = true
return v
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func updateModel(_ model: YHSelectGoodsModel) {
self.imgView.sd_setImage(with: URL(string: model.image), placeholderImage: UIImage(named: "global_default_image"))
}
func setupUI() {
self.selectionStyle = .none
self.contentView.addSubview(self.imgView)
self.imgView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(160)
make.bottom.equalTo(-12)
}
}
}
......@@ -147,7 +147,9 @@ extension YHSelectViewController {
tableView.delegate = self
tableView.tableHeaderView = sectionView
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 250))
tableView.register(cellWithClass: YHSelectLookTableViewCell.self)
tableView.register(YHSelectLookTableViewCell.self, forCellReuseIdentifier: YHSelectLookTableViewCell.cellReuseIdentifier)
tableView.register(YHNewProductCell.self, forCellReuseIdentifier: YHNewProductCell.cellReuseIdentifier)
return tableView
}()
view.addSubview(tableView)
......@@ -185,13 +187,30 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHSelectLookTableViewCell.self)
let model = self.viewModel.goodsArray[indexPath.row]
if model.goodsCategoryType == 1 { // 新品商品
guard let cell = tableView.dequeueReusableCell(withIdentifier: YHNewProductCell.cellReuseIdentifier, for: indexPath) as? YHNewProductCell else {
return UITableViewCell()
}
cell.updateModel(model)
return cell
}
guard let cell = tableView.dequeueReusableCell(withIdentifier: YHSelectLookTableViewCell.cellReuseIdentifier, for: indexPath) as? YHSelectLookTableViewCell else {
return UITableViewCell()
}
cell.number = indexPath.row
cell.dataSource = self.viewModel.goodsArray[indexPath.row]
cell.dataSource = model
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let model = self.viewModel.goodsArray[indexPath.row]
if model.goodsCategoryType == 1 { // 新品商品
return 160
}
if indexPath.row == 0 {
return 102
}
......@@ -221,8 +240,13 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.viewModel.goodsArray[indexPath.row]
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/goods/sales-detail" + "?id=\(model.id)"
YHAnalytics.track("APP_GalaxySelectionPage_ClickProduct", properties: ["productID": model.id])
var url = ""
if model.goodsCategoryType == 1 { // 新品商品
url = YHBaseUrlManager.shared.businessH5Url() + "/yh-new-goods/detail?id=" + model.id
} else {
url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/goods/sales-detail" + "?id=\(model.id)"
YHAnalytics.track("APP_GalaxySelectionPage_ClickProduct", properties: ["productID": model.id])
}
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
......@@ -264,6 +288,9 @@ extension YHSelectViewController: JXSegmentedListContainerViewListDelegate {
}
class YHSelectLookTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHSelectLookTableViewCell"
var centerImageView: UIImageView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
......
......@@ -64,6 +64,7 @@ class YHSelectGoodsModel: SmartCodable {
var icons: [YHSelectGoodIconModel] = []
// 货币符号 HKD、CNY
var currency: String = ""
var goodsCategoryType: Int = 0 // 产品的分类类型:0 默认普通,1 新品商品
required init() {
}
......
#!/bin/sh
set -eu
# allow overriding the version
VERSION=${SENTRY_CLI_VERSION:-latest}
PLATFORM=`uname -s`
ARCH=`uname -m`
case "$PLATFORM" in
CYGWIN*) PLATFORM="Windows"
;;
MINGW*) PLATFORM="Windows"
;;
MSYS*) PLATFORM="Windows"
;;
Darwin) ARCH="universal"
;;
esac
case "$ARCH" in
armv6*) ARCH="armv7"
;;
armv7*) ARCH="armv7"
;;
armv8*) ARCH="aarch64"
;;
armv64*) ARCH="aarch64"
;;
aarch64*) ARCH="aarch64"
;;
esac
# If the install directory is not set, set it to a default
if [ -z ${INSTALL_DIR+x} ]; then
INSTALL_DIR=/usr/local/bin
fi
if [ -z ${INSTALL_PATH+x} ]; then
INSTALL_PATH="${INSTALL_DIR}/sentry-cli"
fi
DOWNLOAD_URL="https://release-registry.services.sentry.io/apps/sentry-cli/${VERSION}?response=download&arch=${ARCH}&platform=${PLATFORM}&package=sentry-cli"
echo "This script will automatically install sentry-cli (${VERSION}) for you."
echo "Installation path: ${INSTALL_PATH}"
if [ "x$(id -u)" = "x0" ]; then
echo "Warning: this script is currently running as root. This is dangerous. "
echo " Instead run it as normal user. We will sudo as needed."
fi
if [ -f "$INSTALL_PATH" ]; then
echo "error: sentry-cli is already installed."
echo " run \"sentry-cli update\" to update to latest version"
exit 1
fi
if ! hash curl 2> /dev/null; then
echo "error: you do not have 'curl' installed which is required for this script."
exit 1
fi
TEMP_FILE=`mktemp "${TMPDIR:-/tmp}/.sentrycli.XXXXXXXX"`
TEMP_HEADER_FILE=`mktemp "${TMPDIR:-/tmp}/.sentrycli-headers.XXXXXXXX"`
cleanup() {
rm -f "$TEMP_FILE"
rm -f "$TEMP_HEADER_FILE"
}
trap cleanup EXIT
HTTP_CODE=$(curl -SL --progress-bar "$DOWNLOAD_URL" -D "$TEMP_HEADER_FILE" --output "$TEMP_FILE" --write-out "%{http_code}")
if [ ${HTTP_CODE} -lt 200 ] || [ ${HTTP_CODE} -gt 299 ]; then
echo "error: your platform and architecture (${PLATFORM}-${ARCH}) is unsupported."
exit 1
fi
for PYTHON in python3 python2 python ''; do
if hash "$PYTHON"; then
break
fi
done
if [ "$PYTHON" ]; then
"$PYTHON" - <<EOF "${TEMP_FILE}" "${TEMP_HEADER_FILE}"
if 1:
import sys
import re
import hashlib
import binascii
validated = False
with open(sys.argv[2], "r") as f:
for line in f:
match = re.search("(?i)^digest:.?sha256=([^,\n ]+)", line)
if match is not None:
with open(sys.argv[1], "rb") as downloaded:
hasher = hashlib.sha256()
while True:
chunk = downloaded.read(4096)
if not chunk:
break
hasher.update(chunk)
calculated = hasher.digest()
expected = binascii.a2b_base64(match.group(1))
if calculated != expected:
print("error: checksum mismatch (got %s, expected %s)" % (
binascii.b2a_hex(calculated).decode("ascii"),
binascii.b2a_hex(expected).decode("ascii")
))
sys.exit(1)
validated = True
break
if not validated:
print("warning: unable to validate checksum because no checksum available")
EOF
else
echo "warning: python not available, unable to verify checksums"
fi
chmod 0755 "$TEMP_FILE"
if ! (mkdir -p "$(dirname "$INSTALL_PATH")" && mv "$TEMP_FILE" "$INSTALL_PATH") 2> /dev/null; then
sudo -k sh -c "mkdir -p \"$(dirname "$INSTALL_PATH")\" && mv \"$TEMP_FILE\" \"$INSTALL_PATH\""
fi
echo "Sucessfully installed $("$INSTALL_PATH" --version)"
VERSION=$("$INSTALL_PATH" --version | awk '{print $2}')
MAJOR=$(echo "$VERSION" | cut -d. -f1)
MINOR=$(echo "$VERSION" | cut -d. -f2)
if (test -d "${HOME}/.oh-my-zsh") 2>/dev/null && [ $MAJOR -eq 2 ] && [ $MINOR -ge 22 ]; then
echo 'Detected Oh My Zsh, installing Zsh completions...'
if (mkdir -p "${HOME}/.oh-my-zsh/completions") 2>&1 && ("$INSTALL_PATH" completions zsh > "${HOME}/.oh-my-zsh/completions/_sentry_cli") 2>&1; then
echo "Successfully installed Zsh completions."
else
echo 'Warning: failed to install Zsh completions.'
fi
fi
echo 'Done!'
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