Sfoglia il codice sorgente

添加好友申请审核列表接口

wkw 1 settimana fa
parent
commit
db4b396a5d
3 ha cambiato i file con 24 aggiunte e 5 eliminazioni
  1. 2 2
      .env
  2. 5 0
      src/api/path/im.api.js
  3. 17 3
      src/views/im/contactList/invitation/index.vue

+ 2 - 2
.env

@@ -8,7 +8,7 @@ VITE_DEV_PATH='https://wallet.angeltokens.io'
 VITE_PRO_PATH='https://wallet.angeltokens.io'
 
 
-VITE_PRO_IM_PATH='https://nim.angeltokens.io'
-VITE_DEV_IM_PATH='https://nim.angeltokens.io'
+VITE_PRO_IM_PATH='http://192.168.0.59:8888'
+VITE_DEV_IM_PATH='http://192.168.0.59:8888'#https://nim.angeltokens.io
 
 VITE_PRO_BACKEND_PATH='https://backend.angeltoken.net'

+ 5 - 0
src/api/path/im.api.js

@@ -36,3 +36,8 @@ export function getmessage(params) {
   return service.get('message', { params });
 }
 
+// 获取好友申请审核列表
+export function friendRequest(params) {
+  return service.get("/user/friend/request", { params });
+}
+

+ 17 - 3
src/views/im/contactList/invitation/index.vue

@@ -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>