From 982573f9d0ddc7bffc0cdb9ce4d7d13b265d9cb1 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 14 Aug 2020 14:49:35 +0800 Subject: [PATCH] lianxi process --- test_client/src/views/crm/consumer.vue | 2 +- test_mini/app.js | 4 ++-- test_mini/app.json | 2 +- test_mini/pages/lianxi/main.js | 7 ++++++- test_mini/pages/material/video.js | 18 +++++++++++++++++- test_mini/pages/material/video.wxml | 15 ++++++++++++--- test_mini/pages/material/video.wxss | 7 ++++--- test_server/crm/views.py | 11 +++++++++++ test_server/question/views.py | 6 ++++++ 9 files changed, 60 insertions(+), 12 deletions(-) diff --git a/test_client/src/views/crm/consumer.vue b/test_client/src/views/crm/consumer.vue index 13f2caf..e546fc9 100644 --- a/test_client/src/views/crm/consumer.vue +++ b/test_client/src/views/crm/consumer.vue @@ -352,7 +352,7 @@ export default { rule1: { name: [{ required: true, message: "请输入姓名", trigger: "blur" }], username: [ - { required: true, message: "请输入手机号", trigger: "change", pattern: /^1[34578]\d{9}$/, } + { required: true, message: "请输入手机号", trigger: "change", pattern: /^1[345789]\d{9}$/, } ], role: [ { required: true, message: "请选择", trigger: "change" } diff --git a/test_mini/app.js b/test_mini/app.js index ad0d1c5..a7c9ddb 100644 --- a/test_mini/app.js +++ b/test_mini/app.js @@ -68,9 +68,9 @@ App({ globalData: { userInfo: {}, userinfo: {}, // 服务器传回的消费者信息 - //host: 'https://apitest.ahctc.cn', + host: 'https://apitest.ahctc.cn', mediahost: 'https://apitest.ahctc.cn', - host: 'http://127.0.0.1:8000', + //host: 'http://127.0.0.1:8000', //mediahost: 'http://127.0.0.1:8000', token : '', } diff --git a/test_mini/app.json b/test_mini/app.json index 76b614b..f351863 100644 --- a/test_mini/app.json +++ b/test_mini/app.json @@ -84,7 +84,7 @@ }, "plugins": { "tencentvideo": { - "version": "1.3.3", + "version": "1.3.15", "provider": "wxa75efa648b60994b" } }, diff --git a/test_mini/pages/lianxi/main.js b/test_mini/pages/lianxi/main.js index 200a5b9..71e1b16 100644 --- a/test_mini/pages/lianxi/main.js +++ b/test_mini/pages/lianxi/main.js @@ -33,6 +33,10 @@ Page({ that.data.ydtms.push(that.data.tm_current.id) } }, + changeProcess: function(e){ + let data = {'questioncat':this.questioncat, 'ydtms':this.ydtms} + + }, /** * 生命周期函数--监听页面加载 */ @@ -66,7 +70,8 @@ Page({ var that = this var query = { questioncat: that.data.questioncat, - ydtms: wx.getStorageSync('cat' + that.data.questioncat.toString()) + ydtms: wx.getStorageSync('cat' + that.data.questioncat.toString()), + ydtms_:that.data.ydtms } api.request('/question/question/exercise/?limit=10&page='+that.data.page, 'POST', query).then(res => { if(res.code>=200){ diff --git a/test_mini/pages/material/video.js b/test_mini/pages/material/video.js index 04f5d8d..4acc33b 100644 --- a/test_mini/pages/material/video.js +++ b/test_mini/pages/material/video.js @@ -37,6 +37,9 @@ Page({ getList: function () { var that = this api.request('/cms/material/', 'GET', that.data.query).then(res => { + for(var i=0;i - {{item.name}} + playerid="txv1" + bindplay="play" + bindpause="pause" + bindended="pause" + data-index = "{{index}}" + > + + {{item.name}} + -{{item.name}} + +{{item.name}} + \ No newline at end of file diff --git a/test_mini/pages/material/video.wxss b/test_mini/pages/material/video.wxss index aa8fa32..f4aae0e 100644 --- a/test_mini/pages/material/video.wxss +++ b/test_mini/pages/material/video.wxss @@ -4,10 +4,11 @@ text-align: center; } .txv-video-slot{ - width: 80px; + width: 100%; height: 40px; line-height: 40px; font-size: 16px; - color: #fff; - margin: 10px; + color:white; + background-color: black; + opacity:0.3; } \ No newline at end of file diff --git a/test_server/crm/views.py b/test_server/crm/views.py index 6fadb3d..100d8b4 100644 --- a/test_server/crm/views.py +++ b/test_server/crm/views.py @@ -230,6 +230,17 @@ class ConsumerViewSet(ModelViewSet): request.user.save() return Response(status=status.HTTP_200_OK) + # @action(methods=['put'], detail=False, + # url_path='process', url_name='exercise_processcat', perms_map=[{'*':'*'}]) + # def processcat(self, request): + # ''' + # 练习进度单类别修改 + # ''' + # if hasattr(request.user, 'process'): + # request.user.process = request.data['process'] + # request.user.save() + # return Response(status=status.HTTP_200_OK) + @action(methods=['post'], detail=False, url_path='realinfo', url_name='get_realinfo', perms_map=[{'*':'*'}]) def realinfo(self, request): diff --git a/test_server/question/views.py b/test_server/question/views.py index 132006e..99b138d 100644 --- a/test_server/question/views.py +++ b/test_server/question/views.py @@ -241,6 +241,12 @@ class ExerciseView(APIView): queryset = Question.objects.filter(is_delete=0,questioncat=questioncat).order_by('type','name') if 'ydtms' in request.data and request.data['ydtms']: queryset = queryset.exclude(id__in = request.data['ydtms']) + if 'ydtms_' in request.data and request.data['ydtms_']: + consumer = request.user + process = consumer.process + process['cat'+str(questioncat)] = request.data['ydtms_'] + consumer.process = process + consumer.save() count = queryset.count() pg = CommonPagination() p = pg.paginate_queryset(queryset=queryset,request=request,view=self)