def dingding_pulling(self, **args): template = env.get_template("apps.html") corpid, corpsecret, agent_id, token_dict = request.env['ding.ding'].sudo().get_ding_common_message() ding_obj = Dingtalk(corpid=corpid, corpsecret=corpsecret, agent_id=agent_id, token=token_dict) signature, timestamp, nonceStr = ding_obj.get_js_api_params(str(request.httprequest.base_url), '1234') return template.render({ 'corpId': corpid, 'timeStamp': timestamp, 'agentId': agent_id, 'nonceStr': nonceStr, 'accessToken': token_dict.get("access_token"), 'title': u'钉钉测试', 'signature': signature, })
def getdingdingconfig(self, **args): corpid, corpsecret, agent_id, token_dict = request.env['ding.ding'].sudo().get_ding_common_message() ding_obj = Dingtalk(corpid=corpid, corpsecret=corpsecret, agent_id=agent_id, token=token_dict) signature, timestamp, nonceStr = ding_obj.get_js_api_params(str(request.httprequest.base_url), '1234') return { 'corpId': corpid, 'timeStamp': timestamp, 'agentId': agent_id, 'nonceStr': nonceStr, 'accessToken': token_dict.get("access_token"), 'title': u'钉钉测试', 'signature': signature, # 'jsApiList': jsApiList }