|
@@ -2,8 +2,8 @@
|
|
|
<div class="container">
|
|
|
<div class="content">
|
|
|
<div class="tab-box">
|
|
|
- <div class="tab-text" :class="type == 0?'active-color':''" @click="type = 0">我收到的</div>
|
|
|
- <div class="tab-text" :class="type == 1?'active-color':''" @click="type = 1">我发起的</div>
|
|
|
+ <div class="tab-text" :class="type == 1?'active-color':''" @click="type = 1">我收到的</div>
|
|
|
+ <div class="tab-text" :class="type == 2?'active-color':''" @click="type = 2">我发起的</div>
|
|
|
</div>
|
|
|
<div class="list-box">
|
|
|
<div class="box-item" :class="{ 'no-border': i === 9 }" v-for="(item,i) in 20">
|
|
@@ -38,8 +38,22 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-const type = ref(0);
|
|
|
+import { friendRequest } from "@/api/path/im.api";
|
|
|
+import { useWalletStore } from "@/stores/modules/walletStore";
|
|
|
+const walletStore = useWalletStore();
|
|
|
+
|
|
|
+
|
|
|
+const type = ref(1);
|
|
|
const showAgree = ref(false);
|
|
|
+
|
|
|
+const getfriendRequest = async () => {
|
|
|
+ const res = await friendRequest({uuid:walletStore.account,status:type.value});
|
|
|
+ console.log(res)
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(()=>{
|
|
|
+ getfriendRequest();
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|