profile
viewpoint

cos800/bgf 0

my gogf GoFrame project init

cos800/grace 0

一个精巧、易用的微信小程序开发辅助库

cos800/rageframe2 0

一个基于Yii2高级框架的快速开发应用引擎

cos800/ThinkTools 0

TT, ThinkPHP Tools, Tp Tools

startedczl0325/jetbrains-agent-latest

started time in 6 days

fork cos800/rageframe2

一个基于Yii2高级框架的快速开发应用引擎

http://www.rageframe.com

fork in 7 days

startedyioMe/nodejs_wx_aipay_api

started time in 8 days

issue openedRubyLouvre/avalon

R.I.P

created time in 20 days

startedo2team/athena

started time in a month

issue commentwecatch/china_regions

台湾,香港,澳门都没有 ????

是啊?为什么

chenlexing

comment created time in a month

push eventcos800/bgf

王忠强

commit sha a5f1e3a2cd239066234b12a3e8707f8dc193f4e9

no message

view details

push time in 2 months

issue commentgogf/gf

郭神,建议增加个事件机制

这个需求我支持!!!精神中支持

ayamzh

comment created time in 2 months

PublicEvent

push eventcos800/big-gf

王忠强

commit sha 702f70cf248e430cf94aafe03d61e0600dfdb312

no message

view details

push time in 2 months

startedgogf/gf

started time in 2 months

issue openedgogf/gf

提两个建议,关于数据校验(表单验证)

看文档 https://goframe.org/util/gvalid/index 内置规则有个integer 但是平常校验一些id,page之类的参数,经常是需要大于0的正整数。

自定义错误,有没有可能像ThinkPHP那样

params := map[string]interface{} {
    "passport"  : "",
    "password"  : "123456",
    "password2" : "1234567",
}
rules := map[string]string {
    "passport|帐号"  : "required|length:6,16",
    "password|密码"  : "required|length:6,16|same:password2",
    "password2|密码2" : "required|length:6,16",
}
if e := gvalid.CheckMap(params, rules); e != nil {
    fmt.Println(e.Maps())
}

输出错误时,把『passport 不能为空』替换成『帐号不能为空』 go语言还不太熟悉,大概是这个意思。

created time in 2 months

startedpanteng/wechat-h5-boilerplate

started time in 2 months

startedly525/luban-h5

started time in 2 months

startedstrapi/strapi

started time in 2 months

startededdycjy/go-gin-example

started time in 2 months

startedpeachdocs/peach

started time in 2 months

startedunknwon/the-way-to-go_ZH_CN

started time in 2 months

startedunknwon/go-study-index

started time in 2 months

startedgo-ini/ini

started time in 2 months

startedSortableJS/Vue.Draggable

started time in 2 months

startedwe7coreteam/w7-rangine-empty

started time in 2 months

startedYurunsoft/PaySDK

started time in 2 months

startedchuzhixin/vue-admin-beautiful

started time in 2 months

issue commentovertrue/wechat

好像没有『代小程序实现业务』方面的接口?

我好像看懂了 源码。。。

cos800

comment created time in 2 months

issue closedovertrue/wechat

好像没有『代小程序实现业务』方面的接口?

比如这个『上传小程序代码』

https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Mini_Programs/code/commit.html

closed time in 2 months

cos800

issue commentovertrue/wechat

好像没有『代小程序实现业务』方面的接口?

文档完全跟不上啊, 感觉上了贼船, 微信官方文档写得倒是详尽, 但是用了 easywechat 反而无从下手了,

cos800

comment created time in 2 months

issue commentovertrue/wechat

Credential "component_verify_ticket" does not exist in cache.

好像找到问题了,redis服务器连不上,但是没有错误提示。

cos800

comment created time in 2 months

issue openedovertrue/wechat

Credential "component_verify_ticket" does not exist in cache.

我用的环境

  • PHP 版本:7.2
  • overtrue/wechat 版本:^4.2
  • 是否使用了框架?框架名称:thinkphp 6.0

问题及现象

实例化代码是这样的:

function wxopen() {
    static $op;
    if (!$op) {
        $config = config('wxopen');
        $op = \EasyWeChat\Factory::openPlatform($config);

        $redisConfig = config('cache.stores.redis');
        $host = $redisConfig['host'] ?: '127.0.0.1';
        $port = $redisConfig['port'] ?: '6379';
        $client = new \Predis\Client("tcp://$host:$port");
        $cache = new \Symfony\Component\Cache\Adapter\RedisAdapter($client);

        $op->rebind('cache', $cache);
    }
    return $op;
}

授权事件接收URL代码是这样的:

    // 授权事件接收URL
    function auth() {
        $server = wxopen()->server;

        $server->push(function ($message) {
            Log::write('EVENT_COMPONENT_VERIFY_TICKET');
            Log::write(js_encode($message));
            // todo
        }, Guard::EVENT_COMPONENT_VERIFY_TICKET);

        // 处理授权成功事件
        $server->push(function ($message) {
            Log::write('EVENT_AUTHORIZED');
            Log::write(js_encode($message));
            // todo
        }, Guard::EVENT_AUTHORIZED);

        // 处理授权更新事件
        $server->push(function ($message) {
            Log::write('EVENT_UPDATE_AUTHORIZED');
            Log::write(js_encode($message));
        }, Guard::EVENT_UPDATE_AUTHORIZED);

        // 处理授权取消事件
        $server->push(function ($message) {
            Log::write('EVENT_UNAUTHORIZED');
            Log::write(js_encode($message));
            // todo
        }, Guard::EVENT_UNAUTHORIZED);

        $server->serve()->send();
    }

按文档所说 easywechat 会自动管理缓存,并且我也修改了缓存驱动为redis, 可是我登录redis-cil,看不到任何数据。

127.0.0.1:6379> keys *
(empty list or set)

查看日志,微信服务器 是有发送数据过来的。

[2020-06-02T16:34:57+08:00][info] EVENT_COMPONENT_VERIFY_TICKET
[2020-06-02T16:34:57+08:00][info] {"AppId":"wx1f7a9924a0806804","CreateTime":"1591086887","InfoType":"component_verify_ticket","ComponentVerifyTicket":"ticket@@@F2_ij7U4SQe9q3SzAcy5zeoqUmIOlXCzrdcHBAhlNeNM5R2ysjIeUyPA5NHfYBH7mc5_SrkZoOo7CT-Hghx4uQ"}

created time in 2 months

issue commentovertrue/wechat

class 'EasyWeChat\OpenPlatform\Base\Client' does not have a method 'rebind'

升级到4.2 已解决rebind方法不存在的问题

cos800

comment created time in 2 months

issue closedovertrue/wechat

class 'EasyWeChat\OpenPlatform\Base\Client' does not have a method 'rebind'

我用的环境

  • PHP 版本:7.2.20
  • overtrue/wechat 版本:~4.0
  • 是否使用了框架?框架名称:thinkphp 6.0

问题及现象

我是这样子实例化openPlatform的

        $config = config('wxopen');
        $op = \EasyWeChat\Factory::openPlatform($config);

        $redisConfig = config('cache.stores.redis');
        $host = $redisConfig['host'] ?: '127.0.0.1';
        $port = $redisConfig['port'] ?: '6379';
        $client = new \Predis\Client("tcp://$host:$port");
        $cache = new \Symfony\Component\Cache\Adapter\RedisAdapter($client);

        $op->rebind('cache', $cache);

报错是这样子的:

class 'EasyWeChat\OpenPlatform\Base\Client' does not have a method 'rebind'

难道openPlatform不能rebind cache? 还是我写法有什么错? 手册里我看到app可以rebind cache https://www.easywechat.com/docs/4.1/customize/cache

closed time in 2 months

cos800

issue commentovertrue/wechat

class 'EasyWeChat\OpenPlatform\Base\Client' does not have a method 'rebind'

我尝试在整个vendor目录搜索rebind,但是什么都没找到。

cos800

comment created time in 2 months

issue openedovertrue/wechat

class 'EasyWeChat\OpenPlatform\Base\Client' does not have a method 'rebind'

我用的环境

  • PHP 版本:7.2.20
  • overtrue/wechat 版本:~4.0
  • 是否使用了框架?框架名称:thinkphp 6.0

问题及现象

我是这样子实例化openPlatform的

        $config = config('wxopen');
        $op = \EasyWeChat\Factory::openPlatform($config);

        $redisConfig = config('cache.stores.redis');
        $host = $redisConfig['host'] ?: '127.0.0.1';
        $port = $redisConfig['port'] ?: '6379';
        $client = new \Predis\Client("tcp://$host:$port");
        $cache = new \Symfony\Component\Cache\Adapter\RedisAdapter($client);

        $op->rebind('cache', $cache);

报错是这样子的:

class 'EasyWeChat\OpenPlatform\Base\Client' does not have a method 'rebind'

难道openPlatform不能rebind cache? 还是我写法有什么错? 手册里我看到app可以rebind cache https://www.easywechat.com/docs/4.1/customize/cache

created time in 2 months

issue openedovertrue/wechat

好像没有『代小程序实现业务』方面的接口?

比如这个『上传小程序代码』

https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Mini_Programs/code/commit.html

created time in 2 months

startedncform/ncform

started time in 3 months

issue openeddream2023/vue-ele-form

能不能直接在浏览器中用 不用cli创建vue项目

文档里只看到node环境中的用法,没看到浏览器环境中直接用的使用说明。

created time in 3 months

starteddream2023/vue-ele-form

started time in 3 months

more