Exemple #1
0
def wxLogout(request):
    if request.method == 'GET':
        code = request.GET.get('code','')
        result,url = weixin_user_url_preHandle(code,GlobalVar.OpenType.wxRelease )
        if result:
            return HttpResponseRedirect(url)
        else:
            return JsonResponse(GlobalVar.RspFail,url)
    else:
        return JsonResponse(GlobalVar.RspSuccess,'OK')         
Exemple #2
0
def wxMyInfo(request):
    #debug('wiews_weixin.py->wxMyInfor:enter the wxMyinfo')
    if request.method == 'GET':
        code = request.GET.get('code','')
        result,url = weixin_user_url_preHandle(code,GlobalVar.OpenType.Messsage)
        
        debug('wiews_weixin.py->wxMyInfo->result,url:',result,url)

        if result:
            return HttpResponseRedirect(url)
        else:
            return JsonResponse(GlobalVar.RspFail,url)  
    else:
        return JsonResponse(GlobalVar.RspSuccess,'OK')