|
@@ -196,12 +196,30 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 我的好友 -->
|
|
|
+ <el-dialog title="好友列表" :visible.sync="friendsOpen" width="520px" append-to-body :close-on-click-modal=false>
|
|
|
+ <el-table v-loading="loading" :data="friendList" >
|
|
|
+ <el-table-column label="序号" type="index" width="50" />
|
|
|
+ <el-table-column label="昵称" align="center" prop="nickName" />
|
|
|
+ </el-table>
|
|
|
+ <br />
|
|
|
+ <el-pagination small
|
|
|
+ v-show="ftotal>0"
|
|
|
+ :page-size="friendsParams.pageSize"
|
|
|
+ :current-page="friendsParams.pageNum"
|
|
|
+ :total="ftotal"
|
|
|
+ />
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="friendBack">返回</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { listUser, getUser, delUser, addUser, updateUser, exportUser } from "@/api/system/appUser";
|
|
|
import appUserAvatar from "./detail/appUserAvatar";
|
|
|
+import { listFriends } from "@/api/system/friends";
|
|
|
|
|
|
export default {
|
|
|
name: "AppUser",
|
|
@@ -225,6 +243,7 @@ export default {
|
|
|
total: 0,
|
|
|
// 会员表格数据
|
|
|
userList: [],
|
|
|
+ friendList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -244,6 +263,13 @@ export default {
|
|
|
pageSize: 10,
|
|
|
searchValue: null,
|
|
|
},
|
|
|
+ friendsOpen: false,
|
|
|
+ ftotal: 0,
|
|
|
+ friendsParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ appUserId: null,
|
|
|
+ },
|
|
|
reFresh: 1,
|
|
|
// 表单参数
|
|
|
form: {},
|
|
@@ -393,6 +419,7 @@ export default {
|
|
|
myPage(row) {
|
|
|
|
|
|
},
|
|
|
+
|
|
|
myPublish(row) {
|
|
|
this.$router.push({
|
|
|
path:'/my/publish',
|
|
@@ -401,21 +428,26 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ getMyFriends(){
|
|
|
+ this.loading = true;
|
|
|
+ listFriends(this.friendsParams).then(res => {
|
|
|
+ this.friendList = res.rows;
|
|
|
+ this.ftotal = res.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
myFriend(row) {
|
|
|
- this.$router.push({
|
|
|
- path:'/my/friend',
|
|
|
- query: {
|
|
|
- id: row.userId
|
|
|
- }
|
|
|
- })
|
|
|
+ this.friendsOpen = true;
|
|
|
+ this.friendsParams.appUserId = row.userId;
|
|
|
+ this.getMyFriends();
|
|
|
+ },
|
|
|
+ friendBack(){
|
|
|
+ this.friendsOpen = false;
|
|
|
},
|
|
|
+
|
|
|
myFamily(row) {
|
|
|
- this.$router.push({
|
|
|
- path:'/my/family',
|
|
|
- query: {
|
|
|
- id: row.userId
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
};
|