Parcourir la source

主播端首页接口对接

warrior il y a 3 mois
Parent
commit
6764d32a0f

+ 1 - 1
projects/live-app/src/modules/live/link-page/link-page.component.html

@@ -8,7 +8,7 @@
       />
       <div class="profile-title">
         <div class="profile-name">{{ room?.get("user")?.get("nickname") }}</div>
-        <div class="level">LV:33</div>
+        <div class="level">LV:1</div>
       </div>
       <ion-icon
         (click)="onCollection()"

+ 1 - 1
projects/live-app/src/modules/tabs/anthorhome/anthorhome.component.ts

@@ -122,7 +122,7 @@ export class AnthorhomeComponent implements OnInit {
   }
   async getUserList() {
     let res = await this.aiServ.getLinkUsers({
-      val: this.value ? this.value : '',
+      value: this.value ? this.value : '',
       skip: this.userList.length,
       // sex: this.viewAnchor,
       city: this.city,

+ 12 - 23
projects/live-app/src/services/aichart.service.ts

@@ -250,29 +250,18 @@ export class AiChatService {
     return this.http.customSQL(sql);
   }
 
-  async getLinkUsers(param: any): Promise<any> {
-    let { val, limit, skip, sex, city } = param;
-    let whereUser = val
-      ? `AND (u.nickname LIKE '%${val}%' OR pf.mobile LIKE '%${val}%' OR pf.name LIKE '%${val}%')`
-      : ``;
-    let whereSex = sex ? `AND pf.sex = '${sex}'` : ``;
-    let whereCity = city ? `AND us."city" = '${city}'` : '';
-    let sql = `SELECT pf.name,pf.mobile,pf.remark,pf.birthdate,
-    u.city,u."avatar",u."objectId" uid,u."nickname"
-    FROM "Profile" pf
-    LEFT JOIN "_User" u
-    ON u."objectId" = pf."user"
-    WHERE pf."company" = 'Qje9D4bqol'
-    ${whereUser}
-    ${whereSex}
-    ${whereCity}
-    AND (pf."identyType" <> 'anchor' OR pf."identyType" IS NULL)
-    AND pf."isCross" = TRUE
-    AND pf."isDeleted" IS NOT TRUE
-    ORDER BY pf."createdAt" DESC
-    OFFSET ${skip || 0} LIMIT ${limit || 20}`;
-    let res: any = await this.http.customSQL(sql);
-    return res.data;
+  async getLinkUsers(params: {
+    company?:string,
+    value?:string, 
+    limit?:number, 
+    skip?:number, 
+    sex?:string, 
+    city?:string
+  }): Promise<any> {
+    params['company'] = this.company;
+    let baseurl = 'https://server.fmode.cn/api/ailiao/users';
+    const data = await this.http.httpRequst(baseurl, params, 'POST');
+    return data?.data;
   }
 
   /* 赠送礼物 */