提交 ac278393 authored 作者: lihuihui's avatar lihuihui
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
:page-size="page.size" :page-size="page.size"
layout="total, prev, pager, next, jumper" layout="total, prev, pager, next, jumper"
:total="page.total" :total="page.total"
:hide-on-single-page="true"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
></el-pagination> ></el-pagination>
</div> </div>
...@@ -154,8 +155,8 @@ export default { ...@@ -154,8 +155,8 @@ export default {
// 分页 // 分页
if (this.hasPage) { if (this.hasPage) {
this.dataList = response.list this.dataList = response.list || []
this.page.total = parseInt(response.count) this.page.total = parseInt(response.count) || 0
} }
}) })
}, },
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="live-item-content__time">{{subitem.start_time}}</div> <div class="live-item-content__time">{{subitem.start_time}}</div>
<div <div
class="live-item-content__status" class="live-item-content__status"
v-if="subitem.enable_record" v-if="!(subitem.live_status === 103 && !subitem.enable_record)"
>{{calcTimeText(subitem.start_time, subitem.live_status)}}</div> >{{calcTimeText(subitem.start_time, subitem.live_status)}}</div>
</div> </div>
</div> </div>
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
methods: { methods: {
/* 退出登录 - 跳转方法 */ /* 退出登录 - 跳转方法 */
logout() { logout() {
cAction.Others.outLogin() cAction.Other.outLogin()
.then(str => { .then(str => {
window.G.UserInfo = {} window.G.UserInfo = {}
this.$router.push({ path: '/login/index' }) this.$router.push({ path: '/login/index' })
...@@ -96,9 +96,10 @@ export default { ...@@ -96,9 +96,10 @@ export default {
this.dataList = response.data this.dataList = response.data
} }
}) })
.catch(e => { // 取消报错提醒
this.$message.error(e.message) // .catch(e => {
}) // this.$message.error(e.message)
// })
.finally(() => { .finally(() => {
if (this.loading) { if (this.loading) {
this.loading.close() this.loading.close()
...@@ -182,6 +183,7 @@ export default { ...@@ -182,6 +183,7 @@ export default {
openCloudLive(data, message) { openCloudLive(data, message) {
// https://doc.bokecc.com/live/Appendix_1.html // https://doc.bokecc.com/live/Appendix_1.html
const liveStatus = data.live_status const liveStatus = data.live_status
data.viewer_name = data.viewer_name || this.nickName
if (liveStatus === 1) { if (liveStatus === 1) {
// 进行中 // 进行中
const url = `https://view.csslcloud.net/api/view/index?roomid=${data.room_id}&userid=${data.user_id}&autoLogin=true&viewername=${data.viewer_name}&viewertoken=${data.viewer_token}` const url = `https://view.csslcloud.net/api/view/index?roomid=${data.room_id}&userid=${data.user_id}&autoLogin=true&viewername=${data.viewer_name}&viewertoken=${data.viewer_token}`
...@@ -258,7 +260,7 @@ export default { ...@@ -258,7 +260,7 @@ export default {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.getNewLiveMsg() this.getNewLiveMsg()
this.getLiveList() this.getLiveList()
}, 3000) }, 10000)
}, },
beforeDestroy() { beforeDestroy() {
this.timer && clearInterval(this.timer) this.timer && clearInterval(this.timer)
...@@ -292,7 +294,11 @@ body { ...@@ -292,7 +294,11 @@ body {
padding: 0.2rem 0.2rem 0.16rem; padding: 0.2rem 0.2rem 0.16rem;
} }
.head .logo { .head .logo {
height: 0.3rem; width: 0.9rem;
/* height: 0.3rem; */
}
.head .logo:nth-child(2) {
margin-left: 0.1rem;
} }
.head .user { .head .user {
display: flex; display: flex;
...@@ -379,7 +385,7 @@ body { ...@@ -379,7 +385,7 @@ body {
font-size: 0.12rem; font-size: 0.12rem;
color: #333; color: #333;
} }
.live-item-content__time { .live-item-content__status {
color: #b01c3d; color: #b01c3d;
} }
</style> </style>
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
"babel-eslint": "^8.2.6", "babel-eslint": "^8.2.6",
"cross-env": "^5.2.0",
"eslint": "^4.19.1", "eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0", "eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.14.0", "eslint-plugin-import": "^2.14.0",
...@@ -37,6 +36,7 @@ ...@@ -37,6 +36,7 @@
"express": "^4.16.4", "express": "^4.16.4",
"form-data": "^2.5.0", "form-data": "^2.5.0",
"multer": "^1.4.1", "multer": "^1.4.1",
"promise.prototype.finally": "^3.1.1" "promise.prototype.finally": "^3.1.1",
"cross-env": "^5.2.0"
} }
} }
...@@ -2,8 +2,12 @@ const state = process.env.NODE_ENV ...@@ -2,8 +2,12 @@ const state = process.env.NODE_ENV
let conf = {} let conf = {}
if (state === 'test') { if (state === 'test') {
conf.agentApiUrl = 'https://api2.ezijing.com/' conf.agentApiUrl = 'https://api2.ezijing.com/'
conf.apiKey = 'mwLyCymyEVCcKTn7nKDjYIMPBwScbugX'
conf.host = 'lms-api2.ezijing.com'
} else if (state === 'production') { } else if (state === 'production') {
conf.agentApiUrl = 'https://zapi.ezijing.com/' conf.agentApiUrl = 'https://zapi.ezijing.com/'
conf.apiKey = 'mwLyCymyEVCcKTn7nKDjYIMPBwScbugX'
conf.host = 'lms-api.ezijing.com'
} }
global.app = null global.app = null
......
...@@ -36,15 +36,15 @@ const agentProcessor = () => { ...@@ -36,15 +36,15 @@ const agentProcessor = () => {
params: req.query params: req.query
} }
options.url = options.url.replace(/tenant\//gi, '') options.url = options.url.replace(/tenant\//gi, '')
headers['apikey'] = 'mwLyCymyEVCcKTn7nKDjYIMPBwScbugX' headers['apikey'] = conf.apiKey
if (/user_center/gi.test(options.url)) { if (/user_center/gi.test(options.url)) {
headers['Host'] = 'sso.ezijing.com' headers['Host'] = 'sso.ezijing.com'
headers['host'] = 'sso.ezijing.com' headers['host'] = 'sso.ezijing.com'
} else { } else {
// headers['Host'] = 'lms-api.ezijing.com' // headers['Host'] = 'lms-api.ezijing.com'
// headers['host'] = 'lms-api.ezijing.com' // headers['host'] = 'lms-api.ezijing.com'
headers['Host'] = 'lms-worklobby-api.ezijing.com' headers['Host'] = conf.host
headers['host'] = 'lms-worklobby-api.ezijing.com' headers['host'] = conf.host
} }
/* 测试 */ /* 测试 */
// if (/\/essay/gi.test(options.url) && /post/gi.test(req.method)) { // if (/\/essay/gi.test(options.url) && /post/gi.test(req.method)) {
...@@ -118,9 +118,7 @@ const agentProcessor = () => { ...@@ -118,9 +118,7 @@ const agentProcessor = () => {
'base64' 'base64'
) )
} catch (e) { } catch (e) {
res res.status(500).json({
.status(500)
.json({
message: message:
'文档上传出错,错误原因:请不要直接修改后缀“.doc”为“.docx”或者正文内容必须大于400字', '文档上传出错,错误原因:请不要直接修改后缀“.doc”为“.docx”或者正文内容必须大于400字',
errMsg: 'err', errMsg: 'err',
...@@ -135,8 +133,8 @@ const agentProcessor = () => { ...@@ -135,8 +133,8 @@ const agentProcessor = () => {
/* check-access接口 */ /* check-access接口 */
// headers['Host'] = 'lms-api.ezijing.com' // headers['Host'] = 'lms-api.ezijing.com'
// headers['host'] = 'lms-api.ezijing.com' // headers['host'] = 'lms-api.ezijing.com'
headers['Host'] = 'lms-worklobby-api.ezijing.com' headers['Host'] = conf.host
headers['host'] = 'lms-worklobby-api.ezijing.com' headers['host'] = conf.host
axios.defaults.headers = headers axios.defaults.headers = headers
axios({ axios({
timeout: 30 * 1000, timeout: 30 * 1000,
...@@ -215,9 +213,7 @@ const agentProcessor = () => { ...@@ -215,9 +213,7 @@ const agentProcessor = () => {
JSON.stringify(e.response.data) JSON.stringify(e.response.data)
) )
} else { } else {
res res.status(500).json({
.status(500)
.json({
message: '系统错误,请稍后重试或联系管理员', message: '系统错误,请稍后重试或联系管理员',
errMsg: 'Error Proxy Request or BackData Excute Error', errMsg: 'Error Proxy Request or BackData Excute Error',
code: 500 code: 500
...@@ -239,9 +235,7 @@ const agentProcessor = () => { ...@@ -239,9 +235,7 @@ const agentProcessor = () => {
}) })
}) })
} catch (e) { } catch (e) {
res res.status(500).json({
.status(500)
.json({
message: '系统错误,请稍后重试或联系管理员', message: '系统错误,请稍后重试或联系管理员',
errMsg: 'Network Server Excute Error', errMsg: 'Network Server Excute Error',
code: 500 code: 500
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论