talk_appAmin/pages/Friend/addressbook.vue

133 lines
3.0 KiB
Vue
Raw Normal View History

2024-06-12 12:29:17 +08:00
<!-- 通讯录 -->
<template>
2024-06-18 19:06:14 +08:00
2024-06-12 12:29:17 +08:00
<view style="position: fixed; top: 0;bottom: 0; left: 0; right: 0; background-color: #ffffff; z-index: -1;"></view>
2024-06-18 19:06:14 +08:00
2024-06-12 12:29:17 +08:00
<up-index-list :index-list="indexList">
<template v-for="(item, index) in itemArr">
<!-- #ifdef APP-NVUE -->
<up-index-anchor :text="indexList[index]"></up-index-anchor>
<!-- #endif -->
<up-index-item>
<!-- #ifndef APP-NVUE -->
2024-06-18 19:06:14 +08:00
<up-index-anchor :text="indexList[index]" bg-color="#ffffff" height="78rpx"
style="border-bottom: none;margin-left: 32rpx;padding: 0rpx;" size="30rpx"></up-index-anchor>
2024-06-12 12:29:17 +08:00
<!-- #endif -->
2024-06-18 19:06:14 +08:00
<!-- <view class="list-cell" v-for="(cell, index) in item"> -->
<view class="list-cell">
2024-06-12 12:29:17 +08:00
<view class="box">
<image src="../../static/images/icon/tu4-1.jpg" />
<view style="margin: auto 0; margin-left: 24rpx;">
2024-06-18 19:06:14 +08:00
<view><text class="boxtexttop">{{item.sysUserInfo.infoName}}</text></view>
<view><text class="boxtextbottom">[签名]{{item.sysUserInfo.remark}}</text></view>
2024-06-12 12:29:17 +08:00
</view>
</view>
</view>
</up-index-item>
</template>
</up-index-list>
</template>
<script setup>
// 创建响应式数据
2024-06-18 19:06:14 +08:00
const indexList = ref(["A", "B", "C", "D", "E", "F", "G", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V",
"W", "X", "Y", "Z"
]);
2024-06-12 12:29:17 +08:00
const itemArr = ref([
2024-06-18 19:06:14 +08:00
// ['列表A1', '列表A2', '列表A3'],
// ['列表B1', '列表B2', '列表B3'],
// ['列表C1', '列表C2', '列表C3'],
// ['列表D1', '列表D2', '列表D3'],
// ['列表D1', '列表D2', '列表D3'],
// ['列表D1', '列表D2', '列表D3'],
// ['列表D1', '列表D2', '列表D3'],
// ['列表D1', '列表D2', '列表D3']
2024-06-12 12:29:17 +08:00
]);
2024-06-18 19:06:14 +08:00
import {
onMounted,
ref,
reactive,
getCurrentInstance
} from 'vue';
import {
listFriendShip,
getFriendShip,
delFriendShip,
addFriendShip,
updateFriendShip,
listFriendShipId,
} from "@/api/signln/FriendShip/FriendShip";
import {
GetListid
} from "@/api/signln/SignTa/SignTa";
const {
proxy
} = getCurrentInstance();
const form = {
// pageNum: 1,
// pageSize: 10,
userId: null,
friendId: null,
actionUserId: null,
actionTime: null,
status: null
}
const myuserid = ref(0);
onMounted(() => {
//获取$("#")
const getuser = GetListid().then(res => {
myuserid.value = res;
console.log("党情登录用户" + myuserid.value)
})
})
//获取所有的好友
function GetList() {
listFriendShipId(form.value).then(response => {
itemArr.value = response.rows;
console.log(response.rows)
});
}
GetList();
2024-06-12 12:29:17 +08:00
</script>
<style scoped>
.list-cell {
padding: 0rpx;
}
.box {
width: 750rpx;
height: 108rpx;
background: #ffffff;
display: flex;
}
.box>image {
width: 60rpx;
height: 60rpx;
border-radius: 60rpx;
display: block;
margin: auto 0;
margin-left: 32rpx;
}
.boxtexttop {
font-weight: 600;
/* width: 81rpx; */
height: 30rpx;
font-size: 30rpx;
text-align: left;
color: #000000;
}
.boxtextbottom {
font-weight: Regular;
/* width: 291rpx; */
height: 21rpx;
font-size: 20rpx;
text-align: left;
color: #939393;
}
</style>