Commit b5ee4a25 by zhujian

品牌替换

parent da3e88e3
...@@ -72,6 +72,7 @@ function getClientEnvironment(publicUrl) { ...@@ -72,6 +72,7 @@ function getClientEnvironment(publicUrl) {
// Useful for determining whether we’re running in production mode. // Useful for determining whether we’re running in production mode.
// Most importantly, it switches React into the correct mode. // Most importantly, it switches React into the correct mode.
NODE_ENV: process.env.NODE_ENV || 'development', NODE_ENV: process.env.NODE_ENV || 'development',
BREND: process.env.BREND || 'xiaomai',
DEPLOY_ENV: process.env.DEPLOY_ENV, DEPLOY_ENV: process.env.DEPLOY_ENV,
// Useful for resolving the correct path to static assets in `public`. // Useful for resolving the correct path to static assets in `public`.
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />. // For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
"style-loader": "0.23.1", "style-loader": "0.23.1",
"terser-webpack-plugin": "2.3.8", "terser-webpack-plugin": "2.3.8",
"ts-pnp": "1.1.6", "ts-pnp": "1.1.6",
"better-npm-run": "^0.1.0",
"typescript": "^4.0.2", "typescript": "^4.0.2",
"underscore": "^1.10.2", "underscore": "^1.10.2",
"url-loader": "2.3.0", "url-loader": "2.3.0",
...@@ -105,19 +106,36 @@ ...@@ -105,19 +106,36 @@
"xiaomai-b-components": "1.4.4" "xiaomai-b-components": "1.4.4"
}, },
"scripts": { "scripts": {
"start": "cross-env DEPLOY_ENV=syoo node scripts/start.js", "start": "node scripts/start.js",
"start:dev": "cross-env DEPLOY_ENV=dev node scripts/start.js", "start:dev": "cross-env DEPLOY_ENV=dev node scripts/start.js",
"start:dev1": "cross-env DEPLOY_ENV=dev node scripts/start.js", "start:dev1": "cross-env DEPLOY_ENV=dev node scripts/start.js",
"start:rc": "cross-env DEPLOY_ENV=rc node scripts/start.js", "start:rc": "cross-env DEPLOY_ENV=rc node scripts/start.js",
"start:gray": "cross-env DEPLOY_ENV=gray node scripts/start.js", "start:gray": "cross-env DEPLOY_ENV=gray node scripts/start.js",
"start:prod": "cross-env DEPLOY_ENV=prod node scripts/start.js", "start:prod": "cross-env DEPLOY_ENV=prod node scripts/start.js",
"start:syoo": "better-npm-run start:syoo",
"build:dev": "cross-env DEPLOY_ENV=dev node scripts/build.js", "build:dev": "cross-env DEPLOY_ENV=dev node scripts/build.js",
"build:dev1": "cross-env DEPLOY_ENV=dev node scripts/build.js", "build:dev1": "cross-env DEPLOY_ENV=dev node scripts/build.js",
"build:rc": "cross-env DEPLOY_ENV=rc node scripts/build.js", "build:rc": "cross-env DEPLOY_ENV=rc node scripts/build.js",
"build:gray": "cross-env DEPLOY_ENV=gray node scripts/build.js", "build:gray": "cross-env DEPLOY_ENV=gray node scripts/build.js",
"build:syoo": "cross-env DEPLOY_ENV=syoo node scripts/build.js", "build:syoo": "better-npm-run build:syoo",
"build:prod": "cross-env DEPLOY_ENV=prod node scripts/build.js" "build:prod": "cross-env DEPLOY_ENV=prod node scripts/build.js"
}, },
"betterScripts": {
"start:syoo": {
"command": "node scripts/start.js",
"env": {
"DEPLOY_ENV": "",
"BREND": "syoo"
}
},
"build:syoo": {
"command": "node scripts/build.js",
"env": {
"DEPLOY_ENV": "syoo",
"BREND": "syoo"
}
}
},
"eslintConfig": { "eslintConfig": {
"extends": "react-app" "extends": "react-app"
}, },
...@@ -147,4 +165,4 @@ ...@@ -147,4 +165,4 @@
"ali-oss": "^6.12.0", "ali-oss": "^6.12.0",
"react-sortable-hoc": "^1.11.0" "react-sortable-hoc": "^1.11.0"
} }
} }
\ No newline at end of file
...@@ -24,12 +24,12 @@ interface FetchOptions { ...@@ -24,12 +24,12 @@ interface FetchOptions {
requestType: string, // 请求类型 form为表单类型 json为json类型,默认json类型 requestType: string, // 请求类型 form为表单类型 json为json类型,默认json类型
reject: boolean, reject: boolean,
} }
interface HeadersType{ interface HeadersType {
storeId?:any, storeId?: any,
storeUserId?:any, storeUserId?: any,
userId?:any, userId?: any,
xmtoken?:any, xmtoken?: any,
enterpriseId?:string|null enterpriseId?: string | null
} }
class Axios { class Axios {
static post( static post(
...@@ -40,18 +40,18 @@ class Axios { ...@@ -40,18 +40,18 @@ class Axios {
): Promise<any> { ): Promise<any> {
const _url = `${url}?storeId=${User.getStoreId()}&token=${User.getToken()}&storeUserId=${User.getStoreUserId()}&userId=${User.getUserId()}`; const _url = `${url}?storeId=${User.getStoreId()}&token=${User.getToken()}&storeUserId=${User.getStoreUserId()}&userId=${User.getUserId()}`;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let headerObject:HeadersType={}; let headerObject: HeadersType = {};
if(User.getStoreId()){ if (User.getStoreId()) {
headerObject.storeId = User.getStoreId(); headerObject.storeId = User.getStoreId();
} }
if(User.getStoreUserId()){ if (User.getStoreUserId()) {
headerObject.storeUserId = User.getStoreUserId(); headerObject.storeUserId = User.getStoreUserId();
} }
if(User.getUserId()){ if (User.getUserId()) {
headerObject.userId = User.getUserId(); headerObject.userId = User.getUserId();
} }
if(User.getToken()){ if (User.getToken()) {
headerObject.xmtoken = User.getToken(); headerObject.xmtoken = User.getToken();
} }
if (User.getEnterpriseId()) { if (User.getEnterpriseId()) {
headerObject.enterpriseId = User.getEnterpriseId(); headerObject.enterpriseId = User.getEnterpriseId();
...@@ -65,7 +65,7 @@ class Axios { ...@@ -65,7 +65,7 @@ class Axios {
'Content-Type': options.requestType === 'form' ? 'application/x-www-form-urlencoded' : 'application/json; charset=UTF-8', 'Content-Type': options.requestType === 'form' ? 'application/x-www-form-urlencoded' : 'application/json; charset=UTF-8',
} }
}); });
if (method !== 'GET' && options.requestType === 'form') { if (method !== 'GET' && options.requestType === 'form') {
instance.defaults.transformRequest = [(queryParam): string => { instance.defaults.transformRequest = [(queryParam): string => {
let ret: string = ''; let ret: string = '';
...@@ -92,8 +92,8 @@ class Axios { ...@@ -92,8 +92,8 @@ class Axios {
const { message: ResMessage, success, resultMsg, code: resultCode } = response.data; const { message: ResMessage, success, resultMsg, code: resultCode } = response.data;
if (resultCode === "CROP_DEPLOY_PAST_BETTER") { if (resultCode === "CROP_DEPLOY_PAST_BETTER") {
Modal.warning({ Modal.warning({
title:"服务已到期", title: "服务已到期",
content: "当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买", content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: "我知道了" okText: "我知道了"
}) })
} else if (success || resultCode === 0) { } else if (success || resultCode === 0) {
...@@ -104,24 +104,24 @@ class Axios { ...@@ -104,24 +104,24 @@ class Axios {
return Promise.reject(response.data); return Promise.reject(response.data);
}, (error): AxiosPromise => { }, (error): AxiosPromise => {
const requestStatus = error.request.status const requestStatus = error.request.status
switch (requestStatus){ switch (requestStatus) {
case 401: case 401:
User.removeUserId(); User.removeUserId();
User.removeToken(); User.removeToken();
window.RCHistory.replace('/login'); window.RCHistory.replace('/login');
break; break;
case 403: case 403:
message.error('暂无查看权限'); message.error('暂无查看权限');
window.RCHistory.replace('/login'); window.RCHistory.replace('/login');
return Promise.reject(); return Promise.reject();
break; break;
case 504: case 504:
message.error('网络状况不稳定,如果出现数据异常,请刷新页面'); message.error('网络状况不稳定,如果出现数据异常,请刷新页面');
Promise.reject(); Promise.reject();
break; break;
default: default:
message.error(error.message); message.error(error.message);
break; break;
} }
return Promise.reject(error.message); return Promise.reject(error.message);
}); });
......
...@@ -10,7 +10,7 @@ import { MapInterface } from '@/domains/basic-domain/interface' ...@@ -10,7 +10,7 @@ import { MapInterface } from '@/domains/basic-domain/interface'
// 默认是 dev 环境 // 默认是 dev 环境
const ENV: string = process.env.DEPLOY_ENV || 'dev' const ENV: string = process.env.DEPLOY_ENV || 'dev'
console.log('process.env.DEPLOY_ENV', process) console.log('process.env.DEPLOY_ENV', process.env, ENV, 'hjkkkk')
const BASIC_HOST_MAP: MapInterface = { const BASIC_HOST_MAP: MapInterface = {
dev: 'https://dev-heimdall.xiaomai5.com/', dev: 'https://dev-heimdall.xiaomai5.com/',
dev1: 'https://dev1-heimdall.xiaomai5.com/', dev1: 'https://dev1-heimdall.xiaomai5.com/',
......
export const BREND: any = process.env.BREND;
const BrandNameMap: any = {
xiaomai: '小麦企学院',
syoo: '云课堂'
}
const BrandIcon: any = {
xiaomai: 'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png',
syoo: 'https://image.xiaomaiketang.com/xm/Z8AExQQADj.png'
}
const BrandLogo: any = {
xiaomai: 'https://image.xiaomaiketang.com/xm/6k8PPCmywG.png',
syoo: 'https://image.xiaomaiketang.com/xm/T7NRKwrfQE.png'
}
export const brandName: string = BrandNameMap[BREND];
export const brandIcon: string = BrandIcon[BREND];
export const brandLogo: string = BrandLogo[BREND];
window.brandName = BrandNameMap[BREND];
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
content="小麦企学院,企业培训,员工培训,企业大学,企业内训,企业外训,培训计划,培训素材,企培,企训,资料云盘,培训课程,培训任务,直播课,线上课,图文课,线下课,知识库,作业,考试,排行榜,培训类别管理,定制培训计划,管理数据,学习数据,企学院,资料共享,培训数字化,数字化培训,培训工具,在线培训,线上培训,培训saas,培训管理,企业微信培训,对客培训,客户培训,直播培训,互联网培训,新员工培训,管理培训,管理者培训,工人培训,制造业培训,餐饮培训,服务业培训,零售培训,门店培训,工厂培训,车间培训,培训补贴,人事培训,财务培训,职场培训,企业学院平台,教育企业学院,教育企业平台,教育平台学院,企业学习,酷学院,小鹅通,企业学院,云学堂,时代光华,云课堂,魔学院,云大学,米知云,授课学堂" content="小麦企学院,企业培训,员工培训,企业大学,企业内训,企业外训,培训计划,培训素材,企培,企训,资料云盘,培训课程,培训任务,直播课,线上课,图文课,线下课,知识库,作业,考试,排行榜,培训类别管理,定制培训计划,管理数据,学习数据,企学院,资料共享,培训数字化,数字化培训,培训工具,在线培训,线上培训,培训saas,培训管理,企业微信培训,对客培训,客户培训,直播培训,互联网培训,新员工培训,管理培训,管理者培训,工人培训,制造业培训,餐饮培训,服务业培训,零售培训,门店培训,工厂培训,车间培训,培训补贴,人事培训,财务培训,职场培训,企业学院平台,教育企业学院,教育企业平台,教育平台学院,企业学习,酷学院,小鹅通,企业学院,云学堂,时代光华,云课堂,魔学院,云大学,米知云,授课学堂"
/> />
<!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> --> <!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> -->
<link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/c4KiP2epBP.png" /> <!-- <link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/c4KiP2epBP.png" /> -->
<!-- <link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/WGWCtxiGzE.png"> -->
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
......
...@@ -23,12 +23,24 @@ import '@/core/xmTD'; ...@@ -23,12 +23,24 @@ import '@/core/xmTD';
import User from '@/common/js/user'; import User from '@/common/js/user';
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import BaseService from '@/domains/basic-domain/baseService'; import BaseService from '@/domains/basic-domain/baseService';
import {brandName,BREND,brandIcon} from '@/domains/brand/constants'
declare var getParameterByName: any; declare var getParameterByName: any;
declare var window: any; declare var window: any;
window.currentStoreUserInfo = {} window.currentStoreUserInfo = {}
const history = createHashHistory(); const history = createHashHistory();
document.title=brandName;
var iconUrl ='https://image.xiaomaiketang.com/xm/WGWCtxiGzE.png'
if(BREND !='xiaomai'){
iconUrl =brandIcon
}
var linkzh = document.createElement('link');
linkzh.setAttribute('rel',"shortcut icon");
linkzh.setAttribute('href',iconUrl);
document.head.appendChild(linkzh);
window.RCHistory = _.extend({}, history, { window.RCHistory = _.extend({}, history, {
push: (obj: any) => { push: (obj: any) => {
history.push(obj) history.push(obj)
......
...@@ -26,7 +26,7 @@ export default function LimitTip(props:{total:number,type:string,tip:() => React ...@@ -26,7 +26,7 @@ export default function LimitTip(props:{total:number,type:string,tip:() => React
{ {
isOver ? ( isOver ? (
<> <>
<div style={{marginLeft:"14px",display:"inline-block"}}>当前企业使用人数已达到上限 (<span style={{color:"#333333",fontWeight:"bold"}}>{limitUser}</span>人),将无法添加新员工、新学员,如需增加人数限制,请联系小麦企学院服务平台。</div> <div style={{marginLeft:"14px",display:"inline-block"}}>{`当前企业使用人数已达到上限 (<span style={{color:"#333333",fontWeight:"bold"}}>{limitUser}</span>人),将无法添加新员工、新学员,如需增加人数限制,请联系${window.brandName}服务平台。`}</div>
<ContactWidget trigger="hover" placement="bottom"> <ContactWidget trigger="hover" placement="bottom">
<div className="renew-text">立即续费<span className="icon iconfont" style={{fontSize:"10px"}}>&#59291;</span></div> <div className="renew-text">立即续费<span className="icon iconfont" style={{fontSize:"10px"}}>&#59291;</span></div>
</ContactWidget> </ContactWidget>
......
...@@ -279,7 +279,7 @@ class AddLive extends React.Component { ...@@ -279,7 +279,7 @@ class AddLive extends React.Component {
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) { if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({ Modal.warning({
title: '服务已到期', title: '服务已到期',
content: '当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买', content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: '我知道了', okText: '我知道了',
}); });
return; return;
...@@ -541,7 +541,7 @@ class AddLive extends React.Component { ...@@ -541,7 +541,7 @@ class AddLive extends React.Component {
<Breadcrumbs navList={type == 'add' ? '新建直播课' : '编辑直播课'} goBack={this.handleGoBack} /> <Breadcrumbs navList={type == 'add' ? '新建直播课' : '编辑直播课'} goBack={this.handleGoBack} />
<div className='box'> <div className='box'>
<div className='show-tips'> <div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> </div>
<div className='add-live-page__form'> <div className='add-live-page__form'>
<div className='basic-info__wrap'> <div className='basic-info__wrap'>
......
...@@ -321,7 +321,7 @@ class AddGraphicsCourse extends React.Component { ...@@ -321,7 +321,7 @@ class AddGraphicsCourse extends React.Component {
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) { if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({ Modal.warning({
title: '服务已到期', title: '服务已到期',
content: '当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买', content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: '我知道了', okText: '我知道了',
}); });
return; return;
...@@ -481,7 +481,7 @@ class AddGraphicsCourse extends React.Component { ...@@ -481,7 +481,7 @@ class AddGraphicsCourse extends React.Component {
<div className='box'> <div className='box'>
<div className='show-tips'> <div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> </div>
<div className='form'> <div className='form'>
......
...@@ -373,7 +373,7 @@ class AddOfflineCourse extends React.Component { ...@@ -373,7 +373,7 @@ class AddOfflineCourse extends React.Component {
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) { if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({ Modal.warning({
title: '服务已到期', title: '服务已到期',
content: '当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买', content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: '我知道了', okText: '我知道了',
}); });
return; return;
...@@ -711,7 +711,7 @@ class AddOfflineCourse extends React.Component { ...@@ -711,7 +711,7 @@ class AddOfflineCourse extends React.Component {
<div className='box'> <div className='box'>
<div className='show-tips'> <div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> </div>
<div className='form'> <div className='form'>
......
...@@ -405,7 +405,7 @@ class AddVideoCourse extends React.Component { ...@@ -405,7 +405,7 @@ class AddVideoCourse extends React.Component {
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) { if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({ Modal.warning({
title:"服务已到期", title:"服务已到期",
content: "当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买", content:`当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: "我知道了" okText: "我知道了"
}) })
return return
...@@ -723,7 +723,7 @@ class AddVideoCourse extends React.Component { ...@@ -723,7 +723,7 @@ class AddVideoCourse extends React.Component {
<div className='box'> <div className='box'>
<div className='show-tips'> <div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> </div>
<div className='form'> <div className='form'>
......
...@@ -7,59 +7,59 @@ import moment from "moment"; ...@@ -7,59 +7,59 @@ import moment from "moment";
export default function HomeTip() { export default function HomeTip() {
const [isOverNum, setIsOverNum] = useState<boolean>(false) const [isOverNum, setIsOverNum] = useState<boolean>(false)
const [tipType, setTipType] = useState(0) //0不显示1即将过期2已过期 const [tipType, setTipType] = useState(0) //0不显示1即将过期2已过期
const [expirationTime, setExpirationTime] = useState("") const [expirationTime, setExpirationTime] = useState("")
const [surplusDay, setSurplusDay] = useState(0) const [surplusDay, setSurplusDay] = useState(0)
const versionInfo = useContext(VersionContext) const versionInfo = useContext(VersionContext)
useEffect(()=> { useEffect(() => {
if (versionInfo) { if (versionInfo) {
setIsOverNum(versionInfo.userNum === -1 ? false : versionInfo.whetherReachUserNum) setIsOverNum(versionInfo.userNum === -1 ? false : versionInfo.whetherReachUserNum)
setSurplusDay(versionInfo.surplusDayTime) setSurplusDay(versionInfo.surplusDayTime)
setExpirationTime(versionInfo.validEndTime) setExpirationTime(versionInfo.validEndTime)
if (versionInfo.stateEnum === "NO") { if (versionInfo.stateEnum === "NO") {
setTipType(2) setTipType(2)
} else if (versionInfo.surplusDayTime === 30 || versionInfo.surplusDayTime <= 7) { } else if (versionInfo.surplusDayTime === 30 || versionInfo.surplusDayTime <= 7) {
setTipType(1) setTipType(1)
}
} }
}
},[versionInfo])
}, [versionInfo])
return (
<div className="home-tip"> return (
{ <div className="home-tip">
(isOverNum || tipType !== 0) && {
(isOverNum || tipType !== 0) &&
<div className="tip"> <div className="tip">
<Carousel dotPosition="left" dots={false} autoplay={true} autoplaySpeed={5000}> <Carousel dotPosition="left" dots={false} autoplay={true} autoplaySpeed={5000}>
{ {
isOverNum && ( isOverNum && (
<div className="content"> <div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系小麦企学院服务平台。 <span className="icon iconfont" style={{ color: "#FF4F4F", marginRight: "8px" }}>&#xe61d;</span>{`温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系${window.brandName}服务平台。`}
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget> <ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
</div> </div>
) )
} }
{ {
tipType === 2 && ( tipType === 2 && (
<div className="content"> <div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>版本到期提醒:当前企业购买的小麦企学院服务已于{moment(versionInfo?.validEndTimeST).format("YYYY-MM-DD HH:mm:ss")}到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~ <span className="icon iconfont" style={{ color: "#FF4F4F", marginRight: "8px" }}>&#xe61d;</span>版本到期提醒:当前企业购买的{`${window.brandName}`}服务已于{moment(versionInfo?.validEndTimeST).format("YYYY-MM-DD HH:mm:ss")}到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget> <ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
</div> </div>
) )
} }
{ {
tipType === 1 && ( tipType === 1 && (
<div className="content"> <div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>当前企业购买的小麦企学院服务仅剩{surplusDay}天(于{expirationTime}到期),为了不影响使用,建议尽快续费购买哦~ <span className="icon iconfont" style={{ color: "#FF4F4F", marginRight: "8px" }}>&#xe61d;</span>当前企业购买的{`${window.brandName}`}服务仅剩{surplusDay}天(于{expirationTime}到期),为了不影响使用,建议尽快续费购买哦~
<ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget> <ContactWidget placement="bottom" trigger="hover"><div className="renew-btn">立即续费</div></ContactWidget>
</div> </div>
) )
} }
</Carousel> </Carousel>
</div> </div>
} }
</div> </div>
) )
} }
\ No newline at end of file \ No newline at end of file
...@@ -22,7 +22,6 @@ import "./KnowledgeBaseList.less"; ...@@ -22,7 +22,6 @@ import "./KnowledgeBaseList.less";
const DEFAULT_SIZE_UNIT = 1000 * 1000 // 将B转换成M const DEFAULT_SIZE_UNIT = 1000 * 1000 // 将B转换成M
const { confirm } = Modal const { confirm } = Modal
const ENV = process.env.DEPLOY_ENV || "dev"
class KnowledgeBaseList extends React.Component { class KnowledgeBaseList extends React.Component {
constructor(props) { constructor(props) {
......
...@@ -19,7 +19,6 @@ import "./LiveList.less"; ...@@ -19,7 +19,6 @@ import "./LiveList.less";
import CourseService from "@/domains/course-domain/CourseService"; import CourseService from "@/domains/course-domain/CourseService";
import User from "@/common/js/user"; import User from "@/common/js/user";
const ENV = process.env.DEPLOY_ENV || "dev";
class VideoList extends React.Component { class VideoList extends React.Component {
constructor(props) { constructor(props) {
......
...@@ -281,7 +281,7 @@ function AddPlan() { ...@@ -281,7 +281,7 @@ function AddPlan() {
<Breadcrumbs navList={type == 'add' ? '新建培训计划' : '编辑培训计划'} goBack={handleGoBack} /> <Breadcrumbs navList={type == 'add' ? '新建培训计划' : '编辑培训计划'} goBack={handleGoBack} />
<div className='box'> <div className='box'>
<div className='show-tips'> <div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> </div>
<div className='add-plan-page__form'> <div className='add-plan-page__form'>
<div className='basic-info__wrap'> <div className='basic-info__wrap'>
......
...@@ -5,6 +5,7 @@ import BaseService from "@/domains/basic-domain/baseService"; ...@@ -5,6 +5,7 @@ import BaseService from "@/domains/basic-domain/baseService";
import User from "@/common/js/user"; import User from "@/common/js/user";
import { LIVE_SHARE } from "@/domains/course-domain/constants"; import { LIVE_SHARE } from "@/domains/course-domain/constants";
import { Modal, message } from 'antd'; import { Modal, message } from 'antd';
import { brandLogo } from '@/domains/brand/constants'
import './CollegeManagePage.less'; import './CollegeManagePage.less';
import storage from '@/common/js/storage'; import storage from '@/common/js/storage';
...@@ -18,9 +19,9 @@ const roleMap = { ...@@ -18,9 +19,9 @@ const roleMap = {
function ExpirationPopover(props) { function ExpirationPopover(props) {
const [showType, setShowType] = useState(0); //0不显示,1剩余30天,2小于等于7天,3已过期 const [showType, setShowType] = useState(0); //0不显示,1剩余30天,2小于等于7天,3已过期
useEffect(()=> { useEffect(() => {
if (props.surplusDayTime === 0 ) { if (props.surplusDayTime === 0) {
//已过期 //已过期
let loginflag = storage.get("expiration_tip_login") let loginflag = storage.get("expiration_tip_login")
if (loginflag === null || loginflag === "true") { if (loginflag === null || loginflag === "true") {
...@@ -31,7 +32,7 @@ function ExpirationPopover(props) { ...@@ -31,7 +32,7 @@ function ExpirationPopover(props) {
} }
//即将过期 //即将过期
if (props.surplusDayTime === 30 || props.surplusDayTime <= 7) { if (props.surplusDayTime === 30 || props.surplusDayTime <= 7) {
let daysflag = storage.get("expiration_tip"+User.getUserId()+"_days") let daysflag = storage.get("expiration_tip" + User.getUserId() + "_days")
if (daysflag === null || daysflag !== moment().format("YYYYMMDD")) { if (daysflag === null || daysflag !== moment().format("YYYYMMDD")) {
setShowType(2) setShowType(2)
} }
...@@ -52,12 +53,12 @@ function ExpirationPopover(props) { ...@@ -52,12 +53,12 @@ function ExpirationPopover(props) {
// setShowType(2) // setShowType(2)
// } // }
// } // }
},[props.endTime,props.surplusDayTime]) }, [props.endTime, props.surplusDayTime])
function iknow() { function iknow() {
storage.set("expiration_tip_login",false) storage.set("expiration_tip_login", false)
storage.set("expiration_tip"+User.getUserId()+"_days",moment().format("YYYYMMDD")) storage.set("expiration_tip" + User.getUserId() + "_days", moment().format("YYYYMMDD"))
/* /*
if (props.surplusDayTime === 0 ) { if (props.surplusDayTime === 0 ) {
//已过期 //已过期
...@@ -79,27 +80,27 @@ function ExpirationPopover(props) { ...@@ -79,27 +80,27 @@ function ExpirationPopover(props) {
return ( return (
<> <>
{ {
showType === 0 ? ("") :( showType === 0 ? ("") : (
<div className="expirationpopover"> <div className="expirationpopover">
<div className="dialog"> <div className="dialog">
<div className="title">{props.surplusDayTime === 0 ? "服务已到期":"服务到期提醒"}</div> <div className="title">{props.surplusDayTime === 0 ? "服务已到期" : "服务到期提醒"}</div>
{ {
showType === 3 ? ( showType === 3 ? (
<div className="tip-text">当前企业购买的小麦企学院服务已于<span style={{color:"#FF4F4F"}}>{moment(props.endTime).format("YYYY-MM-DD HH:mm:ss")}</span>到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~</div> <div className="tip-text">当前企业购买的{`${window.brandName}`}服务已于<span style={{ color: "#FF4F4F" }}>{moment(props.endTime).format("YYYY-MM-DD HH:mm:ss")}</span>到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~</div>
) : ( ) : (
<div className="tip-text">当前企业购买的小麦企学院服务 <span style={{color:"#FF4F4F"}}>仅剩{props.surplusDayTime}</span>(于<span>{moment(props.endTime).format("YYYY-MM-DD")}</span>到期),为了不影响使用,建议尽快续费购买哦~</div> <div className="tip-text">当前企业购买的{`${window.brandName}`}服务 <span style={{ color: "#FF4F4F" }}>仅剩{props.surplusDayTime}</span>(于<span>{moment(props.endTime).format("YYYY-MM-DD")}</span>到期),为了不影响使用,建议尽快续费购买哦~</div>
) )
} }
<div className="qrcode"> <div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img> <img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<div className="des">微信/企业微信扫码咨询</div> <div className="des">微信/企业微信扫码咨询</div>
</div>
<div className="phone"><svg style={{ position: "relative", top: "2px", marginRight: "4px" }} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
<div className="button" onClick={iknow}>我知道了</div>
</div>
</div> </div>
<div className="phone"><svg style={{position:"relative",top:"2px",marginRight:"4px"}} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
<div className="button" onClick={iknow}>我知道了</div>
</div>
</div>
) )
} }
</> </>
...@@ -115,9 +116,9 @@ export default class CollegeManagePage extends React.Component { ...@@ -115,9 +116,9 @@ export default class CollegeManagePage extends React.Component {
list: [], list: [],
enterpriseId: User.getEnterpriseId(), enterpriseId: User.getEnterpriseId(),
isAdmin: false, isAdmin: false,
createStoreList:[], createStoreList: [],
joinStoreList:[], joinStoreList: [],
surplusDayTime:365, //剩余天数 surplusDayTime: 365, //剩余天数
endTime: 0, //有效截至时间 endTime: 0, //有效截至时间
}; };
} }
...@@ -127,7 +128,7 @@ export default class CollegeManagePage extends React.Component { ...@@ -127,7 +128,7 @@ export default class CollegeManagePage extends React.Component {
this.getEnterpriseUser(); this.getEnterpriseUser();
this.getVersion() this.getVersion()
} }
getEnterpriseUser() { getEnterpriseUser() {
const { enterpriseId } = this.state; const { enterpriseId } = this.state;
const params = { const params = {
...@@ -142,16 +143,16 @@ export default class CollegeManagePage extends React.Component { ...@@ -142,16 +143,16 @@ export default class CollegeManagePage extends React.Component {
getVersion() { getVersion() {
BaseService.getLesseeVersionMsg() BaseService.getLesseeVersionMsg()
.then(res=> { .then(res => {
User.setVersion(res.result) User.setVersion(res.result)
User.setExpirationTime(res.result.validEndTime) User.setExpirationTime(res.result.validEndTime)
this.setState({ this.setState({
surplusDayTime: res.result.stateEnum === "NO" ? 0 : res.result.surplusDayTime, surplusDayTime: res.result.stateEnum === "NO" ? 0 : res.result.surplusDayTime,
endTime: res.result.validEndTime endTime: res.result.validEndTime
})
}) })
})
} }
getStoreList() { getStoreList() {
const { enterpriseId } = this.state; const { enterpriseId } = this.state;
if (!enterpriseId) return null; if (!enterpriseId) return null;
...@@ -166,13 +167,13 @@ export default class CollegeManagePage extends React.Component { ...@@ -166,13 +167,13 @@ export default class CollegeManagePage extends React.Component {
User.setStoreId(mainStore.id); User.setStoreId(mainStore.id);
User.setStoreUserId(mainStore.storeUserId); User.setStoreUserId(mainStore.storeUserId);
} }
const createStoreList = list.filter((item)=>{ const createStoreList = list.filter((item) => {
return item.userRole === 'StoreManager' return item.userRole === 'StoreManager'
}) })
const joinStoreList = list.filter((item)=>{ const joinStoreList = list.filter((item) => {
return item.userRole !== 'StoreManager' return item.userRole !== 'StoreManager'
}) })
this.setState({createStoreList:createStoreList,joinStoreList:joinStoreList}) this.setState({ createStoreList: createStoreList, joinStoreList: joinStoreList })
}); });
} }
checkCollege(item, bool) { checkCollege(item, bool) {
...@@ -218,12 +219,12 @@ export default class CollegeManagePage extends React.Component { ...@@ -218,12 +219,12 @@ export default class CollegeManagePage extends React.Component {
} }
handleLogout() { handleLogout() {
BaseService.logout({identifier:User.getIdentifier()}).then((res) => { BaseService.logout({ identifier: User.getIdentifier() }).then((res) => {
User.removeUserId(); User.removeUserId();
User.removeToken(); User.removeToken();
User.removeEnterpriseId(); User.removeEnterpriseId();
User.clearUserInfo(); User.clearUserInfo();
const htmlUrl = `${LIVE_SHARE}store/index?id=${User.getCustomerStoreId()||User.getStoreId()}&userId=${User.getUserId()}&from=work_weixin`; const htmlUrl = `${LIVE_SHARE}store/index?id=${User.getCustomerStoreId() || User.getStoreId()}&userId=${User.getUserId()}&from=work_weixin`;
window.location.href = htmlUrl; window.location.href = htmlUrl;
}); });
} }
...@@ -239,10 +240,10 @@ export default class CollegeManagePage extends React.Component { ...@@ -239,10 +240,10 @@ export default class CollegeManagePage extends React.Component {
} = this.state; } = this.state;
return ( return (
<div className="college-manage-page"> <div className="college-manage-page">
<ExpirationPopover surplusDayTime={this.state.surplusDayTime} endTime={this.state.endTime}/> <ExpirationPopover surplusDayTime={this.state.surplusDayTime} endTime={this.state.endTime} />
<div className="college-header"> <div className="college-header">
<div className="box"> <div className="box">
<img className="box-image" src="https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png" /> <img className="box-image" src={brandLogo} />
<div className="user"> <div className="user">
<img className="image" src={avatar} /> <img className="image" src={avatar} />
<span className="name">{name}</span> <span className="name">{name}</span>
...@@ -294,13 +295,13 @@ export default class CollegeManagePage extends React.Component { ...@@ -294,13 +295,13 @@ export default class CollegeManagePage extends React.Component {
}} }}
> >
<div className="header"> <div className="header">
<img className="image" src={item.logo || "https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png"} /> <img className="image" src={item.logo || brandLogo} />
<span className="tag">{roleMap[item.userRole]}</span> <span className="tag">{roleMap[item.userRole]}</span>
</div> </div>
<div className="title">{item.storeName}</div> <div className="title">{item.storeName}</div>
<div className="time">{moment(item.createTime).format('YYYY-MM-DD HH:mm')}</div> <div className="time">{moment(item.createTime).format('YYYY-MM-DD HH:mm')}</div>
<div className="control-box"> <div className="control-box">
{item.userRole === 'StoreManager' && item.state === 'VALID' && {item.userRole === 'StoreManager' && item.state === 'VALID' &&
<span <span
className="control-button" className="control-button"
onClick={(e) => { onClick={(e) => {
...@@ -348,76 +349,76 @@ export default class CollegeManagePage extends React.Component { ...@@ -348,76 +349,76 @@ export default class CollegeManagePage extends React.Component {
} }
</div> </div>
</div> </div>
{ joinStoreList.length > 0 && {joinStoreList.length > 0 &&
<div className="join-container"> <div className="join-container">
<div className="title-box"> <div className="title-box">
<span className="title">我加入的({joinStoreList.length})</span> <span className="title">我加入的({joinStoreList.length})</span>
</div> </div>
<div className="college-list"> <div className="college-list">
{joinStoreList.map((item) => ( {joinStoreList.map((item) => (
<div <div
key={item.id} key={item.id}
className={`college-item${item.state === 'VALID' ? '' : ' disabled'}${item.userRole === 'StoreManager' ? ' enabled' : ''}`} className={`college-item${item.state === 'VALID' ? '' : ' disabled'}${item.userRole === 'StoreManager' ? ' enabled' : ''}`}
onClick={() => { onClick={() => {
if (item.state !== 'VALID') { if (item.state !== 'VALID') {
message.warning('学院已停用,请启用后使用或联系学院管理员'); message.warning('学院已停用,请启用后使用或联系学院管理员');
return null; return null;
}; };
User.setStoreId(item.id); User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId); User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeId = item.id; window.currentStoreUserInfo.storeId = item.id;
window.currentStoreUserInfo.storeUserId = item.storeUserId; window.currentStoreUserInfo.storeUserId = item.storeUserId;
window.RCHistory.push('/home') window.RCHistory.push('/home')
}} }}
> >
<div className="header"> <div className="header">
<img className="image" src={item.logo || "https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png"} /> <img className="image" src={item.logo || brandLogo} />
<span className="tag">{roleMap[item.userRole]}</span> <span className="tag">{roleMap[item.userRole]}</span>
</div> </div>
<div className="title">{item.storeName}</div> <div className="title">{item.storeName}</div>
<div className="time">{moment(item.createTime).format('YYYY-MM-DD HH:mm')}</div> <div className="time">{moment(item.createTime).format('YYYY-MM-DD HH:mm')}</div>
<div className="control-box"> <div className="control-box">
{item.userRole === 'StoreManager' && item.state === 'VALID' && !item.mainStore && {item.userRole === 'StoreManager' && item.state === 'VALID' && !item.mainStore &&
<span
className="control-button"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
User.setStoreId(item.id);
User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeId = item.id;
window.currentStoreUserInfo.storeUserId = item.storeUserId;
window.RCHistory.push('/college-info')
}}
>编辑</span>
}
{((item.userRole === 'StoreManager' && !item.mainStore) || item.state !== 'VALID') &&
<span
className="control-button"
onClick={(e) => {
if (item.state !== 'VALID') return null;
e.preventDefault();
e.stopPropagation();
this.checkCollege(item, false);
}}
>{item.state === 'VALID' ? '停用' : '已停用'}</span>
}
<span <span
className="control-button" className="control-button disable-button"
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
User.setStoreId(item.id); this.changeCollege(item, true);
User.setStoreUserId(item.storeUserId);
window.currentStoreUserInfo.storeId = item.id;
window.currentStoreUserInfo.storeUserId = item.storeUserId;
window.RCHistory.push('/college-info')
}} }}
>编辑</span> >启用</span>
} </div>
{((item.userRole === 'StoreManager' && !item.mainStore) || item.state !== 'VALID') &&
<span
className="control-button"
onClick={(e) => {
if (item.state !== 'VALID') return null;
e.preventDefault();
e.stopPropagation();
this.checkCollege(item, false);
}}
>{item.state === 'VALID' ? '停用' : '已停用'}</span>
}
<span
className="control-button disable-button"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
this.changeCollege(item, true);
}}
>启用</span>
</div> </div>
</div> ))}
))} </div>
</div> </div>
</div>
} }
</div> </div>
</div> </div>
) )
} }
......
...@@ -6,6 +6,7 @@ import BaseService from "@/domains/basic-domain/baseService"; ...@@ -6,6 +6,7 @@ import BaseService from "@/domains/basic-domain/baseService";
import User from "@/common/js/user"; import User from "@/common/js/user";
import Breadcrumbs from "@/components/Breadcrumbs"; import Breadcrumbs from "@/components/Breadcrumbs";
import ImgClipModal from '@/components/ImgClipModal' import ImgClipModal from '@/components/ImgClipModal'
import { brandLogo } from '@/domains/brand/constants'
import './CreateCollege.less'; import './CreateCollege.less';
let cutFlag = false; let cutFlag = false;
...@@ -16,7 +17,7 @@ export default class CreateCollege extends React.Component { ...@@ -16,7 +17,7 @@ export default class CreateCollege extends React.Component {
super(props); super(props);
this.state = { this.state = {
avatar: 'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png', avatar: 'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png',
logo: 'https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png', logo: brandLogo,
name: '', name: '',
enterpriseId: User.getEnterpriseId(), enterpriseId: User.getEnterpriseId(),
imageFile: null, // 需要被截取的图片 imageFile: null, // 需要被截取的图片
...@@ -111,7 +112,7 @@ export default class CreateCollege extends React.Component { ...@@ -111,7 +112,7 @@ export default class CreateCollege extends React.Component {
<div className="college-manage-page"> <div className="college-manage-page">
<div className="college-header"> <div className="college-header">
<div className="box"> <div className="box">
<img className="box-image" src="https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png" /> <img className="box-image" src={brandLogo} />
</div> </div>
</div> </div>
<div className="breadcrumb-wrap"> <div className="breadcrumb-wrap">
...@@ -134,7 +135,7 @@ export default class CreateCollege extends React.Component { ...@@ -134,7 +135,7 @@ export default class CreateCollege extends React.Component {
className="icon iconfont" className="icon iconfont"
onClick={() => { onClick={() => {
this.setState({ this.setState({
logo: 'https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png', logo: brandLogo,
visible: false, visible: false,
}) })
}} }}
......
...@@ -9,7 +9,7 @@ import BaseService from '@/domains/basic-domain/baseService'; ...@@ -9,7 +9,7 @@ import BaseService from '@/domains/basic-domain/baseService';
import axios from 'axios'; import axios from 'axios';
import storage from '@/common/js/storage'; import storage from '@/common/js/storage';
import _ from 'underscore'; import _ from 'underscore';
import user from '@/common/js/user'; import {brandLogo} from '@/domains/brand/constants'
const { TabPane } = Tabs; const { TabPane } = Tabs;
function Login(props) { function Login(props) {
...@@ -156,7 +156,7 @@ function Login(props) { ...@@ -156,7 +156,7 @@ function Login(props) {
return ( return (
<div className='login-page'> <div className='login-page'>
<div className='logo-img-box'> <div className='logo-img-box'>
<img src='https://image.xiaomaiketang.com/xm/6k8PPCmywG.png' className='logo-img' /> <img src={brandLogo} className='logo-img' />
</div> </div>
<div className='login-main'> <div className='login-main'>
<div className='left-banner'> <div className='left-banner'>
......
...@@ -12,6 +12,7 @@ import classNames from 'classnames'; ...@@ -12,6 +12,7 @@ import classNames from 'classnames';
import User from "@/common/js/user" import User from "@/common/js/user"
import _ from 'underscore'; import _ from 'underscore';
import tBus from '@/core/tbus' import tBus from '@/core/tbus'
import { brandLogo } from '@/domains/brand/constants'
import "./Menu.less"; import "./Menu.less";
import { display } from 'html2canvas/dist/types/css/property-descriptors/display'; import { display } from 'html2canvas/dist/types/css/property-descriptors/display';
import ContactWidget from '@/components/ContactWidget'; import ContactWidget from '@/components/ContactWidget';
...@@ -158,7 +159,7 @@ function Aside(props: any) { ...@@ -158,7 +159,7 @@ function Aside(props: any) {
if (User.getToken()) { if (User.getToken()) {
StoreService.getStoreDetail({ storeId: User.getStoreId() }).then((res) => { StoreService.getStoreDetail({ storeId: User.getStoreId() }).then((res) => {
if (_.isEmpty(res.result.logo)) { if (_.isEmpty(res.result.logo)) {
setTopLogoUrl('https://image.xiaomaiketang.com/xm/fe4NCjr7XF.png'); setTopLogoUrl(brandLogo);
} else { } else {
setTopLogoUrl(res.result.logo); setTopLogoUrl(res.result.logo);
} }
......
...@@ -4,7 +4,7 @@ import Service from '@/common/js/service'; ...@@ -4,7 +4,7 @@ import Service from '@/common/js/service';
import User from '@/common/js/user'; import User from '@/common/js/user';
import { PATH } from '@/domains/basic-domain/constants'; import { PATH } from '@/domains/basic-domain/constants';
import './WechatLogin.less'; import './WechatLogin.less';
const Logo = require('@/common/images/logo.png'); import {brandName,BREND,brandIcon,brandLogo} from '@/domains/brand/constants'
declare var location: any; declare var location: any;
declare var window: any; declare var window: any;
...@@ -33,7 +33,7 @@ export default function WechatLogin(props: any) { ...@@ -33,7 +33,7 @@ export default function WechatLogin(props: any) {
text: redirect, text: redirect,
correctLevel: 2, correctLevel: 2,
size: 180, size: 180,
image: 'https://image.xiaomaiketang.com/xm/bFkRBz7teA.png', image: brandIcon,
imageSize: 50, imageSize: 50,
}); });
qrcodeWrapDom.innerHTML = ''; qrcodeWrapDom.innerHTML = '';
......
...@@ -251,7 +251,7 @@ function EmployeesManagePage() { ...@@ -251,7 +251,7 @@ function EmployeesManagePage() {
function handleDeleteWorkWechatEmployeeConfirm(record: RecordTypes) { function handleDeleteWorkWechatEmployeeConfirm(record: RecordTypes) {
return confirm({ return confirm({
title: "你确定要删除此员工吗?", title: "你确定要删除此员工吗?",
content: "管理员需在企业微信后台的“小麦企学院”应用管理中移除此员工,此员工才无法继续登陆小麦企学院", content:`管理员需在企业微信后台的“${window.brandName}”应用管理中移除此员工,此员工才无法继续登陆${window.brandName}`,
icon: ( icon: (
<span className="icon iconfont default-confirm-icon">&#xe839; </span> <span className="icon iconfont default-confirm-icon">&#xe839; </span>
), ),
......
...@@ -84,7 +84,7 @@ function AddExam(props: any) { ...@@ -84,7 +84,7 @@ function AddExam(props: any) {
tenantId: User.getStoreId(), tenantId: User.getStoreId(),
source: 0, source: 0,
} }
Service.Hades('public/hades/queryExamPageList', param).then(res=> { Service.Hades('public/hades/queryExamPageList', param).then(res => {
const { result = {} } = res; const { result = {} } = res;
setExamList(result.records || []) setExamList(result.records || [])
}) })
...@@ -155,7 +155,7 @@ function AddExam(props: any) { ...@@ -155,7 +155,7 @@ function AddExam(props: any) {
return return
} }
if(checkExist(param.examName)) { if (checkExist(param.examName)) {
message.warning('此考试名称已存在'); message.warning('此考试名称已存在');
return return
} }
...@@ -275,14 +275,14 @@ function AddExam(props: any) { ...@@ -275,14 +275,14 @@ function AddExam(props: any) {
// 校验考试名称是否存在 // 校验考试名称是否存在
function checkExist(examName: any) { function checkExist(examName: any) {
var result:any = null; var result: any = null;
examList.length > 0 && examList.forEach((item:any) => { examList.length > 0 && examList.forEach((item: any) => {
if (result != null) { if (result != null) {
return result; return result;
} }
if (props.type === 'edit') { if (props.type === 'edit') {
if (item.examName === examName && item.examId !== match.params.id) { if (item.examName === examName && item.examId !== match.params.id) {
result = item; result = item;
} }
} else { } else {
if (item.examName === examName) { if (item.examName === examName) {
...@@ -314,9 +314,9 @@ function AddExam(props: any) { ...@@ -314,9 +314,9 @@ function AddExam(props: any) {
<Breadcrumbs navList={title} goBack={handleGoBack} /> <Breadcrumbs navList={title} goBack={handleGoBack} />
<div className="box"> <div className="box">
<div className="show-tips"> <div className="show-tips">
<ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利" /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> <div className="form"> </div> <div className="form">
<div className="title">基本信息</div> <div className="title">基本信息</div>
<Form <Form
labelCol={{ span: 3 }} labelCol={{ span: 3 }}
...@@ -324,7 +324,7 @@ function AddExam(props: any) { ...@@ -324,7 +324,7 @@ function AddExam(props: any) {
layout="horizontal" layout="horizontal"
> >
<Form.Item label="考试名称" <Form.Item label="考试名称"
validateStatus={(check && (!examName || (examName.length > 40 || checkExist(examName)) )) ? 'error' : ''} validateStatus={(check && (!examName || (examName.length > 40 || checkExist(examName)))) ? 'error' : ''}
help={check && (!examName ? '请输入考试名称' : (examName.length > 40 ? '考试名称最多40字' : (checkExist(examName) && '此考试名称已存在')))} help={check && (!examName ? '请输入考试名称' : (examName.length > 40 ? '考试名称最多40字' : (checkExist(examName) && '此考试名称已存在')))}
required> required>
...@@ -458,7 +458,7 @@ function AddExam(props: any) { ...@@ -458,7 +458,7 @@ function AddExam(props: any) {
onChange={(val) => { setNeedPhone(val ? 'NEED_PHONE_VERIFY' : 'DO_NOT_NEED_PHONE_VERIFY') }} onChange={(val) => { setNeedPhone(val ? 'NEED_PHONE_VERIFY' : 'DO_NOT_NEED_PHONE_VERIFY') }}
></Switch> ></Switch>
<div style={{ position: 'relative', left: 8, color: "#999" }}> <div style={{ position: 'relative', left: 8, color: "#999" }}>
{needPhone == 'NEED_PHONE_VERIFY' ? '已开启,学员需绑定手机号才可参与考试' : '已关闭,学员无需绑定手机号即可参与考试'} {needPhone == 'NEED_PHONE_VERIFY' ? '已开启,学员需绑定手机号才可参与考试' : '已关闭,学员无需绑定手机号即可参与考试'}
</div> </div>
</div> </div>
</Form.Item> </Form.Item>
...@@ -470,7 +470,7 @@ function AddExam(props: any) { ...@@ -470,7 +470,7 @@ function AddExam(props: any) {
onChange={(val) => { setNeedOptionDisorder(val ? 'OPTION_RANDOM' : 'OPTION_SORT') }} onChange={(val) => { setNeedOptionDisorder(val ? 'OPTION_RANDOM' : 'OPTION_SORT') }}
></Switch> ></Switch>
<div style={{ position: 'relative', left: 8, color: "#999" }}> <div style={{ position: 'relative', left: 8, color: "#999" }}>
{needOptionDisorder == 'OPTION_RANDOM' ? '已开启,选项随机排序' : '已关闭,选项按设置顺序排序'} {needOptionDisorder == 'OPTION_RANDOM' ? '已开启,选项随机排序' : '已关闭,选项按设置顺序排序'}
</div> </div>
</div> </div>
......
...@@ -800,7 +800,7 @@ class OperatePaper extends Component { ...@@ -800,7 +800,7 @@ class OperatePaper extends Component {
<Spin spinning={loading}> <Spin spinning={loading}>
<div className='box'> <div className='box'>
<div className='show-tips'> <div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> </div>
<Form ref={this.formRef} style={{ marginTop: 24 }}> <Form ref={this.formRef} style={{ marginTop: 24 }}>
<Form.Item <Form.Item
......
...@@ -303,7 +303,7 @@ class OperateQuestion extends Component { ...@@ -303,7 +303,7 @@ class OperateQuestion extends Component {
/> />
<div className="box"> <div className="box">
<div className="show-tips"> <div className="show-tips">
<ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利" /> <ShowTips message={`请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,${window.brandName}保有依据国家规定及平台规则进行处理的权利`} />
</div> </div>
<Tabs <Tabs
style={{ marginTop: 32 }} style={{ marginTop: 32 }}
......
...@@ -53,7 +53,7 @@ class BatchImportQuestionModal extends Component { ...@@ -53,7 +53,7 @@ class BatchImportQuestionModal extends Component {
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) { if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({ Modal.warning({
title:"服务已到期", title:"服务已到期",
content: "当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买", content: `当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: "我知道了" okText: "我知道了"
}) })
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment