修正i3-3代SKU总成本计算错误并清理验证图片
- 修正3个i3-3代SKU文件总成本与配件之和不一致的问题:i3-3代-4G-32G总成本221.5->236.5,i3-3代-4G-64G总成本236.5->251.5,i3-3代-8G-64G总成本313.5->298.5 - 删除售价验证临时图片,新增nascab产品和2.5金单有产品目录
BIN
产品/nascab/image/214357667.jpg
Normal file
|
After Width: | Height: | Size: 3.2 MiB |
BIN
产品/nascab/image/214357698.jpg
Normal file
|
After Width: | Height: | Size: 3.8 MiB |
BIN
产品/nascab/image/scene_01_主图白底.png
Normal file
|
After Width: | Height: | Size: 160 KiB |
BIN
产品/nascab/image/scene_02_相册备份.png
Normal file
|
After Width: | Height: | Size: 368 KiB |
BIN
产品/nascab/image/scene_02_相册备份_v2.png
Normal file
|
After Width: | Height: | Size: 364 KiB |
BIN
产品/nascab/image/scene_02_相册备份_v3.png
Normal file
|
After Width: | Height: | Size: 376 KiB |
BIN
产品/nascab/image/scene_02_相册备份_v4.png
Normal file
|
After Width: | Height: | Size: 2.7 MiB |
BIN
产品/nascab/image/scene_03_影视播放.png
Normal file
|
After Width: | Height: | Size: 269 KiB |
BIN
产品/nascab/image/scene_04_多设备互联.png
Normal file
|
After Width: | Height: | Size: 314 KiB |
BIN
产品/nascab/image/scene_05_文件共享.png
Normal file
|
After Width: | Height: | Size: 355 KiB |
BIN
产品/nascab/image/scene_06_加密安全.png
Normal file
|
After Width: | Height: | Size: 369 KiB |
1
产品/nascab/产品名称.md
Normal file
@@ -0,0 +1 @@
|
||||
智能存储NAS相册备份无线传输共享视频影视播放手机电脑互联
|
||||
BIN
产品/nascab/详情/__pycache__/doubao_image.cpython-313.pyc
Normal file
70
产品/nascab/详情/add_text.py
Normal file
@@ -0,0 +1,70 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""在图片上叠加文字标签:标题 + 副标题,带半透明背景条"""
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
import sys
|
||||
import os
|
||||
|
||||
def add_text_overlay(image_path, title, subtitle, output_path):
|
||||
img = Image.open(image_path).convert("RGBA")
|
||||
w, h = img.size
|
||||
|
||||
# 创建文字图层
|
||||
txt_layer = Image.new("RGBA", (w, h), (0, 0, 0, 0))
|
||||
draw = ImageDraw.Draw(txt_layer)
|
||||
|
||||
# 字体大小根据图片宽度自适应
|
||||
title_size = max(48, w // 18)
|
||||
sub_size = max(28, w // 30)
|
||||
|
||||
# 尝试加载中文字体
|
||||
font_paths = [
|
||||
r"C:\Windows\Fonts\msyhbd.ttc", # 微软雅黑粗体
|
||||
r"C:\Windows\Fonts\msyh.ttc", # 微软雅黑
|
||||
r"C:\Windows\Fonts\simhei.ttf", # 黑体
|
||||
]
|
||||
title_font = None
|
||||
sub_font = None
|
||||
for fp in font_paths:
|
||||
if os.path.exists(fp):
|
||||
title_font = ImageFont.truetype(fp, title_size)
|
||||
sub_font = ImageFont.truetype(fp, sub_size)
|
||||
break
|
||||
|
||||
if title_font is None:
|
||||
title_font = ImageFont.load_default()
|
||||
sub_font = ImageFont.load_default()
|
||||
|
||||
# 文字位置:左上角,带边距
|
||||
margin_x = w // 15
|
||||
margin_y = h // 10
|
||||
|
||||
# 绘制半透明背景条
|
||||
title_bbox = draw.textbbox((margin_x, margin_y), title, font=title_font)
|
||||
sub_bbox = draw.textbbox((margin_x, title_bbox[3] + 12), subtitle, font=sub_font)
|
||||
|
||||
bar_top = margin_y - 16
|
||||
bar_bottom = sub_bbox[3] + 16
|
||||
bar_right = max(title_bbox[2], sub_bbox[2]) + 30
|
||||
|
||||
draw.rectangle(
|
||||
[(margin_x - 16, bar_top), (bar_right, bar_bottom)],
|
||||
fill=(0, 0, 0, 140)
|
||||
)
|
||||
|
||||
# 绘制标题(白色粗体)
|
||||
draw.text((margin_x, margin_y), title, font=title_font, fill=(255, 255, 255, 255))
|
||||
|
||||
# 绘制副标题(浅白色)
|
||||
draw.text((margin_x, title_bbox[3] + 12), subtitle, font=sub_font, fill=(220, 230, 255, 230))
|
||||
|
||||
# 合成
|
||||
result = Image.alpha_composite(img, txt_layer).convert("RGB")
|
||||
result.save(output_path, "PNG")
|
||||
print(f"Saved: {output_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 5:
|
||||
print("Usage: python add_text.py <image_path> <title> <subtitle> <output_path>")
|
||||
sys.exit(1)
|
||||
add_text_overlay(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])
|
||||
70
产品/nascab/详情/doubao_image.py
Normal file
@@ -0,0 +1,70 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""豆包万相 (Doubao Seedream) 图片生成工具 - 支持文生图/图生图"""
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
import base64
|
||||
import urllib.request
|
||||
import urllib.error
|
||||
|
||||
API_URL = "https://ark.cn-beijing.volces.com/api/v3/images/generations"
|
||||
API_KEY = "ark-119a37ed-f123-42fc-aea6-b38d47d47fc0-f7ddf"
|
||||
MODEL = "doubao-seedream-5-0-260128"
|
||||
|
||||
|
||||
def generate(prompt, input_image=None, output_path="output.png", size="2k"):
|
||||
"""生成图片。input_image 为本地路径时走图生图,否则文生图。"""
|
||||
body = {
|
||||
"model": MODEL,
|
||||
"prompt": prompt,
|
||||
"size": size,
|
||||
"sequential_image_generation": "disabled",
|
||||
"response_format": "url",
|
||||
"stream": False,
|
||||
"watermark": False,
|
||||
}
|
||||
|
||||
if input_image and os.path.exists(input_image):
|
||||
with open(input_image, "rb") as f:
|
||||
img_b64 = base64.b64encode(f.read()).decode("ascii")
|
||||
ext = os.path.splitext(input_image)[1].lower().lstrip(".")
|
||||
mime = "jpeg" if ext in ("jpg", "jpeg") else ("png" if ext == "png" else "octet-stream")
|
||||
body["image"] = [f"data:image/{mime};base64,{img_b64}"]
|
||||
|
||||
data = json.dumps(body).encode("utf-8")
|
||||
req = urllib.request.Request(
|
||||
API_URL,
|
||||
data=data,
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": f"Bearer {API_KEY}",
|
||||
},
|
||||
method="POST",
|
||||
)
|
||||
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=180) as resp:
|
||||
result = json.loads(resp.read().decode("utf-8"))
|
||||
except urllib.error.HTTPError as e:
|
||||
err_body = e.read().decode("utf-8", errors="replace")
|
||||
print(f"HTTP {e.code}: {err_body}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
image_url = result["data"][0]["url"]
|
||||
print(f"Generated URL: {image_url}")
|
||||
|
||||
# 下载图片
|
||||
urllib.request.urlretrieve(image_url, output_path)
|
||||
print(f"Saved to: {output_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# 用法: python doubao_image.py <prompt> <output_path> [input_image] [size]
|
||||
if len(sys.argv) < 3:
|
||||
print("Usage: python doubao_image.py <prompt> <output_path> [input_image] [size]")
|
||||
sys.exit(1)
|
||||
prompt = sys.argv[1]
|
||||
output_path = sys.argv[2]
|
||||
input_image = sys.argv[3] if len(sys.argv) > 3 else None
|
||||
size = sys.argv[4] if len(sys.argv) > 4 else "2k"
|
||||
generate(prompt, input_image, output_path, size)
|
||||
74
产品/nascab/详情/详情页文案.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# NasCabOS 商品详情页文案
|
||||
|
||||
> 产品全称:智能存储NAS相册备份无线传输共享视频影视播放手机电脑互联
|
||||
> 软件名称:NasCabOS
|
||||
> 官网:https://nas.cab/
|
||||
|
||||
---
|
||||
|
||||
## 屏1|产品主图
|
||||
|
||||

|
||||
|
||||
**NasCabOS 智能私有云**
|
||||
手机电脑互联 · 相册备份 · 影视播放 · 无需专用硬件
|
||||
|
||||
---
|
||||
|
||||
## 屏2|相册备份
|
||||
|
||||

|
||||
|
||||
**手机照片自动备份 永不丢失**
|
||||
- 插上U盘,手机照片自动无线备份到私有云
|
||||
- 时间线/地图视图,智能相册自动分类
|
||||
- 人脸识别 · AI分类,一键整理海量照片
|
||||
- 不改变原有文件夹结构,只读取和组织
|
||||
|
||||
---
|
||||
|
||||
## 屏3|影视播放
|
||||
|
||||

|
||||
|
||||
**私人影院 随时随地看**
|
||||
- 手机/iPad/电视多端播放,实时转码
|
||||
- 几乎支持所有视频格式,蓝光原盘也能播
|
||||
- 自动匹配海报,影视库式管理
|
||||
- 出门在外也能远程看家里的电影
|
||||
|
||||
---
|
||||
|
||||
## 屏4|多设备互联
|
||||
|
||||

|
||||
|
||||
**手机 电脑 平板 一盘全通**
|
||||
- Windows / macOS / Android / iOS / TV / Web 全平台
|
||||
- 局域网内所有设备同时访问,互不干扰
|
||||
- 无需专用硬件,电脑装上就能用
|
||||
- 插上U盘,旧电脑秒变NAS服务器
|
||||
|
||||
---
|
||||
|
||||
## 屏5|文件共享
|
||||
|
||||

|
||||
|
||||
**全家共享 一人管文件全家都能用**
|
||||
- FTP / SFTP / WebDAV 三协议共享
|
||||
- 每个成员独立账号,独立权限
|
||||
- 在线上传下载,远程也能访问
|
||||
- 挂载云盘,聚合多个网盘到一个入口
|
||||
|
||||
---
|
||||
|
||||
## 屏6|加密安全
|
||||
|
||||

|
||||
|
||||
**AES256加密 隐私绝不泄露**
|
||||
- 加密空间,隐藏敏感文件
|
||||
- 2FA双因素认证,Google/Microsoft验证器
|
||||
- IP黑白名单,控制谁能访问
|
||||
- WebRTC加密传输,数据不走第三方服务器
|
||||
@@ -17,6 +17,6 @@
|
||||
| **运费** | 运费 | ¥10 |
|
||||
| **包装费** | 包装费 | ¥5 |
|
||||
| **装机费** | 装机费 | ¥10 |
|
||||
| **总成本** | - | ¥221.5 |
|
||||
| **建议零售价** | - | ¥272 |
|
||||
| **总成本** | - | ¥236.5 |
|
||||
| **建议零售价** | - | ¥286.5 |
|
||||
| **备注** | 3.5金属大,双盘位,双SATA口 | - |
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
| **运费** | 运费 | ¥10 |
|
||||
| **包装费** | 包装费 | ¥5 |
|
||||
| **装机费** | 装机费 | ¥10 |
|
||||
| **总成本** | - | ¥236.5 |
|
||||
| **建议零售价** | - | ¥287 |
|
||||
| **总成本** | - | ¥251.5 |
|
||||
| **建议零售价** | - | ¥301.5 |
|
||||
| **备注** | 3.5金属大,双盘位,双SATA口 | - |
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
| **运费** | 运费 | ¥10 |
|
||||
| **包装费** | 包装费 | ¥5 |
|
||||
| **装机费** | 装机费 | ¥10 |
|
||||
| **总成本** | - | ¥313.5 |
|
||||
| **建议零售价** | - | ¥363.5 |
|
||||
| **总成本** | - | ¥298.5 |
|
||||
| **建议零售价** | - | ¥348.5 |
|
||||
| **备注** | 3.5金属大,双盘位,双SATA口 | - |
|
||||
|
||||