You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.2 KiB
66 lines
1.2 KiB
|
3 years ago
|
<template>
|
||
|
|
<view>
|
||
|
|
<button @tap="toAdd">添加运维人员</button>
|
||
|
|
<button @tap="logout">退出登录</button>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import { getCustomerPage } from "@/common/network/customer";
|
||
|
|
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
customerList: [],
|
||
|
|
};
|
||
|
|
},
|
||
|
|
created() {},
|
||
|
|
mounted() {},
|
||
|
|
methods: {
|
||
|
|
getCustomerPage() {
|
||
|
|
let data = {
|
||
|
|
orders: [
|
||
|
|
{
|
||
|
|
field: "custid",
|
||
|
|
type: "asc",
|
||
|
|
},
|
||
|
|
],
|
||
|
|
page: {
|
||
|
|
page: 1,
|
||
|
|
limit: 20,
|
||
|
|
},
|
||
|
|
};
|
||
|
|
getCustomerPage(data)
|
||
|
|
.then((res) => {
|
||
|
|
if (res.code === 200) {
|
||
|
|
this.customerList = res.data.page.list;
|
||
|
|
} else {
|
||
|
|
console.log(res);
|
||
|
|
}
|
||
|
|
})
|
||
|
|
.catch((err) => {
|
||
|
|
console.log(err);
|
||
|
|
});
|
||
|
|
},
|
||
|
|
toAdd() {
|
||
|
|
uni.navigateTo({
|
||
|
|
url: "/pages/customer/add/add",
|
||
|
|
});
|
||
|
|
},
|
||
|
|
logout() {
|
||
|
|
uni.removeStorageSync("access_token");
|
||
|
|
uni.removeStorageSync("role");
|
||
|
|
uni.reLaunch({
|
||
|
|
url: "/pages/user/login/login",
|
||
|
|
});
|
||
|
|
},
|
||
|
|
},
|
||
|
|
onLoad() {
|
||
|
|
this.getCustomerPage();
|
||
|
|
},
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped>
|
||
|
|
</style>
|