wushaodong 3 gadi atpakaļ
vecāks
revīzija
352d06f18f

+ 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://print.zzliaoyuan.com/api/wechat_notify/'
+WEIXIN_CALLBACK_API = 'https://finance.nostone.cn/api/wechat_notify/'
 
 # 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://print.zzliaoyuan.com', ]
+        requestdomain = uploaddomain = downloaddomain = ['https://finance.nostone.cn', ]
         wsrequestdomain = []
         WeChat.modify_domain(self.getAccessToken2(), 'set', requestdomain, wsrequestdomain, uploaddomain, downloaddomain)
 

+ 1 - 1
apps/WechatTp/models.py

@@ -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://print.zzliaoyuan.com/api/redirect_authorize/' + agent_id + '/&auth_type=2'
+        url += '&redirect_uri=https://finance.nostone.cn/api/redirect_authorize/' + agent_id + '/&auth_type=2'
         return url
 
     def getTemplateList(self):

+ 1 - 1
apps/order/urls.py

@@ -7,7 +7,7 @@ from .views import *
 urlpatterns = [
     url(r'^deleteProductImage/$', DeleteProductImageView.as_view()),
     url(r'productDict/$', ProductView.as_view()),
-    url(r'productList/$', ProductListView.as_view()),
+    url(r'productList/$', ProductListView.as_view()), # 小程序首页,获取产品列表
     url(r'list/$', OrderListView.as_view()),
 ]
 

+ 1 - 0
apps/order/views.py

@@ -20,6 +20,7 @@ from utils.format import strftime
 
 
 class ProductView(APIView):
+    permission_classes = [isLogin, ]
 
     def get(self, request):
         data = []

+ 1 - 1
apps/upload/models.py

@@ -21,7 +21,7 @@ class UploadManager(models.Manager):
             img = Image.open(fullname)
             width, height = img.size
             #上传产品图片, 缩略图压缩宽或高最大200
-            if width > 1440 and path == 'commodity_image':
+            if width > 1440 and path == 'product_image/':
                 img = img.resize((1440, int((height / width) * 1440)), Image.ANTIALIAS)
                 img.save(fullname)
                 width, height = img.size

+ 12 - 11
nostone_loan/settings.py

@@ -115,16 +115,17 @@ WSGI_APPLICATION = 'nostone_loan.wsgi.application'
 # Database
 # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
 
-DATABASES = {
-    'default': {
-        'ENGINE': 'django.db.backends.mysql',
-        'NAME': 'noston_loan',
-        'USER': 'carwin',
-        'PASSWORD': 'carwin!@#',
-        'HOST': '39.106.109.89',
-        'PORT': 3306,
-    },
-}
+# DATABASES = {
+#     'default': {
+#         'ENGINE': 'django.db.backends.mysql',
+#         'NAME': 'nostone_loan',
+#         'USER': 'root',
+#         'PASSWORD': 'nostone@20211224',
+#         'HOST': '47.104.66.103',
+#         'PORT': 3306,
+#     },
+# }
+
 # 配置缓存为redis
 # windowns 系统,需要安装Redis-x64-3.0.503.msi,并启动服务。
 # CACHES = {
@@ -215,7 +216,7 @@ UIS_ROOT = os.path.join(BASE_DIR, "uis/")
 EXPORT_URL = '/export/'
 EXPORT_ROOT = os.path.join(BASE_DIR, "export/")
 
-SERVER_DOMAIN = 'https://print.zzliaoyuan.com'
+SERVER_DOMAIN = 'https://finance.nostone.cn'
 # SERVER_DOMAIN = 'http://192.168.2.45:8887'
 
 JWT_AUTH = {

+ 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://print.zzliaoyuan.com/api/wechat_notify/'
+WEIXIN_CALLBACK_API = 'https://finance.nostone.cn/api/wechat_notify/'
 
 class WechatPay():