Commit abc22a92 authored by liujiangnan's avatar liujiangnan

debug

parent 5e40f738
...@@ -149,20 +149,30 @@ new Vue({ ...@@ -149,20 +149,30 @@ new Vue({
} }
}, },
searchWords() { searchWords() {
axios.get(`https://api.iplayabc.com/ciba/api/v1/word/reviews?daylimit=20&totallimit=100&uid=${this.searchQuery}`) $.ajax({
.then(response => { url: `https://api.iplayabc.com/ciba/api/v1/word/reviews`,
if (response.data.code === 200) { method: 'GET',
this.currentRows = response.data.rows; data: {
daylimit: 20,
totallimit: 100,
uid: this.searchQuery
},
dataType: 'json',
success: (response) => {
if (response.code === 200) {
this.currentRows = response.rows;
this.showControlPanel = false; this.showControlPanel = false;
this.breadcrumb = [{ text_en: '记忆之塔' }]; this.breadcrumb = [{ text_en: '记忆之塔' }];
} else { } else {
this.$message.error('查询失败'); this.$message.error('查询失败');
} }
}) },
.catch(error => { error: (jqXHR, textStatus, errorThrown) => {
console.error('Error:', error); console.error('Error:', textStatus, errorThrown);
this.$message.error('查询出错'); this.$message.error('查询出错');
}
}); });
this.searchQuery = '';
}, },
}, },
mounted() { mounted() {
......
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