业务经理

微信扫描以上二维码

028-61286886

技术咨询

请问下获取投稿页面的栏目回调定义怎么写呀

迅睿框架 更新 2020-11-30 16:53:33 华仔

请问下获取投稿页面的栏目回调定义怎么写呀!我这个写法获取不到

 "category": {
                "1": {
                    "id": "1",
                    "pid": "0",
                    "pids": "0",
                    "name": "头像",
                    "dirname": "touxiang",
                    "pdirname": "",
                    "child": 1,
                    "childids": "1,4,5,6,7,8,12,14,18,19,20",
                    "thumb": "5358",
                    "show": "1",
                    "setting": {
                        "linkurl": "",
                        "seo": {
                            "list_title": "头像大全_头像发布中心[第{page}页{join}]_{SITE_NAME}",
                            "list_keywords": "头像,女生头像高冷,情侣头像",
                            "list_description": "网的头像大全频道,您可以发布、寻找各种头像、情侣头像、女生头像等。"
                        },
                        "template": {
                            "pagesize": "10",
                            "mpagesize": "10",
                            "list": "list.html",
                            "category": "category.html",
                            "search": "search.html",
                            "show": "show.html"
                        },
                        "cat_field": null,
                        "html": 0,
                        "urlrule": 3
                    },
                    "displayorder": "0",
                    "mid": "p",
                    "topid": "1",
                    "domain": "",
                    "mobile_domain": "",
                    "catids": [
                        "1",
                        "4",
                        "5",
                        "6",
                        "7",
                        "8",
                        "12",
                        "14",
                        "18",
                        "19",
                        "20"
                    ],
                    "tid": 1,
                    "permission": "",
                    "url": "/p/touxiang.html",
                    "total": 591,
                    "field": [
                        
                    ]
                },
                "2": {
                    "id": "2",
                    "pid": "0",
                    "pids": "0",
                    "name": "卡通图",
                    "dirname": "bizhi",
                    "pdirname": "",
                    "child": 1,
                    "childids": "2,9,10,34",
                    "thumb": "5359",
                    "show": "1",
                    "setting": {
                        "linkurl": "",
                        "seo": {
                            "list_title": "壁纸大全_高清动漫壁纸发布中心[第{page}页{join}]_{SITE_NAME}",
                            "list_keywords": "壁纸,高清动漫壁纸,动漫壁纸",
                            "list_description": "网的壁纸大全频道,您可以发布、寻找各种壁纸、高清动漫壁纸、动漫壁纸等。"
                        },
                        "template": {
                            "pagesize": "10",
                            "mpagesize": "10",
                            "list": "list.html",
                            "category": "category.html",
                            "search": "search.html",
                            "show": "show.html"
                        },
                        "cat_field": null,
                        "html": 0,
                        "urlrule": 3
                    },
                    "displayorder": "0",
                    "mid": "p",
                    "topid": "2",
                    "domain": "",
                    "mobile_domain": "",
                    "catids": [
                        "2",
                        "9",
                        "10",
                        "34"
                    ],
                    "tid": 1,
                    "permission": "",
                    "url": "/p/bizhi.html",
                    "total": 116,
                    "field": [
                        
                    ]
                },
                "3": {
                    "id": "3",
                    "pid": "0",
                    "pids": "0",
                    "name": "图片",
                    "dirname": "tupian",
                    "pdirname": "",
                    "child": 1,
                    "childids": "3,35,36,37,38,39,40",
                    "thumb": "5360",
                    "show": "1",
                    "setting": {
                        "linkurl": "",
                        "seo": {
                            "list_title": "图片大全_高清人物图片发布中心[第{page}页{join}]_{SITE_NAME}",
                            "list_keywords": "图片,人物图片,高清动漫图片",
                            "list_description": "网的图片大全频道,您可以发布、寻找各种图片、人物图片、高清动漫图片等。"
                        },
                        "template": {
                            "pagesize": "10",
                            "mpagesize": "10",
                            "list": "list.html",
                            "category": "category.html",
                            "search": "search.html",
                            "show": "show.html"
                        },
                        "cat_field": null,
                        "html": 0,
                        "urlrule": 3
                    },
                    "displayorder": "0",
                    "mid": "p",
                    "topid": "3",
                    "domain": "",
                    "mobile_domain": "",
                    "catids": [
                        "3",
                        "35",
                        "36",
                        "37",
                        "38",
                        "39",
                        "40"
                    ],
                    "tid": 1,
                    "permission": "",
                    "url": "/p/tupian.html",
                    "total": 164,
                    "field": [
                        
                    ]
                },
                "4": {
                    "id": "4",
                    "pid": "1",
                    "pids": "0,1",
                    "name": "女生头像",
                    "dirname": "nstx",
                    "pdirname": "touxiang/",
                    "child": 0,
                    "childids": 4,
                    "thumb": "2745",
                    "show": "1",
                    "setting": {
                        "linkurl": "",
                        "seo": {
                            "list_title": "女生头像大全_少女头像发布中心[第{page}页{join}]_{SITE_NAME}",
                            "list_keywords": "女生头像,少女头像,闺蜜头像",
                            "list_description": "头像女大全频道,您可以发布、寻找各种女生头像、少女头像、闺蜜头像等。"
                        },
                        "template": {
                            "pagesize": "10",
                            "mpagesize": "10",
                            "list": "list.html",
                            "category": "category.html",
                            "search": "search.html",
                            "show": "show.html"
                        },
                        "cat_field": null,
                        "html": 0,
                        "urlrule": 3
                    },
                    "displayorder": "0",
                    "mid": "p",
                    "topid": "1",
                    "domain": "",
                    "mobile_domain": "",
                    "catids": [
                        "4"
                    ],
                    "tid": 1,
                    "permission": [
                        
                    ],
                    "url": "/p/nstx.html",
                    "total": 57,
                    "field": [
                        
                    ]
                },
                "5": {
                    "id": "5",
                    "pid": "1",
                    "pids": "0,1",
                    "name": "闺蜜头像",
                    "dirname": "gmtx",
                    "pdirname": "touxiang/",
                    "child": 0,
                    "childids": 5,
                    "thumb": "",
                    "show": "1",
                    "setting": {
                        "linkurl": "",
                        "seo": {
                            "list_title": "闺蜜头像大全_闺蜜头像发布中心[第{page}页{join}]_{SITE_NAME}",
                            "list_keywords": "闺蜜头像,闺蜜头像",
                            "list_description": "网的闺蜜头像大全频道,您可以发布、寻找各种闺蜜头像、闺蜜头像等。"
                        },
                        "template": {
                            "pagesize": "10",
                            "mpagesize": "10",
                            "list": "list.html",
                            "category": "category.html",
                            "search": "search.html",
                            "show": "show.html"
                        },
                        "cat_field": null,
                        "html": 0,
                        "urlrule": 3
                    },
                    "displayorder": "0",
                    "mid": "p",
                    "topid": "1",
                    "domain": "",
                    "mobile_domain": "",
                    "catids": [
                        "5"
                    ],
                    "tid": 1,
                    "permission": [
                        
                    ],
                    "url": "/p/gmtx.html",
                    "total": 27,
                    "field": [
                        
                    ]
                },
                "6": {
                    "id": "6",
                    "pid": "1",
                    "pids": "0,1",
                    "name": "情侣头像",
                    "dirname": "qltx",
                    "pdirname": "touxiang/",
                    "child": 0,
                    "childids": 6,
                    "thumb": "",
                    "show": "1",
                    "setting": {
                        "linkurl": "",
                        "seo": {
                            "list_title": "情侣头像大全_情侣头像发布中心[第{page}页{join}]_{STE_NAME}",
                            "list_keywords": "情侣头像,高清情侣头像",
                            "list_description": "网的情侣头像频道,您可以发布、寻找各种侣头像、情侣头像等。"
                        },
//投稿栏目获取,需要获取栏目id和栏目名称
public function my_post($data) {
    $rt = [];
    if ($data['category']) {
        foreach ($data['category'] as $t) {
            $rt[] = [
                
            'id' => $t['id'],// id号
               
            ];
        }
    }

    return $rt;
}



插件版权:官方插件
插件名称:api

方案

  • 官方插件技术-大山 #1 · 2020-11-30 14:50:19
    请求URL发来看看
  • 华仔 #2 · 2020-11-30 15:09:55
    https://www.acgnme.com/index.php?appid=1&appsecret=PHPCMFBE6FEA7FE7AD3&api_auth_code=f04c11bc3454c0c97b35f2e6a78f0864&api_auth_uid=8&s=member&app=p&c=home&m=add
    官方插件技术-大山 这个
  • 华仔 #3 · 2020-11-30 15:28:17
    官方插件技术-大山 老大麻烦看下
  • 官方插件技术-大山 #4 · 2020-11-30 15:43:17
    public function my_post($data) {
        $rt = [];
        if (\Phpcmf\Service::C()->module['category']) {
            foreach (\Phpcmf\Service::C()->module as $t) {
                $rt[] = [
                    
                'id' => $t['id'],// id号
                   
                ];
            }
        }
    
        return $rt;
    }
  • 华仔 #5 · 2020-11-30 15:47:33
    官方插件技术-大山 测试啥也没返回呀
    https://www.acgnme.com/index.php?appid=1&appsecret=PHPCMFBE6FEA7FE7AD3&api_auth_code=f04c11bc3454c0c97b35f2e6a78f0864&api_auth_uid=8&api_call_function=my_post&s=member&app=p&c=home&m=add
  • 官方插件技术-大山 #6 · 2020-11-30 16:36:53
    满意答案
    public function my_post($data) {
        $rt = [];
        if (\Phpcmf\Service::C()->module['category']) {
            foreach (\Phpcmf\Service::C()->module['category'] as $t) {
                $rt[] = [
                    
                'id' => $t['id'],// id号
                   
                ];
            }
        }
    
        return $rt;
    }
  • 华仔 #7 · 2020-11-30 16:53:33
    @官方插件技术-大山:非常感谢!

迅睿系统漏洞

GEO系统
GEO系统(2026-09-15)
运营客户端,防止误触阴影处关闭对话框
独立站群系统
独立站群系统(2026-09-14)
子站独立部署时修复同步附件失败问题
在线客服
在线客服(2026-09-13)
修复删除会话报错问题 删除会话时联动删除聊天图片
在线考试竞赛系统
在线考试竞赛系统(2026-09-12)
增加投票功能 考试功能拓展 注意:更新后需要执行系统更新,更新数...
网上信箱
网上信箱(2026-09-12)
修复新版本兼容问题
GeoSeo收录宝
GeoSeo收录宝(2026-09-12)
1 优化Update.php文件,解决版本在线升级不完整问题 2 ...
GeoSeo工具箱
GeoSeo工具箱(2026-09-11)
修正历史记录推送
微信系统
微信系统(2026-09-11)
增加数据统计总览界面 账号管理增加服务和公众号的区别 菜单管理支持更...
答题系统
答题系统(2026-09-11)
一站式在线答题系统,支持真题考试、题库练习和错题本,适合培训、考证、...
阿里云滑动验证码
阿里云滑动验证码(2026-09-10)
采用阿里云验证码替换迅睿系统自带的图片验证码和滑动验证码。后台设置方...