Commit 4717a822 authored by 罗超's avatar 罗超

优化部分功能

parent 263a77a8
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"quasar": "^1.0.0", "quasar": "^1.0.0",
"relation-graph": "^1.0.8", "relation-graph": "^1.0.8",
"v-viewer": "^1.5.1", "v-viewer": "^1.5.1",
"vue-aliplayer-v2": "^1.2.9",
"vue-i18n": "^8.0.0", "vue-i18n": "^8.0.0",
"vue-inline-svg": "^2.0.0" "vue-inline-svg": "^2.0.0"
}, },
......
...@@ -48,7 +48,7 @@ module.exports = function (ctx) { ...@@ -48,7 +48,7 @@ module.exports = function (ctx) {
build: { build: {
vueRouterMode: 'hash', // available values: 'hash', 'history' vueRouterMode: 'hash', // available values: 'hash', 'history'
env: ctx.dev ? { env: ctx.dev ? {
API: 'http://192.168.20.24:8300/api' API: 'http://192.168.20.17:8017/api'
} : { } : {
API: 'http://eduapi.oytour.com/api' API: 'http://eduapi.oytour.com/api'
}, },
......
...@@ -52,6 +52,9 @@ const server = ws ...@@ -52,6 +52,9 @@ const server = ws
mainClass.createWindow(); mainClass.createWindow();
mainClass.mainWindow.webContents.on("dom-ready", () => { mainClass.mainWindow.webContents.on("dom-ready", () => {
mainClass.mainWindow.webContents.send("RELOAD_USER_INFO", teacher); mainClass.mainWindow.webContents.send("RELOAD_USER_INFO", teacher);
setTimeout(() => {
mainClass.mainWindow.webContents.send("UPDATE_STUDENT_CHECKIN", 3);
}, 6000);
}); });
} else { } else {
popuClass.createWindow(); popuClass.createWindow();
...@@ -72,9 +75,13 @@ const server = ws ...@@ -72,9 +75,13 @@ const server = ws
server.connections.forEach(conn => { server.connections.forEach(conn => {
conn.sendText("OPEN-CAMERA"); conn.sendText("OPEN-CAMERA");
}); });
}else if(str.indexOf("CHECK_IN")!=-1){ } else if(str.indexOf("CHECK_IN")!=-1){
console.log("CHECK_IN",str)
let id=str.split('|')[1] let id=str.split('|')[1]
mainClass.mainWindow.webContents.send("UPDATE_STUDENT_CHECKIN", id); mainClass.mainWindow.webContents.send("UPDATE_STUDENT_CHECKIN", id);
} else if(str.indexOf("UPLOAD_VIDEO_RESULT")!=-1){
let vid=str.split(':')[1]
mainClass.mainWindow.webContents.send("NEW_CLASS_UP_VIDEO", vid);
} }
}); });
//监听关闭 //监听关闭
...@@ -230,13 +237,12 @@ ipc.on("OPEN_LOGIN_INIT", function(event) { ...@@ -230,13 +237,12 @@ ipc.on("OPEN_LOGIN_INIT", function(event) {
//popuClass.popuWindow = null; //popuClass.popuWindow = null;
}); });
ipc.on("EXIT_LOGIN_OPENPOPU", function(event) { ipc.on("EXIT_LOGIN_OPENPOPU", function(event) {
console.log()
if (popuClass.popuWindow != null && !popuClass.popuWindow.isDestroyed()) { if (popuClass.popuWindow != null && !popuClass.popuWindow.isDestroyed()) {
popuClass.popuWindow.reload(); popuClass.popuWindow.show()
popuClass.popuWindow.on("ready-to-show", () => { popuClass.popuWindow.webContents.send("REFER_PAGE");
popuClass.popuWindow.show(); loginClass.loginWindow.destroy();
loginClass.loginWindow.destroy(); loginClass.loginWindow = null;
loginClass.loginWindow = null;
});
} else { } else {
popuClass.createWindow(); popuClass.createWindow();
loginClass.loginWindow.destroy(); loginClass.loginWindow.destroy();
...@@ -279,10 +285,12 @@ ipc.on("CHOSEN_DIRTORY_PATH", function(event) { ...@@ -279,10 +285,12 @@ ipc.on("CHOSEN_DIRTORY_PATH", function(event) {
}); });
}); });
ipc.on("GO_TO_CLASS", function(event) { ipc.on("GO_TO_CLASS", function(event) {
mainClass.createTray()
mainClass.mainWindow.hide()
//散布即将上课消息,关闭人脸识别 //散布即将上课消息,关闭人脸识别
server.connections.forEach(conn => { // server.connections.forEach(conn => {
conn.sendText("CLOSE-CAMERA-FORREADY"); // conn.sendText("CLOSE-CAMERA-FORREADY");
}); // });
}); });
ipc.on("CLOSE_VIDEO", function(event,id) { ipc.on("CLOSE_VIDEO", function(event,id) {
server.connections.forEach(conn => { server.connections.forEach(conn => {
...@@ -295,10 +303,8 @@ ipc.on("CREATEORUPDATE_CONFIG_JSON", function(event, classroom_info) { ...@@ -295,10 +303,8 @@ ipc.on("CREATEORUPDATE_CONFIG_JSON", function(event, classroom_info) {
event.sender.send("NOTIFY_CONFIG_STATUS"); event.sender.send("NOTIFY_CONFIG_STATUS");
} else { } else {
if (popuClass.popuWindow != null && !popuClass.popuWindow.isDestroyed()) { if (popuClass.popuWindow != null && !popuClass.popuWindow.isDestroyed()) {
popuClass.popuWindow.reload(); popuClass.popuWindow.show()
popuClass.popuWindow.on("ready-to-show", () => { popuClass.popuWindow.webContents.send("REFER_PAGE");
popuClass.popuWindow.show();
});
} else { } else {
if ( if (
loginClass.loginWindow != null && loginClass.loginWindow != null &&
......
import { app, BrowserWindow, nativeTheme } from "electron"; import { app, BrowserWindow, Tray } from "electron";
const path = require('path');
var mainClass = {}; var mainClass = {};
mainClass.mainWindow = null; mainClass.mainWindow = null;
mainClass.tray=null
mainClass.createWindow = function() { mainClass.createWindow = function() {
mainClass.mainWindow = new BrowserWindow({ mainClass.mainWindow = new BrowserWindow({
width: 850, width: 850,
...@@ -23,7 +25,25 @@ mainClass.createWindow = function() { ...@@ -23,7 +25,25 @@ mainClass.createWindow = function() {
mainClass.mainWindow.on("closed", () => { mainClass.mainWindow.on("closed", () => {
mainClass.mainWindow = null; mainClass.mainWindow = null;
if(mainClass.tray){
mainClass.tray.destroy();
mainClass.tray=null
}
});
mainClass.mainWindow.on("blur", () => {
if(mainClass.tray){
mainClass.mainWindow.hide()
}
}); });
}; };
mainClass.createTray=function(){
console.log(__statics)
mainClass.tray = new Tray(path.join(__statics, '/favicon.ico'));
mainClass.tray.setToolTip('甲鹤上课系统')
mainClass.tray.on('click', ()=>{ //我们这里模拟桌面程序点击通知区图标实现打开关闭应用的功能
mainClass.mainWindow.isVisible() ? mainClass.mainWindow.hide() : mainClass.mainWindow.show()
mainClass.mainWindow.isVisible() ? mainClass.mainWindow.setSkipTaskbar(false):mainClass.mainWindow.setSkipTaskbar(true);
})
}
export default mainClass; export default mainClass;
...@@ -38,7 +38,21 @@ export function queryClassTime(data) { ...@@ -38,7 +38,21 @@ export function queryClassTime(data) {
export function queryStudent(data) { export function queryStudent(data) {
return request({ return request({
url: '/Class/GetStudentByClassId', url: '/Class/GetStudentCheckByClassId',
method: 'post',
data
})
}
export function queryVideoAuth(data) {
return request({
url: '/Video/GetVideoPlayAuth',
method: 'post',
data
})
}
export function setStudentCheckIn(data) {
return request({
url: '/class/AddClassCheckOne',
method: 'post', method: 'post',
data data
}) })
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
</div> </div>
<div class="stu-box"> <div class="stu-box">
<div class="text-dark q-mb-md f14 text-center">{{x.GuestName}}</div> <div class="text-dark q-mb-md f14 text-center">{{x.GuestName}}</div>
<div class="text-primary ms-r f12 text-center" v-if="x.checkState==1">学员已签到</div> <div class="text-primary ms-r f12 text-center" v-if="x.CheckStatus==0">学员已签到</div>
<div class="text-negative ms-r f12 text-center" v-if="x.checkState==0">学员未签到</div> <div class="text-negative ms-r f12 text-center" v-if="x.CheckStatus==-1">学员未签到</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -47,6 +47,15 @@ export default { ...@@ -47,6 +47,15 @@ export default {
components: { components: {
//carmers //carmers
}, },
props:["checkIns"],
watch: {
checkIns:{
handler(val,oval){
this.initStudents()
},
deep:true
}
},
data() { data() {
return { return {
room: null, room: null,
...@@ -65,7 +74,8 @@ export default { ...@@ -65,7 +74,8 @@ export default {
width: '9px', width: '9px',
opacity: 0 opacity: 0
}, },
students:[] students:[],
checkInList:[]
} }
}, },
mounted() { mounted() {
...@@ -73,29 +83,24 @@ export default { ...@@ -73,29 +83,24 @@ export default {
this.user = Lockr.get("loginUserInfo"); this.user = Lockr.get("loginUserInfo");
} }
let that=this let that=this
this.$q.electron.ipcRenderer.on("UPDATE_STUDENT_CHECKIN",(e,r)=>{
that.students.forEach(x=>{
if(x.Id==r){
x.checkState=1
}
})
})
this.initStudents() this.initStudents()
this.$q.electron.ipcRenderer.send("BEGIN_STUDENTS_CHECKIN",this.user.ClassInfo.ClassId);
}, },
methods: { methods: {
changeCheck(i){ changeCheck(i){
this.students[i].checkState=this.students[i].checkState==0?1:0 this.students[i].checkState=this.students[i].checkState==0?1:0
}, },
initStudents(){ initStudents(){
console.log("调用")
queryStudent({ queryStudent({
ClassId:this.user.ClassInfo.ClassId ClassId:this.user.ClassInfo.ClassId,
ClassTimeId:this.user.ClassInfo.ClassTimeId
}).then(res=>{ }).then(res=>{
let temp=res["Data"] // let temp=res["Data"]
temp.forEach(x => { // temp.forEach(x => {
x.checkState=0 // x.checkState=this.checkInList.indexOf(x.Id)==-1?0:1
}); // });
this.students=temp; this.students=res["Data"];
this.$forceUpdate();
}) })
} }
}, },
......
...@@ -12,22 +12,24 @@ ...@@ -12,22 +12,24 @@
<q-img style="border-radius: 6px;" v-for="(item, i) in user.ClassInfo.SuiPaiList" :key="i" height="76px" width="100px" :src="item"></q-img> <q-img style="border-radius: 6px;" v-for="(item, i) in user.ClassInfo.SuiPaiList" :key="i" height="76px" width="100px" :src="item"></q-img>
</div>--> </div>-->
<div class="pingfang-b" style="font-size:18px;margin-bottom:20px;">课程回顾</div> <div class="pingfang-b" style="font-size:18px;margin-bottom:20px;">上课录像</div>
<div v-if="shangeKeState!=-1" style="height:262px;border-radius:12px;font-size:20px;padding-top:111px;" class="bg-dark text-grey-2 text-center">{{shangeKeState==0?"上课后将启动自动录屏":"视频录制中,下课后可查看"}}</div> <div v-if="shangeKeState!=-1&&videoPath==''" style="height:262px;border-radius:12px;font-size:20px;padding-top:111px;" class="bg-dark text-grey-2 text-center">{{shangeKeState==0?"上课后将启动自动录屏":"视频录制中,下课后可查看"}}</div>
<div v-if="videoPath!=''" style="height:262px;border-radius:12px;" class="bg-dark"> <div v-if="shangeKeState==2&&videoPath==''" style="height:262px;border-radius:12px;font-size:20px;padding-top:111px;" class="bg-dark text-grey-2 text-center">正在上传上课录像</div>
<q-video <div v-if="videoAuth" style="height:262px;border-radius:12px;" class="bg-dark">
<!--<q-video
:ratio="16/9" :ratio="16/9"
:src="videoPath" :src="videoPath"
/> />-->
<vue-aliplayer-v2 ref="VueAliplayerV2" :options="options" />
</div> </div>
<div class="pingfang-b" style="font-size:18px;margin-bottom:20px;margin-top:20px;">期间录像</div> <!-- <div class="pingfang-b" style="font-size:18px;margin-bottom:20px;margin-top:20px;">期间录像</div>
<div v-if="shangeKeState!=-1" style="height:262px;border-radius:12px;font-size:20px;padding-top:111px;" class="bg-dark text-grey-2 text-center">{{shangeKeState==0?"上课后将启动自动录屏":"视频录制中,下课后可查看"}}</div> <div v-if="shangeKeState!=-1" style="height:262px;border-radius:12px;font-size:20px;padding-top:111px;" class="bg-dark text-grey-2 text-center">{{shangeKeState==0?"上课后将启动自动录屏":"视频录制中,下课后可查看"}}</div>
<div v-if="videoPath!=''" style="height:262px;border-radius:12px;" class="bg-dark"> <div v-if="videoPath!=''" style="height:262px;border-radius:12px;" class="bg-dark">
<q-video <q-video
:ratio="16/9" :ratio="16/9"
:src="videoPath" :src="videoPath"
/> />
</div> </div>-->
</q-scroll-area> </q-scroll-area>
</div> </div>
<div style="width:248px;padding:20px;" class="bg-white full-height"> <div style="width:248px;padding:20px;" class="bg-white full-height">
...@@ -97,10 +99,10 @@ ...@@ -97,10 +99,10 @@
<q-spinner-facebook /> <q-spinner-facebook />
</template> </template>
</q-btn> </q-btn>
<q-btn @click="changeClassStatus" disable v-if="user.ClassInfo.ClassStatus==2" label="资料上传中" style="width:100%;" color="grey"></q-btn> <div v-if="shangeKeState==2 && videoPath==''">你已完成授课,辛苦啦,后台正在上传视频,请勿关闭电视。</div>
<!-- <q-btn @click="changeClassStatus" disable label="资料上传中" style="width:100%;" color="grey"></q-btn> -->
<q-btn @click="changeClassStatus" v-if="user.ClassInfo.ClassStatus==1 && !classOver" label="正在上课" style="width:100%;" color="grey"></q-btn> <q-btn @click="changeClassStatus" v-if="user.ClassInfo.ClassStatus==1 && !classOver" label="正在上课" style="width:100%;" color="grey"></q-btn>
<q-btn @click="changeClassStatus" v-if="shangeKeState==1" label="下 课" style="width:100%;background:rgb(0,197,154);color:white;"></q-btn> <q-btn @click="changeClassStatus" v-if="shangeKeState==1" label="下 课" style="width:100%;background:rgb(0,197,154);color:white;"></q-btn>
<q-btn @click="changeClassStatus" disable v-if="user.ClassInfo.ClassStatus==2" label="资料上传中" style="width:100%;" color="grey"></q-btn>
</div> </div>
</div> </div>
</div> </div>
...@@ -113,13 +115,22 @@ ...@@ -113,13 +115,22 @@
<script> <script>
import Lockr from 'lockr' import Lockr from 'lockr'
import VueAliplayerV2 from 'vue-aliplayer-v2';
import {queryVideoAuth} from '../api/room/class_room'
// import carmers from './camers' // import carmers from './camers'
export default { export default {
components: { components: {
//carmers //carmers
VueAliplayerV2
}, },
props:["vPath"],
data() { data() {
return { return {
options: {
isLive: false, //切换为直播流的时候必填
autoplay:false,
height:"100%"
},
room: null, room: null,
user: null, user: null,
submitting: false, submitting: false,
...@@ -128,7 +139,9 @@ export default { ...@@ -128,7 +139,9 @@ export default {
borderRadius: '5px', borderRadius: '5px',
backgroundColor: '#333', backgroundColor: '#333',
width: '5px', width: '5px',
opacity: 0.4 opacity: 0.4,
preload:true,
}, },
barStyle: { barStyle: {
...@@ -145,7 +158,19 @@ export default { ...@@ -145,7 +158,19 @@ export default {
currentSecond:0, currentSecond:0,
shangeKeState:0, shangeKeState:0,
videoPath:"", videoPath:"",
moniState:0 moniState:0,
videoAuth:null
}
},
watch: {
vPath:{
handler(newV,oldV){
if(newV && newV!=''){
this.videoPath=newV
this.initVideoAuth();
}
},
deep:true
} }
}, },
mounted() { mounted() {
...@@ -164,16 +189,24 @@ export default { ...@@ -164,16 +189,24 @@ export default {
this.setClassDownStatus() this.setClassDownStatus()
}, 1000); }, 1000);
this.$root.$on("update_suipai_img",r=>{ if(this.vPath && this.vPath!=''){
console.log("视频路径:"+r) this.videoPath=this.vPath
this.updatePic(r) this.initVideoAuth();
}) }
this.$q.electron.ipcRenderer.on("NEW_CLASS_UP_VIDEO",(e,r)=>{
this.videoPath=r;
})
}, },
methods: { methods: {
initVideoAuth(){
queryVideoAuth({strVid:this.videoPath}).then(r=>{
console.log(r.Data)
this.options.vid=this.videoPath
this.options.playauth=r.Data.PlayAuth
this.options.cover=r.Data.VideoMeta.CoverURL
this.options.encryptType=1
this.videoAuth=r.Data
})
},
moni(){ moni(){
if(this.moniState==0){ if(this.moniState==0){
this.$q.electron.ipcRenderer.send("GO_TO_CLASS") this.$q.electron.ipcRenderer.send("GO_TO_CLASS")
...@@ -214,14 +247,33 @@ export default { ...@@ -214,14 +247,33 @@ export default {
return Math.floor(Math.random() * (max - min + 1)) + min; return Math.floor(Math.random() * (max - min + 1)) + min;
}, },
changeClassStatus() { changeClassStatus() {
if(this.shangeKeState==0){ if(!this.submitting){
this.$root.$emit("play_music") this.submitting=true
this.$q.electron.ipcRenderer.send("GO_TO_CLASS") if(this.shangeKeState==0){
this.shangeKeState=1 this.$q.dialog({
}else{ title: '上课提醒',
this.$root.$emit("play_music") message: '开始上课后,系统将停止人脸识别签到,需要手动进行学员签到',
this.$q.electron.ipcRenderer.send("CLOSE_VIDEO",this.room.Id) ok: "确认上课",
this.shangeKeState=-1 cancel: "取消",
seamless:true,
persistent: true
}).onOk(() => {
this.$root.$emit("play_music")
this.$q.electron.ipcRenderer.send("GO_TO_CLASS")
this.shangeKeState=1
}).onCancel(() => {
// console.log('>>>> Cancel')
}).onDismiss(() => {
// console.log('I am triggered on both OK and Cancel')
this.submitting=false
})
}else{
this.$root.$emit("play_music")
this.$q.electron.ipcRenderer.send("CLOSE_VIDEO",this.room.Id)
this.shangeKeState=-1
this.submitting=false
}
} }
}, },
setClassDownStatus() { setClassDownStatus() {
......
...@@ -92,6 +92,9 @@ export default { ...@@ -92,6 +92,9 @@ export default {
this.$q.electron.ipcRenderer.send("OPEN_CLASS_ROOM_INIT") this.$q.electron.ipcRenderer.send("OPEN_CLASS_ROOM_INIT")
}, },
close(){ close(){
if(this.isValing){
this.$q.electron.ipcRenderer.send("CLOSE_VALIDATE_VIDEO")
}
this.$q.electron.ipcRenderer.send("EXIT_LOGIN_OPENPOPU") this.$q.electron.ipcRenderer.send("EXIT_LOGIN_OPENPOPU")
}, },
gologin() { gologin() {
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<div class="full-height col"> <div class="full-height col">
<q-tab-panels v-model="pannelName" animated class="full-height"> <q-tab-panels v-model="pannelName" animated class="full-height">
<q-tab-panel class="q-pa-none full-height" name="main"> <q-tab-panel class="q-pa-none full-height" name="main">
<class-info v-if="!isReload"></class-info> <class-info v-if="!isReload" :vPath="videoPath"></class-info>
</q-tab-panel> </q-tab-panel>
<q-tab-panel class="q-pa-none full-height" name="sign"> <q-tab-panel class="q-pa-none full-height" name="sign">
<check-in></check-in> <check-in ref="checkInBox" :checkIns="checkInList"></check-in>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</div> </div>
...@@ -42,6 +42,7 @@ import classInfo from '../components/class_info' ...@@ -42,6 +42,7 @@ import classInfo from '../components/class_info'
import checkIn from '../components/check_in' import checkIn from '../components/check_in'
import { addAuth } from "../utils/auth"; import { addAuth } from "../utils/auth";
import Lockr from 'lockr' import Lockr from 'lockr'
import {setStudentCheckIn} from '../api/room/class_room'
export default { export default {
data() { data() {
return { return {
...@@ -66,26 +67,73 @@ export default { ...@@ -66,26 +67,73 @@ export default {
], ],
crtMenu: 0, crtMenu: 0,
pannelName:"main", pannelName:"main",
isReload:false isReload:false,
checkInList:[],
videoPath:""
} }
}, },
components:{classInfo,checkIn}, components:{classInfo,checkIn},
mounted() { created(){
this.$root.$on("play_music",this.playStart)
if (Lockr.get("Token")) {
let token = Lockr.get("Token");
addAuth(token);
}
this.$q.electron.ipcRenderer.on("RELOAD_USER_INFO",(event,userInfo)=>{ this.$q.electron.ipcRenderer.on("RELOAD_USER_INFO",(event,userInfo)=>{
console.log("哈哈,我被命中了")
Lockr.set("loginUserInfo",userInfo) Lockr.set("loginUserInfo",userInfo)
let token = userInfo.Token;
addAuth(token);
this.isReload = true this.isReload = true
this.$nextTick(function(){ this.$nextTick(function(){
this.isReload = false this.isReload = false
}) })
}); });
this.$q.electron.ipcRenderer.on("UPDATE_STUDENT_CHECKIN",(e,r)=>{
console.log("哈哈,我被命中了",r)
this.setUserCheckIn(r)
})
this.$q.electron.ipcRenderer.on("NEW_CLASS_UP_VIDEO",(e,r)=>{
this.videoPath=r;
})
},
mounted() {
this.$root.$on("play_music",this.playStart)
if (Lockr.get("loginUserInfo")) {
let user = Lockr.get("loginUserInfo");
let token = user.Token;
addAuth(token);
this.$q.electron.ipcRenderer.send("BEGIN_STUDENTS_CHECKIN",user.ClassInfo.ClassId);
}
}, },
methods: { methods: {
setUserCheckIn(id){
if (Lockr.get("loginUserInfo")) {
let user = Lockr.get("loginUserInfo");
let room = Lockr.get("room_config");
let msg={
classId:user.ClassInfo.ClassId,
ClassDate:user.ClassInfo.ClassTime.split(' ')[0],
ClassRoomId:room.Id,
School_Id:user.School_Id,
TeacherId:user.Id,
OrderGuestId:id,
CheckStatus:0,
StudyNum:"90",
ClassTimeId:user.ClassInfo.ClassTimeId
};
console.log(this.$refs.checkInBox)
setStudentCheckIn(msg).then(r=>{
//d
//this.checkInList.push(r)
if(this.pannelName=="sign"){
this.$refs.checkInBox.initStudents()
}
});
}
},
signout(){ signout(){
Lockr.rm("loginUserInfo") Lockr.rm("loginUserInfo")
this.$q.electron.ipcRenderer.send("USER_SIGNOUT"); this.$q.electron.ipcRenderer.send("USER_SIGNOUT");
......
...@@ -88,6 +88,10 @@ export default { ...@@ -88,6 +88,10 @@ export default {
this.room = Lockr.get("room_config") this.room = Lockr.get("room_config")
this.getClassTimeList() this.getClassTimeList()
} }
let that=this
this.$q.electron.ipcRenderer.on("REFER_PAGE",(e)=>{
that.getClassTimeList()
})
//this.$q.electron.ipcRenderer.send("OPEN_LOCK_SCREEN") //this.$q.electron.ipcRenderer.send("OPEN_LOCK_SCREEN")
}, },
methods: { methods: {
......
import axios from "axios"; import axios from "axios";
import Lockr from "lockr"
import { import {
removeAuth removeAuth
} from "../utils/auth"; } from "../utils/auth";
...@@ -16,6 +17,7 @@ const service = axios.create({ ...@@ -16,6 +17,7 @@ const service = axios.create({
timeout: 15000 timeout: 15000
}); });
// request拦截器 // request拦截器
service.interceptors.request.use( service.interceptors.request.use(
config => { config => {
......
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