wushaodong 3 år sedan
förälder
incheckning
32d4aa0025

+ 1 - 1
apps/WeChatResponse.py

@@ -25,7 +25,7 @@ WEIXIN_UNIFIED_ORDER_URL = 'https://api.mch.weixin.qq.com/pay/unifiedorder'
 WEIXIN_QUERY_ORDER_URL = 'https://api.mch.weixin.qq.com/pay/orderquery'
 
 # 微信支付回调API
-WEIXIN_CALLBACK_API = 'https://lsr.zzly.vip/api/wechat_notify/'
+WEIXIN_CALLBACK_API = '{}/api/wechat_notify/'.format(settings.SERVER_DOMAIN)
 
 # pc端支付
 class WeChatResponse():

+ 1 - 1
apps/WechatApplet/models.py

@@ -228,7 +228,7 @@ class WechatApplet(models.Model):
         self.save()
 
     def setDomain(self):
-        requestdomain = uploaddomain = downloaddomain = ['https://lsr.zzly.vip', ]
+        requestdomain = uploaddomain = downloaddomain = [settings.SERVER_DOMAIN, ]
         wsrequestdomain = []
         WeChat.modify_domain(self.getAccessToken2(), 'set', requestdomain, wsrequestdomain, uploaddomain, downloaddomain)
 

+ 2 - 2
apps/WechatTp/models.py

@@ -3,7 +3,7 @@
 import time
 from django.db import models
 from django.utils import timezone
-
+from django.conf import settings
 from utils.exceptions import CustomError
 
 from utils.wx.wechat import WeChat
@@ -76,7 +76,7 @@ class WechatTp(models.Model):
 
     def getAuthUrl(self, agent_id):
         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
 
     def getTemplateList(self):

+ 0 - 2
uis/views/commodity/edit.html

@@ -148,9 +148,7 @@
                                         }
                                     }
                                 }
-                                break
                             }
-                            break
                         }
                     }
                 }

+ 1 - 1
utils/wechatpay.py

@@ -21,7 +21,7 @@ WEIXIN_UNIFIED_ORDER_URL = 'https://api.mch.weixin.qq.com/pay/unifiedorder'
 # 微信查询订单URL
 WEIXIN_QUERY_ORDER_URL = 'https://api.mch.weixin.qq.com/pay/orderquery'
 # 微信支付回调API
-WEIXIN_CALLBACK_API = 'https://lsr.zzly.vip/api/wechat_notify/'
+WEIXIN_CALLBACK_API = '{}/api/wechat_notify/'.format(settings.SERVER_DOMAIN)
 
 class WechatPay():