|
@@ -3,7 +3,7 @@
|
|
import time
|
|
import time
|
|
from django.db import models
|
|
from django.db import models
|
|
from django.utils import timezone
|
|
from django.utils import timezone
|
|
-
|
|
|
|
|
|
+from django.conf import settings
|
|
from utils.exceptions import CustomError
|
|
from utils.exceptions import CustomError
|
|
|
|
|
|
from utils.wx.wechat import WeChat
|
|
from utils.wx.wechat import WeChat
|
|
@@ -76,7 +76,7 @@ class WechatTp(models.Model):
|
|
|
|
|
|
def getAuthUrl(self, agent_id):
|
|
def getAuthUrl(self, agent_id):
|
|
url = 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=' + self.getAppid() + '&pre_auth_code=' + self.getPreAuthCode()
|
|
url = 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=' + self.getAppid() + '&pre_auth_code=' + self.getPreAuthCode()
|
|
- url += '&redirect_uri=https://lsr.zzly.vip/api/redirect_authorize/' + agent_id + '/&auth_type=2'
|
|
|
|
|
|
+ url += '&redirect_uri={}/api/redirect_authorize/' + agent_id + '/&auth_type=2'.format(settings.SERVER_DOMAIN)
|
|
return url
|
|
return url
|
|
|
|
|
|
def getTemplateList(self):
|
|
def getTemplateList(self):
|