We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6d3a57 commit edab888Copy full SHA for edab888
1 file changed
example/wxapp_api.py
@@ -3,7 +3,7 @@
3
from datetime import datetime
4
5
from weixin import WXAPPAPI
6
-from weixin.helper import smart_str
+from weixin.helper import smart_bytes
7
8
appid = environ.get("WXAPP_APPID", "appid")
9
secret = environ.get("WXAPP_SECRET", "secret")
@@ -29,11 +29,11 @@
29
},
30
"keyword2": {
31
# 备注
32
- "value": "请点击查看".encode("utf-8").decode("latin1")
+ "value": smart_bytes("请点击查看").decode("latin1")
33
34
"keyword3": {
35
# 状态
36
- "value": "图片已经生成".encode("utf-8").decode("latin1"),
+ "value": smart_bytes("图片已经生成").decode("latin1"),
37
"color": "#173177",
38
39
@@ -43,3 +43,4 @@
43
api = WXAPPAPI(access_token=token)
44
resp = api.send_template(json_body=json_body)
45
print(resp)
46
+
0 commit comments