Commit 3f9f9b6f by chenqiang

home界面内容清理

parent 959c7e17
<template>
<div class="home">
<img :src="captcha.img ? 'captcha.img' : defaultGoodsImage" />
<div class="demo" @click="toBar">跳转</div>
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<div class="demo" @click="toLogin">跳转</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="用户管理" name="first" v-if="userAuth < 2"
>用户管理</el-tab-pane
>
<el-tab-pane label="配置管理" name="second" v-if="userAuth < 1"
>配置管理</el-tab-pane
>
<el-tab-pane label="角色管理" name="third" v-if="userAuth < 5"
>角色管理</el-tab-pane
>
<el-tab-pane label="定时任务补偿" name="fourth" v-if="userAuth < 6"
>定时任务补偿</el-tab-pane
>
</el-tabs>
</div>
<div class="home"></div>
</template>
<script>
import { Home, test, test1 } from "@/api/home.js";
import { mapGetters } from "vuex";
export default {
name: "Home",
data() {
return {
tokeb: "",
captcha: {
id: "",
img: ""
},
options: [
{
value: "选项1",
label: "黄金糕"
},
{
value: "选项2",
label: "双皮奶"
},
{
value: "选项3",
label: "蚵仔煎"
},
{
value: "选项4",
label: "龙须面"
},
{
value: "选项5",
label: "北京烤鸭"
}
],
value: "",
activeName: ""
};
return{}
},
created() {
this.getHome();
this.getH();
this.getT();
},
computed: {
...mapGetters(["defaultGoodsImage", "userAuth"])
},
methods: {
getHome() {
Home({
objectValue: "粤sty989"
}).then(res => {
console.log(res);
});
},
getH() {
test({
objectValue: "粤sty989"
}).then(res => {
console.log(res);
});
},
getT() {
test1({
zjhm: 412721197608203413
}).then(res => {
console.log(res);
});
},
toBar() {
this.$router.push("/asdw");
},
toLogin() {
this.$router.push("/Login");
},
handleClick(tab, event) {
console.log(tab, event);
}
}
};
</script>
<style lang="scss">
.demo {
width: 100px;
height: 100px;
background: $base-color;
}
</style>
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