English navigation · Main article content follows the Chinese edition. View Simplified Chinese version.

  1. Homepage
  2. /
  3. Tencent WeDa
  4. /
  5. Developer
👨‍💻
Developers · Deep expansion and integration

Tencent WeDa developer learning path

WeDa extension development panorama for engineers: code blocks / custom components / cloud functions SCF / OpenAPI / custom connectors / WeCom API / mini program in-depth extension / Tencent Cloud native integration.

WeDa extended development four-tier system

L1

Low-code JS code blocks

Front-end interaction and business logic, including $page $w $app built-in variables.

Applicable: Field linkage/dynamic display/complex verification

L2

Custom component

Developed based on React/Vue, packaged and published to the component library through CLI.

Applicable to: Rich text editor/map/chart/video playback

L3

Cloud Function SCF

Node.js/Python backend function, which can be called by pages/processes/scheduled tasks.

Applicable to: complex business rules/data cleaning/three-party API combination

L4

Custom connector

Register the third-party REST API as a data source and use it directly in drag and drop.

Applicable to: ERP / CRM / HR system docking

Low-code JS code block example

1. dynamic approval routing (amount ≥ 50,000 plus CFO)

// 事件:表单提交前
const amount = Number($w.amountInput.value || 0);
const dept = await app.cloud.callFunction({
  name: 'getManager',
  data: { userId: app.dataSources.user.openid, level: 1 }
});
let approvers = [dept.data, 'finance_head_id'];
if (amount >= 50000) approvers.push('cfo_id');
return { approverIds: approvers.filter(Boolean) };

2. calls a custom connector to query ERP

// 事件:页面加载
const res = await app.dataSources.ErpCustomer.wedaGetRecords({
  filter: {
    where: { region: { $eq: '华东' } }
  },
  pageSize: 50
});
$w.customerTable.setData(res.records);
// 错误兜底
if (!res.records?.length) app.utils.toast('无数据');

Tencent Cloud native integration matrix

Tencent Cloud productsIntegration methodTypical uses
Cloud database TDSQL-C/MongoDBDirect connection to data sourceBusiness master data reading and writing
Object Storage COSBuilt-in upload componentPictures/Attachments/Large Files
Cloud Function SCFfunction callBackend business/three-party API combination
API gatewayCustom connectorUnified authentication and current limiting
腾讯云 BIChart embeddingComplex signage / cockpit
Log Service CLSSCF log deliveryCentralized search and alerting
WeCom Open APIConnector + JS-SDKOrganizational Structure/Message/Approval
WeChat appletPublish with one clickC-side access/scan code/payment

Multiple environments & DevOps best practices

🧪 Development/Testing/Production

Use WeDa multi-environment isolation, and configure variables to point to different databases and connectors to avoid production data pollution.

🧭 Version and Grayscale

Version snapshots and rollbacks are supported. Key changes are grayscaled to 10% users first, and error rates are monitored before full rollout.

📦 Export with Git

The application can export zip structured files and cooperate with Git for version management, code review and branch merging.

📊 Monitoring & Alerting

Cloud function log → CLS; operating indicators → cloud monitoring; when the error rate/delay exceeds the threshold, the enterprise micro notification is on duty.

🔐 Key management

Third-party keys are stored in "environment variables" or Tencent Cloud SSM parameter warehouse, and hard coding into code blocks is strictly prohibited.

🧱 Component library management

The enterprise private component library is released in versions and can be referenced by semver in the application. Downgrades can be rolled back with one click.