This commit is contained in:
zmr900709
2020-06-22 17:45:39 +08:00
parent d384e6d4e7
commit 7c62d68806
3 changed files with 33 additions and 5 deletions

View File

@@ -96,7 +96,7 @@
},
onLoad() {
// 数据的请求
this.apiwelcome()
this.apiwelcome()
},
methods: {
apiwelcome() {
@@ -155,8 +155,13 @@
data: res.data,
success: function() {
console.log('success');
// 跳转首页
uni.switchTab({
url: '/pages/index/index'
});
}
});
// 存储接口请求所需token
uni.setStorage({
key: 'token',

View File

@@ -10,7 +10,7 @@
</view>
<!-- 标签 -->
<view class="tab_lable">
<view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index)">{{item}}</view>
<view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index)">{{item.name}}</view>
</view>
<!-- 提交按钮 -->
<view class="submites" @click="toHomePage">{{submites}}</view>
@@ -28,11 +28,19 @@
value: '',
login: '登录',
show: false,
tab_lables: ["科技", "科技", "科技", "科技", "科技", "科技", "科技", "科技", "科技", "科技"],
tab_lables: [],
submites: '选好了进入首页',
rSelect:[]
};
},
onLoad(){
// 列表的方法
this.labelList()
},
mounted(){
},
methods: {
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {
@@ -59,7 +67,17 @@
uni.switchTab({
url: '/pages/index/index'
});
}
},
// 标签的列表展示
labelList(){
console.log("11111222")
this.$u.api.labelList({
}).then((res) => {
console.log(res)
this.tab_lables = res.data
})
},
}
};
</script>