image + style

This commit is contained in:
caishi 2022-04-14 15:31:30 +08:00
parent 1d3128b1eb
commit fe8494ec17
2 changed files with 10 additions and 57 deletions

View File

@ -5,16 +5,17 @@ const { Search } = Input;
const $ = window.$;
const isDev = window.location.port == 3007;
const isdev2= window.location.hostname ==='www.educoder.net'
export const TEST_HOST = "https://testforgeplus.trustie.net/"
const isdev2= window.location.hostname ==='www.educoder.net';
export const TEST_HOST = window.location.hostname ==="testforgeplus.educoder.net";
export function getImageUrl(path) {
const local = 'https://testforgeplus.educoder.net';
const normal = 'https://ali-cdn.educoder.net/images';
const normalend = 'https://ali-cdn.educoder.net';
const normal = TEST_HOST ? "https://new-testali-cdn.educoder.net/images" : 'https://ali-cdn.educoder.net/images';
const normalend = TEST_HOST ? 'https://new-testali-cdn.educoder.net' :'https://ali-cdn.educoder.net';
if (isDev) {
return `${local}/${path}`;
}
if(path.substr(0, 7) !== "/system"){
if (isDev) {
return `${local}/${path}`
}
if(path.substr(0, 7) !== "/images"){
return `${normal}${path}`;
}else{
@ -54,9 +55,6 @@ export function numFormat(num, digits){
}
export function getImage(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'https://testforgeplus.trustie.net/';
if(path.indexOf("http://")===-1){
if (isDev) {
@ -69,9 +67,6 @@ export function getImage(path) {
}
export function getcdnImageUrl(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const testlocal = 'https://testali-cdn.educoder.net'
const local='https://ali-cdn.educoder.net'
let firstStr=path.substr(0,1);
@ -84,11 +79,9 @@ export function getcdnImageUrl(path) {
return `/${path}`
}
}
// return `${local}/${path}`;
}
export function setcndImagesUrl(path){
const testlocal = 'https://testali-cdn.educoder.net'
const local='https://ali-cdn.educoder.net'
let firstStr=path.substr(0,1);
if(firstStr=="/"){
@ -96,13 +89,11 @@ export function setcndImagesUrl(path){
return `${path}`
}
return `${local}${path}`;
//return isDev?`${testlocal}${path}`:`${local}${path}`;
}else{
if (!isdev2) {
return `/${path}`
}
return `${local}/${path}`;
// return isDev?`${testlocal}/${path}`:`${local}/${path}`;
}
}
@ -136,28 +127,13 @@ export function getUrl(path, goTest) {
}
export function getUrlmys(path, goTest) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// 如果想所有url定位到测试版可以反注释掉下面这行
//goTest = true
// testbdweb.educoder.net testbdweb.trustie.net
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
// const local = 'https://testeduplus2.educoder.net'
const local = 'https://test-jupyterweb.educoder.net'
if (isDev) {
return `${local}${path?path:''}`
}
return `${path ? path: ''}`;
}
export function getStaticUrl() {
const local = TEST_HOST;
if (isDev) {
return local
}
// todo cdn
return ''
}
export function getUrl2(path, goTest) {
const local = 'http://localhost:3000'
if (isDev) {
@ -167,30 +143,8 @@ export function getUrl2(path, goTest) {
}
const newopens ="79e33abd4b6588941ab7622aed1e67e8";
let newtimestamp;
let checkSubmitFlgs = false;
function railsgettimess(proxy) {
if(checkSubmitFlgs===false){
$.ajax({url:proxy,
async:false,success:function(data){
if(data.status===0){
newtimestamp=data.message;
checkSubmitFlgs = true;
}
}})
window.setTimeout(function () {
checkSubmitFlgs=false;
}, 2500);
}
}
export function Railsgettimes() {
// railsgettimess(`${getUrl()}/api/main/first_stamp.json`);
// railsgettimess(`https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
}
export function getmyUrl(geturl) {
return `${getUrl()}${geturl}`;

View File

@ -22,7 +22,6 @@
transform: translateX(-50%);
}
.subjectleft>span:first-child{
width: 140px;
height: 30px;
font-size: 30px;
font-weight: 600;
@ -121,7 +120,7 @@
justify-content: space-between;
flex-wrap: wrap;
align-items: center;
padding:0px 30px;
padding:20px 30px;
border-bottom: 1px solid #E0E0E0;
}
.list-r-Search{