-
wechat
2021-01-08 18:06:53<div><p>Your Wechat MatchZoo Group is full, and i can't join you, could you please take me in. My wechat number is : <em>hshrimp</em>. Thank you.</p><p>该提问来源于开源项目:NTMC-Community/... -
weChat
2019-04-27 00:19:00“跳一跳”游戏中黑色小人从一个方块跳到另一个方块上会获得1分, 如果跳到方块的中心点上会获得2分,连续跳到中心点会依次获得2分、4分、6分、8 分……。该函数传入一个列表,列表中用布尔值True或False表示是否跳...“跳一跳”游戏中黑色小人从一个方块跳到另一个方块上会获得1分,
如果跳到方块的中心点上会获得2分,连续跳到中心点会依次获得2分、4分、6分、8
分……。该函数传入一个列表,列表中用布尔值True或False表示是否跳到方块的中心点,函
数返回最后获得的分数def calc_score(jump_list): total = 0 center_nums = 0 for i in jump_list: if i: center_nums += 1 total += 2 * center_nums#如果跳到方块的中心点上会获得2分,连续跳到中心点会依次获得2分、4分、6分、8 else: total += 1#“跳一跳”游戏中黑色小人从一个方块跳到另一个方块上会获得1分 center_nums= 0 else: return total list1 = [True, False, False, True, True, True, False] list2 = [True, True, False, True, True, True, False] print(calc_score(list1)) # 结果是-->17 print(calc_score(list2)) # 结果是-->20"""
-
wechat.bat
2018-04-26 21:43:03wechat bat wechat bat wechat bat wechat bat wechat bat wechat bat wechat bat -
WeChat.exe
2020-12-29 16:40:34WeChat.exe -
WeChat Backend As a robot, I can take care of some simple works for you. Fetures Welcome new members Auto Replay as Code WebHook (GitHub) Docker Sample config.yaml: token: wechat-token git_url: ...
-
WeChatClient 基于JavaFX+CSS构建的Wechat APP客户端 wechat客户端,具体查看博客:https://blog.csdn.net/daydream13580130043/article/details/79171256 wechat服务端地址:...
-
wechat.css
2020-03-30 16:56:09wechat.css -
wechat源码
2015-10-08 16:08:27wechat源码 微信开发者可以参考 -
wechat4ujs微信wechatweb网页版微信机器人
2019-08-08 08:19:59wechat4u: 微信 wechat web 网页版接口的 JavaScript 实现,兼容Node和浏览器,微信机器人 -
WeChat support
2020-12-31 00:22:01<div><p>https://github.com/geeeeeeeeek/electronic-wechat</p>该提问来源于开源项目:bilelmoussaoui/Hardcode-Tray</p></div> -
wechat sdk
2020-12-02 01:56:44<div><p>it is possible to add wechat sdk in this plugin thank you</p><p>该提问来源于开源项目:EddyVerbruggen/SocialSharing-PhoneGap-Plugin</p></div> -
wechat.rar
2020-07-28 11:54:17wechat_devtools_1.04.2007092_x64, -
yii2easywechat应用于yii2的WeChatSDK
2019-08-07 14:16:50yii2-easy-wechat:应用于yii2的WeChatSDK -
golang 微信sdk (golang wechat - go-wechat) - 持续更新
2018-12-04 16:11:53https://github.com/MwlLj/go-wechat 安装: go get github.com/MwlLj/go-wechat 使用时只需要包含两个包 import ( "github.com/MwlLj/go-wechat" "github....源码地址:
https://github.com/MwlLj/go-wechat
安装:
go get github.com/MwlLj/go-wechat
使用时只需要包含两个包
import ( "github.com/MwlLj/go-wechat" "github.com/MwlLj/go-wechat/common" )
可以很简单的实现收发
package main import ( "fmt" "github.com/MwlLj/go-wechat" "github.com/MwlLj/go-wechat/common" ) var _ = fmt.Println func main() { info := common.CUserInfo{ AppId: "your appid", AppSecret: "your appsecret", Port: 80, Url: "/xxx", Token: "your token", } wc := wechat.New(&info) wc.RegisterMsgFunc(func(reply common.IReply, msg *common.CMessage, userData interface{}) error { reply.SendMessage(msg) return nil }, nil) wc.Loop() }
具体的接口 example:
https://github.com/MwlLj/go-wechat/tree/master/example/full
附(微信公众号测试帐号开发流程):
1. 进入 https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index
2. 填写基本信息
appID: 自动生成
appsecret: 自动生成
URL: 接收微信服务器的url, 如果不配置 nginx, 必须用 80 端口(直接 http://ip/xxx)
Token: 任意填写, 但是如果是正式版的公众号, 请写得复杂一些
3. 可以将上面的例子(记得将 AppId 等基本信息改成你自己的)放在远程服务器上, go run main.go
4. 点击测试帐号的 提交, 只有步骤3启动之后, 测试帐号的配置信息提交才会成功
last:
如果觉得写得好, 记得给⭐⭐⭐星星⭐⭐⭐哦
-
wechat.zip
2020-02-24 15:00:48采用python写的wechat客户端,可以登录防撤回功能。已经自动回复功能。还有拉色块采用python写的wechat客户端,可以登录防撤回功能。已经自动回复功能。还有拉色块 -
WeChat电脑微信多开
2020-10-18 02:56:15WeChat电脑微信多开-win WeChat电脑微信多开-win WeChat电脑微信多开-win -
easywechat
2020-08-09 14:37:26use EasyWeChat\Factory; class Wechat { /** * @var \EasyWeChat\OfficialAccount\Application */ public $app; /** * @var \Overtrue\Socialite\Providers\WeChatProvider */ public $oaut.<?php namespace App\Http\Classes; use EasyWeChat\Factory; class Wechat { /** * @var \EasyWeChat\OfficialAccount\Application */ public $app; /** * @var \Overtrue\Socialite\Providers\WeChatProvider */ public $oauth; /** * payment * @var Factory */ public $payment; public function __construct() { $this->app = Factory::officialAccount(config('config.easy_wechat')); $this->oauth = $this->app->oauth; $this->payment = Factory::payment(config('config.easy_wechat')); } /** * 获取用户信息 * @return $this|\Overtrue\Socialite\User */ public function userInfo() { // 获取 OAuth 授权结果用户信息 $user = $this->oauth->user(); return $user; } /** * 根据openid获取用户信息 * @param $openId * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string|mixed * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException */ public function getUser($openId) { if (!empty($this->app->user)) { return $this->app->user->get($openId); } return null; } /** * Name:发送模板消息 * * @@param string $wechat_openid 接收用户openid * @param string $templete_id 模板id * @param string $url 链接url * @param array $data 模板键值对数据 * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException */ public function templeteMsg($wechat_openid, $templete_id, $url, $data) { $res = $this->app->template_message->send([ 'touser' => $wechat_openid, 'template_id' => $templete_id, 'url' => $url, 'data' => $data ]); return $res; } /** * Name:jsapi支付 * * @param $data * @return array * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException */ public function jsApiPay($data) { $result = $this->payment->order->unify(array_merge([ 'spbill_create_ip' => request()->ip(), // 可选,如不传该参数,SDK 将会自动获取相应 IP 地址 'trade_type' => 'JSAPI', // 请对应换成你的支付方式对应的值类型 ], $data)); if (isset($result['return_code']) && $result['return_code'] == 'FAIL') { return ['status' => false, 'msg' => $result['return_msg'], 'data' => '']; } else { if ($result['result_code'] == 'FAIL') { return ['status' => false, 'msg' => $result['err_code_des'], 'data' => '']; } else { $arr = $this->getBridgeConfig($result['prepay_id']); return ['status' => true, 'msg' => 'success', 'data' => $arr]; } } } /** * 获取支付信息 * @param $prepayId * @return mixed */ public function getBridgeConfig($prepayId) { return $this->payment->jssdk->bridgeConfig($prepayId); } }
-
【第三方互联】十六、微信(wechat)授权第三方登录
2020-10-29 21:24:09第三方平台系列文章,今天终于又开始更新了,今天继续学习微信(wechat)授权第三方登录 一、准备工作 1、申请微信公众测试号 由于我们是个人开发者,我们需要去注册申请一个微信公众平台的测试号 ...第三方平台系列文章,今天终于又开始更新了,今天继续学习微信(wechat)授权第三方登录
一、准备工作
1、申请微信公众测试号
由于我们是个人开发者,我们需要去注册申请一个微信公众平台的测试号
https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login
我们使用微信扫码登录后,我们可以拿到 appID 和 appsecret2、关注公众测试号
3、配置回调域名
在“网页服务”中找到“网页账号”,修改“网页授权获取用户基本信息”接口的回调域名
注意:这里说的是,配置网页授权回调页面 域名,跟我们平常对接的第三方接口不一样,不用填写完整的回调地址,只是回调域名,回调地址在回调域名之下- 例如:
回调地址:http://www.baidu.com/wechat/back
那么这里:baidu.com
新手一般在这里容易弄混,配置完成,点击“确认”即可
二、开始开发
1、获取应用信息
我们将获取到的 appID 和 appsecret 写在配置文件中,我这里是 SpringBoot 项目,我就放在 application.yml 文件中
2、引入 maven 依赖
<!-- 网络请求 --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.6</version> </dependency> <!-- alibaba的fastjson --> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.51</version> </dependency>
这里我们需要用到网络请求,和 JSON 对象的转换,所以我引入了 httpclient 和 fastjson,其余依赖请自行引入
3、从配置文件中获取 “wechat” 配置信息
/** * 公众平台提供的 appid 和 appsecret */ @Value("${wechat.oauth.appid}") public String APPID; @Value("${wechat.oauth.appsecret}") public String APPKEY; @Value("${wechat.oauth.callback}") public String URL;
4、重定向到授权页面
/** * 请求授权页面 */ @RequestMapping("/auth") public String token(HttpSession session) throws Exception { // 用于第三方应用防止CSRF攻击 String uuid = UUID.randomUUID().toString().replaceAll("-", ""); session.setAttribute("state", uuid); // Step1:获取Authorization Code String url = "https://open.weixin.qq.com/connect/oauth2/authorize?" + "appid=" + APPID + "&redirect_uri=" + URLEncoder.encode(URL) + "&response_type=code" + "&scope=snsapi_userinfo" + "&state=" + uuid + "#wechat_redirect"; return PasswordUtils.redirectTo(url); }
- Step1 参数解释如下:
参数 是否必须 说明 appid 是 公众号的唯一标识 redirect_uri 是 授权后重定向的回调链接地址, 请使用 urlEncode 对链接进行处理 response_type 是 返回类型,请填写code scope 是 应用授权作用域,snsapi_base (不弹出授权页面,直接跳转,只能获取用户openid),snsapi_userinfo (弹出授权页面,可通过openid拿到昵称、性别、所在地。并且, 即使在未关注的情况下,只要用户授权,也能获取其信息 ) state 否 重定向后会带上state参数,开发者可以填写a-zA-Z0-9的参数值,最多128字节 #wechat_redirect 是 无论直接打开还是做页面302重定向时候,必须带此参数
这时,我们访问,便会出现授权页面5、授权回调
/** * 授权回调 */ @GetMapping(value = "/callback") public void callback(HttpServletRequest request) throws Exception { HttpSession session = request.getSession(); // 得到Authorization Code String code = request.getParameter("code"); // 我们放在地址中的状态码 String state = request.getParameter("state"); String uuid = (String) session.getAttribute("state"); // 验证信息我们发送的状态码 if (null != uuid) { // 状态码不正确,直接返回登录页面 if (!uuid.equals(state)) { return PasswordUtils.redirectTo("/login"); } } // Step2:通过Authorization Code获取Access Token String url = "https://api.weixin.qq.com/sns/oauth2/access_token?" + "appid=" + APPID + "&secret=" + APPKEY + "&code=" + code + "&grant_type=authorization_code"; JSONObject resJson = HttpRequestUtils.httpRequestGet(url); if (null == resJson) { return PasswordUtils.redirectTo("/login"); } String accessToken = resJson.getString("access_token"); String openId = resJson.getString("openid"); if (StringUtils.isBlank(accessToken) || StringUtils.isBlank(openId)) { return PasswordUtils.redirectTo("/login"); } url = "https://api.weixin.qq.com/sns/userinfo?" + "access_token=" + accessToken + "&openid=" + openId + "&lang=zh_CN"; // Step3: 获取微信用户信息 resJson = HttpRequestUtils.httpRequestGet(url); /** * TODO 这时就该写自己的业务逻辑了 */ }
- Step2 参数解释如下:
参数 是否必须 说明 appid 是 公众号的唯一标识 secret 是 公众号的appsecret code 是 填写第一步获取的code参数 grant_type 是 填写为authorization_code - Step3 参数解释如下:
参数 是否必须 说明 access_token 是 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同 openid 是 用户的唯一标识 lang 是 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语 6、网络请求方法
Step 2 和 Step 3 均为 GET 请求方式
/** * GET 请求 */ public static JSONObject httpRequestGet(String url) throws IOException { CloseableHttpClient client = HttpClients.createDefault(); HttpGet httpGet = new HttpGet(url); HttpResponse response = client.execute(httpGet); HttpEntity entity = response.getEntity(); if (entity != null) { String result = EntityUtils.toString(entity, "UTF-8"); return JSONObject.parseObject(result); } httpGet.releaseConnection(); return null; }
三、文档资料
关于微信授权登录的文档地址如下:
https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html
四、总结
该授权认证过程符合 OAuth2 认证基本流程,对于应用而言,其流程由获取Authorization Code和通过Authorization Code获取Access Token这2步组成,如图所示:
如您在阅读中发现不足,欢迎留言!!!
- 例如:
-
co-wechat-api, Wechat API支持异步功能.zip
2019-09-18 03:57:47co-wechat-api, Wechat API支持异步功能 Wechat ( ES6版) 详细参见API文档企业版本请前往:https://github.com/node-webot/wechat-enterprise安 -
Wechat Official Accounts 我的微信公众号
-
laravel-wechat 微信 SDK for Laravel / Lumen, 基于 overtrue/wechat 交流QQ群:319502940 框架要求 overtrue/laravel-wechat:^5.1 -> Laravel/Lumen >= 5.1 overtrue/laravel-wechat:^6.0 -> ...
-
本镜像基于深度操作系统 准备工作 允许所有用户访问X11服务,运行命令: xhost + 查看系统audio gid cat /etc/group | grep audio fedora 26 结果: audio:x:63: ...进入docker容器:docker exec -it ... bestwu/wechat
-
WeChat多开.zip
2020-06-05 16:11:21WeChat多开.zip -
imliubo/Wechat_MQTT_ESP8266_BaiduIoT - 微信智能小管家 (使用微信小程序控制你的硬件设备) yuzexia/iw3cplus - 前端社区www.w3cplus.com的微信小程序 RAOE/show-videos - 秀视频(微信小程序短视频社交软件,...
-
WeChat小程序事件
2017-11-14 23:37:44WeChat小程序事件WeChat小程序事件WeChat小程序事件WeChat小程序事件 -
we-WeChat:we-weChat是为Web设计的聊天应用程序-源码
2021-03-02 10:51:58we-WeChat:we-weChat是为Web设计的聊天应用程序
-
产品经理的核心四问
-
使用 Linux 平台充当 Router 路由器
-
2021年 系统架构设计师 系列课
-
Microsoft Outlook更新以后——助你效率升级
-
自动化测试Python3+Selenium3+Unittest
-
MySQL Router 实现高可用、负载均衡、读写分离
-
MaxScale 实现 MySQL 读写分离与负载均衡
-
MySQL 主从复制 Replication 详解(Linux 和 W
-
用微服务spring cloud架构打造物联网云平台
-
2021年低压电工考试报名及低压电工复审考试
-
古董电脑室:2019日记簿(三)
-
通过带有聚合松弛掩码的分层双线性池进行的细粒度分类
-
画图软件 draw.io
-
牛牛量化策略交易
-
Leetcode 21. 合并两个有序链表
-
elementui + Vue-Quill-Editor 富文本编辑器(行高、调整图片大小)
-
持续交付模式
-
零基础极简以太坊智能合约开发环境搭建并开发部署
-
MySQL 存储过程(创建海量数据实验环境)
-
给开发人员的时间管理建议