企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# :-: **读取积分信息** 方法:`TM()->integral('A','B','C')` | 代码 | 说明 | | --- | --- | | A | 积分账户ID、不指定则当前账户默认积分类别 | | B | 账号UID,读取其它账户则传入 `默认为当前账号` | | C | 积分类别ID,默认为默认积分| | A B C为空 | 自动读取当前账号输出当前默认积分类型的信息 | 输出信息: | 字段 | 说明 | | --- | --- | | ['card'] ['id'] | 积分账户卡号 | | ['card'] ['uid'] | 所属用户ID | | ['card'] ['tid'] | 积分类型ID| | ['card'] ['total'] | 当前总计积分 | | ['card'] ['flow'] | 流动积分数量 | | ['card'] ['freeze'] | 冻结积分数量 | | ['card'] ['locking'] | 锁定积分(只能用于消费) | | ['card'] ['addtime'] | 开户时间戳 | | ['card'] ['lasttime'] | 最后更新时间戳 | | ['card'] ['status'] | 状态 1正常 | | --- | --- | | ['type'] ['id'] | 积分类型ID | | ['type'] ['name'] | 积分类型 名称 | | ['type'] ['alias'] | 积分类型别名 | | ['type'] ['sign'] | 积分符号 | | ['type'] ['ico'] | 积分图标 | | ['type'] ['info'] | 积分描述 | | ['type'] ['ratio'] | 与人民币兑换比例 | | ['type'] ['status'] | 状态 1正常 | | ['type'] ['sort'] | 排序 | | ['type'] ['defaults'] | 是否默认 1 默认 | 代码示范: ~~~php {php} $jifen = TM()->integral(); //读取积分信息 {/php} 我的{$jifen.type.name} <i class="{$jifen.type.ico}"></i> <div class="line b-b"></div> 总计{$jifen.type.name}:{$jifen.card.total} <i class="{$jifen.type.ico}"></i><br> 流动{$jifen.type.name}:{$jifen.card.flow} <i class="{$jifen.type.ico}"></i><br> 冻结{$jifen.type.name}:{$jifen.card.freeze} <i class="{$jifen.type.ico}"></i> ~~~ 输出数组示范: ~~~array array(2) { ["card"]=> array(10) { ["id"]=> string(8) "80000001" ["uid"]=> string(5) "10000" ["tid"]=> string(5) "10000" ["flow"]=> string(5) "10.00" ["freeze"]=> string(4) "0.00" ["locking"]=> string(5) "10.00" ["addtime"]=> string(10) "1602317935" ["lasttime"]=> string(10) "1602317935" ["status"]=> string(1) "1" ["total"]=> string(5) "10.00" } ["type"]=> array(9) { ["id"]=> string(5) "10000" ["name"]=> string(6) "金豆" ["alias"]=> string(7) "default" ["sign"]=> string(2) "۵" ["ico"]=> string(14) " fa fa-lemon-o" ["info"]=> string(18) "系统默认积分" ["ratio"]=> string(3) "100" ["status"]=> string(1) "1" ["sort"]=> string(1) "0" } } ~~~