commit
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
export default {
|
||||
id : 1,
|
||||
testUrl:'http://192.168.1.5:10086'
|
||||
testUrl:'http://192.168.1.5:10086',
|
||||
zIndex:2,
|
||||
}
|
||||
24
src/tool/domTurnImg.js
Normal file
24
src/tool/domTurnImg.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import html2canvas from "html2canvas";
|
||||
const getJpeg = dom =>{
|
||||
return new Promise(resolve =>{
|
||||
html2canvas(dom,{useCORS: true,}).then(canvas =>{
|
||||
const jpeg = canvas.toDataURL('image/jpeg',1.0);
|
||||
resolve(base64ToFile(jpeg))
|
||||
console.log(jpeg);
|
||||
})
|
||||
})
|
||||
}
|
||||
const base64ToFile = urlData =>{
|
||||
const arr = urlData.split(',');
|
||||
const mime = arr[0].match(/:(.*?);/)[1]
|
||||
const bytes = atob(arr[1])
|
||||
let n = bytes.length;
|
||||
const ia = new Uint8Array(n)
|
||||
while (n--){
|
||||
ia[n] = bytes.charCodeAt(n);
|
||||
}
|
||||
console.log(new File([ia],'jpeg',{type:mime}));
|
||||
return new File([ia],'jpeg',{type:mime})
|
||||
|
||||
}
|
||||
export default getJpeg
|
||||
@@ -20,7 +20,7 @@ import { message } from 'ant-design-vue';
|
||||
// axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
||||
// }
|
||||
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
||||
|
||||
console.log(process.env.VUE_APP_BASE_URL);
|
||||
//POST传参序列化(添加请求拦截器)
|
||||
axios.interceptors.request.use((config) => {
|
||||
//在发送请求之前做某件事
|
||||
@@ -78,7 +78,7 @@ export const Https = {
|
||||
designCollection:'/api/design/designCollection', //设计 Conllection
|
||||
reDesignCollection:'/api/design/reDesignCollection',//重新设计 Conllection
|
||||
countDesignProcess:'/api/design/countDesignProcess', //统计design进度
|
||||
getRgbByHsvBatch:'/api/element/getRgbByHsvBatch', //通过hsv值数组批量获取潘通信息
|
||||
getRgbByHsvBatch:'http://192.168.1.6:10086/api/element/getRgbByHsvBatch', //通过hsv值数组批量获取潘通信息
|
||||
designLike:'/api/design/like', //Design Like
|
||||
designDislike: '/api/design/dislike', //Design Dislike
|
||||
queryUserGroup:'/api/history/queryUserGroup', //History用户分页分组列表
|
||||
@@ -99,8 +99,9 @@ export const Https = {
|
||||
saveOrEditTemplatePoint:'/api/library/saveOrEditTemplatePoint',//保存或者编辑template打点
|
||||
libraryModelsDot:'/api/library/modelsDot',//Models打点预览
|
||||
pythonChatStream:'/api/python/chatStream',//机器人助力
|
||||
workspaceDetail:'http://192.168.1.5:10086/api/workspace/detail',//用户习惯详情
|
||||
|
||||
workspaceDetail:'http://192.168.1.6:10086/api/workspace/detail',//用户习惯详情
|
||||
sketchAndPrintGenerate:'/api/generate/sketchAndPrint',//sketchGenerate生成图片
|
||||
|
||||
},
|
||||
|
||||
axiosGet(url,config) {
|
||||
|
||||
Reference in New Issue
Block a user