fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const adminRouter = {
|
||||
all:[{
|
||||
const all = (t)=>{
|
||||
return[{
|
||||
name:'All User',
|
||||
route:'/administrator/allUser',
|
||||
icon:'yonghu',
|
||||
@@ -24,7 +24,7 @@ const adminRouter = {
|
||||
// },
|
||||
// ],
|
||||
},{
|
||||
name:'Design Frequency',
|
||||
name:'User data',
|
||||
route:'/administrator/testClickData',
|
||||
icon:'shenpi',
|
||||
expandIcon:'icon-xiala',
|
||||
@@ -177,17 +177,19 @@ const adminRouter = {
|
||||
route:'/administrator/organization',
|
||||
key:'sub13',
|
||||
isShow:true,
|
||||
}],
|
||||
schoolOrEnterprise:[
|
||||
}]
|
||||
}
|
||||
const schoolOrEnterprise = (t) =>{
|
||||
return[
|
||||
{
|
||||
name:'All User',
|
||||
name:t('admin.allUser'),
|
||||
route:'/administrator/allUserSE',
|
||||
icon:'usetime',
|
||||
key:'sub1',
|
||||
isShow:true,
|
||||
},
|
||||
{
|
||||
name:'Design Frequency',
|
||||
name:t('admin.UserData'),
|
||||
route:'/administrator/testClickDataSE',
|
||||
icon:'usetime',
|
||||
key:'sub2',
|
||||
@@ -222,4 +224,4 @@ const adminRouter = {
|
||||
// }
|
||||
]
|
||||
}
|
||||
export {adminRouter}
|
||||
export default {all , schoolOrEnterprise}
|
||||
@@ -2,13 +2,14 @@ import html2canvas from "html2canvas";
|
||||
const getJpeg = dom =>{
|
||||
return new Promise(resolve =>{
|
||||
setTimeout(() => {
|
||||
html2canvas(dom,{useCORS: true,}).then(canvas =>{
|
||||
let base64 = canvas.toDataURL('image/jpeg',.9);
|
||||
html2canvas(dom,{useCORS: true,backgroundColor: null}).then(canvas =>{
|
||||
let base64 = canvas.toDataURL('image/png',.9);
|
||||
console.log(base64)
|
||||
// let quality = 0.9 // 压缩系数0-1之间
|
||||
let newImage = new Image()
|
||||
newImage.src = base64
|
||||
newImage.setAttribute('crossOrigin', 'Anonymous') // url为外域时需要
|
||||
const filename = new Date().toISOString() + '.jpg';
|
||||
const filename = new Date().toISOString() + '.png';
|
||||
resolve(base64ToFile(base64,filename))
|
||||
newImage.remove()
|
||||
// }
|
||||
@@ -29,7 +30,7 @@ function base64ToFile(base64,filename) {
|
||||
const byteArray = new Uint8Array(byteNumbers);
|
||||
|
||||
// 创建 File 对象
|
||||
const file = new File([byteArray], filename, { type: 'image/jpeg' }); // 根据需要的类型进行修改
|
||||
const file = new File([byteArray], filename, { type: 'image/png' }); // 根据需要的类型进行修改
|
||||
return file;
|
||||
}
|
||||
//base64转成blob
|
||||
@@ -39,7 +40,7 @@ function dataURLtoFile(dataURI, type) {
|
||||
for (let i = 0; i < binary.length; i++) {
|
||||
array.push(binary.charCodeAt(i));
|
||||
}
|
||||
return new Blob([new Uint8Array(array)], { type: "image/jpeg" });
|
||||
return new Blob([new Uint8Array(array)], { type: "image/png" });
|
||||
}
|
||||
|
||||
//转换
|
||||
|
||||
@@ -82,8 +82,8 @@ axios.interceptors.request.use((config) => {
|
||||
},(error) =>{
|
||||
return Promise.reject(error);
|
||||
});
|
||||
const binaryToUrl = (binary,type = 'application/octet-stream',res)=>{
|
||||
let blob = new Blob([binary], {'content-type':res.headers['content-type']});
|
||||
const binaryToUrl = (binary,type = 'application/json',res)=>{
|
||||
let blob = new Blob([binary], {'content-type':type});
|
||||
let url = URL.createObjectURL(blob);
|
||||
return url
|
||||
}
|
||||
@@ -364,6 +364,7 @@ export const Https = {
|
||||
addOrUpdateSubAccount:`/api/account/addOrUpdateSubAccount`,//添加子账号
|
||||
deleteSubAccount:`/api/account/deleteSubAccount`,//删除子账号
|
||||
subAccountImportExcelDownload:`/api/account/subAccountImportExcelDownload`,//批量添加模板下载模板
|
||||
exportAccountsToExcel:`/api/account/exportAccountsToExcel`,//教育版导出用户数据
|
||||
getNextSequence:`/api/project/getNextSequence`,//批量添加模板下载模板
|
||||
subAccountImport:`/api/account/subAccountImport`,//模板导入
|
||||
getGenerateFrequency:`/api/inquiry/getGenerateFrequency`,//积分使用详情
|
||||
@@ -389,6 +390,7 @@ export const Https = {
|
||||
affiliateRegistration:`/api/affiliate/registration`,//affiliate注册
|
||||
personalCenter:`/api/affiliate/personalCenter`,//affiliate个人中心
|
||||
affiliateList:`/api/affiliate/list`,//affiliate审批列表
|
||||
updateCommission:`/api/affiliate/updateCommission`,//编辑佣金比例
|
||||
getEachAffiliateGeneratedRevenue:`/api/affiliate/getEachAffiliateGeneratedRevenue`,//affiliate每个用户根据日期查询收益
|
||||
affiliateApproval:`/api/affiliate/approval`,//affiliate同意 审批
|
||||
getPersonalMonthlyIncome:`/api/affiliate/getPersonalMonthlyIncome`,//affiliate图表接口
|
||||
|
||||
Reference in New Issue
Block a user