Commit 138553b7 authored by 钟尚武's avatar 钟尚武

Merge branch 'test' into 'master'

Like 2.5 上线

See merge request alpha/sun!363
parents e04dff75 f3ff85be
......@@ -31,10 +31,23 @@ class SurveyView(APIView):
"template_id": int(request.POST.get('template_id', 0)),
}
self.rpc['venus/sun/survey/add'](data=data).unwrap()
data = self.rpc['venus/sun/survey/add'](data=data).unwrap()
return {
"status": 1
return data
class SurveyAddAnswerView(APIView):
def post(self, request):
data = {
"answers": json.loads(request.POST.get('answers')),
"template_id": request.POST.get('template_id'),
"question_order": request.POST.get('question_order'),
}
self.rpc['venus/sun/survey/answers_add'](data=data).unwrap()
return {
"status": 1
}
......@@ -38,6 +38,7 @@ class TopicListView(APIView):
if user_type:
if int(user_type) == USER_EXTRA_TYPE.COMMON:
filters["is_shadow"] = 0
filters["is_edit"] = 0
elif int(user_type) == USER_EXTRA_TYPE.SHADOW:
filters["is_shadow"] = 1
elif int(user_type) == USER_EXTRA_TYPE.KOL:
......
......@@ -252,6 +252,7 @@ urlpatterns = [
url(r'^survey_question/create$', SurveyView.as_view()),
url(r'^survey_question/get$', SurveyView.as_view()),
url(r'^survey_question/list$', SurveyListView.as_view()),
url(r'^survey_question/add_answer$', SurveyAddAnswerView.as_view()),
]
search_urlpatterns = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment