diff --git a/src/components/Article.vue b/src/components/Article.vue index 2f85a08779797dc76932b19205250ba05d799f50..fbd2528ce6159864c6d6c6ecd5b14d6f1de28546 100644 --- a/src/components/Article.vue +++ b/src/components/Article.vue @@ -368,9 +368,26 @@ export default { mounted () { this.articleScrollListen('add') this.initPageSpliteFun() + this.getChallengeDict() // window.addEventListener('onload', this.topVisible()) }, methods: { + getChallengeDict () { + const that = this + that.$axios + .post(that.baseurl + 'dictModel/index/', { + kind: 'challenge' + // 传入索引 + }) + .then((res) => { + that.challengeConfig = res.data.data.map(item => { + return JSON.parse(item.option) + }) + }) + .catch((error) => { + throw Error(error) + }) + }, /** * dom的滚动事件监听 */ diff --git a/src/components/Onlinewebsocket.vue b/src/components/Onlinewebsocket.vue index 847e554f36b669dc8751c5f9918c2ecf23d588bd..2c417d753148dc4984ccdbdf33a33a881ec109e4 100644 --- a/src/components/Onlinewebsocket.vue +++ b/src/components/Onlinewebsocket.vue @@ -145,7 +145,7 @@ export default { websocketUrl: 'wss://yongma16.xyz/ws-api/', websocket: null, // room 存房间名字,content保存聊天信息的数组 - chat_info: new Array(), + chat_info: [], chat_room: null, room_loc: 0, user: '',