Commit aadcd55e authored by liujiangnan's avatar liujiangnan

feat

parent d79f162b
......@@ -94,7 +94,7 @@
</div>
</template>
<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-input>
</template>
......
......@@ -146,13 +146,12 @@ new Vue({
}
},
searchWords() {
const encodedUid = btoa(this.searchQuery);
axios.get(`https://api.iplayabc.com/ciba/api/v1/word/reviews?daylimit=20&totallimit=100&uid=${encodedUid}`)
axios.get(`https://api.iplayabc.com/ciba/api/v1/word/reviews?daylimit=20&totallimit=100&uid=${this.searchQuery}`)
.then(response => {
if (response.data.code === 200) {
this.currentRows = response.data.rows;
this.showControlPanel = false;
this.breadcrumb = [{ text_en: 'Search Results' }];
this.breadcrumb = [{ text_en: '记忆之塔' }];
} else {
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