布局修改 部分bug修复
This commit is contained in:
@@ -177,13 +177,13 @@ const adminRouter = {
|
||||
key:'sub2',
|
||||
isShow:true,
|
||||
},
|
||||
{
|
||||
name:'Credits Detail',
|
||||
route:'/administrator/generateFrequencySE',
|
||||
icon:'usetime',
|
||||
key:'sub3',
|
||||
isShow:true,
|
||||
}
|
||||
// {
|
||||
// name:'Credits Detail',
|
||||
// route:'/administrator/generateFrequencySE',
|
||||
// icon:'usetime',
|
||||
// key:'sub3',
|
||||
// isShow:true,
|
||||
// }
|
||||
// ,{
|
||||
// name:'Coupons',
|
||||
// icon:'usetime',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,8 @@ let flexible = (designWidth, maxWidth,minWidth) =>{
|
||||
designWidth = designWidth || 1920;
|
||||
maxWidth = maxWidth || 2560;
|
||||
minWidth = minWidth || 1024;
|
||||
let oldDesignWidth = designWidth
|
||||
|
||||
// minWidth = minWidth || 1024;
|
||||
function refreshRem() {
|
||||
var width = docEl.getBoundingClientRect().width;
|
||||
@@ -17,9 +19,16 @@ let flexible = (designWidth, maxWidth,minWidth) =>{
|
||||
}else{
|
||||
document.body.classList.remove('ipad')
|
||||
}
|
||||
if(width/height>1.98) width = height * 1.98;
|
||||
width > maxWidth && (width = maxWidth);
|
||||
width < minWidth && (width = minWidth);
|
||||
if(width > 768){
|
||||
if(width/height>1.98) width = height * 1.98;
|
||||
width > maxWidth && (width = maxWidth);
|
||||
width < minWidth && (width = minWidth);
|
||||
designWidth = oldDesignWidth
|
||||
}else{
|
||||
designWidth = 393
|
||||
}
|
||||
console.log(width,designWidth)
|
||||
|
||||
// var rem = width * 10 / designWidth;
|
||||
var rem = Math.round(width * 10 / designWidth);
|
||||
docEl.style.fontSize = rem+'px'
|
||||
|
||||
@@ -36,10 +36,25 @@ axios.defaults.baseURL = import.meta.env.VITE_APP_BASE_URL; //配置接口地
|
||||
const CancelToken = axios.CancelToken;
|
||||
const source = CancelToken.source();
|
||||
// console.log(import.meta.env.VITE_APP_BASE_URL);
|
||||
const filterHttpsUrl = ['/api/portfolio/page','/api/portfolio/detail','/api/account/preLogin','/api/account/schoolLogin','/api/account/enterpriseLogin','/api/account/login']
|
||||
let isLoginTime = false
|
||||
const filterHttpsUrl = [
|
||||
// '/api/portfolio/page',
|
||||
'/api/account/resetPwd',
|
||||
'/api/portfolio/detail',
|
||||
'/api/account/preLogin',
|
||||
'/api/account/designWorksRegister',
|
||||
'/api/account/schoolLogin',
|
||||
'/api/account/enterpriseLogin',
|
||||
'/api/account/login',
|
||||
'/api/account/organizationNameSearch',
|
||||
'/api/account/designWorksRegisterCode',
|
||||
'/api/account/sendEmail']
|
||||
//POST传参序列化(添加请求拦截器)
|
||||
axios.interceptors.request.use((config) => {
|
||||
//在发送请求之前做某件事
|
||||
|
||||
|
||||
|
||||
// config.cancelToken = source.token
|
||||
if(config.method === 'post' || config.method === 'put' || config.method === 'delete'){
|
||||
// config.data = qs.stringify(config.data);
|
||||
@@ -47,6 +62,18 @@ axios.interceptors.request.use((config) => {
|
||||
}
|
||||
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
|
||||
if(filterHttpsUrl.indexOf(config.url) == -1){
|
||||
if (!getCookie('token')) {
|
||||
console.log('无Token,取消请求');
|
||||
if(!isLoginTime){
|
||||
isLoginTime = true
|
||||
router.replace('/')
|
||||
message.warning('Please login and try again~')
|
||||
setTimeout(()=>[
|
||||
isLoginTime = false
|
||||
],2000)
|
||||
}
|
||||
return Promise.reject(new Error('缺少Token,请求被拦截')); // 阻止请求
|
||||
}
|
||||
config.headers.Authorization = getCookie('token');
|
||||
}else{
|
||||
config.headers.Authorization = '';
|
||||
@@ -55,7 +82,6 @@ axios.interceptors.request.use((config) => {
|
||||
},(error) =>{
|
||||
return Promise.reject(error);
|
||||
});
|
||||
let isLoginTime = false
|
||||
const binaryToUrl = (binary,type = 'application/octet-stream',res)=>{
|
||||
let blob = new Blob([binary], {'content-type':res.headers['content-type']});
|
||||
let url = URL.createObjectURL(blob);
|
||||
@@ -101,7 +127,6 @@ axios.interceptors.response.use((res) =>{
|
||||
}
|
||||
}, function(error) {
|
||||
if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
|
||||
return
|
||||
clonAllCookie()
|
||||
if(!isLoginTime){
|
||||
isLoginTime = true
|
||||
@@ -367,6 +392,10 @@ export const Https = {
|
||||
getEachAffiliateGeneratedRevenue:`/api/affiliate/getEachAffiliateGeneratedRevenue`,//affiliate每个用户根据日期查询收益
|
||||
affiliateApproval:`/api/affiliate/approval`,//affiliate同意 审批
|
||||
getPersonalMonthlyIncome:`/api/affiliate/getPersonalMonthlyIncome`,//affiliate图表接口
|
||||
getReferrals:`/api/affiliate/getReferrals`,//affiliate Referral列表
|
||||
editReferral:`/api/affiliate/editReferral`,//affiliate编辑referral
|
||||
batchDeleteReferral:`/api/affiliate/batchDeleteReferral`,//affiliate删除referral
|
||||
// batchDeleteReferral:`/api/affiliate/batchDeleteReferral`,//affiliate删除referral
|
||||
|
||||
getTasksList:`/api/tasks/getList`,//获取w为执行完的所有任务
|
||||
getTasksHistory:`/api/tasks/getAllTask`,//获取所有任务列表
|
||||
|
||||
@@ -270,12 +270,15 @@ const openTypeList = (t)=>{
|
||||
// label:'Design',
|
||||
// router:'tools=design'
|
||||
// },
|
||||
|
||||
|
||||
// {
|
||||
// icon:'fi fi-rr-puzzle-alt',
|
||||
// value:'deReconstruction',
|
||||
// label:t('Header.toolsDeReconstruction'),
|
||||
// router:'tools=deReconstruction'
|
||||
// },
|
||||
{
|
||||
icon:'i class="fi fi-rr-puzzle-alt',
|
||||
value:'deReconstruction',
|
||||
label:t('Header.toolsDeReconstruction'),
|
||||
router:'tools=deReconstruction'
|
||||
},{
|
||||
icon:'fi fi-ss-box-open',
|
||||
value:'toProduct',
|
||||
label:t('Header.toolsToProduct'),
|
||||
@@ -297,12 +300,12 @@ const openTypeList = (t)=>{
|
||||
// label:t('Header.toolsPatternMaking'),
|
||||
// router:'tools=patternMaking3D'
|
||||
// },
|
||||
{
|
||||
icon:'fi fi-rr-pen-swirl',
|
||||
value:'canvasUpload',
|
||||
label:t('Header.toolsCanvas'),
|
||||
router:'tools=canvasUpload'
|
||||
},
|
||||
// {
|
||||
// icon:'fi fi-rr-pen-swirl',
|
||||
// value:'canvasUpload',
|
||||
// label:t('Header.toolsCanvas'),
|
||||
// router:'tools=canvasUpload'
|
||||
// },
|
||||
]
|
||||
},
|
||||
library:{
|
||||
|
||||
@@ -242,7 +242,7 @@ const isMoible = () => {//判断是否是移动端
|
||||
}
|
||||
}
|
||||
|
||||
let setPubDate = (date)=>{
|
||||
let setPubDate = (date,t)=>{
|
||||
const timestamp = new Date(date);
|
||||
const now = new Date();
|
||||
// 计算时间差(以毫秒为单位)
|
||||
@@ -257,19 +257,19 @@ let setPubDate = (date)=>{
|
||||
|
||||
// 根据时间差的大小返回不同的描述
|
||||
if (years > 0) {
|
||||
return `${years} years ago`;
|
||||
return `${years} ${t('newScaleImage.yearsAgo')}`;
|
||||
} else if (months > 0) {
|
||||
return `${months} months ago`;
|
||||
return `${months} ${t('newScaleImage.monthsAgo')}`;
|
||||
} else if (weeks > 0) {
|
||||
return `${weeks} Weeks ago`;
|
||||
return `${weeks} ${t('newScaleImage.WeeksAgo')}`;
|
||||
} else if (days > 0) {
|
||||
return `1 days ago`;
|
||||
return `${t('newScaleImage.daysAgo')}`;
|
||||
} else if (hours > 0) {
|
||||
return `${hours} Hours ago`;
|
||||
return `${hours} ${t('newScaleImage.HoursAgo')}`;
|
||||
} else if (minutes > 0) {
|
||||
return `${minutes} minutes ago`;
|
||||
return `${minutes} ${t('newScaleImage.minutesAgo')}`;
|
||||
} else {
|
||||
return `1 minute ago`;
|
||||
return `${t('newScaleImage.minuteAgo')}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user