tencentyun / wafer-php-server-sdk Goto Github PK
View Code? Open in Web Editor NEWWafer - 企业级微信小程序全栈方案
Home Page: https://github.com/tencentyun/wafer
License: Other
Wafer - 企业级微信小程序全栈方案
Home Page: https://github.com/tencentyun/wafer
License: Other
如题,怎么样添加第三方sdk呢?
use \QCloud_WeApp_SDK\Conf;
Conf::setup(array(
'ServerHost' => '业务服务器的主机名',
'AuthServerUrl' => '鉴权服务器服务地址',
'TunnelServerUrl' => '信道服务器服务地址',
'TunnelSignatureKey' => '和信道服务器通信的签名密钥',
));
建立连接的时候,业务服务器 请求 信道服务器 https://ws.qcloud.com/get/wsurl
疑问1:信道服务器返回的值 其实是 数组。
TunnelService.php 第101行 进行了json_decode 操作。
疑问2:信道服务器返回的值中没有 signature。
如果要上传服务端的文件只能是通过微信开发者工具上传么
请问大神,MySQL 操作类,如何使用like和通配符进行模糊查询。
可直接修改为:
$skey = Util::getHttpHeader(Constants::WX_HEADER_SKEY);
你好,首先感谢提供了一套完整的集成腾讯云服务器的sdk
但请问能否提供一套不依赖腾讯云服务器的基本功能的sdk?
腾讯云默认的一站式解决方案购买的 PHP 业务服务器,默认并没有安装 MySQL 扩展。
对于现有的业务服务器,执行下面 4 行代码即可安装 MySQL 扩展。
wget 'https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi.repo' -O /etc/yum.repos.d/remi.repo
yum --enablerepo=remi-php56 -y update php
yum --enablerepo=remi-php56 -y install php-mysql
service php-fpm restart
新购买一站式解决方案的用户,镜像已经包含 MySQL 扩展,无需安装。
wafer从2020年10月开始好像逐步下线了,进行项目迁移的话,tunnelServer比较棘手,不知道是只能自己搭了,还是说这个服务有办法继续申请和使用
使用非代理方式请求session_key时获取到的openid是错误的,一直是7200。
跟踪发现https://api.weixin.qq.com/sns/jscode2session 这个api的返回内容并不是只有session_key和openid两个字段,还会包含expire_time,而AuthApi.php的第22行
`list($session_key, $openid) = array_values(self::getSessionKey($code));`
会把返回的expire_time赋值给$openid,所以就变成了7200。
请问一下,如果我想条件查询数据如查找30岁以下且为男性的人的信息改如果去写这个条件查询语句。
我尝试了DB::select("table",["*"],['age<"30"','sex="male"'],"and")但是不管用。
跟踪到tunnelAPI.php的sendRequest函数,后面涉及到信道服务器没办法继续了,根据错误日志可以看到该请求返回的 $body中的invalidateTunnelIds中就把有效信道当成无效的返回了。到腾讯云提交工单了,官方建议我不要再使用信道服务,这个东西已经处于无人维护的状态,不免心中愤慨,花了大把精力现在不敢用了。后面的避坑
更新前,登录返回数据如下:
"returnData": {
"id":"abc",
"skey":"abc",
"user_info":{
"openId":"abv","nickName":"abv","gender":1,"language":"zh_CN","city":"Shenzhen","province":"Guangdong","country":"China","avatarUrl":"abv",
"watermark":{"timestamp":1509190947,"appid":"abv"}},
"duration":7200},
"version":1,
"componentName":"MA"}
sdk更新后,登录返回数据如下:
"returnData":{
"user_info":{
"openId":"abv",
"nickName":"adds",
"gender":1,"language":
"zh_CN",
"city":"Shenzhen",
"province":"Guangdong","country":"China","avatarUrl":"add",
"watermark":{"timestamp":1509190947,"appid":"dddd"}}},
"version":1,
"componentName":"MA"}
没有返回id和skey了。。。客户端处理的时候,又没更新,一直提示:
var errorMessage = '登录请求没有包含会话响应,请确保服务器处理 ' + options.loginUrl + '
的时候正确使用了 SDK 输出登录结果';
返回给客户端的result为:
data:""
errMsg:"request:ok"
求解答
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.