Leo 2 lat temu
rodzic
commit
9a2fb40029
40 zmienionych plików z 52 dodań i 1004 usunięć
  1. 0 137
      src/apis/account.ts
  2. 2 46
      src/apis/base.ts
  3. 0 60
      src/apis/course.ts
  4. 0 19
      src/apis/guide.ts
  5. 0 19
      src/apis/teacher.ts
  6. 2 39
      src/config/const.ts
  7. 3 0
      src/pages/index/index.scss
  8. 31 98
      src/pages/index/index.vue
  9. 14 0
      types/apis/login.d.ts
  10. 0 8
      types/klian/account/member_info.d.ts
  11. 0 11
      types/klian/account/set_avatar.d.ts
  12. 0 26
      types/klian/account/thirdparty/weixin/minprogram/login/regist/bind.d.ts
  13. 0 22
      types/klian/account/thirdparty/weixin/minprogram/phone/login.d.ts
  14. 0 10
      types/klian/account/update_avatar.d.ts
  15. 0 10
      types/klian/account/update_birthday.d.ts
  16. 0 10
      types/klian/account/update_enname.d.ts
  17. 0 10
      types/klian/account/update_gender.d.ts
  18. 0 10
      types/klian/account/update_name.d.ts
  19. 0 12
      types/klian/base/account/authcode/get.d.ts
  20. 0 15
      types/klian/base/account/authcode/login.d.ts
  21. 0 8
      types/klian/base/account/incomplete/get.d.ts
  22. 0 6
      types/klian/base/app/loctext/get.d.ts
  23. 0 17
      types/klian/base/wechatrobot/minprogram/generatescheme.d.ts
  24. 0 11
      types/klian/baseapi/account/login.d.ts
  25. 0 9
      types/klian/baseapi/base/account/token/extends.d.ts
  26. 0 8
      types/klian/baseapi/base/account/token/validity.d.ts
  27. 0 26
      types/klian/baseapi/base/account/v2/login.d.ts
  28. 0 15
      types/klian/kidapi/kidstudentother/bannerpositions/get.d.ts
  29. 0 15
      types/klian/kidapi/kidstudentother/icon/jingang/list.d.ts
  30. 0 18
      types/klian/market/marketapi/audition/sale/qrcode/get.d.ts
  31. 0 17
      types/klian/media/rchomework/student/subwork/list.d.ts
  32. 0 31
      types/klian/media/rchomework/user/subwork/list.d.ts
  33. 0 22
      types/klian/media/rcusercourse/guide/lesson/get.d.ts
  34. 0 27
      types/klian/media/rcusercourse/student/list.d.ts
  35. 0 34
      types/klian/media/rcusercourse/user/course/list.d.ts
  36. 0 68
      types/klian/media/rcusercourse/user/lesson/detail.d.ts
  37. 0 45
      types/klian/media/rcusercourse/user/lesson/list.d.ts
  38. 0 19
      types/klian/media/rcusercourse/user/lesson/status/set.d.ts
  39. 0 33
      types/klian/smsapi/base/sms/account/vcode/get.d.ts
  40. 0 13
      types/klian/ugc/curriculum/children/guide/v2.d.ts

+ 0 - 137
src/apis/account.ts

@@ -1,137 +0,0 @@
-import { MP_APPID } from "@/config/const";
-import { createPost } from "@/utils/api";
-
-/**
- * 新验证码接口
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/38373)
- */
-export const getSmsCode = createPost("/smsapi/base/sms/account/vcode/get");
-
-/**
- * 手机号验证码登录v2
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/21176)
- */
-export const phoneLogin = createPost("/baseapi/base/account/v2/login");
-
-/**
- * 密码登录
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/100)
- */
-export const pwdLogin = createPost("/baseapi/account/login");
-
-/**
- * 微信小程序-注册登录绑定一体
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/20546)
- */
-export const mpLoginRegist = createPost(
-  "/account/thirdparty/weixin/minprogram/login/regist/bind"
-);
-
-/**
- * 微信应用(小程序、公众号)-登陆(不注册)
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/37526)
- */
-export const wxCodeLogin = createPost(
-  "/account/thirdparty/weixin/minprogram/phone/login"
-);
-
-export const mpLogin = async () => {
-  const code = await new Promise<string>((resolve, reject) => {
-    uni.login({
-      success({ code }) {
-        if (code) {
-          return resolve(code);
-        }
-        reject();
-      },
-      fail: reject,
-    });
-  });
-
-  return wxCodeLogin({
-    js_code: code,
-    appid: MP_APPID,
-  });
-};
-
-/**
- * token有效性校验
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/13350)
- */
-export const validityToken = createPost("/baseapi/base/account/token/validity");
-
-/**
- * token有效性校验
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/13350)
- */
-export const extendsToken = createPost("/baseapi/base/account/token/extends");
-
-/**
- * 获取登录授权码
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/8292)
- */
-export const getAuthCode = createPost("/base/account/authcode/get");
-
-/**
- * 获取登录授权码
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/8292)
- */
-export const authCodeLogin = createPost("/base/account/authcode/login");
-
-/**
- * 获取用户信息
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/94)
- */
-export const getMemberInfo = createPost("/account/member_info");
-
-/**
- * 获取用户信息完善情况
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/4598)
- */
-export const getAccountIncomplete = createPost("/base/account/incomplete/get");
-
-/**
- * 更新性别
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/24382)
- */
-export const updateGender = createPost("/account/update_gender");
-
-/**
- * 更新英文名
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/25110)
- */
-export const updateEnName = createPost("/account/update_enname");
-
-/**
- * 修改头像
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/39696)
- */
-export const updateAvatar = createPost("/account/update_avatar");
-
-/**
- * 更新昵称
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/38875)
- */
-export const updateName = createPost("/account/update_name");
-
-/**
- * 修改生日
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/38874)
- */
-export const updateBirthday = createPost("/account/update_birthday");

+ 2 - 46
src/apis/base.ts

@@ -1,47 +1,3 @@
-import { createPost } from "@/utils/api";
+import { createGet } from "@/utils/api";
 
-/**
- * 文案-客户端获取文案配置
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/10116)
- */
-export const getAppLocalText = createPost("/base/app/loctext/get");
-
-/**
- * 少儿运营位获取
- *
- * 首页顶部banner:6000
- *
- * 购课中心banner:6001
- *
- * [API](https://yapi.pri.ibanyu.com/project/32/interface/api/39910)
- */
-export const getBannerPositions = createPost(
-  "/kidapi/kidstudentother/bannerpositions/get"
-);
-
-/**
- * 少儿金刚位获取
- *
- * 首页金刚位:600
- *
- * 我的页面-我的福利:601
- *
- * 我的页面-服务中心:602
- *
- * 小程序-我的页面-我的福利:603
- *
- * 小程序-我的页面-服务中心:604
- *
- * [API](https://yapi.pri.ibanyu.com/project/32/interface/api/37554)
- */
-export const getJingangList = createPost(
-  "/kidapi/kidstudentother/icon/jingang/list"
-);
-
-/**
- * 获取少儿指引,是否有订单
- */
-export const getCurriculumGuide = createPost(
-  "/ugc/curriculum/children/guide/v2"
-);
+export const textToImage = createGet("/txt_to_img");

+ 0 - 60
src/apis/course.ts

@@ -1,60 +0,0 @@
-import { createPost } from "@/utils/api";
-
-/**
- * 导学课程信息获取
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48071)
- */
-export const getGuideInf = createPost("/media/rcusercourse/guide/lesson/get");
-export type GuideInfData = Awaited<ReturnType<typeof getGuideInf>>;
-
-/**
- * 录播课用户课程列表
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48116)
- */
-export const getCourseList = createPost("/media/rcusercourse/user/course/list");
-export type CourseList = Awaited<
-  ReturnType<typeof getCourseList>
->["ent"]["items"];
-
-export type TeacherInfo = Awaited<
-  ReturnType<typeof getCourseList>
->["ent"]["teacherinfo"];
-
-/**
- * 录播课用户课节列表
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48089)
- */
-export const getLessonList = createPost("/media/rcusercourse/user/lesson/list");
-export type LessonListData = Awaited<ReturnType<typeof getLessonList>>["ent"];
-
-/**
- * 录播课用户课节获取
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48098)
- */
-export const getLessonDetail = createPost(
-  "/media/rcusercourse/user/lesson/detail"
-);
-
-export type UnitContent = ParsedUnitContent;
-
-/**
- * 录播课用户课节状态设置
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48107)
- */
-export const setModuleStatus = createPost(
-  "/media/rcusercourse/user/lesson/status/set"
-);
-
-/**
- * 录播课用户主观作业信息
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48530)
- */
-export const getSubjectiveHomeworks = createPost(
-  "/media/rchomework/user/subwork/list"
-);

+ 0 - 19
src/apis/guide.ts

@@ -1,19 +0,0 @@
-import { createPost } from "@/utils/api";
-
-/**
- * 获取销售的联系方式
- *
- * [API](https://yapi.pri.ibanyu.com/project/192/interface/api/45614)
- */
-export const getSaleContactInfo = createPost(
-  "/market/marketapi/audition/sale/qrcode/get"
-);
-
-/**
- * 获取小程序链接
- *
- * [API](https://yapi.pri.ibanyu.com/project/11/interface/api/38248)
- */
-export const getWeappSchema = createPost(
-  "/base/wechatrobot/minprogram/generatescheme"
-);

+ 0 - 19
src/apis/teacher.ts

@@ -1,19 +0,0 @@
-import { createPost } from "@/utils/api";
-
-/**
- * 录播课-老师端-学生列表
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48566)
- */
-export const getRcusercourseStudentList = createPost(
-  "/media/rcusercourse/student/list"
-);
-
-/**
- * 录播课-老师端-学生主观作业列表
- *
- * [API](https://yapi.pri.ibanyu.com/project/37/interface/api/48566)
- */
-export const getStudentSubworkList = createPost(
-  "/media/rchomework/student/subwork/list"
-);

+ 2 - 39
src/config/const.ts

@@ -1,39 +1,2 @@
-export const API_ORIGIN = process.env.VUE_APP_API_ORIGIN || "";
-
-export const IS_PROD = API_ORIGIN === "https://www.ipalfish.com";
-
-export const APPID = IS_PROD ? "wxef05f6e4a0fe9349" : "wxa15709c9a213c969";
-
-export const MP_APPID = "wx090cc3b016e45bfe";
-
-export const MPIDS = {
-  gh_a78cc120af4d: "wx6d129dbaf4c856b4", // 伴鱼背诗
-  gh_d0c6def48c3a: "wx22b38437cabb3477", // 伴鱼少儿英语一起学
-  gh_71096a09b36e: "wx8cf57ae657827b4d", // 伴鱼萌新拼团
-  gh_a3f365d7e63c: "wx2148e066dc87b8cf", // 伴鱼少儿数学
-  gh_7c8de9488f91: "wx66ba17ac415bb74c", // CRM物料小程序
-  gh_14ee6526c235: "wxc45e87060caca7c1", // 伴鱼鱼仔妈妈
-  gh_248329cd9b22: "wx55799c45b981e38a", // 伴鱼数学
-  gh_bdd9a0e1f68b: "wx28939208004fe580", // 伴鱼AI课
-  gh_2e593539a66c: "wx2fafa51849a7a81f", // 伴鱼福利社
-  gh_968c8e227fb9: "wx6df066cf5d3bd702", // 伴鱼数学作业打卡
-  gh_b2d43ed27ec1: "wxde3689bb4e580d3c", // 伴鱼英语口语
-  gh_efcc33623aa1: "wxbb7956ffb41afbfb", // 伴鱼动画TV
-  gh_acfb89ccc634: "wxe302671c1ed5045b", // 伴鱼数学思维训练营
-  gh_da43ecd2dab0: "wxf8f508905936505c", // Tina阅读体验营
-  gh_4aef48016f92: "wx050d34a8e2bc8af8", // 伴鱼精读课
-  gh_4321916a700d: "wx6d0d4c29e90e2417", // 伴鱼少儿英语外教试听课
-  gh_73a37142a146: "wx46a871235e9beab4", // 伴鱼自然拼读
-  gh_ac22b442cbe2: "wxd85f0d7405fb894a", // 伴鱼绘本
-  gh_4b031143b9f6: "wxb7588dd0c2bf6301", // 伴鱼启蒙教务
-  gh_5325cc77f87f: "wxb44a6ced09581d6e", // 鱼仔淘淘
-  gh_3f14742ab981: "wx6279b6d9e24736bc", // 伴鱼绘本VIP服务
-  gh_54b591d1250b: "wxb672bb4635316a6d", // 伴鱼少儿英语周周打卡
-  gh_b6e71ca55787: "wx39446263a9b936f2", // 伴鱼读绘本
-  gh_6c30d2c477cc: "wx71539d2ca324d6e7", // 伴鱼数学趣学图形
-};
-
-export const DOWNLOAD_LINK =
-  "https://a.app.qq.com/o/simple.jsp?pkgname=com.palfish.sinology";
-
-export const MP_LOGIN_AUTH_CODE_KEY = "380239f1cab43f72";
+export const API_ORIGIN = "http://47.243.107.213:8091";
+// process.env.VUE_APP_API_ORIGIN || "http://47.243.107.213:8091";

+ 3 - 0
src/pages/index/index.scss

@@ -124,3 +124,6 @@
   height: 42rpx;
   padding: 10rpx;
 }
+.img-msg {
+  max-width: 100%;
+}

+ 31 - 98
src/pages/index/index.vue

@@ -17,24 +17,14 @@
           :class="'intelligent_chat_view' + index"
         >
           <view :class="item.left ? 'robot_word' : 'patient_word'">
-            <view v-if="item.msg">
+            <view v-if="item.type === 'img' && item.data">
               <view>
-                {{ item.msg }}
+                <image :src="item.data.url" class="img-msg" mode="widthFix" />
               </view>
             </view>
-            <view v-else>
+            <view v-if="item.msg">
               <view>
-                {{ item.title }}
-              </view>
-              <view v-if="item.data">
-                <view v-for="(data, data_index) in item.data" :key="data.id">
-                  <view
-                    class="keyHighlight"
-                    v-html="data.keyHighlight"
-                    v-if="data.keyHighlight"
-                    @click="keyHighlight(data, data_index)"
-                  ></view>
-                </view>
+                {{ item.msg }}
               </view>
             </view>
           </view>
@@ -72,6 +62,7 @@
 <script lang="ts">
 import { Component } from "vue-property-decorator";
 import AccountMixin from "@/mixins/account";
+import { textToImage } from "@/apis/base";
 
 @Component({})
 export default class HomeView extends AccountMixin {
@@ -79,18 +70,12 @@ export default class HomeView extends AccountMixin {
   // 输入框距底部高度(键盘显示隐藏高度变化)
   bottom = "0px";
   // 对话框数组
-  msg_list = [
-    {
-      left: true,
-      msg: "嗨~我是小助,您身边的智能助手~",
-      data: null,
-    },
-    {
-      left: true,
-      msg: "请问有什么可以帮助您的?",
-      data: null,
-    },
-  ];
+  msg_list: {
+    left: boolean;
+    msg: string;
+    type?: "text" | "img";
+    data?: { url: string };
+  }[] = [];
   // 容器高度
   key_height = "0px";
   // 容器滚动底部定位id
@@ -154,7 +139,6 @@ export default class HomeView extends AccountMixin {
         this.key_height = `${res_keyboard.windowHeight - this.inputHeight}px`;
       }
 
-      console.log(this.key_height);
       this.num = this.msg_list.length;
       this.bottomId = "dade" + this.num;
     });
@@ -176,8 +160,15 @@ export default class HomeView extends AccountMixin {
     // 换id
     this.controlId = false;
   }
+  async getImg() {
+    const res = await textToImage({
+      q: this.value.toString().trim(),
+    });
+    console.log(res);
+  }
   // input发送事件
   async input_send() {
+    this.getImg();
     if (!this.value.toString()) {
       return;
     }
@@ -192,84 +183,26 @@ export default class HomeView extends AccountMixin {
         {
           left: false,
           msg: this.value,
-          data: null,
         },
       ];
-      // 如果你们没有网络请求,----------------
-      if (this.value.match(/你好|您好/)) {
+      const res = await textToImage({
+        q: this.value.trim(),
+      });
+      if (res.errno === 10000) {
         this.msg_list = [
           ...this.msg_list,
-          {
-            left: true,
-            msg: "您好,我是小助,您有什么问题可以直接问我哦~",
-            data: null,
-          },
-        ];
-      } else {
-        this.msg_list = [
-          ...this.msg_list,
-          {
-            left: true,
-            msg: "没有找到该问题答案,请换种问法试一试。",
-            data: null,
-          },
+          ...res.data.imgs.map((data) => {
+            return {
+              left: true,
+              msg: "",
+              type: "img",
+              data,
+            } as (typeof this.msg_list)[number];
+          }),
         ];
       }
       this.value = "";
-      this.num = this.msg_list.length;
-      this.bottomId = "dade" + this.num;
-
-      timer = setTimeout(() => {
-        this.boolen = true;
-      }, 300);
-      // 如果你们有网络请求,把下边的注开----------------------------------------------
-
-      // // 注释掉的是网络请求,如果直接粘贴会报错,所以我就注掉了这就不会报错了
-      // let res = await this.$api.disease_keyword({
-      // 	keyword: this.value
-      // })
-      // console.log(res);
-      // if (res.code == 200) {
-      // 	if (Array.isArray(res.data) && res.data.length > 0) {
-      // 		// 替换高亮,增加样式
-      // 		res.data.forEach((v, i) => {
-      // 			if (v.keyHighlight && v.keyHighlight.match(/em/)) {
-      // 				v.keyHighlight = v.keyHighlight.replace(/<em>/,
-      // 					'<strong style="color: #F07828;">')
-      // 				v.keyHighlight = v.keyHighlight.replace(/<\/em>/, '</strong>')
-      // 			}
-      // 		})
-      // 		// 增加回答,机器人回答的话
-      // 		this.msg_list = [...this.msg_list, {
-      // 			left: true,
-      // 			title: `以下是关于“${this.value}”的解答:`,
-      // 			data: res.data
-      // 		}]
-      // 	} else {
-      // 		// 提示,没有找到该问题答案
-      // 		if (this.value.match(/你好|您好/)) {
-      // 			this.msg_list = [...this.msg_list, {
-      // 				left: true,
-      // 				msg: '您好,我是小助,您有什么问题可以直接问我哦~',
-      // 				data: null
-      // 			}]
-      // 		} else {
-      // 			this.msg_list = [...this.msg_list, {
-      // 				left: true,
-      // 				msg: '没有找到该问题答案,请换种问法试一试。',
-      // 				data: null
-      // 			}]
-      // 		}
-      // 	}
-      // 	this.value = '';
-      // 	this.num = this.msg_list.length;
-      // 	this.bottomId = 'dade' + (this.num);
-      // } else {
-      // 	// 出什么问题,toast出来
-      // }
-      // timer = setTimeout(() => {
-      // 	this.boolen = true
-      // }, 300)
+      this.boolen = true;
     }
   }
 }

+ 14 - 0
types/apis/login.d.ts

@@ -0,0 +1,14 @@
+declare interface ApiList {
+  "/txt_to_img": {
+    params: {
+      q?: string;
+    };
+    response: {
+      errno: number;
+      errmsg: string;
+      data: {
+        imgs: { url: string }[];
+      };
+    };
+  };
+}

+ 0 - 8
types/klian/account/member_info.d.ts

@@ -1,8 +0,0 @@
-declare interface ApiList {
-  "/account/member_info": {
-    response: {
-      mid: number;
-      member_info: MemberInfo;
-    };
-  };
-}

+ 0 - 11
types/klian/account/set_avatar.d.ts

@@ -1,11 +0,0 @@
-declare interface ApiList {
-  "/account/set_avatar": {
-    params: {
-      json: string;
-      image: File;
-    };
-    response: {
-      member_info: MemberInfo;
-    };
-  };
-}

+ 0 - 26
types/klian/account/thirdparty/weixin/minprogram/login/regist/bind.d.ts

@@ -1,26 +0,0 @@
-declare interface ApiList {
-  "/account/thirdparty/weixin/minprogram/login/regist/bind": {
-    params: {
-      cate?: 1 | 2; // 用户类型。1学生 2老师
-      encryptedData: string; // 手机号授权的加密串
-      iv: string;
-      appid: string;
-      srcreg?: string; // 注册来源;
-    } & (
-      | {
-          js_code: string; // 非必须
-        }
-      | {
-          openid: string; // 非必须
-        }
-    );
-    response: LoginInfo & {
-      openid: string;
-      pw: string;
-      isold: boolean; // 该用户是否是老用户
-      autopasswd: boolean;
-      thirdpart_id: string; // 第三方tid
-      ticket: string;
-    };
-  };
-}

+ 0 - 22
types/klian/account/thirdparty/weixin/minprogram/phone/login.d.ts

@@ -1,22 +0,0 @@
-declare interface ApiList {
-  "/account/thirdparty/weixin/minprogram/phone/login": {
-    params: {
-      cate?: number; // 用户的身份,1学生,2老师
-      js_code?: string; // 登录时获取的 code
-      appid?: string; // 使用js_code时必传
-      ticket?: string; // 公众号传入
-    };
-    response: {
-      isreg: boolean; // 微信是否注册了伴鱼账号
-      isbind: boolean; // 微信账号注册的伴鱼账号是否绑定了手机号
-      hasothercate: boolean; // 手机是否有另外的cate账号
-      wxcode: string; // 微信三方信息的加密串
-      thirdpart_id: string; // 第三方tid
-      openid: string; //
-      ticket: string; // 小程序登陆场景返回
-      logininfo: LoginInfo & {
-        pw: string; // 密码
-      };
-    };
-  };
-}

+ 0 - 10
types/klian/account/update_avatar.d.ts

@@ -1,10 +0,0 @@
-declare interface ApiList {
-  "/account/update_avatar": {
-    params: {
-      avatar: string;
-    };
-    response: {
-      member_info: MemberInfo;
-    };
-  };
-}

+ 0 - 10
types/klian/account/update_birthday.d.ts

@@ -1,10 +0,0 @@
-declare interface ApiList {
-  "/account/update_birthday": {
-    params: {
-      birthday: number;
-    };
-    response: {
-      member_info: MemberInfo;
-    };
-  };
-}

+ 0 - 10
types/klian/account/update_enname.d.ts

@@ -1,10 +0,0 @@
-declare interface ApiList {
-  "/account/update_enname": {
-    params: {
-      enname: string;
-    };
-    response: {
-      member_info: MemberInfo;
-    };
-  };
-}

+ 0 - 10
types/klian/account/update_gender.d.ts

@@ -1,10 +0,0 @@
-declare interface ApiList {
-  "/account/update_gender": {
-    params: {
-      gender: 1 | 2;
-    };
-    response: {
-      member_info: MemberInfo;
-    };
-  };
-}

+ 0 - 10
types/klian/account/update_name.d.ts

@@ -1,10 +0,0 @@
-declare interface ApiList {
-  "/account/update_name": {
-    params: {
-      name: string;
-    };
-    response: {
-      member_info: MemberInfo;
-    };
-  };
-}

+ 0 - 12
types/klian/base/account/authcode/get.d.ts

@@ -1,12 +0,0 @@
-declare interface ApiList {
-  "/base/account/authcode/get": {
-    params: {
-      target_atype: number; // 目标app的token授权类型。atype说明:http://confluence.pri.ibanyu.com/pages/viewpage.action?pageId=10369808
-      target_src: number; // 目标app的src。 src说明:http://confluence.pri.ibanyu.com/pages/viewpage.action?pageId=16614161
-      key: string; // 当前场景标识。服务端分配。TOKEN服务ETCD配置。 —— 后端研发配置。 该值需要找基础服务申请配置
-    };
-    response: {
-      code: string;
-    };
-  };
-}

+ 0 - 15
types/klian/base/account/authcode/login.d.ts

@@ -1,15 +0,0 @@
-declare interface ApiList {
-  "/base/account/authcode/login": {
-    params: {
-      authcode: string; // 授权码
-    };
-    response: {
-      area: string;
-      member_info: MemberInfo;
-      mid: number;
-      phone: string;
-      token: string;
-      pw: string;
-    };
-  };
-}

+ 0 - 8
types/klian/base/account/incomplete/get.d.ts

@@ -1,8 +0,0 @@
-declare interface ApiList {
-  "/base/account/incomplete/get": {
-    response: EntData<{
-      incomplete: number; // 是否有未完善的属性。true需要完善,false 不需要完善
-      incompleteAttrs: string[]; // 需要完善的属性列表。name名称,avatar头像,origavatar头像,enname英文名,gender性别,birthday生日
-    }>;
-  };
-}

+ 0 - 6
types/klian/base/app/loctext/get.d.ts

@@ -1,6 +0,0 @@
-declare interface ApiList {
-  "/base/app/loctext/get": {
-    params: { h_lc: string; key: string };
-    response: EntData<string>;
-  };
-}

+ 0 - 17
types/klian/base/wechatrobot/minprogram/generatescheme.d.ts

@@ -1,17 +0,0 @@
-declare interface ApiList {
-  "/base/wechatrobot/minprogram/generatescheme": {
-    params: {
-      appid: string; // 小程序的应用id
-      expire_type: number; // 有效期设置类型。0 按照时间戳设置,1按照间隔天数设置
-      expire_time?: number; // 到期失效的scheme码的失效时间,为Unix时间戳。生成的到期失效scheme码在该时间前有效。最长有效期为30天。expire_type 为 0 时必填,并且不能小于5分钟
-      expire_interval?: number; // 到期失效的scheme码的失效时间,从当前开始间隔的天数。最长有效期为30天。expire_type 为 1 时必填。 至少是1天
-      path?: string; // 通过scheme码进入的小程序页面路径,必须是已经发布的小程序存在的页面,不可携带query。path为空时会跳转小程序主页。
-      query?: string; // 通过 scheme 码进入小程序时的 query,最大1024个字符,只支持数字,大小写英文以及部分特殊字符:`!#$&'()*+,/:;=?@-._~%``
-      env_version?: "release" | "trial" | "develop"; // 要打开的小程序版本。正式版为"release",体验版为"trial",开发版为"develop",仅在微信外打开时生效。
-      refresh?: boolean; // 是否强制刷新。false则缓存存在使用缓存,不存在,则获取新的。 true 一定获取新的
-    };
-    response: EntData<{
-      openlink: string;
-    }>;
-  };
-}

+ 0 - 11
types/klian/baseapi/account/login.d.ts

@@ -1,11 +0,0 @@
-declare interface ApiList {
-  "/baseapi/account/login": {
-    params: {
-      cate?: 1 | 2; // 用户类型。1学生 2老师
-      phone: string; // 手机号
-      pw: string; // 密码
-      area: string; // 国际区号
-    };
-    response: LoginInfo;
-  };
-}

+ 0 - 9
types/klian/baseapi/base/account/token/extends.d.ts

@@ -1,9 +0,0 @@
-declare interface ApiList {
-  "/baseapi/base/account/token/extends": {
-    response: EntData<{
-      pass: boolean; // 是否能注销。true可以,false 不可以
-      reason: string[]; // 不能注销的原因
-      canforcelogoff: boolean; // 是否能够强制注销
-    }>;
-  };
-}

+ 0 - 8
types/klian/baseapi/base/account/token/validity.d.ts

@@ -1,8 +0,0 @@
-declare interface ApiList {
-  "/baseapi/base/account/token/validity": {
-    response: EntData<{
-      expire_in: number; // 过期时间,距离当前时间秒数
-      rec_expire_in: number; // 推荐过期时间,距离当前时间秒数。建议使用此值,作为token有效时间依据,合理使用token以及及时更新token(重新登录 或 uptoken)。该值由账号服务根据策略计算。
-    }>;
-  };
-}

+ 0 - 26
types/klian/baseapi/base/account/v2/login.d.ts

@@ -1,26 +0,0 @@
-declare interface ApiList {
-  "/baseapi/base/account/v2/login": {
-    params: {
-      area: string;
-      phone: string; // 手机号
-      code: string; // 短信验证码
-      vtype: string; // 验证码类型,在获取验证码时返回
-      cate?: 1 | 2; // 身份类型,1学生;2老师
-      gender?: number; // 性别。1 男,2女
-      birthday?: number; // 生日时间戳秒
-      pw?: string; // 密码。加密后密码 用于注册时作为初始密码。
-      refer_code?: string; // 邀请码
-      srcreg?: string; // 注册来源渠道
-    };
-    response: {
-      hasothercate: boolean;
-      islogin: boolean;
-      isneedbindphone: boolean;
-      isnew: boolean;
-      logininfo: LoginInfo & {
-        isneedbindphone: boolean;
-        pw: string;
-      };
-    };
-  };
-}

+ 0 - 15
types/klian/kidapi/kidstudentother/bannerpositions/get.d.ts

@@ -1,15 +0,0 @@
-declare interface ApiList {
-  "/kidapi/kidstudentother/bannerpositions/get": {
-    params: { positions: number[] };
-    response: EntData<{
-      items: {
-        [key: string]: {
-          imgurl: string; // 静态图
-          route: string; // 跳转路由
-          title: string; // 名称
-          dynamicimage: string; // 动态图
-        }[];
-      };
-    }>;
-  };
-}

+ 0 - 15
types/klian/kidapi/kidstudentother/icon/jingang/list.d.ts

@@ -1,15 +0,0 @@
-declare interface ApiList {
-  "/kidapi/kidstudentother/icon/jingang/list": {
-    params: { positiontype: number };
-    response: EntData<{
-      items: {
-        staticimage: string; // 静态图+gif
-        dynamicimage: string; // 动态图,Lottie文件
-        route: string; // 跳转路由
-        cornerdot: boolean; // 角标小红点,true则展示
-        cornertext: string; // 角标文案
-        showtext: string;
-      }[];
-    }>;
-  };
-}

+ 0 - 18
types/klian/market/marketapi/audition/sale/qrcode/get.d.ts

@@ -1,18 +0,0 @@
-declare interface ApiList {
-  "/market/marketapi/audition/sale/qrcode/get": {
-    params: {
-      uid: number; // uid
-      math: boolean; // 数学业务 true
-      buss: 1 | 2 | 3; // 1英语 2数学 3国学
-    };
-    response: EntData<{
-      sale: string; // 销售account
-      wx: string; // 企业微信二维码
-      line: string; // line 二维码
-      linelink: string; // line 链接
-      whatsapp: string; // whatsapp 二维码
-      whatsapplink: string; // whatsapp 链接
-      wxname: string; // 销售企微名
-    }>;
-  };
-}

+ 0 - 17
types/klian/media/rchomework/student/subwork/list.d.ts

@@ -1,17 +0,0 @@
-declare interface ApiList {
-  "/media/rchomework/student/subwork/list": {
-    params: { uid: number; subject: number };
-    response: EntData<{
-      subworks: {
-        workname: string;
-        worktype: number;
-        items: {
-          homeworkid: number;
-          status: number; //  1:(未完成); 2:老师待批改(学生完成); 3:老师已批改(学生待查看); 4:(学生已查看);
-          finishtime: number;
-          examid: number;
-        }[];
-      }[];
-    }>;
-  };
-}

+ 0 - 31
types/klian/media/rchomework/user/subwork/list.d.ts

@@ -1,31 +0,0 @@
-declare interface ApiList {
-  "/media/rchomework/user/subwork/list": {
-    params: { uid: number; courseid: number; worktype: number };
-    response: EntData<{
-      learndays: number; // 学习天数
-      total: number;
-      used: number;
-      // 主观作业列表
-      subworks:
-        | {
-            workname: string; // 作业名称
-            worktype: number; // 作业类型
-            items: {
-              // 作业列表
-              homeworkid: number; // 作业id
-              status: number; // 1:未完成; 2:学生完成(老师待批改); 3:学生待查看(老师已批改); 4:学生已查看;
-              finishtime: number; // 完成时间
-              examid: number; // 测试id
-            }[];
-          }[]
-        | null;
-      courseinfo: {
-        name: string;
-        cover: string;
-        desc: string;
-        subject: string;
-        coursetype: string;
-      };
-    }>;
-  };
-}

+ 0 - 22
types/klian/media/rcusercourse/guide/lesson/get.d.ts

@@ -1,22 +0,0 @@
-declare interface ApiList {
-  "/media/rcusercourse/guide/lesson/get": {
-    params: { uid: number; subject: number };
-    response: ResData<
-      {
-        title: string;
-        icon: string;
-        desc: string;
-      },
-      {
-        teacher: {
-          // 辅导老师
-          status: number;
-        };
-        consultant: {
-          // 顾问老师
-          status: number;
-        };
-      }
-    >;
-  };
-}

+ 0 - 27
types/klian/media/rcusercourse/student/list.d.ts

@@ -1,27 +0,0 @@
-declare interface ApiList {
-  "/media/rcusercourse/student/list": {
-    params: {
-      uid: number; // 老师uid
-      subject: number; // 100,国学
-      offset: number;
-      limit: number;
-    };
-    response: EntData<{
-      total: number;
-      offset: number;
-      more: boolean;
-      students: {
-        userinfo: {
-          id: number; // uid
-          name: string;
-          avatar: string;
-        };
-        subworkstatus: number; // 主观作业状态 0:无作业; 1:有作业-待批改; 2:有作业-已完成;
-        learninfo: {
-          lessonremind: boolean; // 解锁课程是否完成
-          lastlessontime: number; // 上次上课时间
-        };
-      }[];
-    }>;
-  };
-}

+ 0 - 34
types/klian/media/rcusercourse/user/course/list.d.ts

@@ -1,34 +0,0 @@
-declare interface ApiList {
-  "/media/rcusercourse/user/course/list": {
-    params: { uid: number; subject: number };
-    response: EntData<{
-      items: {
-        subject: number; // 100科目
-        courseid: number; // 课程id
-        coursetype: number; // 课程类型,1:体验课,2:系统课
-        name: number; // 课程名
-        cover: string; // 封面
-        desc: string; // ext	:string; // 其他内容json
-        status: number; // 状态
-        starttime: number; // 开始时间
-        createtime: number; // 创建时间
-        route: string; // h5跳转链接
-        subworks: {
-          worktype: number;
-          workname: string;
-          status: number;
-        }[];
-      }[];
-
-      teacherinfo: {
-        avatar: string;
-        name: string;
-        status: number;
-      };
-
-      offset: number;
-      more: boolean;
-      total: number;
-    }>;
-  };
-}

+ 0 - 68
types/klian/media/rcusercourse/user/lesson/detail.d.ts

@@ -1,68 +0,0 @@
-declare interface ParsedUnitContent {
-  name: string;
-  src: string;
-  poster: string;
-  style: {
-    width: string;
-    height: string;
-  };
-  data: {
-    type: string;
-    name: string;
-    syncType: string;
-    style: {
-      x: number;
-      y: number;
-      width: string;
-      height: string;
-      rotate: number;
-      borderRadius: number;
-    };
-    durationTime: number;
-    src: string;
-    poster: string;
-    optionList: unknown[];
-    videoName: string;
-    audioUrl: string;
-  };
-  type: string;
-}
-declare interface ApiList {
-  "/media/rcusercourse/user/lesson/detail": {
-    params: { uid: number; courseid: number; lessonid: number };
-    response: EntData<{
-      course: {
-        name: string;
-        subject: string;
-      };
-      lesson: {
-        lesson_cover: string;
-        lesson_name: string;
-      };
-      homeworkinfo: {
-        homeworkid: number;
-        examid: number;
-        status: number;
-        finishtime: number;
-      };
-      modules: {
-        module_id: string;
-        module_content: string;
-        module_name: string;
-        module_cover: string;
-        module_type: string;
-        module_link: string;
-        module_route: string;
-        module_status: number; // 0:未完成,1:完成
-        units: {
-          unit_iD: string;
-          unit_type: string;
-          unit_index: number;
-          parent_id: string;
-          unit_content: string;
-          resources: string;
-        }[];
-      }[];
-    }>;
-  };
-}

+ 0 - 45
types/klian/media/rcusercourse/user/lesson/list.d.ts

@@ -1,45 +0,0 @@
-declare interface ApiList {
-  "/media/rcusercourse/user/lesson/list": {
-    params: { uid: number; courseid: number };
-    response: EntData<{
-      courseinfo: {
-        name: string;
-        cover: string;
-        desc: string;
-        subject: number;
-        coursetype: number;
-        periodinfo: {
-          typename: string;
-          typeid: string;
-        };
-      };
-
-      items: {
-        lessoninfo: {
-          uid: number;
-          courseid: number;
-          lessonid: number;
-          idx: number;
-          name: string;
-          cid: number;
-          cover: string;
-          status: number;
-          ext: string;
-          starttime: number;
-          homeworkid: number;
-          examid: number;
-        };
-        homeworkinfo: {
-          homeworkid: number;
-          examid: number;
-          status: number;
-          finishtime: number;
-        };
-      }[];
-    }>;
-  };
-}
-
-declare type LessonList = Awaited<
-  ApiList["/rcusercourse/user/lesson/list"]["response"]
->["ent"];

+ 0 - 19
types/klian/media/rcusercourse/user/lesson/status/set.d.ts

@@ -1,19 +0,0 @@
-declare interface ApiList {
-  "/media/rcusercourse/user/lesson/status/set": {
-    params: {
-      uid: number;
-      courseid: number;
-      lessonid: number;
-      moduleid: number;
-      status: number;
-    };
-    response: EntData<{
-      courseid: number;
-      lessonid: number;
-      moduleid: number;
-      status: number;
-      uid: number;
-      unitid: number;
-    }>;
-  };
-}

+ 0 - 33
types/klian/smsapi/base/sms/account/vcode/get.d.ts

@@ -1,33 +0,0 @@
-type VType =
-  | "reg_login" // 登陆注册一体
-  | "register" // 注册 手机号未注册
-  | "reset_passwd" // 忘记密码 手机号已注册
-  | "easy_login" // 快速登录 手机号已注册
-  | "upphone" // 修改手机号 手机号未注册
-  | "security_check" // 校验本账号的手机号 uid绑定的手机号是发送验证码的手机号(需要走鉴权)
-  | "close_class_check" // 关闭班级校验
-  | "withdraw" // 提现
-  | "multiway"; // 通用验证码; // 短信类型:register注册,easy_login快速登录,reg_login登陆注册一体,http://confluence.pri.ibanyu.com/pages/viewpage.action?pageId=53411899
-declare interface ApiList {
-  "/smsapi/base/sms/account/vcode/get": {
-    params: {
-      area: string; // 手机号所在区号
-      phone: string; // 手机号
-      vtype: VType;
-      cate?: 1 | 2; // 身份类型,参数参考:http://confluence.pri.ibanyu.com/pages/viewpage.action?pageId=16621914
-      ctype?: 1 | 2; // 触发风控的验证码类型,1图形验证码、2滑块验证码
-      captchaid?: number; // 图片验证码的id
-      captchacode?: string; // 图片验证码
-      abchannel?: number; //投放渠道
-    };
-    response: EntData<{
-      status: 0 | 1 | 2; // 发送状态。0短信发送成功,1触发风控-图形验证码,2触发风控-滑块验证码,3触发风控-图形和滑块
-      captcha: {
-        captchaid: number; // 图片验证码的id
-        captchaurl: string; // 图片验证码的url
-      };
-      reqid: string; // 滑块验证码的reqid
-      vtype: VType; // 实际发送的短信类型
-    }>;
-  };
-}

+ 0 - 13
types/klian/ugc/curriculum/children/guide/v2.d.ts

@@ -1,13 +0,0 @@
-declare interface ApiList {
-  "/ugc/curriculum/children/guide/v2": {
-    response: EntData<{
-      countdownstatus: number;
-      coursetitle: string;
-      curriordercn: number; // 订单数量
-      curriorderexpire: number; // 订单过期时间
-      route: string;
-      stype: number; // 1: 购买; 2: 测评; 3: 微信公众关注;
-      text: string; // 文本描述
-    }>;
-  };
-}