★ 宪法总纲:编辑任何资源的唯一正确姿势

★ 建站顺序另见《云酷德建站流程法》(tempx buildlaw.index,打开章程,2026-10-05 定稿):先名后形 → 计划六表 → 补正 → 开工 → newresname 建名 → 照 funtxt 施工 → samekdatatotab 回填 → 验收。

以前文档里写的是「直接调 API 接口」——那是旧约,作废。所有资源的增删改,一律按下述六步走。

  1. 先登录,拿三件套
    GET 本站域名/localxres/funx/commonlogin/?uid=<账号>&pass=<makepass密文>&sysid=<系统id>
    返回 JSON 的 msg 就是 stoken。随后 Cookie 必须带 三个值:uid、stoken、deadline=time()+3600*72。
    坑:只带 uid+stoken、不带 deadline,会被 heartbeat 的 $leftt>0 拦掉,现象是 302 静默跳转,接口返回空。
  2. 建资源名
    funx.newresname?restype=<类型>&rescode=<域.名>&sysid=<系统>&restitle=<标题>
    Cookie 里的 uid 在 coode_userlist 中必须 PRIME=1。tempx 的 rescode 若含点号,点前是域、点后是单元名;不含点号则自动补 .index。
  3. 查编辑器地址
    到 coode_sysrestypedefine 按 restypecode 查 cloudpath 字段——它就是该类型资源的编辑器地址。
    分水岭:cloudpath 值为 mysql 的,说明这类资源基本不落盘,可以直接改数据;值是一条 URL 的,说明会落盘,必须进编辑器改,直接改库会造成库盘不一致。
  4. 打开编辑器
    编辑器地址不用猜、不用记——去 coode_sysrestypedefine 找到该 restypecode 那一行,读它的 cloudpath 字段,那就是现成的完整编辑器地址,? 后面已经把参数位留好了;你要做的只是把占位符换成资源名或该数据的 SNO 序号。
    三个完整地址示例:
    https://qianjilian.com/localxres/tempx/tempeditor/index.html?unitid=xianfa.index
    https://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=savefunc
    https://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=coode_funsetfile@SNO:12345.funfull
  5. 编辑器里能调哪些后端方法
    由 coode_funlist 的 usearea 字段声明:它写明该方法允许被哪个页面调用,形如 tempx.tempeditor.index。
    heartbeat 会把 HTTP Referer 解析成 pgmark(资源类型.目录.单元),拿它和 usearea 比对,不匹配直接判无权。所以「在哪个页面里调」不是形式,是权限本身。
    usearea 为空 = 不限制来源,可从外部调用(如 newresname、savetoseed、makelayfolder)。
  6. 鉴权在哪
    数据集 heartbeat 的 refreshtoken 方法:校验 stoken 是否有效、刷新 coode_loginstoken 有效期、并下发 deadline。所有「为什么明明登录了还是没权限」的答案都在这里。

26 类资源:编辑器完整地址 / 能不能直接改库

下表「编辑器 / 落点」列即 coode_sysrestypedefine.cloudpath 的值(已补全域名前缀),可直接复制使用。

类型主表编辑器 / 落点(完整地址)
funx 函数coode_funlisthttps://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=<函数名>
clsx 类coode_phpclshttps://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=<类名>
sfunx 函数集coode_funsetfilehttps://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=coode_funsetfile@SNO:<该数据序号>.funfull
dfunx 数据函数coode_datafunhttps://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=coode_funsetfile@SNO:<该数据序号>.funfull
constx 静态量coode_sysconstanthttps://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=coode_funsetfile@SNO:<该数据序号>.funfull
configx 系统参数coode_sysconfighttps://qianjilian.com/localxres/pagex/htmleditor/WrvLoe/index.html?funid=coode_funsetfile@SNO:<该数据序号>.funfull
tempx 模板coode_domainunithttps://qianjilian.com/localxres/tempx/tempeditor/index.html?unitid=<域.单元>
pagex 页面coode_tinyhttps://qianjilian.com/localxres/tempx/tinylayeditor/index.html?unitid=<域.单元>&tinyid=<tinymark>
mfunx 分布函数coode_multifunlisthttps://qianjilian.com/localxres/tempx/tinylayeditor/index.html?unitid=resuptool.index&tinyid=o16CUI
tabx 表coode_tablisthttps://qianjilian.com/localxres/funx/anyjsshort/?stid=2qPIqS-sfile:anyjsshort.php-&pnum=150:<表名>&page=1:TABLE_NAME&
formx 表单coode_shortdatahttps://qianjilian.com/localxres/funx/anyjsshort/?datatype=html&stid=keydtly-&pnum=100:<shortid>&page=1:shortid&
dataspacex 数据空间coode_dataspacehttps://qianjilian.com/localxres/tempx/dspcmgr/index.html
sysx 系统容器coode_sysinformationmysql:不落盘,可直接改库
appx 应用容器coode_appdefaultmysql:不落盘,可直接改库
layx 输出容器coode_applaymysql:不落盘,可直接改库
cdtrdrx 条件跳转coode_cdtrdrmysql:不落盘,可直接改库
parardrx 参数跳转coode_parardrmysql:不落盘,可直接改库
groupx 一级分类coode_grouplistmysql:不落盘,可直接改库
plotx 节点coode_plotlistmysql:不落盘,可直接改库
csspagex 样式页面coode_facelistmysql:不落盘,可直接改库
iconsetx 图标库coode_iconsetmysql:不落盘,可直接改库
databasex 数据库coode_dblistmysql:不落盘,可直接改库
afunx 事务函数coode_affairfunlistmysql:不落盘,可直接改库
parax 外部框架coode_paramysql:不落盘,可直接改库
apix 接口密钥coode_apipoolmysql:不落盘,可直接改库
smallcssx 小CSScoode_codedemomysql:不落盘,可直接改库
云酷德宪法/功能与逻辑

fun

功能与逻辑7 种

能被直接调用的能力单元,端点本身就是资源。下面每一种都给出操作接口、关键参数和一个可直接跑的示例;要看图解和完整步骤,点「完整操作页」。

函数类:谁都能调,端点就是资源本身调用方Agent / 页面 / funxHTTP 端点/localxres/funx/<名>/GET / POST,必须带 Cookie返回结果库 coode_funlist(HEX 正文)盘 /localxres/funx/<名>/index.php

图:这一类资源在云酷德体系里所处的位置

资源与 API

7 种

编号说明:本页所有 SNO:8848 都是数据编号示例,仅供参考,非真实数据。真用的时候,先 select SNO from <表> where <定位键>='<资源码>' 查出真实主键再替换。

PHP 函数资源,云酷德最小的可执行单元。主表 coode_funlist:funname=资源名(英文码)、funcname=中文标题、funfull=正文(HEX)。落盘 /localxres/funx/<名>/index.php,HTTP 端点 /localxres/funx/<名>/ 。响应统一信封 maker…

主表 coode_funlist键 funname盘 /localxres/funx/库内 1170 条
操作接口关键参数
创建savefuncGET fn=<函数名> + POST dt=<PHP正文>(不带 <?php 头、不写正则、零反斜杠)
补充savefuncGET fn=SNO:8848.<字段名>@coode_funlist ;POST dt=<新值>
详情SQLselect * from coode_funlist where funname=<资源码>
卸载unstallresrestype=funx&rescode=<资源码>&sysid=0

落盘 /localxres/funx/<名>/index.php,HTTP 端点直接就是 /localxres/funx/<名>/。五条铁律:不带 <?php 头 / 不能出现连续 TYPE_HEX / 不能写正则 / % 后必须空格或括号 / 裸单引号用 dyh() 拼。

改一条记录(万能通道 · 编号 8848 为示例,非真实数据)复制
POST 本站域名/localxres/funx/savefunc/?fn=SNO:8848.unittitle@coode_funlist
Cookie: uid=divlovecss; stoken=; deadline=
Content-Type: application/x-www-form-urlencoded
dt=<这一列的新值>
# fn 三种写法:
#   fn=<函数名>                 普通 funx
#   fn=<键>@<表>.<列>            按业务键写某表某列
#   fn=SNO:<主键>.<列>@<表>      按主键写任意表(就是这条)

sfunx

函数集完整操作页 →

PHP 函数集(一段可 eval 的公共代码库)。主表 coode_funsetfile:setname=资源名、setcname=中文标题、funfull=正文。落盘 /localxres/sfunx/<名>/index.php,由 RESFUNSET()(EARTH L167) 加载,磁盘优先。

主表 coode_funsetfile键 setname盘 /localxres/sfunx/库内 42 条
操作接口关键参数
创建savefuncGET fn=<键>@<表>.<列> + POST dt=<函数集正文>
补充savefuncGET fn=SNO:8848.<字段名>@coode_funsetfile ;POST dt=<新值>
详情SQLselect * from coode_funsetfile where setname=<资源码>
卸载unstallresrestype=sfunx&rescode=<资源码>&sysid=0

函数集 = 一堆函数的容器。写入用 savefunc?fn=SNO:<主键>.<字段>@<表>,调用用 eval(RESFUNSET("名"))。⚠ 函数集里定义的函数名多是全局的(如 dspbasecoprt 的 NS/ND/UD/RD/SY),用前确认没撞车。

改一条记录(万能通道 · 编号 8848 为示例,非真实数据)复制
POST 本站域名/localxres/funx/savefunc/?fn=SNO:8848.unittitle@coode_funsetfile
Cookie: uid=divlovecss; stoken=; deadline=
Content-Type: application/x-www-form-urlencoded
dt=<这一列的新值>
# fn 三种写法:
#   fn=<函数名>                 普通 funx
#   fn=<键>@<表>.<列>            按业务键写某表某列
#   fn=SNO:<主键>.<列>@<表>      按主键写任意表(就是这条)

PHP 类资源。主表 coode_phpcls:funname=类名、funcname=中文标题。落盘 /localxres/clsx/<名>/index.php,由 CLASSX()(EARTH L137) 加载,磁盘优先。funx 里用 eval(CLASSX(”shortlist”)) 的方式调用。

主表 coode_phpcls键 funname盘 /localxres/clsx/库内 65 条
操作接口关键参数
创建写 coode_phpclsfunname=类名、funcname=中文标题;落盘 clsx/<名>/index.php
补充savefuncGET fn=SNO:8848.<字段名>@coode_phpcls ;POST dt=<新值>
详情SQLselect * from coode_phpcls where funname=<资源码>
卸载unstallresrestype=clsx&rescode=<资源码>&sysid=0

PHP 类资源。落盘 /localxres/clsx/<名>/index.php,磁盘优先加载。在 funx 里用 eval(CLASSX("名")) 调用。

改一条记录(万能通道 · 编号 8848 为示例,非真实数据)复制
POST 本站域名/localxres/funx/savefunc/?fn=SNO:8848.unittitle@coode_phpcls
Cookie: uid=divlovecss; stoken=; deadline=
Content-Type: application/x-www-form-urlencoded
dt=<这一列的新值>
# fn 三种写法:
#   fn=<函数名>                 普通 funx
#   fn=<键>@<表>.<列>            按业务键写某表某列
#   fn=SNO:<主键>.<列>@<表>      按主键写任意表(就是这条)

dfunx

数据函数完整操作页 →

数据函数。主表 coode_datafun(dfunmark)。落盘 /localxres/dfunx/<名>/index.php。依赖 tabx.any(任意表)。

主表 coode_datafun键 dfunmark盘 /localxres/dfunx/库内 13 条
操作接口关键参数
创建写主表 coode_datafuninsert 一条记录,定位键 dfunmark;库 + 盘 + 索引要一起对上
补充savefuncGET fn=SNO:8848.<字段名>@coode_datafun ;POST dt=<新值>
详情SQLselect * from coode_datafun where dfunmark=<资源码>
卸载unstallresrestype=dfunx&rescode=<资源码>&sysid=0

数据函数,主表 coode_datafun,定位键 dfunmark。

改一条记录(万能通道 · 编号 8848 为示例,非真实数据)复制
POST 本站域名/localxres/funx/savefunc/?fn=SNO:8848.unittitle@coode_datafun
Cookie: uid=divlovecss; stoken=; deadline=
Content-Type: application/x-www-form-urlencoded
dt=<这一列的新值>
# fn 三种写法:
#   fn=<函数名>                 普通 funx
#   fn=<键>@<表>.<列>            按业务键写某表某列
#   fn=SNO:<主键>.<列>@<表>      按主键写任意表(就是这条)

mfunx

分布函数完整操作页 →

分布函数(同一个函数分发到多站点/多版本)。主表 coode_multifunlist(funname)。落盘 /localxres/mfunx/<名>/index.php。

主表 coode_multifunlist键 funname盘 /localxres/mfunx/库内 71 条
操作接口关键参数
创建写主表 coode_multifunlistinsert 一条记录,定位键 funname;库 + 盘 + 索引要一起对上
补充savefuncGET fn=SNO:8848.<字段名>@coode_multifunlist ;POST dt=<新值>
详情SQLselect * from coode_multifunlist where funname=<资源码>
卸载unstallresrestype=mfunx&rescode=<资源码>&sysid=0

分布函数:主表 coode_multifunlist + 索引表 coode_multifunindex,落盘四个文件。字段渲染走通用 sysshowfun + exchangeunit 机制。

改一条记录(万能通道 · 编号 8848 为示例,非真实数据)复制
POST 本站域名/localxres/funx/savefunc/?fn=SNO:8848.unittitle@coode_multifunlist
Cookie: uid=divlovecss; stoken=; deadline=
Content-Type: application/x-www-form-urlencoded
dt=<这一列的新值>
# fn 三种写法:
#   fn=<函数名>                 普通 funx
#   fn=<键>@<表>.<列>            按业务键写某表某列
#   fn=SNO:<主键>.<列>@<表>      按主键写任意表(就是这条)

afunx

事务函数完整操作页 →

事务函数(一组要一起执行的动作)。主表 coode_affairfunlist(funname)。落盘 /localxres/afunx/<名>/index.php。

主表 coode_affairfunlist键 funname盘 /localxres/afunx/库内 3 条
操作接口关键参数
创建写主表 coode_affairfunlistinsert 一条记录,定位键 funname;库 + 盘 + 索引要一起对上
补充savefuncGET fn=SNO:8848.<字段名>@coode_affairfunlist ;POST dt=<新值>
详情SQLselect * from coode_affairfunlist where funname=<资源码>
卸载unstallresrestype=afunx&rescode=<资源码>&sysid=0

事务函数,主表 coode_affairfunlist,定位键 funname,与 funx 同构但用于事务编排。

改一条记录(万能通道 · 编号 8848 为示例,非真实数据)复制
POST 本站域名/localxres/funx/savefunc/?fn=SNO:8848.unittitle@coode_affairfunlist
Cookie: uid=divlovecss; stoken=; deadline=
Content-Type: application/x-www-form-urlencoded
dt=<这一列的新值>
# fn 三种写法:
#   fn=<函数名>                 普通 funx
#   fn=<键>@<表>.<列>            按业务键写某表某列
#   fn=SNO:<主键>.<列>@<表>      按主键写任意表(就是这条)

apix

api接口完整操作页 →

API 接口池(外部接口登记)。主表 coode_apipool(apicode)。不落盘。

主表 coode_apipool键 apicode盘 /localxres/apix/库内 25 条
操作接口关键参数
创建写 coode_apipoolapicode 定位,登记接口地址与参数
补充savefuncGET fn=SNO:8848.<字段名>@coode_apipool ;POST dt=<新值>
详情SQLselect * from coode_apipool where apicode=<资源码>
卸载unstallresrestype=apix&rescode=<资源码>&sysid=0

API 接口池,主表 coode_apipool,定位键 apicode,登记对外/对内的接口。

改一条记录(万能通道 · 编号 8848 为示例,非真实数据)复制
POST 本站域名/localxres/funx/savefunc/?fn=SNO:8848.unittitle@coode_apipool
Cookie: uid=divlovecss; stoken=; deadline=
Content-Type: application/x-www-form-urlencoded
dt=<这一列的新值>
# fn 三种写法:
#   fn=<函数名>                 普通 funx
#   fn=<键>@<表>.<列>            按业务键写某表某列
#   fn=SNO:<主键>.<列>@<表>      按主键写任意表(就是这条)
云酷德宪法 · 分类页 fun · 本页也是 tempx 资源 xianfa.fun
操作方法随造系统过程持续补充——每实操一次就回来补一段