This commit is contained in:
libowei 2023-12-05 18:17:41 +08:00
parent d419034d31
commit 34362eb928
3 changed files with 5 additions and 90 deletions

View File

@ -41,7 +41,7 @@ const install = (Vue, vm) => {
// 方式四如果token放在了Storage本地存储中拦截是每次请求都执行的
// 所以哪怕您重新登录修改了Storage下一次的请求将会是最新值
// const token = uni.getStorageSync('token');
const token = "Bearer b85a1a24553c4f6fa374e18539daf70d"
const token = "Bearer 8005fb2dde6e44a3aff61d67e8ef5bcf"
// console.log("我是token", token)
config.header.Authorization = token;
// #ifdef H5

View File

@ -15,6 +15,7 @@
<swiper :interval="5000" :duration="1000" is-scroll="true" :current="current" @change="updateCurrent" class="swiper">
<!-- 口语 -->
<swiper-item>
<slander></slander>
</swiper-item>
<!-- 写作 -->
<swiper-item>
@ -166,23 +167,10 @@
<script>
import audiology from './components/audiology.vue'
import reading from './components/reading.vue'
import slander from './components/slander.vue'
export default {
data() {
return {
postdata :{
"key": "",
"pageNum": 0,
"mode": "home",
"part": "part1",
"order": "0",
"type": "",
"isStudy": 0,
"isFavorite": 0,
"isEvlua": 0,
"isFun": 0,
"level": 0,
"isNew": 0
},
//
list: [{
name: '口语'
@ -201,51 +189,22 @@
name: '1',
disabled: false
}],
//
slander: [],
//
options:[
{
id:1,
name:'Part1'
},
{
id:2,
name:'Part2'
}
],
options2:[
{
id:1,
name:'环境类'
},
{
id:2,
name:'学习类'
}
],
arrowDown:false,
categorize:'分类',
//
Compose: [],
num:0,
// v-if
arrow:false,
selectedOption:'Part1',
radioValue: '',
part1: true,
current: 0,
search: true,
listType: [],
idList: [],
}
},
components:{
audiology,
reading
reading,
slander
},
onLoad() {
this.getList()
@ -255,20 +214,6 @@
upType(index, num) {
this.listType.splice(index, 1, num)
},
//
getList() {
let add ={"key":"","pageNum":0,"mode":"home","part":"part1","order":"0","type":"","isStudy":0,"isFavorite":0,"isEvlua":0,"isFun":0,"level":0,"isNew":0}
this.$u.post('https://api.admin-v2.langsi.online/admin-api/speaking/topic/home/list',add).then(res => {
let keyArr = Object.keys(res.data)
let valueArr = Object.values(res.data)
this.slander = keyArr.map((item, index) => {
return {
label: item,
list: valueArr[index]
}
})
})
},
change(index) {
this.current = index;
},
@ -297,37 +242,7 @@
this.search = true
} else {
this.search = false
}
},
//
arrow_xl(){
this.arrow=!this.arrow
},
arrow_xl2(){
this.arrowDown=!this.arrowDown
},
//
arrow_options(id){
this.options.forEach(item=>{
if(item.id== id){
this.selectedOption=item.name
}else if(id==2){
this.postdata.part="part2"
this.getList()
}else{
this.postdata.part="part1"
this.getList()
}
})
},
Classification(id){
this.options2.forEach(item=>{
if(item.id == id){
this.categorize =item.name
}
})
},
radioGroupChange() {