def response_msg(msg): resp = BaseResponse(msg) if msg["Content"].strip().startswith("#"): msg_data = {"openid": msg["FromUserName"], "msg": msg["Content"]} requests.post(settings.COMPANY_URL["customer"]["POST_TO_ADMIN"], data=msg_data) context = {"Content": "客服消息已经发送,请稍后"} context = {"Content": "如果在消息前面加上#,那么我就可以回复客服消息"} return resp.get_response(context)
def response_msg(msg): resp = BaseResponse(msg) if msg['Content'].strip().startswith('#'): msg_data = {'openid': msg['FromUserName'], 'msg': msg['Content']} requests.post(settings.COMPANY_URL['customer']['POST_TO_ADMIN'], data=msg_data) context = {'Content': '客服消息已经发送,请稍后'} context = {'Content': '如果在消息前面加上#,那么我就可以回复客服消息'} return resp.get_response(context)
def contact(msg): resp = BaseResponse(msg, "contact.xml") return resp.get_response()
def about(msg): resp = BaseResponse(msg, "about.xml") return resp.get_response()