Commit aadcd55e authored by liujiangnan's avatar liujiangnan

feat

parent d79f162b
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<el-input v-model="searchQuery" placeholder="输入UID" class="search-input"> <el-input v-model="searchQuery" placeholder="输入用户标识" class="search-input">
<el-button slot="append" icon="el-icon-search" @click="searchWords">查询</el-button> <el-button slot="append" icon="el-icon-search" @click="searchWords">查询</el-button>
</el-input> </el-input>
</template> </template>
......
...@@ -146,13 +146,12 @@ new Vue({ ...@@ -146,13 +146,12 @@ new Vue({
} }
}, },
searchWords() { searchWords() {
const encodedUid = btoa(this.searchQuery); axios.get(`https://api.iplayabc.com/ciba/api/v1/word/reviews?daylimit=20&totallimit=100&uid=${this.searchQuery}`)
axios.get(`https://api.iplayabc.com/ciba/api/v1/word/reviews?daylimit=20&totallimit=100&uid=${encodedUid}`)
.then(response => { .then(response => {
if (response.data.code === 200) { if (response.data.code === 200) {
this.currentRows = response.data.rows; this.currentRows = response.data.rows;
this.showControlPanel = false; this.showControlPanel = false;
this.breadcrumb = [{ text_en: 'Search Results' }]; this.breadcrumb = [{ text_en: '记忆之塔' }];
} else { } else {
this.$message.error('查询失败'); this.$message.error('查询失败');
} }
......
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