img标签src=""和background-image:url();引发两次请求页面bug

本文探讨了在HTML中使用空的src属性时产生的页面重复加载问题,尤其是在不同浏览器中的表现差异。针对img标签及background-image:url()的使用进行了详细分析。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  img标签src=""和background-image:url();引发两次请求页面bug 具体原因是,在img 对象的src 属性是空字符串("")的时候,浏览器认为这是一个缺省值,值的内容为当前网页的路径。
浏览器会用当前路径进行再一次载入,并把其内容作为图像的二进制内 容并试图显示。
对于不同的浏览器测试后,发现对于有无src 或者src 是否为空的情况,还不尽相同,测试结果如下表。
 
代码FirefoxIE6IE7
<img src="" />会重复载入会重复载入会重复载入
<img src />会重复载入正常正常
<img />正常正常正常
 
以后如果图片路径后来才赋值的,一定注意这个问题,不要加上src="";或者background-image:url(); 。
(IE中只有img标签有上述问题,而在chrome、firefox、safari中<script src="">和<link href="">都会导致出现一个新的请求)

转载于:https://www.cnblogs.com/wqhwe/p/4933819.html

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="../css/swiper.min.css"> <link rel="stylesheet" href="../css/demo.css"> <title>Document</title> </head> <body> <div class="seamlesswrap"> <!-- 1.swiper无缝轮播 --> <div class="swiper-container seamless01-swiper"> <div class="swiper-wrapper"> <div class="swiper-slide"> <img src="../img/img01.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img02.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img03.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img04.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img05.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img06.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img07.jpg"/> </div> </div> </div> <div class="swiper-container seamless02-swiper"> <div class="swiper-wrapper"> <div class="swiper-slide"> <img src="../img/img01.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img02.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img03.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img04.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img05.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img06.jpg"/> </div> <div class="swiper-slide"> <img src="../img/img07.jpg"/> </div> </div> </div> </div> </body> <script src="../js/jquery.js"></script> <script src="../js/swiper.min.js"></script> <script> $(function(){ var mySwiper = new Swiper('.seamless01-swiper', { observer: true, //开启动态检查器,监测swiperslide observeParents: true, //监测Swiper 的祖/父元素 speed: 4000,//切换速度 loop:true,//循环 slidesPerView:4,//显示数量 spaceBetween:10,//间隔 freeMode:true,//自动贴合 autoplay: {//自动播放 delay: 0,//自动切换的时间间隔 stopOnLastSlide: false,//切换到最后一个slide时停止自动切换 disableOnInteraction: false,//用户操作后是否停止 }, breakpoints: { 750: { //当屏幕宽度大于等于320 slidesPerView: 3, }, } }); var mySwiper = new Swiper('.seamless02-swiper', { observer: true, //开启动态检查器,监测swiperslide observeParents: true, //监测Swiper 的祖/父元素 speed: 4000,//切换速度 loop:true,//循环 slidesPerView:4,//显示数量 spaceBetween:10,//间隔 freeMode:true,//自动贴合 autoplay: {//自动播放 delay: 0,//自动切换的时间间隔 stopOnLastSlide: false,//切换到最后一个slide时停止自动切换 disableOnInteraction: false,//用户操作后是否停止 reverseDirection: true,//方向切换 }, breakpoints: { 750: { //当屏幕宽度大于等于320 slidesPerView: 3, }, } }); }) </script> </html> 在横向无线滚动时每一张图片结束后会有卡顿一下后继续滚动,应该如何解决
最新发布
08-12
<template> <view class="container"> <!-- 表单输入区域 --> <picker :range="communities" @change="onCommunityChange"> <view class="picker">选择小区:{{ selectedCommunity || '请选择' }}</view> </picker> <input class="input" placeholder="详细位置" v-model="location" /> <textarea class="textarea" placeholder="工作内容" v-model="content"></textarea> <!-- 图片预览区域 --> <view class="image-preview"> <view v-for="(img, index) in images" :key="index" class="image-item"> <image :src="img" class="preview-img" mode="aspectFill" @click="previewImage(index)" /> <view class="delete-btn" @click="removeImage(index)">×</view> </view> </view> <button class="upload-btn" @click="chooseImages">上传照片</button> <!-- 隐藏的Canvas --> <canvas canvas-id="watermarkCanvas" :style="{ width: canvasWidth + 'px', height: canvasHeight + 'px', position: 'absolute', left: '-9999px' }" ></canvas> </view> </template> <script> export default { data() { return { communities: ['小区A', '小区B', '小区C'], selectedCommunity: '', location: '', content: '', images: [], canvasWidth: 0, canvasHeight: 0 }; }, methods: { async chooseImages() { if (!this.validateForm()) return; const res = await uni.chooseImage({ count: 3, sizeType: ['compressed'], sourceType: ['camera', 'album'] }); this.processImages(res.tempFilePaths); }, async processImages(paths) { for (const path of paths) { try { const watermarked = await this.addWatermark(path); this.images.push(watermarked); } catch (e) { console.error('水印生成失败:', e); uni.showToast({ title: '图片处理失败', icon: 'none' }); } } }, async addWatermark(imgPath) { const { width, height } = await this.getImageInfo(imgPath); const ctx = uni.createCanvasContext('watermarkCanvas', this); // 设置Canvas尺寸 this.canvasWidth = width; this.canvasHeight = height; // 分块绘制基础图片 await this.drawImageInChunks(ctx, imgPath, width, height); // 添加水印层 this.drawWatermark(ctx, width, height); // 导出结果 return new Promise((resolve, reject) => { ctx.draw(false, () => { uni.canvasToTempFilePath({ canvasId: 'watermarkCanvas', success: res => resolve(res.tempFilePath), fail: reject }, this); }); }); }, // 分块绘制方法(核心优化) async drawImageInChunks(ctx, path, totalWidth, totalHeight) { const chunkSize = 400; // 分块尺寸 for (let y = 0; y < totalHeight; y += chunkSize) { for (let x = 0; x < totalWidth; x += chunkSize) { await new Promise(resolve => { const w = Math.min(chunkSize, totalWidth - x); const h = Math.min(chunkSize, totalHeight - y); ctx.drawImage(path, x, y, w, h, x, y, w, h); ctx.draw(true, () => setTimeout(resolve, 20)); }); } } }, // 水印绘制逻辑 drawWatermark(ctx, width, height) { const now = new Date(); const timeStr = `${now.getFullYear()}-${(now.getMonth()+1).toString().padStart(2,'0')}-${now.getDate().toString().padStart(2,'0')} ${now.getHours().toString().padStart(2,'0')}:${now.getMinutes().toString().padStart(2,'0')}`; // 半透明背景层 ctx.setFillStyle('rgba(0,0,0,0.4)'); ctx.fillRect(0, height-120, width, 120); // 文字水印 ctx.setFontSize(24); ctx.setFillStyle('#ffffff'); ctx.fillText(`时间:${timeStr}`, 20, height-100); ctx.fillText(`地点:${this.selectedCommunity} ${this.location}`, 20, height-70); ctx.fillText(`内容:${this.content}`, 20, height-40); }, // 公共方法 validateForm() { if (!this.selectedCommunity || !this.location || !this.content) { uni.showToast({ title: '请填写完整信息', icon: 'none' }); return false; } return true; }, getImageInfo(path) { return new Promise((resolve, reject) => { uni.getImageInfo({ src: path, success: resolve, fail: reject }); }); }, onCommunityChange(e) { this.selectedCommunity = this.communities[e.detail.value]; }, previewImage(index) { uni.previewImage({ current: index, urls: this.images }); }, removeImage(index) { this.images.splice(index, 1); } } }; </script> <style scoped> .container { width: 100vw; height: 100vh; overflow: auto; box-sizing: border-box; padding: 30rpx; background-color: #f4f6f8; } .picker { padding: 20rpx; border: 1px solid #ccc; border-radius: 10rpx; margin-bottom: 30rpx; background-color: #fff; } .input, .textarea { border: 1px solid #ccc; border-radius: 10rpx; padding: 20rpx; margin-bottom: 30rpx; background-color: #fff; } .textarea { height: 150rpx; } .section-title { margin: 20rpx 0 10rpx; font-weight: bold; } .image-preview { display: flex; flex-wrap: wrap; gap: 10rpx; margin-bottom: 20rpx; } .image-item { position: relative; } .preview-img { width: 150rpx; height: 150rpx; object-fit: cover; border-radius: 10rpx; border: 1rpx solid #ddd; } .delete-btn { position: absolute; top: -10rpx; right: -10rpx; background-color: rgba(0, 0, 0, 0.6); color: white; border-radius: 50%; width: 40rpx; height: 40rpx; text-align: center; line-height: 40rpx; font-size: 30rpx; z-index: 10; user-select: none; } .upload-btn, .submit-btn { background-color: #007aff; color: white; padding: 20rpx; border-radius: 10rpx; margin-bottom: 20rpx; text-align: center; user-select: none; } </style> 这一份代码有水印,没图片了,你把这个bug改了
06-03
package service import ( "fmt" "log" "os" "regexp" "sort" "strconv" "strings" "unicode/utf16" "unicode/utf8" "github.com/tidwall/gjson" "github.com/tidwall/sjson" ) // ExtractedImage 包含图片的详细信息 type ExtractedImage struct { Field string // 图片所属字段(如 "spec_detail", "white_background_pic") FullPath string // 在JSON中的完整路径(用于后续操作) ImageURL string // 图片URL Index int // 在数组中的索引(如果是数组字段) IsInArray bool // 是否在数组中 } // JSONProcessor 处理 JSON 数据的工具类 type JSONProcessor struct { jsonStr string rootPath string // 动态确定的根路径(如 "schema" 或 "data") } // NewJSONProcessor 创建新的 JSON 处理器 func NewJSONProcessor(jsonStr string) *JSONProcessor { // 动态确定根路径 rootPath := determineRootPath(jsonStr) return &JSONProcessor{ jsonStr: jsonStr, rootPath: rootPath, } } // determineRootPath 动态确定根路径 func determineRootPath(jsonStr string) string { // 可能的根路径候选 candidates := []string{"schema", "data", "model"} for _, candidate := range candidates { // 检查是否存在 candidate.model if gjson.Get(jsonStr, candidate+".model").Exists() { return candidate + ".model" } // 检查是否存在 candidate if gjson.Get(jsonStr, candidate).Exists() { return candidate } } // 默认使用 "schema.model" log.Println("无法确定根路径,使用默认值 schema.model") return "schema.model" } // getFullPath 构建完整路径 func (jp *JSONProcessor) getFullPath(subPath string) string { if subPath == "" { return jp.rootPath } return jp.rootPath + "." + subPath } // RemoveInvalidImage 删除不合规图片及其关联数据 func (jp *JSONProcessor) RemoveInvalidImage(invalidURL string) error { // 1. 检查并删除 spec_detail 中的规格值 if err := jp.removeSpecValuesByImage(invalidURL); err != nil { return err } // 2. 删除其他图片字段中的无效图片 fields := []string{"white_background_pic", "main_image_three_to_four", "pic"} for _, field := range fields { // 特殊处理:白底图只替换不删除 if field == "white_background_pic" { if err := jp.replaceImageInField(field, invalidURL); err != nil { return fmt.Errorf("failed to replace in %s: %v", field, err) } } else { if err := jp.removeImageFromField(field, invalidURL); err != nil { return fmt.Errorf("failed to remove from %s: %v", field, err) } } } // 3. 从描述中删除图片 if err := jp.removeImageFromDescription(invalidURL); err != nil { return fmt.Errorf("failed to remove from description: %v", err) } return nil } // replaceImageInField 替换指定字段中的图片(特殊处理) func (jp *JSONProcessor) replaceImageInField(fieldPath, invalidURL string) error { fullPath := jp.getFullPath(fieldPath + ".value") result := gjson.Get(jp.jsonStr, fullPath) if !result.Exists() { return nil } var newJSON string var err error result.ForEach(func(index gjson.Result, item gjson.Result) bool { if url := item.Get("url").String(); url == invalidURL { // 特殊处理:替换为默认图片 newImage := map[string]interface{}{ "url": "https://default-image.com/replacement.jpg", "width": 800, "height": 600, } itemPath := fmt.Sprintf("%s.%d", fullPath, index.Int()) newJSON, err = sjson.Set(jp.jsonStr, itemPath, newImage) if err != nil { return false } jp.jsonStr = newJSON } return true }) return err } // removeSpecValuesByImage 删除包含指定图片URL的规格值 func (jp *JSONProcessor) removeSpecValuesByImage(invalidURL string) error { specDetailPath := jp.getFullPath("spec_detail.value") result := gjson.Get(jp.jsonStr, specDetailPath) if !result.Exists() { return nil // 没有规格数据,直接返回 } // 收集需要删除的规格值ID var specValueIDs []string result.ForEach(func(_, group gjson.Result) bool { group.Get("spec_values").ForEach(func(_, spec gjson.Result) bool { if imgURL := spec.Get("img_url").String(); imgURL == invalidURL { if id := spec.Get("id").String(); id != "" { specValueIDs = append(specValueIDs, id) } } return true }) return true }) // 删除所有关联的规格值 for _, id := range specValueIDs { if err := jp.RemoveSpecValueByID(id); err != nil { return fmt.Errorf("failed to remove spec value %s: %v", id, err) } } return nil } // removeImageFromField 从指定图片字段中删除无效图片 func (jp *JSONProcessor) removeImageFromField(fieldPath, invalidURL string) error { fullPath := jp.getFullPath(fieldPath + ".value") result := gjson.Get(jp.jsonStr, fullPath) if !result.Exists() { return nil // 字段不存在,直接返回 } // 收集需要删除的索引 var indicesToDelete []int result.ForEach(func(index gjson.Result, item gjson.Result) bool { if url := item.Get("url").String(); url == invalidURL { indicesToDelete = append(indicesToDelete, int(index.Int())) } return true }) // 从后往前删除(避免索引变化) sort.Sort(sort.Reverse(sort.IntSlice(indicesToDelete))) for _, idx := range indicesToDelete { path := fmt.Sprintf("%s.%d", fullPath, idx) var err error jp.jsonStr, err = sjson.Delete(jp.jsonStr, path) if err != nil { return err } } return nil } // unescapeUnicode 解码 Unicode 转义序列(如 \u003c -> <) func unescapeUnicode(s string) string { var buf strings.Builder reader := strings.NewReader(s) // 使用不同的变量名避免冲突 for { r, _, err := reader.ReadRune() // 读取原始字符 if err != nil { break } if r == '\\' { next, _, _ := reader.ReadRune() // 读取下一个字符 if next == 'u' { // 读取 4 位十六进制 hex := make([]rune, 4) for i := 0; i < 4; i++ { ch, _, _ := reader.ReadRune() hex[i] = ch } // 转换为 rune if code, err := strconv.ParseInt(string(hex), 16, 32); err == nil { buf.WriteRune(rune(code)) continue } buf.WriteRune('\\') buf.WriteRune('u') buf.WriteString(string(hex)) continue } buf.WriteRune('\\') buf.WriteRune(next) continue } buf.WriteRune(r) } return buf.String() } // escapeUnicode 将特殊字符编码为 Unicode 转义序列 func escapeUnicode(s string) string { var buf strings.Builder for _, r := range s { if r <= 0x7F { // ASCII 字符 switch r { case '"', '\\', '<', '>', '&': buf.WriteString(fmt.Sprintf("\\u%04X", r)) default: buf.WriteRune(r) } } else { // 非 ASCII 字符 if utf8.ValidRune(r) { buf.WriteRune(r) } else { // 处理代理对(surrogate pairs) for _, surr := range utf16.Encode([]rune{r}) { buf.WriteString(fmt.Sprintf("\\u%04X", surr)) } } } } return buf.String() } // isEscapedFormat 更精确地检测字符串是否为Unicode转义格式 func isEscapedFormat(s string) bool { // 检查是否存在未转义的HTML标签字符 if strings.Contains(s, "<") || strings.Contains(s, ">") { return false } // 使用正则表达式检查是否存在Unicode转义序列 unicodeEscapePattern := regexp.MustCompile(`\\u[0-9a-fA-F]{4}`) return unicodeEscapePattern.MatchString(s) } // removeImageFromDescription 从描述中删除无效图片(保持原始格式) func (jp *JSONProcessor) removeImageFromDescription(invalidURL string) error { descPath := jp.getFullPath("description.value") result := gjson.Get(jp.jsonStr, descPath) if !result.Exists() { return nil } // 获取原始字符串 originalHTML := result.String() // 检测原始格式 isEscaped := isEscapedFormat(originalHTML) var decodedHTML string if isEscaped { // Unicode转义格式:先解码 decodedHTML = unescapeUnicode(originalHTML) } else { // 直接HTML格式:直接使用 decodedHTML = originalHTML } // 处理图片删除 escapedURL := regexp.QuoteMeta(invalidURL) re := regexp.MustCompile( `<img\s[^>]*?src\s*=\s*["']` + escapedURL + `["'][^>]*>`, ) newHTML := re.ReplaceAllString(decodedHTML, "") // 根据原始格式重新编码 var err error if isEscaped { // 重新编码为Unicode转义序列 finalContent := escapeUnicode(newHTML) // 直接设置字符串,sjson会自动处理必要的转义 jp.jsonStr, err = sjson.Set(jp.jsonStr, descPath, finalContent) } else { // 保持直接HTML格式 finalContent := newHTML // 使用SetRaw设置,避免二次编码 jp.jsonStr, err = sjson.SetRaw(jp.jsonStr, descPath, strconv.Quote(finalContent)) } return err } // ExtractAllPics 提取所有图片及其详细信息 func (jp *JSONProcessor) ExtractAllPics() []ExtractedImage { var images []ExtractedImage // 1. 处理指定字段的图片 fields := []string{"spec_detail", "white_background_pic", "main_image_three_to_four", "pic"} for _, field := range fields { path := jp.getFullPath(field + ".value") result := gjson.Get(jp.jsonStr, path) if result.Exists() { // 处理数组字段 if result.IsArray() { array := result.Array() for idx, item := range array { // 处理 spec_detail 的特殊结构 if field == "spec_detail" { specValues := item.Get("spec_values") if specValues.Exists() && specValues.IsArray() { specArray := specValues.Array() for specIdx, spec := range specArray { if img := spec.Get("img_url"); img.Exists() { specPath := fmt.Sprintf("%s.%d.spec_values.%d.img_url", path, idx, specIdx) images = append(images, ExtractedImage{ Field: field, FullPath: specPath, ImageURL: img.String(), Index: specIdx, IsInArray: true, }) } } } } else if url := item.Get("url"); url.Exists() { // 处理其他标准字段 itemPath := fmt.Sprintf("%s.%d.url", path, idx) images = append(images, ExtractedImage{ Field: field, FullPath: itemPath, ImageURL: url.String(), Index: idx, IsInArray: true, }) } } } else { // 处理非数组字段(如果存在) if url := result.Get("url"); url.Exists() { images = append(images, ExtractedImage{ Field: field, FullPath: path + ".url", ImageURL: url.String(), IsInArray: false, }) } } } } // 2. 处理 description 中的图片 descPath := jp.getFullPath("description.value") descResult := gjson.Get(jp.jsonStr, descPath) if descResult.Exists() { html := descResult.String() re := regexp.MustCompile(`<img[^>]+src="([^">]+)"`) matches := re.FindAllStringSubmatch(html, -1) for _, match := range matches { if len(match) > 1 { images = append(images, ExtractedImage{ Field: "description", FullPath: descPath, ImageURL: match[1], }) } } } return images } // RemoveSpecValueByID 根据 spec_value ID 删除规格值及其关联的 SKU func (jp *JSONProcessor) RemoveSpecValueByID(specValueID string) error { // 1. 删除 spec_detail 中的 spec_value specDetailPath := jp.getFullPath("spec_detail.value") specDetailResult := gjson.Get(jp.jsonStr, specDetailPath) if !specDetailResult.Exists() { return fmt.Errorf("spec_detail.value does not exist") } specGroups := specDetailResult.Array() // 收集需要删除的索引(组索引值索引) type deletionPoint struct { groupIndex int valueIndex int } var deletions []deletionPoint // 遍历所有规格组 for groupIdx, group := range specGroups { specValues := group.Get("spec_values").Array() // 遍历组内的规格值 for valueIdx, value := range specValues { if id := value.Get("id").String(); id == specValueID { deletions = append(deletions, deletionPoint{groupIdx, valueIdx}) } } } // 从后往前删除(避免索引变化) sort.Slice(deletions, func(i, j int) bool { if deletions[i].groupIndex == deletions[j].groupIndex { return deletions[i].valueIndex > deletions[j].valueIndex } return deletions[i].groupIndex > deletions[j].groupIndex }) for _, del := range deletions { path := fmt.Sprintf("%s.%d.spec_values.%d", specDetailPath, del.groupIndex, del.valueIndex) var err error jp.jsonStr, err = sjson.Delete(jp.jsonStr, path) if err != nil { return err } } // 2. 删除关联的 SKU skuDetailPath := jp.getFullPath("sku_detail.value") skuDetailResult := gjson.Get(jp.jsonStr, skuDetailPath) if !skuDetailResult.Exists() { // 没有 SKU 数据,直接返回 return nil } skus := skuDetailResult.Array() var skuIndicesToDelete []int // 收集需要删除的 SKU 索引 for idx, sku := range skus { specDetailIDs := sku.Get("spec_detail_ids").Array() for _, id := range specDetailIDs { if id.String() == specValueID { skuIndicesToDelete = append(skuIndicesToDelete, idx) break // 找到匹配即跳出 } } } // 从后往前删除 SKU(避免索引变化) sort.Sort(sort.Reverse(sort.IntSlice(skuIndicesToDelete))) for _, idx := range skuIndicesToDelete { path := fmt.Sprintf("%s.%d", skuDetailPath, idx) var err error jp.jsonStr, err = sjson.Delete(jp.jsonStr, path) if err != nil { return err } } return nil } // UpdateSkuPrice 更新 SKU 的价格 func (jp *JSONProcessor) UpdateSkuPrice(skuID, newPrice string) error { path := jp.getFullPath("sku_detail.value") result := gjson.Get(jp.jsonStr, path) if !result.Exists() { return fmt.Errorf("sku_detail.value does not exist") } skuArray := result.Array() for idx, sku := range skuArray { if id := sku.Get("id").String(); id == skuID { fullPath := fmt.Sprintf("%s.%d.price", path, idx) var err error jp.jsonStr, err = sjson.Set(jp.jsonStr, fullPath, newPrice) return err } } return fmt.Errorf("SKU with ID %s not found", skuID) } // UpdateSkuStock 更新 SKU 的库存 func (jp *JSONProcessor) UpdateSkuStock(skuID string, newStock int) error { path := jp.getFullPath("sku_detail.value") result := gjson.Get(jp.jsonStr, path) if !result.Exists() { return fmt.Errorf("sku_detail.value does not exist") } skuArray := result.Array() for idx, sku := range skuArray { if id := sku.Get("id").String(); id == skuID { // 更新 stock_info.stock_num stockPath := fmt.Sprintf("%s.%d.stock_info.stock_num", path, idx) var err error jp.jsonStr, err = sjson.Set(jp.jsonStr, stockPath, newStock) if err != nil { return err } // 更新 self_sell_stock selfStockPath := fmt.Sprintf("%s.%d.self_sell_stock", path, idx) jp.jsonStr, err = sjson.Set(jp.jsonStr, selfStockPath, newStock) return err } } return fmt.Errorf("SKU with ID %s not found", skuID) } // GetField 获取指定字段的值 func (jp *JSONProcessor) GetField(fieldPath string) (gjson.Result, bool) { fullPath := jp.getFullPath(fieldPath) result := gjson.Get(jp.jsonStr, fullPath) return result, result.Exists() } // UpdateField 更新指定字段的值 func (jp *JSONProcessor) UpdateField(fieldPath string, newValue interface{}) error { fullPath := jp.getFullPath(fieldPath) newJSON, err := sjson.Set(jp.jsonStr, fullPath, newValue) if err != nil { return err } jp.jsonStr = newJSON return nil } // DeleteField 删除指定字段 func (jp *JSONProcessor) DeleteField(fieldPath string) error { fullPath := jp.getFullPath(fieldPath) newJSON, err := sjson.Delete(jp.jsonStr, fullPath) if err != nil { return err } jp.jsonStr = newJSON return nil } // AddArrayItem 向数组字段添加新元素 func (jp *JSONProcessor) AddArrayItem(fieldPath string, newItem interface{}) error { // 检查数组字段是否存在 basePath := jp.getFullPath(fieldPath + ".value") result := gjson.Get(jp.jsonStr, basePath) // 如果数组不存在,先创建空数组 if !result.Exists() { var err error jp.jsonStr, err = sjson.Set(jp.jsonStr, basePath, []interface{}{}) if err != nil { return fmt.Errorf("failed to create array field: %v", err) } } // 添加新元素到数组末尾 fullPath := fmt.Sprintf("%s.-1", basePath) newJSON, err := sjson.Set(jp.jsonStr, fullPath, newItem) if err != nil { return fmt.Errorf("failed to add array item: %v", err) } jp.jsonStr = newJSON return nil } // RemoveArrayItem 从数组中删除指定索引的元素 func (jp *JSONProcessor) RemoveArrayItem(fieldPath string, index int) error { basePath := jp.getFullPath(fieldPath + ".value") result := gjson.Get(jp.jsonStr, basePath) if !result.Exists() { return fmt.Errorf("array field does not exist") } // 检查索引是否有效 array := result.Array() if index < 0 || index >= len(array) { return fmt.Errorf("index %d out of range [0, %d]", index, len(array)-1) } fullPath := fmt.Sprintf("%s.%d", basePath, index) newJSON, err := sjson.Delete(jp.jsonStr, fullPath) if err != nil { return err } jp.jsonStr = newJSON return nil } // GetJSON 获取当前处理后的 JSON func (jp *JSONProcessor) GetJSON() string { return jp.jsonStr } // TestFunc 测试函数 func TestFunc() { content, err := os.ReadFile("asyncCheckPost.json") if err != nil { log.Printf("读取过滤文件失败: %v", err) return } processor := NewJSONProcessor(string(content)) // 提取所有图片 allImages := processor.ExtractAllPics() fmt.Printf("提取到 %d 张图片\n", len(allImages)) // 打印图片信息 for _, img := range allImages { fmt.Printf("字段: %-25s | URL: %s\n", img.Field, img.ImageURL) fmt.Printf("路径: %s\n", img.FullPath) if img.IsInArray { fmt.Printf("索引: %d\n", img.Index) } fmt.Println("----------------------------------") } // 假设我们检测到第二张图片不合规 if len(allImages) > 1 { invalidImage := allImages[1] fmt.Printf("检测到不合规图片: %s (位于 %s)\n", invalidImage.ImageURL, invalidImage.Field) // 特殊处理白底图 if invalidImage.Field == "white_background_pic" { fmt.Println("特殊处理:替换白底图") if err := processor.replaceImageInField(invalidImage.Field, invalidImage.ImageURL); err != nil { fmt.Println("替换图片失败:", err) } else { fmt.Println("成功替换白底图") } } else { // 删除不合规图片及其关联数据 if err := processor.RemoveInvalidImage(invalidImage.ImageURL); err != nil { fmt.Println("删除不合规图片失败:", err) } else { fmt.Println("成功删除不合规图片及其关联数据") } } } // 1. 删除规格值及其关联的 SKU specValueID := "1839581026529404" // 小号钢架尺30米的 ID if err := processor.RemoveSpecValueByID(specValueID); err != nil { fmt.Println("删除规格值失败:", err) } else { fmt.Println("成功删除规格值及其关联SKU") } // 2. 更新 SKU 价格库存 skuID := "3527608283404802" // 第一个 SKU 的 ID newPrice := "99.99" newStock := 3000 if err := processor.UpdateSkuPrice(skuID, newPrice); err != nil { fmt.Println("更新价格失败:", err) } else { fmt.Println("成功更新SKU价格") } if err := processor.UpdateSkuStock(skuID, newStock); err != nil { fmt.Println("更新库存失败:", err) } else { fmt.Println("成功更新SKU库存") } // 3. 测试数组操作 // 向不存在的数组添加元素 if err := processor.AddArrayItem("new_field", map[string]string{"test": "value"}); err != nil { fmt.Println("添加数组项失败:", err) } else { fmt.Println("成功添加数组项到新字段") } // 尝试删除不存在的数组项 if err := processor.RemoveArrayItem("non_existent_field", 0); err != nil { fmt.Println("删除数组项失败(预期):", err) } else { fmt.Println("意外成功删除不存在的数组项") } // 尝试越界删除 if err := processor.RemoveArrayItem("pic", 100); err != nil { fmt.Println("删除数组项失败(预期):", err) } else { fmt.Println("意外成功删除越界数组项") } // 获取最终 JSON // finalJSON := processor.GetJSON() // fmt.Println(finalJSON) } 这是修改后代码,经过调试,在原始数据为:"\u003cp\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_9af34d3b91dfcda1f1aa02cbd595fed0_sx_402315_www790-1125\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_54ab3b361d68c7bb91d1fdb93e2f9d48_sx_84695_www790-645\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_66e5bc7a2ae789f9880a5329d3236380_sx_472879_www790-1170\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e0f605bb1021b0cc92c805fdd64a537e_sx_357278_www790-1054\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_afd37094560a88654f3abe5b31dab275_sx_309478_www790-1126\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_29350443b0952fdebb41a90bcb8d3e23_sx_257960_www790-949\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_582e010aec902ddfa4e814ac7fdb49e2_sx_74202_www790-347\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_807296a14becfead2f2c15427217fc78_sx_197482_www790-1121\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_ed2c93c7f42ac21027712920c9044af7_sx_85018_www790-358\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_468e4a3ee78512501983183a56adb9d8_sx_192991_www790-850\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_f2b733d2637cf06262e7bbf3179b2f5b_sx_183613_www790-915\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_d8c57ff3a871af865c5b600b05d2b9dd_sx_129008_www790-747\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_6e3cd37d29b3a2931251cbf2f9a95182_sx_130183_www790-739\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e702d505e493d3a194f9e1d9defc2bd8_sx_125097_www790-759\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a4e66d51475bb4427acfc96b1b427354_sx_123603_www790-754\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_862268da94f1d404cf17a9f563da1616_sx_215538_www750-779\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_7aaf5ee245ebf2251b89edb26698405d_sx_179597_www750-547\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_1a5719c6d9fd72751e90050d293e0628_sx_403325_www750-1204\" style=\"max-width:100%;\"/\u003e\u003c/p\u003e" 时,isEscapedFormat 直接在检查是否存在未转义的HTML标签字符时返回为false, 注释代码: if strings.Contains(s, "<") || strings.Contains(s, ">") { return false } 直接使用正则表达式检查是否存在Unicode转义序列同样返回的false ,请帮我修复这个bug
08-09
package service import ( "fmt" "log" "os" "regexp" "sort" "github.com/tidwall/gjson" "github.com/tidwall/sjson" ) // JSONProcessor 处理 JSON 数据的工具类 type JSONProcessor struct { jsonStr string } // NewJSONProcessor 创建新的 JSON 处理器 func NewJSONProcessor(jsonStr string) *JSONProcessor { return &JSONProcessor{jsonStr: jsonStr} } // RemoveInvalidImage 删除不合规图片及其关联数据 func (jp *JSONProcessor) RemoveInvalidImage(invalidURL string) error { // basePath := "schema.model" // 1. 检查并删除 spec_detail 中的规格值 if err := jp.removeSpecValuesByImage(invalidURL); err != nil { return err } // 2. 删除其他图片字段中的无效图片 fields := []string{"white_background_pic", "main_image_three_to_four", "pic"} for _, field := range fields { if err := jp.removeImageFromField(field, invalidURL); err != nil { return fmt.Errorf("failed to remove from %s: %v", field, err) } } // 3. 从描述中删除图片 if err := jp.removeImageFromDescription(invalidURL); err != nil { return fmt.Errorf("failed to remove from description: %v", err) } return nil } // removeSpecValuesByImage 删除包含指定图片URL的规格值 func (jp *JSONProcessor) removeSpecValuesByImage(invalidURL string) error { basePath := "schema.model" specDetailPath := fmt.Sprintf("%s.spec_detail.value", basePath) result := gjson.Get(jp.jsonStr, specDetailPath) if !result.Exists() { return nil // 没有规格数据,直接返回 } // 收集需要删除的规格值ID var specValueIDs []string result.ForEach(func(_, group gjson.Result) bool { group.Get("spec_values").ForEach(func(_, spec gjson.Result) bool { if imgURL := spec.Get("img_url").String(); imgURL == invalidURL { if id := spec.Get("id").String(); id != "" { specValueIDs = append(specValueIDs, id) } } return true }) return true }) // 删除所有关联的规格值 for _, id := range specValueIDs { if err := jp.RemoveSpecValueByID(id); err != nil { return fmt.Errorf("failed to remove spec value %s: %v", id, err) } } return nil } // removeImageFromField 从指定图片字段中删除无效图片 func (jp *JSONProcessor) removeImageFromField(fieldPath, invalidURL string) error { fullPath := fmt.Sprintf("schema.model.%s.value", fieldPath) result := gjson.Get(jp.jsonStr, fullPath) if !result.Exists() { return nil // 字段不存在,直接返回 } // 收集需要删除的索引 var indicesToDelete []int result.ForEach(func(index gjson.Result, item gjson.Result) bool { if url := item.Get("url").String(); url == invalidURL { indicesToDelete = append(indicesToDelete, int(index.Int())) } return true }) // 从后往前删除(避免索引变化) sort.Sort(sort.Reverse(sort.IntSlice(indicesToDelete))) for _, idx := range indicesToDelete { path := fmt.Sprintf("%s.%d", fullPath, idx) var err error jp.jsonStr, err = sjson.Delete(jp.jsonStr, path) if err != nil { return err } } return nil } // removeImageFromDescription 从描述中删除无效图片 func (jp *JSONProcessor) removeImageFromDescription(invalidURL string) error { descPath := "schema.model.description.value" result := gjson.Get(jp.jsonStr, descPath) if !result.Exists() { return nil // 描述不存在,直接返回 } html := result.String() // 正则表达式匹配包含指定URLimg标签 re := regexp.MustCompile(`<img[^>]+src="` + regexp.QuoteMeta(invalidURL) + `"[^>]*>`) newHTML := re.ReplaceAllString(html, "") // 更新描述 _, err := sjson.Set(jp.jsonStr, descPath, newHTML) return err } // ExtractAllPics 提取所有图片 URL(包括描述中的图片) func (jp *JSONProcessor) ExtractAllPics() []string { // 基础路径 basePath := "schema.model" // 存储所有图片的集合(使用 map 去重) uniquePics := make(map[string]bool) // 1. 处理指定字段的图片 fields := []string{"spec_detail", "white_background_pic", "main_image_three_to_four", "pic"} for _, field := range fields { path := fmt.Sprintf("%s.%s.value", basePath, field) result := gjson.Get(jp.jsonStr, path) if result.Exists() { result.ForEach(func(_, item gjson.Result) bool { // 处理 spec_detail 的特殊结构 if field == "spec_detail" { item.Get("spec_values").ForEach(func(_, spec gjson.Result) bool { if img := spec.Get("img_url"); img.Exists() { uniquePics[img.String()] = true } return true }) } else if url := item.Get("url"); url.Exists() { // 处理其他标准字段 uniquePics[url.String()] = true } return true }) } } // 2. 处理 description 中的图片 descPath := fmt.Sprintf("%s.description.value", basePath) descResult := gjson.Get(jp.jsonStr, descPath) if descResult.Exists() { html := descResult.String() re := regexp.MustCompile(`<img[^>]+src="([^">]+)"`) matches := re.FindAllStringSubmatch(html, -1) for _, match := range matches { if len(match) > 1 && !uniquePics[match[1]] { uniquePics[match[1]] = true } } } // 转换为切片返回 allPics := make([]string, 0, len(uniquePics)) for pic := range uniquePics { allPics = append(allPics, pic) } return allPics } // RemoveSpecValueByID 根据 spec_value ID 删除规格值及其关联的 SKU func (jp *JSONProcessor) RemoveSpecValueByID(specValueID string) error { basePath := "schema.model" // 1. 删除 spec_detail 中的 spec_value specDetailPath := fmt.Sprintf("%s.spec_detail.value", basePath) specDetailResult := gjson.Get(jp.jsonStr, specDetailPath) if !specDetailResult.Exists() { return fmt.Errorf("spec_detail.value does not exist") } specGroups := specDetailResult.Array() // 收集需要删除的索引(组索引值索引) type deletionPoint struct { groupIndex int valueIndex int } var deletions []deletionPoint // 遍历所有规格组 for groupIdx, group := range specGroups { specValues := group.Get("spec_values").Array() // 遍历组内的规格值 for valueIdx, value := range specValues { if id := value.Get("id").String(); id == specValueID { deletions = append(deletions, deletionPoint{groupIdx, valueIdx}) } } } // 从后往前删除(避免索引变化) sort.Slice(deletions, func(i, j int) bool { if deletions[i].groupIndex == deletions[j].groupIndex { return deletions[i].valueIndex > deletions[j].valueIndex } return deletions[i].groupIndex > deletions[j].groupIndex }) for _, del := range deletions { path := fmt.Sprintf("%s.%d.spec_values.%d", specDetailPath, del.groupIndex, del.valueIndex) var err error jp.jsonStr, err = sjson.Delete(jp.jsonStr, path) if err != nil { return err } } // 2. 删除关联的 SKU skuDetailPath := fmt.Sprintf("%s.sku_detail.value", basePath) skuDetailResult := gjson.Get(jp.jsonStr, skuDetailPath) if !skuDetailResult.Exists() { // 没有 SKU 数据,直接返回 return nil } skus := skuDetailResult.Array() var skuIndicesToDelete []int // 收集需要删除的 SKU 索引 for idx, sku := range skus { specDetailIDs := sku.Get("spec_detail_ids").Array() for _, id := range specDetailIDs { if id.String() == specValueID { skuIndicesToDelete = append(skuIndicesToDelete, idx) break // 找到匹配即跳出 } } } // 从后往前删除 SKU(避免索引变化) sort.Sort(sort.Reverse(sort.IntSlice(skuIndicesToDelete))) for _, idx := range skuIndicesToDelete { path := fmt.Sprintf("%s.%d", skuDetailPath, idx) var err error jp.jsonStr, err = sjson.Delete(jp.jsonStr, path) if err != nil { return err } } return nil } // UpdateSkuPrice 更新 SKU 的价格 func (jp *JSONProcessor) UpdateSkuPrice(skuID, newPrice string) error { path := "schema.model.sku_detail.value" result := gjson.Get(jp.jsonStr, path) if !result.Exists() { return fmt.Errorf("sku_detail.value does not exist") } skuArray := result.Array() for idx, sku := range skuArray { if id := sku.Get("id").String(); id == skuID { fullPath := fmt.Sprintf("%s.%d.price", path, idx) var err error jp.jsonStr, err = sjson.Set(jp.jsonStr, fullPath, newPrice) return err } } return fmt.Errorf("SKU with ID %s not found", skuID) } // UpdateSkuStock 更新 SKU 的库存 func (jp *JSONProcessor) UpdateSkuStock(skuID string, newStock int) error { path := "schema.model.sku_detail.value" result := gjson.Get(jp.jsonStr, path) if !result.Exists() { return fmt.Errorf("sku_detail.value does not exist") } skuArray := result.Array() for idx, sku := range skuArray { if id := sku.Get("id").String(); id == skuID { // 更新 stock_info.stock_num stockPath := fmt.Sprintf("%s.%d.stock_info.stock_num", path, idx) var err error jp.jsonStr, err = sjson.Set(jp.jsonStr, stockPath, newStock) if err != nil { return err } // 更新 self_sell_stock selfStockPath := fmt.Sprintf("%s.%d.self_sell_stock", path, idx) jp.jsonStr, err = sjson.Set(jp.jsonStr, selfStockPath, newStock) return err } } return fmt.Errorf("SKU with ID %s not found", skuID) } // GetField 获取指定字段的值 func (jp *JSONProcessor) GetField(fieldPath string) (gjson.Result, bool) { fullPath := fmt.Sprintf("schema.model.%s", fieldPath) result := gjson.Get(jp.jsonStr, fullPath) return result, result.Exists() } // UpdateField 更新指定字段的值 func (jp *JSONProcessor) UpdateField(fieldPath string, newValue interface{}) error { fullPath := fmt.Sprintf("schema.model.%s", fieldPath) newJSON, err := sjson.Set(jp.jsonStr, fullPath, newValue) if err != nil { return err } jp.jsonStr = newJSON return nil } // DeleteField 删除指定字段 func (jp *JSONProcessor) DeleteField(fieldPath string) error { fullPath := fmt.Sprintf("schema.model.%s", fieldPath) newJSON, err := sjson.Delete(jp.jsonStr, fullPath) if err != nil { return err } jp.jsonStr = newJSON return nil } // AddArrayItem 向数组字段添加新元素 func (jp *JSONProcessor) AddArrayItem(fieldPath string, newItem interface{}) error { // 检查数组字段是否存在 basePath := fmt.Sprintf("schema.model.%s.value", fieldPath) result := gjson.Get(jp.jsonStr, basePath) // 如果数组不存在,先创建空数组 if !result.Exists() { var err error jp.jsonStr, err = sjson.Set(jp.jsonStr, basePath, []interface{}{}) if err != nil { return fmt.Errorf("failed to create array field: %v", err) } } // 添加新元素到数组末尾 fullPath := fmt.Sprintf("%s.-1", basePath) newJSON, err := sjson.Set(jp.jsonStr, fullPath, newItem) if err != nil { return fmt.Errorf("failed to add array item: %v", err) } jp.jsonStr = newJSON return nil } // RemoveArrayItem 从数组中删除指定索引的元素 func (jp *JSONProcessor) RemoveArrayItem(fieldPath string, index int) error { basePath := fmt.Sprintf("schema.model.%s.value", fieldPath) result := gjson.Get(jp.jsonStr, basePath) if !result.Exists() { return fmt.Errorf("array field does not exist") } // 检查索引是否有效 array := result.Array() if index < 0 || index >= len(array) { return fmt.Errorf("index %d out of range [0, %d]", index, len(array)-1) } fullPath := fmt.Sprintf("%s.%d", basePath, index) newJSON, err := sjson.Delete(jp.jsonStr, fullPath) if err != nil { return err } jp.jsonStr = newJSON return nil } // GetJSON 获取当前处理后的 JSON func (jp *JSONProcessor) GetJSON() string { return jp.jsonStr } // TestFunc 测试函数 func TestFunc() { content, err := os.ReadFile("asyncCheckPost.json") if err != nil { log.Printf("读取过滤文件失败: %v", err) return } processor := NewJSONProcessor(string(content)) // 提取所有图片 allPics := processor.ExtractAllPics() fmt.Printf("提取到 %d 张图片\n", len(allPics)) // 假设我们检测到第二张图片不合规 if len(allPics) > 1 { invalidURL := "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314" fmt.Printf("检测到不合规图片: %s\n", invalidURL) // 删除不合规图片及其关联数据 if err := processor.RemoveInvalidImage(invalidURL); err != nil { fmt.Println("删除不合规图片失败:", err) } else { fmt.Println("成功删除不合规图片及其关联数据") // 验证删除后图片数量 newPics := processor.ExtractAllPics() fmt.Printf("删除后剩余图片: %d 张\n", len(newPics)) // 检查是否不再包含不合规图片 for _, url := range newPics { if url == invalidURL { fmt.Println("错误: 不合规图片仍然存在!") break } } } } // 1. 删除规格值及其关联的 SKU specValueID := "1839581026529404" // 小号钢架尺30米的 ID if err := processor.RemoveSpecValueByID(specValueID); err != nil { fmt.Println("删除规格值失败:", err) } else { fmt.Println("成功删除规格值及其关联SKU") } // 2. 更新 SKU 价格库存 skuID := "3527608283404802" // 第一个 SKU 的 ID newPrice := "99.99" newStock := 3000 if err := processor.UpdateSkuPrice(skuID, newPrice); err != nil { fmt.Println("更新价格失败:", err) } else { fmt.Println("成功更新SKU价格") } if err := processor.UpdateSkuStock(skuID, newStock); err != nil { fmt.Println("更新库存失败:", err) } else { fmt.Println("成功更新SKU库存") } // 3. 测试数组操作 // 向不存在的数组添加元素 if err := processor.AddArrayItem("new_field", map[string]string{"test": "value"}); err != nil { fmt.Println("添加数组项失败:", err) } else { fmt.Println("成功添加数组项到新字段") } // 尝试删除不存在的数组项 if err := processor.RemoveArrayItem("non_existent_field", 0); err != nil { fmt.Println("删除数组项失败(预期):", err) } else { fmt.Println("意外成功删除不存在的数组项") } // 尝试越界删除 if err := processor.RemoveArrayItem("pic", 100); err != nil { fmt.Println("删除数组项失败(预期):", err) } else { fmt.Println("意外成功删除越界数组项") } // 获取最终 JSON // finalJSON := processor.GetJSON() // fmt.Println(finalJSON) } 这段代码是修改后的代码,要处理的json数据为:{"schema":{"model":{"sku_detail":{"value":[{"brand_country":null,"cargo_related_cmpu":null,"cb_wares_info":null,"customs_report_info":null,"id":"3527608283404802","price":"70.8","reserved_stock_info":{"channel_stock_detail":[],"channel_stock_num":null,"promotion_stock_num":null},"self_sell_stock":5000,"shop_warehouse":null,"sku_delivery_delay_day":"","sku_id":"3527608283404802","sku_status":true,"source_country":null,"source_product":null,"spec_detail_ids":["1839581026529356"],"stock_info":{"stock_inc_num":0,"stock_num":5000,"use_cargo_stock":false},"supplier_id":""},{"brand_country":null,"cargo_related_cmpu":null,"cb_wares_info":null,"customs_report_info":null,"id":"3527608283405058","price":"97.8","reserved_stock_info":{"channel_stock_detail":[],"channel_stock_num":null,"promotion_stock_num":null},"self_sell_stock":5000,"shop_warehouse":null,"sku_delivery_delay_day":"","sku_id":"3527608283405058","sku_status":true,"source_country":null,"source_product":null,"spec_detail_ids":["1839581026529372"],"stock_info":{"stock_inc_num":0,"stock_num":5000,"use_cargo_stock":false},"supplier_id":""},{"brand_country":null,"cargo_related_cmpu":null,"cb_wares_info":null,"customs_report_info":null,"id":"3527608283405314","price":"127.8","reserved_stock_info":{"channel_stock_detail":[],"channel_stock_num":null,"promotion_stock_num":null},"self_sell_stock":5000,"shop_warehouse":null,"sku_delivery_delay_day":"","sku_id":"3527608283405314","sku_status":true,"source_country":null,"source_product":null,"spec_detail_ids":["1839581026529388"],"stock_info":{"stock_inc_num":0,"stock_num":5000,"use_cargo_stock":false},"supplier_id":""},{"brand_country":null,"cargo_related_cmpu":null,"cb_wares_info":null,"customs_report_info":null,"id":"3527608283405570","price":"41.7","reserved_stock_info":{"channel_stock_detail":[],"channel_stock_num":null,"promotion_stock_num":null},"self_sell_stock":5000,"shop_warehouse":null,"sku_delivery_delay_day":"","sku_id":"3527608283405570","sku_status":true,"source_country":null,"source_product":null,"spec_detail_ids":["1839581026529404"],"stock_info":{"stock_inc_num":0,"stock_num":5000,"use_cargo_stock":false},"supplier_id":""},{"brand_country":null,"cargo_related_cmpu":null,"cb_wares_info":null,"customs_report_info":null,"id":"3527608283405826","price":"53.7","reserved_stock_info":{"channel_stock_detail":[],"channel_stock_num":null,"promotion_stock_num":null},"self_sell_stock":5000,"shop_warehouse":null,"sku_delivery_delay_day":"","sku_id":"3527608283405826","sku_status":true,"source_country":null,"source_product":null,"spec_detail_ids":["1839581026596876"],"stock_info":{"stock_inc_num":0,"stock_num":5000,"use_cargo_stock":false},"supplier_id":""}]},"spec_detail":{"value":[{"id":"1839581026528380","name":"颜色","spec_values":[{"id":"1839581026529356","img_url":"https://p9-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_5df95571bacacf922e8c37a3de756431_sx_158437_www800-800","name":"大号钢架尺30米"},{"id":"1839581026529372","img_url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_5df95571bacacf922e8c37a3de756431_sx_158437_www800-800","name":"大号钢架尺50米"},{"id":"1839581026529388","img_url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_5df95571bacacf922e8c37a3de756431_sx_158437_www800-800","name":"大号钢架尺100米"},{"id":"1839581026529404","img_url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_fbe9fe8421903b55ba4d145a2643ed81_sx_126893_www800-800","name":"超小号钢架尺50米"},{"id":"1839581026596876","img_url":"https://p9-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_fbe9fe8421903b55ba4d145a2643ed81_sx_126893_www800-800","name":"小号钢架尺50米"}]},{"is_default":true,"id":"994777959641832039","name":"默认","spec_values":[{"id":"992068055803834573","name":"默认"}]}]},"white_background_pic":{"value":[{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_c8ffb8f0d8743a222b460447af724639_sx_101226_www800-800"}]},"after_sale":{"value":{"quality_problem_return":{"option_id":null,"selected":true},"supply_day_return_selector":{"option_id":"7-5","selected":true}}},"area_stock_switcher":{"value":false},"category_properties":{"value":{"1687":[{"diy_type":0,"measure_info":null,"tags":null,"value_id":"596120136","value_name":"无品牌"}]}},"delivery_delay_day":{"value":"2"},"description":{"value":"<p><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_9af34d3b91dfcda1f1aa02cbd595fed0_sx_402315_www790-1125\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_54ab3b361d68c7bb91d1fdb93e2f9d48_sx_84695_www790-645\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_66e5bc7a2ae789f9880a5329d3236380_sx_472879_www790-1170\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e0f605bb1021b0cc92c805fdd64a537e_sx_357278_www790-1054\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_afd37094560a88654f3abe5b31dab275_sx_309478_www790-1126\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_29350443b0952fdebb41a90bcb8d3e23_sx_257960_www790-949\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_582e010aec902ddfa4e814ac7fdb49e2_sx_74202_www790-347\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_807296a14becfead2f2c15427217fc78_sx_197482_www790-1121\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_ed2c93c7f42ac21027712920c9044af7_sx_85018_www790-358\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_468e4a3ee78512501983183a56adb9d8_sx_192991_www790-850\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_f2b733d2637cf06262e7bbf3179b2f5b_sx_183613_www790-915\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_d8c57ff3a871af865c5b600b05d2b9dd_sx_129008_www790-747\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_6e3cd37d29b3a2931251cbf2f9a95182_sx_130183_www790-739\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e702d505e493d3a194f9e1d9defc2bd8_sx_125097_www790-759\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a4e66d51475bb4427acfc96b1b427354_sx_123603_www790-754\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_862268da94f1d404cf17a9f563da1616_sx_215538_www750-779\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_7aaf5ee245ebf2251b89edb26698405d_sx_179597_www750-547\" style=\"max-width:100%;\"/><img src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_1a5719c6d9fd72751e90050d293e0628_sx_403325_www750-1204\" style=\"max-width:100%;\"/></p>"},"detail_prettify_uri":{"value":"detail_prettify_045e485dda90cf1d41c224daa17d5345_1ujByp"},"freight_id":{"value":"876937218"},"goods_category":{"value":{"category_leaf_id":22672,"first_cid":20013,"first_cname":"五金/工具","fourth_cid":22672,"fourth_cname":"其他测量工具","second_cid":20284,"second_cname":"手动工具","third_cid":38226,"third_cname":"测量工具"}},"interest_free_activity":{"value":[]},"interest_free_activity_id":{"value":{"activity_template_id":"AT202406281206214183151154"}},"interest_free_open":{"value":false},"main_image_three_to_four":{"value":[{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_fc2053327038b10f398e5b773b2ef501_sx_196929_www600-800"},{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_580ec2400c025f3d4162d314af4c9a30_sx_102512_www600-800"},{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_c6f5e4d3d0fda36b9c236761e4efa738_sx_94422_www600-800"},{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_c5b07fbf071f79bcb95446ac0f751f12_sx_109630_www600-800"}]},"pic":{"value":[{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_79b809eafd2cb2785d72d12c8b1c8313_sx_329742_www800-800"},{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_d8e5f02311d394ebe93bdf397b900ecd_sx_142390_www800-800"},{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_fbe9fe8421903b55ba4d145a2643ed81_sx_126893_www800-800"},{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_5df95571bacacf922e8c37a3de756431_sx_158437_www800-800"}]},"pickup_method":{"value":"0"},"presell_type":{"value":"0"},"product_type":{"value":"0"},"qualification":{"value":{}},"reduce_type":{"value":"2"},"short_product_name":{"value":"批发50米不锈钢卷尺"},"start_sale_type":{"value":"1"},"title":{"value":"批发卷尺钢卷尺50米手提式不锈钢架子尺插地尺50m盒尺不锈钢卷尺"},"title_prefix":{"value":""},"title_suffix":{"value":""},"title_use_brand_name":{"value":false}},"context":{"ability":[],"biz_identity":"xiaodian","category_id":"22672","fast_publish_type":"","feature":{"not_first_render":"1","session_data":"{\"stock_incr_mode\":true,\"only_update_stock\":null}"},"gray_components":["is_evaluate_opened","use_gold_price","gold_price_type","white_background_pic","total_buy_num","max_buy_num","min_buy_num","pickup_method","is_auto_charge","start_sale_type","enable_all_channel_product_online","car_vin_code","category_properties","goods_category","interest_free_open","interest_free_activity_id","interest_free_activity","main_image_three_to_four","presell_type","delivery_delay_day","appoint_delivery_switch","appoint_delivery_day","delay_rule_switch","delay_rule_order_time","delay_rule_delivery_day","delay_rule_delivery_date","presell_end_time_switch","presell_end_time","presell_delivery_type","presell_delay","presell_time","spec_detail","use_old_spec","privilege_service","cp_contract_info","contract_interest_subsidy_switch","product_instant_discount_coupon","product_promotion","sale_channel_type","alli_promotion_plan_switch","after_sale","supply_day_return_selector","damaged_order_return","support_authentic_guaranteeV2","support_allergy_returnV2","supply_allergy_return","quality_problem_return","supply_red_ass_return","worry_free_settlement","is_large_product","three_guarantees","fix_duration","extended_duration","mass_auction_rules","gx_freight_id","edu_discount","size_info_template_id","search_strategy_2c","market_price","sku_detail","area_stock_switcher","deposit_is_select","deposit_price","deposit_find_time","is_c2b_switch_on","micro_app_id","dcar_coupon_type","is_hainan_post","is_hainan_pick","freight_id","custom_property","refund_tips","product_desc_text","promotion_goods_coupon_comp","quality_control","title","title_prefix","title_suffix","title_use_brand_name","title_struct","title_switcher","main_pic_video","description","detail_prettify_uri","detail_prettify_info","account_template_id","reduce_type","short_product_name","inner_shop_category","outer_product_id","category_property_prefill","category_property_prefill_spu","category_property_prefill_barcode","item_max_per_order","customs_clear_type","cdf_category","cross_warehouse_id","origin_country_id","source_country_id","brand_country_id","tax_payer","net_weight_qty","nutritional_information","shop_category","product_ingredients","default_process_time","category_property_pic","#notification","long_pic","poi_code_type","poi_coupon_return_methods","poi_total_can_use_count","poi_condition","poi_link","poi_valid_range","poi_service_num","poi_notification","poi_lib_id","poi_financial_settlement_rate","poi_ids","poi_valid_type","poi_valid_days","product_type","qualification","reference_price","reference_price_certificate_type","reference_price_certificate_urls","restricted_purchasing_plan","pic","weight_unit","weight_value","first_charge_verification","return_address","auction_type","common_reject","quality_inspection_info","dcar_coupon_rights"],"model_type":"normal","n_token":"202508051519307564B95E4372C9DA5687","operation_type":"normal","product_id":"3767461092264116344","token":"202508051519297564B95E4372C9DA5687","version":"v1_v8_v9"}},"is_commit":true,"product_prettify_info":[{"front_unique_key":"$instance-id$800ec0d7-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_9af34d3b91dfcda1f1aa02cbd595fed0_sx_402315_www790-1125\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_9af34d3b91dfcda1f1aa02cbd595fed0_sx_402315_www790-1125\",\"width\":790,\"height\":1125},\"$$name$$\":\"图片1\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_9af34d3b91dfcda1f1aa02cbd595fed0_sx_402315_www790-1125\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_9af34d3b91dfcda1f1aa02cbd595fed0_sx_402315_www790-1125","width":790,"height":1125}},{"front_unique_key":"$instance-id$800ec14f-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_54ab3b361d68c7bb91d1fdb93e2f9d48_sx_84695_www790-645\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_54ab3b361d68c7bb91d1fdb93e2f9d48_sx_84695_www790-645\",\"width\":790,\"height\":645},\"$$name$$\":\"图片2\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_54ab3b361d68c7bb91d1fdb93e2f9d48_sx_84695_www790-645\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_54ab3b361d68c7bb91d1fdb93e2f9d48_sx_84695_www790-645","width":790,"height":645}},{"front_unique_key":"$instance-id$800ec169-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_66e5bc7a2ae789f9880a5329d3236380_sx_472879_www790-1170\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_66e5bc7a2ae789f9880a5329d3236380_sx_472879_www790-1170\",\"width\":790,\"height\":1170},\"$$name$$\":\"图片3\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_66e5bc7a2ae789f9880a5329d3236380_sx_472879_www790-1170\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_66e5bc7a2ae789f9880a5329d3236380_sx_472879_www790-1170","width":790,"height":1170}},{"front_unique_key":"$instance-id$800ec185-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e0f605bb1021b0cc92c805fdd64a537e_sx_357278_www790-1054\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e0f605bb1021b0cc92c805fdd64a537e_sx_357278_www790-1054\",\"width\":790,\"height\":1054},\"$$name$$\":\"图片4\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e0f605bb1021b0cc92c805fdd64a537e_sx_357278_www790-1054\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e0f605bb1021b0cc92c805fdd64a537e_sx_357278_www790-1054","width":790,"height":1054}},{"front_unique_key":"$instance-id$800ec199-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_afd37094560a88654f3abe5b31dab275_sx_309478_www790-1126\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_afd37094560a88654f3abe5b31dab275_sx_309478_www790-1126\",\"width\":790,\"height\":1126},\"$$name$$\":\"图片5\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_afd37094560a88654f3abe5b31dab275_sx_309478_www790-1126\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_afd37094560a88654f3abe5b31dab275_sx_309478_www790-1126","width":790,"height":1126}},{"front_unique_key":"$instance-id$800ec1af-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_29350443b0952fdebb41a90bcb8d3e23_sx_257960_www790-949\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_29350443b0952fdebb41a90bcb8d3e23_sx_257960_www790-949\",\"width\":790,\"height\":949},\"$$name$$\":\"图片6\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_29350443b0952fdebb41a90bcb8d3e23_sx_257960_www790-949\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_29350443b0952fdebb41a90bcb8d3e23_sx_257960_www790-949","width":790,"height":949}},{"front_unique_key":"$instance-id$800ec1d8-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_582e010aec902ddfa4e814ac7fdb49e2_sx_74202_www790-347\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_582e010aec902ddfa4e814ac7fdb49e2_sx_74202_www790-347\",\"width\":790,\"height\":347},\"$$name$$\":\"图片7\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_582e010aec902ddfa4e814ac7fdb49e2_sx_74202_www790-347\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_582e010aec902ddfa4e814ac7fdb49e2_sx_74202_www790-347","width":790,"height":347}},{"front_unique_key":"$instance-id$800ec1ef-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_807296a14becfead2f2c15427217fc78_sx_197482_www790-1121\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_807296a14becfead2f2c15427217fc78_sx_197482_www790-1121\",\"width\":790,\"height\":1121},\"$$name$$\":\"图片8\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_807296a14becfead2f2c15427217fc78_sx_197482_www790-1121\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_807296a14becfead2f2c15427217fc78_sx_197482_www790-1121","width":790,"height":1121}},{"front_unique_key":"$instance-id$800ec208-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_ed2c93c7f42ac21027712920c9044af7_sx_85018_www790-358\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_ed2c93c7f42ac21027712920c9044af7_sx_85018_www790-358\",\"width\":790,\"height\":358},\"$$name$$\":\"图片9\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_ed2c93c7f42ac21027712920c9044af7_sx_85018_www790-358\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_ed2c93c7f42ac21027712920c9044af7_sx_85018_www790-358","width":790,"height":358}},{"front_unique_key":"$instance-id$800ec21c-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_468e4a3ee78512501983183a56adb9d8_sx_192991_www790-850\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_468e4a3ee78512501983183a56adb9d8_sx_192991_www790-850\",\"width\":790,\"height\":850},\"$$name$$\":\"图片10\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_468e4a3ee78512501983183a56adb9d8_sx_192991_www790-850\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_468e4a3ee78512501983183a56adb9d8_sx_192991_www790-850","width":790,"height":850}},{"front_unique_key":"$instance-id$800ec232-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_f2b733d2637cf06262e7bbf3179b2f5b_sx_183613_www790-915\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_f2b733d2637cf06262e7bbf3179b2f5b_sx_183613_www790-915\",\"width\":790,\"height\":915},\"$$name$$\":\"图片11\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_f2b733d2637cf06262e7bbf3179b2f5b_sx_183613_www790-915\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_f2b733d2637cf06262e7bbf3179b2f5b_sx_183613_www790-915","width":790,"height":915}},{"front_unique_key":"$instance-id$800ec246-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314\",\"width\":790,\"height\":314},\"$$name$$\":\"图片12\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314","width":790,"height":314}},{"front_unique_key":"$instance-id$800ec25a-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_d8c57ff3a871af865c5b600b05d2b9dd_sx_129008_www790-747\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_d8c57ff3a871af865c5b600b05d2b9dd_sx_129008_www790-747\",\"width\":790,\"height\":747},\"$$name$$\":\"图片13\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_d8c57ff3a871af865c5b600b05d2b9dd_sx_129008_www790-747\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_d8c57ff3a871af865c5b600b05d2b9dd_sx_129008_www790-747","width":790,"height":747}},{"front_unique_key":"$instance-id$800ec26d-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_6e3cd37d29b3a2931251cbf2f9a95182_sx_130183_www790-739\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_6e3cd37d29b3a2931251cbf2f9a95182_sx_130183_www790-739\",\"width\":790,\"height\":739},\"$$name$$\":\"图片14\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_6e3cd37d29b3a2931251cbf2f9a95182_sx_130183_www790-739\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_6e3cd37d29b3a2931251cbf2f9a95182_sx_130183_www790-739","width":790,"height":739}},{"front_unique_key":"$instance-id$800ec27f-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e702d505e493d3a194f9e1d9defc2bd8_sx_125097_www790-759\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e702d505e493d3a194f9e1d9defc2bd8_sx_125097_www790-759\",\"width\":790,\"height\":759},\"$$name$$\":\"图片15\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e702d505e493d3a194f9e1d9defc2bd8_sx_125097_www790-759\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_e702d505e493d3a194f9e1d9defc2bd8_sx_125097_www790-759","width":790,"height":759}},{"front_unique_key":"$instance-id$800ec291-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a4e66d51475bb4427acfc96b1b427354_sx_123603_www790-754\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a4e66d51475bb4427acfc96b1b427354_sx_123603_www790-754\",\"width\":790,\"height\":754},\"$$name$$\":\"图片16\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a4e66d51475bb4427acfc96b1b427354_sx_123603_www790-754\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a4e66d51475bb4427acfc96b1b427354_sx_123603_www790-754","width":790,"height":754}},{"front_unique_key":"$instance-id$800ec2a3-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_862268da94f1d404cf17a9f563da1616_sx_215538_www750-779\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_862268da94f1d404cf17a9f563da1616_sx_215538_www750-779\",\"width\":750,\"height\":779},\"$$name$$\":\"图片17\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_862268da94f1d404cf17a9f563da1616_sx_215538_www750-779\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_862268da94f1d404cf17a9f563da1616_sx_215538_www750-779","width":750,"height":779}},{"front_unique_key":"$instance-id$800ec2c6-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_7aaf5ee245ebf2251b89edb26698405d_sx_179597_www750-547\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_7aaf5ee245ebf2251b89edb26698405d_sx_179597_www750-547\",\"width\":750,\"height\":547},\"$$name$$\":\"图片18\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_7aaf5ee245ebf2251b89edb26698405d_sx_179597_www750-547\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_7aaf5ee245ebf2251b89edb26698405d_sx_179597_www750-547","width":750,"height":547}},{"front_unique_key":"$instance-id$800ec2d8-71a4-11f0-9ced-0a8ccaf43bfc","id":2,"show_plan":null,"component_type_id":2,"component_front_data":"{\"imgList\":[\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_1a5719c6d9fd72751e90050d293e0628_sx_403325_www750-1204\"],\"droppedEventTriggered\":true,\"image\":{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_1a5719c6d9fd72751e90050d293e0628_sx_403325_www750-1204\",\"width\":750,\"height\":1204},\"$$name$$\":\"图片19\"}","component_data":"{\"url\":\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_1a5719c6d9fd72751e90050d293e0628_sx_403325_www750-1204\"}","image":{"url":"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_1a5719c6d9fd72751e90050d293e0628_sx_403325_www750-1204","width":750,"height":1204}}],"component_template_info":{"template_type":"size_info","template_name":"","component_front_data":"{\"title\":\"尺码推荐\",\"desc\":\"\",\"tempName\":\"\",\"configTable\":[],\"selectedSpecs\":[],\"headerName\":\"尺码\",\"specOptions\":[],\"selectedSize\":[],\"selectedSizeSpecValMap\":{}}","component_data":"{\"title\":\"尺码推荐\",\"sub_title\":\"\",\"selected_size\":[],\"selected_specs\":[],\"config\":{},\"selected_size_spec_val_map\":{}}","image":null,"is_shareable":true},"appid":1,"__token":"d1bb83f794ebaa920694e15f353f023b","_bid":"ffa_goods","_lid":"073964694622"} 经过测试,removeImageFromDescription并没有删除https://p3-aio.ecombdimg.com/obj/ecom-shop-material/jpeg_m_a469f301b9c195b6b833240f9adc1ffc_sx_36996_www790-314 这张图片。请帮我修复这个BUG
08-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值