From 284100841d9a0ebff73e9d249a5147ddde662efe Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 24 Mar 2020 11:35:27 +0800 Subject: [PATCH] remove collect --- test_mini/app.js | 4 ++-- test_mini/app.json | 2 +- test_server/crm/views.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test_mini/app.js b/test_mini/app.js index 44c7e1f..d08d795 100644 --- a/test_mini/app.js +++ b/test_mini/app.js @@ -48,9 +48,9 @@ App({ globalData: { userInfo: null, userinfo: null, // 服务器传回的消费者信息 - host: 'https://apitest.ctcshe.com/api/', + // host: 'https://apitest.ctcshe.com/', mediahost: 'https://apitest.ctcshe.com/', - // host: 'http://127.0.0.1:8000/api/', + host: 'http://127.0.0.1:8000/', // mediahost: 'http://127.0.0.1:8000/', token : '', subject:null, diff --git a/test_mini/app.json b/test_mini/app.json index e12ef94..4794618 100644 --- a/test_mini/app.json +++ b/test_mini/app.json @@ -22,7 +22,7 @@ "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "刷题", + "navigationBarTitleText": "中科辐射学堂", "navigationBarTextStyle": "black" }, "tabBar": { diff --git a/test_server/crm/views.py b/test_server/crm/views.py index 4f6c5da..9d98f03 100644 --- a/test_server/crm/views.py +++ b/test_server/crm/views.py @@ -132,7 +132,7 @@ class ConsumerViewSet(ModelViewSet): else: return Response({'error':result['data']}) - @action(methods=['post','delete', 'get'], detail=False, permission_classes=[], authentication_classes=[ConsumerTokenAuthentication], + @action(methods=['post','delete','get'], detail=False, permission_classes=[], authentication_classes=[ConsumerTokenAuthentication], url_path='collects', url_name='create_collects') def collects(self, request): ''' @@ -150,7 +150,7 @@ class ConsumerViewSet(ModelViewSet): queryset = request.user.collects.all().order_by('-update_time') serializer = QuestionSerializer(instance=queryset,many=True) return Response(serializer.data) - else: + elif request.method == 'DELETE': questionId = request.data.get('question',None) if questionId: request.user.collects.remove(questionId)