parent
203d98ead2
commit
9e8c608aa8
@ -0,0 +1,9 @@ |
||||
import request from "@/utils/request"; |
||||
|
||||
// 查询收货地址列表
|
||||
export function listFollower(user_id) { |
||||
return request({ |
||||
url: `/platform/follower/list/${user_id}`, |
||||
method: "get", |
||||
}); |
||||
} |
@ -0,0 +1,152 @@ |
||||
<template> |
||||
<div class="app-container"> |
||||
<el-table v-loading="loading" :data="followers"> |
||||
|
||||
<el-table-column label="绑定时间" align="center" width="200"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ parseTime(scope.row.createTime) }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="昵称" align="center" width="120"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.followingUser.nickName }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="ID" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.followingUser.userId }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="手机号" align="center" width="120"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.followingUser.phonenumber }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="微信昵称" align="center" width="120"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.followingUser.wechatNickName }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="头像" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-avatar :size="50" :src="getAvatar(scope.row.followingUser)" /> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="性别" align="center"> |
||||
<template slot-scope="scope"> |
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.followingUser.sex" /> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="推荐人" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ scope.row.isDefault ? '是' : '否' }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="登陆时间" align="center" width="200"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ parseTime(scope.row.followingUser.loginDate) }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="注册时间" align="center" width="200"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ parseTime(scope.row.followingUser.createTime) }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="状态" align="center"> |
||||
<template slot-scope="scope"> |
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.followingUser.status" /> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" |
||||
:limit.sync="queryParams.pageSize" @pagination="getList" /> |
||||
|
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import { listFollower } from "@/api/platform/follower"; |
||||
import { getAvatar } from "@/utils"; |
||||
export default { |
||||
name: "Follower", |
||||
props: { |
||||
userId: Number |
||||
}, |
||||
dicts: ['sys_normal_disable', 'sys_user_sex'], |
||||
data() { |
||||
return { |
||||
// 遮罩层 |
||||
loading: true, |
||||
// 选中数组 |
||||
ids: [], |
||||
// 非单个禁用 |
||||
single: true, |
||||
// 非多个禁用 |
||||
multiple: true, |
||||
// 显示搜索条件 |
||||
showSearch: true, |
||||
// 总条数 |
||||
total: 0, |
||||
// 粉丝表格数据 |
||||
followers: [], |
||||
// 弹出层标题 |
||||
title: "", |
||||
// 是否显示弹出层 |
||||
open: false, |
||||
// 查询参数 |
||||
queryParams: { |
||||
pageNum: 1, |
||||
pageSize: 10, |
||||
}, |
||||
// 表单参数 |
||||
form: {}, |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.getList(); |
||||
}, |
||||
methods: { |
||||
getAvatar, |
||||
/** 查询粉丝列表 */ |
||||
getList() { |
||||
this.loading = true; |
||||
listFollower(this.userId).then(response => { |
||||
this.followers = response.rows; |
||||
this.total = response.total; |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
// 取消按钮 |
||||
cancel() { |
||||
this.open = false; |
||||
this.reset(); |
||||
}, |
||||
// 表单重置 |
||||
reset() { |
||||
this.form = { |
||||
id: null, |
||||
|
||||
}; |
||||
this.resetForm("form"); |
||||
}, |
||||
/** 搜索按钮操作 */ |
||||
handleQuery() { |
||||
this.queryParams.pageNum = 1; |
||||
this.getList(); |
||||
}, |
||||
/** 重置按钮操作 */ |
||||
resetQuery() { |
||||
this.resetForm("queryForm"); |
||||
this.handleQuery(); |
||||
} |
||||
}, |
||||
watch: { |
||||
userId(newValue) { |
||||
if (newValue) { |
||||
this.getList(); |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
</script> |
Loading…
Reference in new issue