def getOpenId(code): constant = BaseConstant() url = api_openid % (constant.getAppId(), constant.getAppSecret(), code) jsonStr = httpUtil.get(url) resultDic = json.loads(jsonStr) logging.warn(json.dumps(resultDic, ensure_ascii=False)) return resultDic
def getAccessToken(): constant = BaseConstant() url = api_access_token % (constant.getAppId(), constant.getAppSecret()) jsonStr = httpUtil.get(url) resultDic = json.loads(jsonStr) logging.warn(json.dumps(resultDic, ensure_ascii=False)) return resultDic
def getJsapiTicket(accessToken): url = api_jsapi_ticket % (accessToken) jsonStr = httpUtil.get(url) resultDic = json.loads(jsonStr) logging.warn(json.dumps(resultDic, ensure_ascii=False)) return resultDic
def deleteMenu(): url = api_menu_delete % (accessToken) jsonStr = httpUtil.get(url) resultDic = json.loads(jsonStr) logging.warn(json.dumps(resultDic, ensure_ascii=False)) return resultDic
def getCallbackIp(): url = api_callback_ip % (accessToken) jsonStr = httpUtil.get(url) resultDic = json.loads(jsonStr) logging.warn(json.dumps(resultDic, ensure_ascii=False)) return resultDic