fix(ios): 封面图改为正方形裁剪 512×512
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
587b61d564
commit
d6254287bb
@ -13,7 +13,7 @@ struct CreateLibraryPage: View {
|
||||
ScrollView { VStack(spacing: 20) {
|
||||
// 封面
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("封面图(可选,3:2)").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035)
|
||||
Text("封面图(可选,正方形)").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035)
|
||||
Button { showCoverPicker = true } label: {
|
||||
ZStack {
|
||||
RoundedRectangle(cornerRadius: 14).fill(Color.zxFill004)
|
||||
@ -73,7 +73,7 @@ struct CreateLibraryPage: View {
|
||||
defer { isUploadingCover = false; coverPhotoItem = nil }
|
||||
guard let data = try? await item.loadTransferable(type: Data.self),
|
||||
let image = UIImage(data: data) else { return }
|
||||
let resized = resizeCoverImage(image, tw: 600, th: 400)
|
||||
let resized = resizeCoverImage(image, tw: 512, th: 512)
|
||||
do {
|
||||
let r = try await FileUploadService.shared.uploadImageWithKey(resized, filename: "cover_\(Int(Date().timeIntervalSince1970)).jpg")
|
||||
coverKey = r.objectKey; coverImage = resized
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user