123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <view>
- <view class="user" v-for="item in users" :key="item.code">
- <text class="title">账户 {{item.account}}</text>
- <view class="content">
- <text>密码:{{item.password}}</text>
- <text>角色:{{item.roleFlag}}</text>
- <text>电话:{{item.phone}}</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- users: [],
- }
- },
- onLoad() {
- uni.request({
- url: 'http://127.0.0.1:9999/user/list',
- method: 'GET',
- data: {},
- success: res => {
- this.users = res.data.data.users;
- console.log(res.data.data.users);
- },
- })
- },
- methods: {
- }
- }
- </script>
- <style>
- .anniu {
- width: 116rpx;
- height: 116rpx;
- float: right;
- margin-top: 10rpx;
- margin-right: 4rpx;
- }
- .user {
- width: 702rpx;
- height: 280rpx;
- background-color: white;
- margin-top: 30rpx;
- margin-left: 24rpx;
- border-radius: 10rpx;
- padding-top: 30rpx;
- }
- .content {
- display: flex;
- flex-direction: column;
- margin-top: 30rpx;
- margin-left: 30rpx;
- line-height: 55rpx;
- font-size: 28rpx;
- color: #444546;
- }
- .title {
- font-size: 36rpx;
- margin-left: 30rpx;
- color: #282828;
- font-weight: 600;
- }
- </style>
|