提交 8f350363 authored 作者: 陆's avatar

商品属性添加了定时器

上级 3373dd18
......@@ -2,7 +2,6 @@ package com.platform.entity;
import cn.hutool.core.codec.Base64;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Decoder;
import java.io.*;
......@@ -61,25 +60,25 @@ public class BASE64DecodedMultipartFile implements MultipartFile {
new FileOutputStream(dest).write(imgContent);
}
public static MultipartFile base64ToMultipart(String base64) {
try {
String[] baseStrs = base64.split(",");
BASE64Decoder decoder = new BASE64Decoder();
byte[] b = new byte[0];
b = decoder.decodeBuffer(baseStrs[1]);
for (int i = 0; i < b.length; ++i) {
if (b[i] < 0) {
b[i] += 256;
}
}
return new BASE64DecodedMultipartFile(b, baseStrs[0]);
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
// public static MultipartFile base64ToMultipart(String base64) {
// try {
// String[] baseStrs = base64.split(",");
//
// BASE64Decoder decoder = new BASE64Decoder();
// byte[] b = new byte[0];
// b = decoder.decodeBuffer(baseStrs[1]);
//
// for (int i = 0; i < b.length; ++i) {
// if (b[i] < 0) {
// b[i] += 256;
// }
// }
// return new BASE64DecodedMultipartFile(b, baseStrs[0]);
// } catch (IOException e) {
// e.printStackTrace();
// return null;
// }
// }
public static File base64ToFile(String base64) {
if(base64==null||"".equals(base64)) {
......
......@@ -1256,22 +1256,25 @@ let vm = new Vue({
},
//商品参数
getAttrName(){
this.paramsters= []
$.get('../attributes/queryAttrNames', res => {
let Attr = JSON.parse(res).list
console.log(JSON.parse(res))
Attr.forEach(item=>{
$.get('../attributes/queryAttrDescs?id='+item.id,_res=>{
console.log(JSON.parse(_res).list)
item.attrId = JSON.parse(_res).list.attrId
item.descs = JSON.parse(_res).list.descs
item.value = []
console.log(item)
setTimeout(function (){
this.paramsters= []
$.get('../attributes/queryAttrNames', res => {
let Attr = JSON.parse(res).list
console.log(JSON.parse(res))
Attr.forEach(item=>{
$.get('../attributes/queryAttrDescs?id='+item.id,_res=>{
console.log(JSON.parse(_res).list)
item.attrId = JSON.parse(_res).list.attrId
item.descs = JSON.parse(_res).list.descs
item.value = []
console.log(item)
})
})
vm.paramsters = Attr
console.log(Attr)
})
vm.paramsters = Attr
console.log(Attr)
})
},1300)
},
//限制输入
verifyInput(e){
......
......@@ -10,6 +10,7 @@ import org.apache.poi.hssf.eventusermodel.dummyrecord.LastCellOfRowDummyRecord;
import org.apache.poi.hssf.eventusermodel.dummyrecord.MissingCellDummyRecord;
import org.apache.poi.hssf.model.HSSFFormulaParser;
import org.apache.poi.hssf.record.*;
import org.apache.poi.hssf.record.Record;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论