定制 panthsoni/tengxun 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

panthsoni/tengxun

Composer 安装命令:

composer create-project panthsoni/tengxun

包简介

this is a tengxun developer ball

README 文档

README

腾讯集团微信、扣扣等开发包

安装

composer require panthsoni/tengxun

使用方法

1、微信开发者模式

namespace app\example;

use panthsoni\tengxun\weixin\developer\Developer;

class Example {
    /*构造方法*/
    protect static $method = [
        
    ]
    protect static $developer;
    public function __construct(){
        self::$developer = Developer::init([
            'appid' => '',    //公众号appid,非必填,仅当安全模式下必填
            'encoding_aes_key' => '',  //随机密钥,非必填,仅当安全模式下必填
            'msg_signature' => '',  //消息签名,非必填,仅当安全模式下必填
        ]);
    }

    /*微信监听方法*/
    public function listen(){
        /*微信监听,setMethod为listen,当setIsSafe为true时,模式为安全模式,返回数组格式*/
        $res = self::$developer->setParams([
            'signature' => '',  //签名
            'timestamp' => 1562212362,
            'nonce' => '',  //随机字符串
            'token' => '',   //token码
            'echostr' => '',  //非必填,仅当第一次验证时传入
        ])->setMethod('listen')->setIsSafe(true)->getResult();

        return $res;
    }

    /*被动回复用户信息方法*/
    public function replyMessage(){
        /*微信监听,setMethod为replyMessage,当setIsSafe为true时,模式为安全模式,返回数组格式*/
        $res = self::$developer->setParams([
            'msg_type' => '',   //消息类型,text,voice,video,music,news,image,transfer_customer_service
            'to_user_name' => '',   //接收用户openid
            'from_user_name' => ''   //发送者
        ])->setBizParams([
            'content' => '',   //内容,仅当消息类型为text时,必填
            'media_id' => '',   //媒体ID,仅当消息类型为voice,video,music,image时,必填
            'title' => '',    //非必填,标题
            'description' => '',   //非必填,描述
            'music_url' => '',   //非必填,音乐链接
            'hq_music_url' => '',   //非必填,音乐hq链接
            'article_counts' => 1,  //文章个数,仅当消息类型为news时,必填
            'article_content' => [
                [
                    'title' => '',   //标题,仅当消息类型为news时,必填
                    'description' => '',   //描述,仅当消息类型为news时,必填
                    'pic_url' => '',   //图片链接,仅当消息类型为news时,必填
                    'url' => '',   //跳转链接,仅当消息类型为news时,必填
                ]
            ]
        ])->setMethod('replyMessage')->setIsSafe(true)->getResult();
        
        exit($res);
    }

    /*获取access_token*/
    public function getAccessToken(){
        $res = self::$developer->setParams([
            'secret' => ''
        ])->setMethod('get_base_access_token')->getResult();

        return $res;
    }

    /*菜单服务,相关方法有create_menu,get_menu,del_menu,create_self_menu,del_self_menu,get_self_menu*/
    public function menu(){
        $res = self::$developer->setParams([
            'access_token' => '',
            'button' => '',
            'menuid' => ''
        ])->setMethod('create_menu')->getResult();

        return $res;
    }
}

panthsoni/tengxun 适用场景与选型建议

panthsoni/tengxun 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 11 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 panthsoni/tengxun 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 panthsoni/tengxun 我们能提供哪些服务?
定制开发 / 二次开发

基于 panthsoni/tengxun 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-05