def getUserQrcode(): if Params.IS_ADD_FIREND: wechat = WeChat() media_id = wechat.uploadMediaTmp(Params.ADMIN_QRCODE, 'image')['media_id'] return ('image', media_id) else: con = "未认证的公众号,无法使用该接口" return con
def getIndustryTemplateId(request): param = {"template_id_short": "TM00015"} wechat = WeChat() msg = wechat.getIndustryTemplateId(param) return HttpResponse(msg)
def getIndustry(request): wechat = WeChat() msg = wechat.getIndustry() return HttpResponse(msg)
def setTemplate(request): param = Params.INDUSTRY_ID wechat = WeChat() msg = wechat.setTemplate(param) return HttpResponse(msg)
def subscribe(request): wechat = WeChat() msg = wechat.subscribe() return HttpResponse(msg)
def deleteTable(request): wechat = WeChat() msg = wechat.deleteTable() return HttpResponse(msg)
def createTable(request): param = Params.MENU wechat = WeChat() msg = wechat.createTable(param) return HttpResponse(msg)