Commit 2cea4f2f authored by shujianjia's avatar shujianjia
Browse files

tab更改

No related merge requests found
Showing with 866 additions and 302 deletions
+866 -302
<div class="div">
<span class="firstSpan">Copyright©️ tongfangpc.com.All right reserved 技术运营支持:同方计算机有限公司 </span>
<span class="secondSpan">客户服务热线:400-000-111 京ICP备1800000号</span>
</div>
\ No newline at end of file
<template>
<div class="banxin">
<div class="logo fl">
<img src="../img/logo.png" alt="">
</div>
<div class="ulDiv fl">
<ul class="fl" v-if="headerList.length>0" v-clock>
<li v-for="(item,index) in headerList" @click="headerListClick(item.href)" :key="index" v-cloak>
<span @mouseover="handleMouseover(index)" @mouseout="handleMouseout(index)" :class="{ active: item.isHv,activeSpan:item.isClick }">
{{item.title}}
</span>
</li>
</ul>
</div>
<div class="userMsgDiv fl">
<div class="noLogin">
<!-- <button class="registerButton">注册</button> -->
<button class="loginButton" @click="toLogin()">登录</button>
</div>
</div>
<div class="userMsgDiv fl noDisplay" @mouseLeave="showList=false" @mouseEnter="showList=true">
<div class="loginEd">
<img class="fl">
<span class="username"></span>
<!-- <div
class="userCenterDivButton fr"
id="userCenter">
个人中心
</div> -->
</div>
<div class="toastDiv" v-if="showList">
<ul>
<li v-if="identityId === '020001' || identityId === '020002' || identityId === '010000' || identityId === '020003'">
<span @click="toJumpAdmin()">
统一认证管理中心
</span>
</li>
<!-- <li v-if="identityId === '020001'">
<span
@click="toJumpCmsAdmin()">
门户管理
</span>
</li>
<li v-if="identityId !== '020001'">
<span
@click="toJumpCms()">
校园门户
</span>
</li>
<li>
<span>修改密码</span>
</li> -->
<li>
<span @click="onLogout()">退出登录</span>
</li>
</ul>
</div>
</div>
</div>
</template>
\ No newline at end of file
This diff is collapsed.
// vue.js
'use strict';
var vm = new Vue({
el: "#app",
data: function() {
return {
showList: false,
baseUrl: "http://api.dev.xuezhong100.cn", // http://192.168.30.176:8055
imgUrl: 'http://uploadimg.dev.xuezhong100.cn',
swiperList: [], // 轮播图
newsList: [], // 新闻列表
appList: [], // 应用列表
studyResource: [], // 应用资源列表
color: {
0: 'blue',
1: 'green',
2: 'red',
3: 'purple'
},
errorAppImage: 'this.src="../img/avater/app-image.png"', // 默认app图片
defaultAppImage: '../img/avater/app-image.png', // // 默认app图片
useGuideImgText: "useGuideImgText",
activeImgText: "activeImgText",
noActiveImgText: "noActiveImgText",
headerList: [{
title: "首页",
href: "http://www.dev.xuezhong100.cn",
isHv: false,
isClick: 0
},
{
title: "资源",
href: "http://resource.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
{
title: "应用",
href: "http://application.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
// {
// title: "名师",
// href: "",
// isHv: false,
// isClick: 0
// },
{
title: "服务",
href: "http://www.dev.xuezhong100.cn/serve/index.html",
isHv: false,
isClick: 0
},
{
title: "帮助中心",
href: "http://www.dev.xuezhong100.cn/help/help.html",
isHv: false,
isClick: 1
}
],
useGuideList: [{
href: "http://www.dev.xuezhong100.cn/help/help.html#manager",
isHv: false,
imgText: "我是管理员"
}, {
href: "http://www.dev.xuezhong100.cn/help/help.html#teacher",
isHv: false,
imgText: "我是老师"
}, {
href: "http://www.dev.xuezhong100.cn/help/help.html#student",
isHv: false,
imgText: "我是学生"
}, {
href: "http://www.dev.xuezhong100.cn/help/help.html#parent",
isHv: false,
imgText: "我是家长"
}],
moralResourceList: [{
href: "",
isHv: false,
text: "徳育资源"
}, {
href: "",
isHv: false,
text: "徳育资源"
}, ],
subjectResourceList: [{
href: "",
isHv: false,
text: "专题资源"
}, {
href: "",
isHv: false,
text: "STEAM"
},
{
href: "",
isHv: false,
text: "优秀本校课程"
},
],
}
},
created: function() {
this.getBannerList();
this.getNewList();
this.getAppList();
this.getStudyList();
},
computed: {
identityId() {
var user = JSON.parse(localStorage.getItem('user'));
if (user) {
return user.roleId;
}
return ''
}
},
methods: {
handleMouseover(index) {
if (index > 0) {
this.headerList[index].isClick = true;
this.headerList[index].isHv = true;
}
},
handleMouseout(index) {
if (index > 0) {
this.headerList[index].isClick = false;
this.headerList[index].isHv = false;
}
},
parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
// if (('' + time).length === 10) time = parseInt(time) * 1000
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
if (key === 'a') {
return ['', '', '', '', '', '', ''][value - 1]
}
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
},
getBannerList: function() {
var _this = this;
axios
.post(
this.baseUrl +
"/news/notice/getAllBanner", {
enabled: 1,
siteCode: 0
}
)
.then(function(response) {
_this.swiperList = response.data.result;
})
.catch(function(error) {
console.log(error);
});
},
getNewList: function() {
var _this = this;
axios
.post(
this.baseUrl +
"/news/notice/getAllNotice", {
enabled: 1
}
)
.then(function(response) {
_this.newsList = response.data.result;
})
.catch(function(error) {
console.log(error);
});
},
getAppList: function() {
var _this = this;
axios
.post(
this.baseUrl +
"/auth/appManage/getAppManage", {
pageNum: 1,
pageSize: 16,
status: '00'
}
)
.then(function(response) {
_this.appList = response.data.result.list;
})
.catch(function(error) {
console.log(error);
});
},
getStudyList: function() {
var _this = this;
axios
.get(
this.baseUrl +
"/auth/schoolSectionManage/getAllResourceInfo"
)
.then(function(response) {
_this.studyResource = response.data.result;
})
.catch(function(error) {
console.log(error);
});
},
headerListClick: function(url) {
window.open(url, '_blank');
},
login: function() {
window.location.href = "../login/index.html"
},
toJump: function(schoolSection, subject) {
var url = 'http://resource.dev.xuezhong100.cn/#/';
window.open(`${url}?schoolSection=${schoolSection}&subject=${subject}`, '_blank');
},
toApplicationDetail: function(item) {
var url = 'http://application.dev.xuezhong100.cn/#/applictionDetail';
window.open(`${url}?id=${item.id}&name=${item.name}`, '_blank');
},
toNewsPage: function(index) {
let url = 'http://www.dev.xuezhong100.cn/new_details/news_text.html?newsId=' + this.newsList[index].id;
window.open(url, '_blank');
},
useGuideListClick(url) {
window.open(url, '_blank');
}
}
})
\ No newline at end of file
......@@ -3,7 +3,7 @@
var vm = new Vue({
el: "#app",
data: function () {
data: function() {
return {
showList: false,
baseUrl: "http://api.dev.xuezhong100.cn", // http://192.168.30.176:8055
......@@ -13,7 +13,7 @@ var vm = new Vue({
appList: [], // 应用列表
studyResource: [], // 应用资源列表
color:{
color: {
0: 'blue',
1: 'green',
2: 'red',
......@@ -27,41 +27,42 @@ var vm = new Vue({
activeImgText: "activeImgText",
noActiveImgText: "noActiveImgText",
headerList: [{
title: "首页",
href: "",
isHv: false,
isClick: 1
},
{
title: "资源",
href: "http://resource.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
{
title: "应用",
href: "http://application.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
// {
// title: "名师",
// href: "",
// isHv: false,
// isClick: 0
// },
{
title: "服务",
href: "",
isHv: false,
isClick: 0
},
{
title: "帮助中心",
href: "http://www.dev.xuezhong100.cn/help/help.html",
isHv: false,
isClick: 0
}],
title: "首页",
href: "http://www.dev.xuezhong100.cn",
isHv: false,
isClick: 1
},
{
title: "资源",
href: "http://resource.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
{
title: "应用",
href: "http://application.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
// {
// title: "名师",
// href: "",
// isHv: false,
// isClick: 0
// },
{
title: "服务",
href: "http://www.dev.xuezhong100.cn/serve/index.html",
isHv: false,
isClick: 0
},
{
title: "帮助中心",
href: "http://www.dev.xuezhong100.cn/help/help.html",
isHv: false,
isClick: 0
}
],
useGuideList: [{
href: "http://www.dev.xuezhong100.cn/help/help.html#manager",
isHv: false,
......@@ -135,37 +136,39 @@ var vm = new Vue({
}
},
parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
// if (('' + time).length === 10) time = parseInt(time) * 1000
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
if (key === 'a') { return ['', '', '', '', '', '', ''][value - 1] }
if (result.length > 0 && value < 10) {
value = '0' + value
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
// if (('' + time).length === 10) time = parseInt(time) * 1000
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
return value || 0
})
return time_str
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
if (key === 'a') {
return ['', '', '', '', '', '', ''][value - 1]
}
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
},
getBannerList: function () {
getBannerList: function() {
var _this = this;
axios
.post(
......@@ -175,14 +178,14 @@ var vm = new Vue({
siteCode: 0
}
)
.then(function (response) {
.then(function(response) {
_this.swiperList = response.data.result;
})
.catch(function (error) {
.catch(function(error) {
console.log(error);
});
},
getNewList: function () {
getNewList: function() {
var _this = this;
axios
.post(
......@@ -198,7 +201,7 @@ var vm = new Vue({
console.log(error);
});
},
getAppList: function () {
getAppList: function() {
var _this = this;
axios
.post(
......@@ -216,7 +219,7 @@ var vm = new Vue({
console.log(error);
});
},
getStudyList: function () {
getStudyList: function() {
var _this = this;
axios
.get(
......@@ -230,28 +233,28 @@ var vm = new Vue({
console.log(error);
});
},
headerListClick: function (url) {
headerListClick: function(url) {
window.open(url, '_blank');
},
login: function() {
window.location.href = "../login/index.html"
},
toJump: function (schoolSection, subject) {
toJump: function(schoolSection, subject) {
var url = 'http://resource.dev.xuezhong100.cn/#/';
window.open(`${url}?schoolSection=${schoolSection}&subject=${subject}`, '_blank');
},
toApplicationDetail: function (item) {
toApplicationDetail: function(item) {
var url = 'http://application.dev.xuezhong100.cn/#/applictionDetail';
window.open(`${url}?id=${item.id}&name=${item.name}`, '_blank');
},
toNewsPage: function (index) {
let url = 'http://www.dev.xuezhong100.cn/new_details/news_text.html?newsId='+this.newsList[index].id;
window.open(url,'_blank');
toNewsPage: function(index) {
let url = 'http://www.dev.xuezhong100.cn/new_details/news_text.html?newsId=' + this.newsList[index].id;
window.open(url, '_blank');
},
useGuideListClick(url){
window.open(url,'_blank');
useGuideListClick(url) {
window.open(url, '_blank');
}
}
})
})
\ No newline at end of file
// vue.js
'use strict';
var vm = new Vue({
el: "#app",
data: function() {
return {
showList: false,
baseUrl: "http://api.dev.xuezhong100.cn", // http://192.168.30.176:8055
imgUrl: 'http://uploadimg.dev.xuezhong100.cn',
swiperList: [], // 轮播图
newsList: [], // 新闻列表
appList: [], // 应用列表
studyResource: [], // 应用资源列表
color: {
0: 'blue',
1: 'green',
2: 'red',
3: 'purple'
},
errorAppImage: 'this.src="../img/avater/app-image.png"', // 默认app图片
defaultAppImage: '../img/avater/app-image.png', // // 默认app图片
useGuideImgText: "useGuideImgText",
activeImgText: "activeImgText",
noActiveImgText: "noActiveImgText",
headerList: [{
title: "首页",
href: "http://www.dev.xuezhong100.cn",
isHv: false,
isClick: 0
},
{
title: "资源",
href: "http://resource.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
{
title: "应用",
href: "http://application.dev.xuezhong100.cn/",
isHv: false,
isClick: 0
},
// {
// title: "名师",
// href: "",
// isHv: false,
// isClick: 0
// },
{
title: "服务",
href: "http://www.dev.xuezhong100.cn/serve/index.html",
isHv: false,
isClick: 1
},
{
title: "帮助中心",
href: "http://www.dev.xuezhong100.cn/help/help.html",
isHv: false,
isClick: 0
}
],
useGuideList: [{
href: "http://www.dev.xuezhong100.cn/help/help.html#manager",
isHv: false,
imgText: "我是管理员"
}, {
href: "http://www.dev.xuezhong100.cn/help/help.html#teacher",
isHv: false,
imgText: "我是老师"
}, {
href: "http://www.dev.xuezhong100.cn/help/help.html#student",
isHv: false,
imgText: "我是学生"
}, {
href: "http://www.dev.xuezhong100.cn/help/help.html#parent",
isHv: false,
imgText: "我是家长"
}],
moralResourceList: [{
href: "",
isHv: false,
text: "徳育资源"
}, {
href: "",
isHv: false,
text: "徳育资源"
}, ],
subjectResourceList: [{
href: "",
isHv: false,
text: "专题资源"
}, {
href: "",
isHv: false,
text: "STEAM"
},
{
href: "",
isHv: false,
text: "优秀本校课程"
},
],
}
},
created: function() {
this.getBannerList();
this.getNewList();
this.getAppList();
this.getStudyList();
},
computed: {
identityId() {
var user = JSON.parse(localStorage.getItem('user'));
if (user) {
return user.roleId;
}
return ''
}
},
methods: {
handleMouseover(index) {
if (index > 0) {
this.headerList[index].isClick = true;
this.headerList[index].isHv = true;
}
},
handleMouseout(index) {
if (index > 0) {
this.headerList[index].isClick = false;
this.headerList[index].isHv = false;
}
},
parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
// if (('' + time).length === 10) time = parseInt(time) * 1000
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
if (key === 'a') {
return ['', '', '', '', '', '', ''][value - 1]
}
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
},
getBannerList: function() {
var _this = this;
axios
.post(
this.baseUrl +
"/news/notice/getAllBanner", {
enabled: 1,
siteCode: 0
}
)
.then(function(response) {
_this.swiperList = response.data.result;
})
.catch(function(error) {
console.log(error);
});
},
getNewList: function() {
var _this = this;
axios
.post(
this.baseUrl +
"/news/notice/getAllNotice", {
enabled: 1
}
)
.then(function(response) {
_this.newsList = response.data.result;
})
.catch(function(error) {
console.log(error);
});
},
getAppList: function() {
var _this = this;
axios
.post(
this.baseUrl +
"/auth/appManage/getAppManage", {
pageNum: 1,
pageSize: 16,
status: '00'
}
)
.then(function(response) {
_this.appList = response.data.result.list;
})
.catch(function(error) {
console.log(error);
});
},
getStudyList: function() {
var _this = this;
axios
.get(
this.baseUrl +
"/auth/schoolSectionManage/getAllResourceInfo"
)
.then(function(response) {
_this.studyResource = response.data.result;
})
.catch(function(error) {
console.log(error);
});
},
headerListClick: function(url) {
window.open(url, '_blank');
},
login: function() {
window.location.href = "../login/index.html"
},
toJump: function(schoolSection, subject) {
var url = 'http://resource.dev.xuezhong100.cn/#/';
window.open(`${url}?schoolSection=${schoolSection}&subject=${subject}`, '_blank');
},
toApplicationDetail: function(item) {
var url = 'http://application.dev.xuezhong100.cn/#/applictionDetail';
window.open(`${url}?id=${item.id}&name=${item.name}`, '_blank');
},
toNewsPage: function(index) {
let url = 'http://www.dev.xuezhong100.cn/new_details/news_text.html?newsId=' + this.newsList[index].id;
window.open(url, '_blank');
},
useGuideListClick(url) {
window.open(url, '_blank');
}
}
})
\ No newline at end of file
......@@ -177,7 +177,7 @@
<script type="text/javascript" src="../js/base.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="../js/jquery.js"></script>
<script src="../js/homePage.js"></script>
<script src="../js/serve.js"></script>
<script type="text/javascript" src="../js/bootstrap.js"></script>
<script src="../js/token.js"></script>
<script src="../js/less.js"></script>
......
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