国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術(shù)文章
文章詳情頁

python - 已關(guān)注粉絲再次掃描微信帶參數(shù)二維碼報錯

瀏覽:161日期:2022-09-12 14:38:51

問題描述

已關(guān)注粉絲再次掃描微信帶參數(shù)二維碼報錯。未關(guān)注粉絲掃描二維碼時,正常。第二次掃描時,提示“無法服務(wù)”

查后臺nginx日志 兩種場景均返回的為空,CODE 為200

@app.route('/',methods=['POST','GET','PUT'])def index(): if(request.method=='GET'): #驗證微信signature=request.args.get(’signature’, None)timestamp=request.args.get(’timestamp’,None)nonce=request.args.get(’nonce’,None)echostr=request.args.get(’echostr’,'hello')# logging.info(echostr)return echostr if(request.method=='POST'):soup=BeautifulSoup(request.data,'xml')logging.info('POST請求n'+str(soup))MsgType=soup.MsgType.stringif(MsgType==’event’): if(soup.Event.string=='SCAN' or soup.Event.string=='subscribe' ):key=soup.EventKey.stringopenid=soup.FromUserName.stringlogging.info('EventKey'+str(key))# 商店管理員掃描if(key.startswith('ownerid')): key=key.split('ownerid')[1] data={'openid':str(openid)} res=requests.put('http://www.example.com/owner/'+key+'/',json=data) return ’’# 商店顧客掃描if(key.startswith('qrscene_')): key=key.split('qrscene_')[1]data={'shopid':key}res=requests.put('http://www.example.com/customer/'+openid+'/',json=data)logging.info(str(res.json()))return '' # WX.notify(soup.FromUserName.string)return '' return ''

問題解答

回答1:

你好,請問這個問題你解決了嗎?是怎么解決的呢?我現(xiàn)在也遇到了這個問題,不知道怎么辦呢,求助

標(biāo)簽: 微信 Python
相關(guān)文章:
主站蜘蛛池模板: 溧水县| 葵青区| 明溪县| 斗六市| 静海县| 聂荣县| 汤阴县| 浮山县| 大足县| 特克斯县| 夏津县| 阿尔山市| 集安市| 阳新县| 孝义市| 平安县| 南华县| 长丰县| 保定市| 石门县| 额尔古纳市| 铜川市| 宜黄县| 读书| 嘉祥县| 江永县| 醴陵市| 全州县| 左贡县| 大姚县| 增城市| 自贡市| 庆阳市| 宜君县| 红桥区| 罗定市| 巴林左旗| 诸城市| 京山县| 隆化县| 德惠市|