diff --git a/backend/src/main.js b/backend/src/main.js
index e0949a3..c892f9f 100644
--- a/backend/src/main.js
+++ b/backend/src/main.js
@@ -24,8 +24,8 @@ import '@/permission' // permission control
* please remove it before going online ! ! !
*/
if (process.env.NODE_ENV === 'production') {
- const { mockXHR } = require('../mock')
- mockXHR()
+ // const { mockXHR } = require('../mock')
+ // mockXHR()
}
// set ElementUI lang to EN
diff --git a/backend/src/settings.js b/backend/src/settings.js
index 3085585..db693b6 100644
--- a/backend/src/settings.js
+++ b/backend/src/settings.js
@@ -1,6 +1,6 @@
module.exports = {
- title: '天泽金融竞赛平台',
+ title: '天择金融竞赛平台',
/**
* @type {boolean} true | false
diff --git a/backend/src/store/modules/user.js b/backend/src/store/modules/user.js
index 657eaaf..0c2dec2 100644
--- a/backend/src/store/modules/user.js
+++ b/backend/src/store/modules/user.js
@@ -33,6 +33,7 @@ const actions = {
const { username, password } = userInfo
return new Promise((resolve, reject) => {
login({ username: username.trim(), password: password }).then(response => {
+ console.log("login5")
const { data } = response
commit('SET_TOKEN', data.token)
setToken(data.token)
diff --git a/backend/src/utils/request.js b/backend/src/utils/request.js
index 9eafe0f..7b8bf5c 100644
--- a/backend/src/utils/request.js
+++ b/backend/src/utils/request.js
@@ -2,7 +2,6 @@ import axios from 'axios'
import { MessageBox, Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
-
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
@@ -14,7 +13,6 @@ const service = axios.create({
service.interceptors.request.use(
config => {
// do something before request is sent
-
if (store.getters.token) {
// let each request carry token
// ['X-Token'] is a custom headers key
@@ -43,8 +41,8 @@ service.interceptors.response.use(
* You can also judge the status by HTTP Status Code
*/
response => {
+ console.log(response)
const res = response.data
-
// if the custom code is not 200, it is judged as an error.
if (res.code !== 200) {
Message({
@@ -81,5 +79,4 @@ service.interceptors.response.use(
return Promise.reject(error)
}
)
-
export default service
diff --git a/backend/src/views/competition/components/group.vue b/backend/src/views/competition/components/group.vue
index 85c80ee..c6cc7f7 100644
--- a/backend/src/views/competition/components/group.vue
+++ b/backend/src/views/competition/components/group.vue
@@ -101,6 +101,11 @@ export default {
default: 0
}
},
+ watch:{
+ cmpId:function(v){
+ console.log(v)
+ }
+ },
data() {
return {
myGroup: this.group,
diff --git a/backend/src/views/competition/components/survey.vue b/backend/src/views/competition/components/survey.vue
index 7e41d3e..24e590b 100644
--- a/backend/src/views/competition/components/survey.vue
+++ b/backend/src/views/competition/components/survey.vue
@@ -21,8 +21,8 @@
- ——
-
+ ——
+
删除
@@ -35,7 +35,7 @@
- ——
+ ——
添加
diff --git a/backend/src/views/competition/components/task.vue b/backend/src/views/competition/components/task.vue
index db76789..643423d 100644
--- a/backend/src/views/competition/components/task.vue
+++ b/backend/src/views/competition/components/task.vue
@@ -51,6 +51,12 @@
+
+ 小时
+
+
+
+
@@ -275,16 +281,17 @@ export default {
this.courseOptions = res.data.page.content
}
})
- if(this.task.length == 0){
- for(var i=0;i {
if(res.code==200){
@@ -294,17 +301,9 @@ export default {
}
})
},
- watch: {
- task: {
- handler: function(nv,ov){
-
- }
- },
- group: {
- handler: function(nv,ov){
-
- }
- }
+ mounted(){
+ this.temp = this.task[0]
+ this.tabId = 0
},
data(){
return {
@@ -355,10 +354,12 @@ export default {
operationStartTime: '',
operationEndTime: '',
tradeType: 1,
+ examDuration:1,
initCapital: 1000000,
financeBasePower: 40,
financeProfitPower: 60,
operationLogo:'',
+ examLogo: '',
examStartTime: '',
examEndTime: '',
questionList:[]
@@ -369,7 +370,7 @@ export default {
name: '股票基金',
},
{
- id: 2,
+ id: 4,
name: '期货'
}
],
@@ -505,7 +506,7 @@ export default {
this.stage = item
},
confirmEdit(){
-
+ this.editStageId =0
},
multiScore(){
let score = 0
@@ -516,7 +517,8 @@ export default {
},
addQuestion(){
let ids = []
- this.chooseList.forEach(item => ids.push(item.id))
+ this.chooseList.forEach(item => ids.push(item.id))
+ console.log(this.task,this.tabId)
let tmp = this.task[this.tabId].questionList.find(t=> t.groupId ==this.groupId)
if(tmp){
tmp.questionIds = ids
@@ -526,7 +528,6 @@ export default {
questionIds: ids
})
}
- console.log(this.task[this.tabId].questionList)
this.confirmChoose()
},
@@ -542,7 +543,6 @@ export default {
questionIds: ids
})
}
- console.log(this.task[this.tabId].questionList)
this.confirmChoose2()
},
levelToName(levelId){
@@ -577,7 +577,6 @@ export default {
this.chooseList = []
this.questionList = []
}
-
}catch{
this.chooseList = []
this.questionList = []
diff --git a/backend/src/views/competition/components/team.vue b/backend/src/views/competition/components/team.vue
index 626defa..da4c6fc 100644
--- a/backend/src/views/competition/components/team.vue
+++ b/backend/src/views/competition/components/team.vue
@@ -53,7 +53,13 @@
- 搜索 添加成员批量导入
+
+ 搜索
+ 添加成员
+
+ 批量导入
+
+
@@ -78,21 +84,23 @@
- {{ scope.row.name }}
+ {{ scope.row.teacher }}
- 移除
+
+ 移除
+
@@ -120,9 +128,9 @@
确定
取消
-
+
-
+
查询
添加队员
取消
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{ scope.row.studentNo}}
+
+
+
+
+ {{ scope.row.name}}
+
+
+
+
+ {{ scope.row.level}}
+
+
+
+
+ 添加队员
+ 取消
+
+
diff --git a/backend/src/views/table/index.vue b/backend/src/views/table/index.vue
index 9176f7a..213170c 100644
--- a/backend/src/views/table/index.vue
+++ b/backend/src/views/table/index.vue
@@ -61,7 +61,7 @@
删除
-
+
初始化密码
@@ -124,6 +124,7 @@ import * as regionApi from '@/api/region'
import * as levelApi from '@/api/level'
import * as provinceApi from '@/api/province'
import * as userApi from '@/api/user'
+import user from '../../store/modules/user'
export default {
filters: {
@@ -217,6 +218,26 @@ export default {
}
return "未知"
},
+ handleModifyStatus(row){
+ console.log(row.id)
+ userApi.initPwd({id: row.id}).then(res=>{
+ if(res.code == 200){
+ this.$notify({
+ title: '操作成功',
+ message: "success",
+ type: 'success',
+ duration: 2000
+ })
+ }else{
+ this.$notify({
+ title: '操作失败',
+ message: res.msg,
+ type: 'error',
+ duration: 2000
+ })
+ }
+ })
+ },
levelToName(id){
let l = this.levelOtions.find(level => level.id == id)
if(l){
diff --git a/backend/vue.config.js b/backend/vue.config.js
index 54d0035..bde428e 100644
--- a/backend/vue.config.js
+++ b/backend/vue.config.js
@@ -32,6 +32,7 @@ module.exports = {
devServer: {
port: port,
open: true,
+ disableHostCheck: true,
overlay: {
warnings: false,
errors: true