@myun/gimi-chat 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,14 +21,14 @@ var VideoItem = function VideoItem(_ref) {
21
21
  return state.gimiMenu.businessParams;
22
22
  }),
23
23
  gradeId = _useAppSelector.gradeId,
24
- teachModuleId = _useAppSelector.teachModuleId;
24
+ teachModelId = _useAppSelector.teachModelId;
25
25
  var handleClick = function handleClick() {
26
26
  if (item.isDelete === 1) return;
27
27
  if (platform !== 'myun') return Toast.warning('当前平台不支持溯源跳转');
28
28
  var searchParams = "gradeId=".concat(item.gradeId, "&teachModuleId=").concat(item.id, "&outlineId=").concat(item.courseId, "&phaseId=").concat(item.phaseId);
29
29
  if (item.isJoinClass) {
30
30
  // 如果溯源就是当前视频,直接跳转到溯源的进度
31
- if (gradeId === item.gradeId && teachModuleId === item.id) {
31
+ if (gradeId === item.gradeId && teachModelId === item.id) {
32
32
  onClick === null || onClick === void 0 || onClick(item.startedAtSecond);
33
33
  } else {
34
34
  // 如果不是当前视频,新开一个学习页面
@@ -8,7 +8,14 @@ var ReasoningSearch = function ReasoningSearch(_ref) {
8
8
  var dispatch = useAppDispatch();
9
9
  var searchResult = {};
10
10
  try {
11
- searchResult = typeof value === 'string' ? JSON.parse(value) : value;
11
+ var temp = value;
12
+ if (typeof temp !== 'string') {
13
+ temp = JSON.stringify(temp);
14
+ }
15
+ while (typeof temp === 'string') {
16
+ temp = JSON.parse(temp);
17
+ }
18
+ searchResult = temp;
12
19
  } catch (error) {
13
20
  return '';
14
21
  }
@@ -630,7 +630,9 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
630
630
  _context8.next = 9;
631
631
  return rewriteRecommendListFormHistory(chatList, "".concat(lastUserRequestMessage.chatId));
632
632
  case 9:
633
- getRelatedCourses((lastUserMessage === null || lastUserMessage === void 0 ? void 0 : lastUserMessage.content) || '');
633
+ if (lastMessage.stop === 0) {
634
+ getRelatedCourses((lastUserMessage === null || lastUserMessage === void 0 ? void 0 : lastUserMessage.content) || '');
635
+ }
634
636
  case 10:
635
637
  case "end":
636
638
  return _context8.stop();