alibaba / alibaba/lowcode-engine

页面schema模板中dataSource配置好后,运行低代码引擎进行渲染,出现如下报错信息:Error: the getUserInfo request should not fetch, please check the condition。麻烦帮看下是什么原因导致没发出请求

Open
#2,856 7 comments 0 reactions 1 assignee Claimed by @YSMJ1994 View on GitHub
insufficient information
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

## **Describe the bug (required)** / **详细描述 bug(必填)**
我dataSource配置好后,运行低代码引擎进行渲染,出现如下报错信息:Error: the getUserInfo request should not fetch, please check the condition。请帮排查下该问题,谢谢。

A clear and concise description of what the bug is. / 请提供清晰且精确的 bug 描述
以下是dataSource配置:
```json
"dataSource": {
"list": [
{
"type": "fetch",
"isInit": true,
"options": {
"params": {},
"method": "GET",
"isCors": true,
"timeout": 5000,
"headers": {},
"uri": "/mock/info.json"
},
"id": "info",
"shouldFetch": {
"type": "JSFunction",
"value": "function() { \n console.log('should fetch.....');\n return true; \n}"
}
},
{
"type": "fetch",
"isInit": true,
"options": {
"params": {},
"method": "GET",
"isCors": true,
"timeout": 500000,
"headers": {},
"uri": "/aaa/bbb/getUser"
},
"id": "getUserInfo",
"shouldFetch": {
"type": "JSFunction",
"value": "function updateUserInfo(res) { \n console.log('should fetch 2 ...'); \n console.log('getUserInfo res:', res); \nthis.setState({\n stageData: res.data\n });\n \nreturn res.data\n}"
}
}
]
}
```
我运行页面(加载低代码引擎渲染后),浏览器控制台出现如下报错信息:Error: the getUserInfo request should not fetch, please check the condition 。
详细报错信息如下:
```bash
Error: the getUserInfo request should not fetch, please check the condition
at RuntimeDataSourceItem. (src_apps_mobile_pages_create-special-customer_lowcode-page_tsx.chunk.js:4242:29)
at step (main.bundle.js:108906:17)
at Object.next (main.bundle.js:108855:14)
at main.bundle.js:108829:67
at new Promise ()
at Module.__awaiter (main.bundle.js:108811:10)
at RuntimeDataSourceItem.load (src_apps_mobile_pages_create-special-customer_lowcode-page_tsx.chunk.js:4195:20)
at src_apps_mobile_pages_create-special-customer_lowcode-page_tsx.chunk.js:4390:60
at step (main.bundle.js:108906:17)
at Object.next (main.bundle.js:108855:14)
```

---

## **To Reproduce (required)** / **如何复现 bug?(必填,非常重要)**
Steps to reproduce the behavior: / 详细复现步骤:
---
中文版示例:
1. 打开 [demo](http://localhost:5556/ );
2. 页面渲染完成后,即报该错误信息 the getUserInfo request should not fetch, please check the condition。

## **Expected behavior (required)** / **预期行为(必填,非常重要)**
A clear and concise description of what did you expect to happen. / 请清晰和精确的描述你预期的行为
---
预期行为:希望页面中的getUserInfo该API请求可正常完成请求,并返回数据。

## **Screenshots (optional)** / **bug 截图(可选)**
Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题

报错截图:
image

---

## **Environments (please complete the following information) (required):** / **请提供如下信息(必填)**
- AliLowCodeEngine version: [e.g. 1.0.0] / 低代码引擎版本:
**渲染引擎版本: @alilc/lowcode-react-renderer": "^1.1.11-alpha.5",**

- AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本

- Browser [e.g. chrome, safari] / 浏览器版本
**- 浏览器版本:版本 120.0.6099.216(正式版本) (x86_64)**

- materials / plugins / tools / 其他物料 / 插件 / 工具链版本

> (this information can be collected via [the manual plugin](https://img.alicdn.com/imgextra/i1/O1CN0115zonY1IsgbkZ2ir7_!!6000000000949-2-tps-3066-1650.png) / 版本信息可[通过低代码用户手册插件收集](https://img.alicdn.com/imgextra/i1/O1CN0115zonY1IsgbkZ2ir7_!!6000000000949-2-tps-3066-1650.png))

## **Additional context (optional)** / **更多额外信息(可选)**
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.