前端异步请求

This commit is contained in:
橙子
2021-10-24 15:50:31 +08:00
parent 3ce0355a79
commit 5d49ad55f7
4 changed files with 58 additions and 44 deletions

View File

@@ -12,21 +12,26 @@
</material-card>
</template>
<script>
import userApi from "../api/userApi"
export default {
created() {
this.init();
},
methods: {
init() {
userApi.GetRouterByUserId(this.$route.path).then(resp=>{
this.axiosUrls=resp.data;
})
}
},
data: () => ({
start: true,
axiosUrls: {
get: "role/getrole",
update: "role/updaterole",
del: "role/delListrole",
add: "role/addrole",
// get: "role/getrole",
// update: "role/updaterole",
// del: "role/delListrole",
// add: "role/addrole",
},
headers: [
{ text: "编号", align: "start", value: "id" },