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

商品属性添加了定时器

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