From 3c49d1b729d8b952df1f75d11cc305789c994998 Mon Sep 17 00:00:00 2001
From: caoqianming
Date: Mon, 14 Sep 2020 15:42:29 +0800
Subject: [PATCH] sub sup
---
test_client/src/components/Tinymce/index2.vue | 244 ++++++++++++++++++
test_client/src/views/question/question.vue | 5 +-
.../src/views/question/questioncreate.vue | 20 +-
.../src/views/question/questionupdate.vue | 79 +++---
test_mini/pages/collect/main.js | 6 +-
test_mini/pages/collect/main.json | 4 +-
test_mini/pages/collect/main.wxml | 10 +-
test_mini/pages/lianxi/main.js | 3 +-
test_mini/pages/lianxi/main.json | 4 +-
test_mini/pages/lianxi/main.wxml | 12 +-
test_mini/pages/main/main.js | 2 +-
test_mini/pages/material/video.js | 3 +
test_mini/pages/material/video.wxml | 1 +
test_mini/pages/test/test.js | 3 +-
test_mini/pages/test/test.json | 4 +-
test_mini/pages/test/test.wxml | 10 +-
test_mini/project.config.json | 126 ++++-----
test_server/qtest/views.py | 3 +-
test_server/question/views.py | 2 +-
19 files changed, 410 insertions(+), 131 deletions(-)
create mode 100644 test_client/src/components/Tinymce/index2.vue
diff --git a/test_client/src/components/Tinymce/index2.vue b/test_client/src/components/Tinymce/index2.vue
new file mode 100644
index 0000000..733b20c
--- /dev/null
+++ b/test_client/src/components/Tinymce/index2.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
diff --git a/test_client/src/views/question/question.vue b/test_client/src/views/question/question.vue
index 3f0c099..0977916 100644
--- a/test_client/src/views/question/question.vue
+++ b/test_client/src/views/question/question.vue
@@ -134,10 +134,11 @@
:visible.sync="dialogVisible"
width="30%">
{{question.type}}
- {{question.name}}
+
-
- {{ key }}:{{value}}
+ {{ key }}:
+
正确答案{{question.right}}
diff --git a/test_client/src/views/question/questioncreate.vue b/test_client/src/views/question/questioncreate.vue
index 75f38a5..e431204 100644
--- a/test_client/src/views/question/questioncreate.vue
+++ b/test_client/src/views/question/questioncreate.vue
@@ -30,7 +30,7 @@
>
-
+
删除
-
+
-
+
-
+
-
+
-
+
-
+
@@ -104,11 +104,13 @@
\ No newline at end of file
diff --git a/test_mini/pages/collect/main.js b/test_mini/pages/collect/main.js
index b2fd714..d9feca2 100644
--- a/test_mini/pages/collect/main.js
+++ b/test_mini/pages/collect/main.js
@@ -11,7 +11,8 @@ Page({
tm_index: 0,
is_right: false,
answerP: false,
- tmtotal: 0
+ tmtotal: 0,
+ domain:getApp().globalData.mediahost,
},
radioChange: function (e) {
var that = this
@@ -176,7 +177,7 @@ Page({
for (let key in tm_current.options) {
let option = {}
option.key = key
- option.value = key + ':' + tm_current.options[key]
+ option.value = tm_current.options[key].toString()
if (tm_current.user_answer) {
if (key == tm_current.user_answer || tm_current.user_answer.indexOf(key) != -1) {
option.checked = true
@@ -186,6 +187,7 @@ Page({
}
options.push(option)
}
+ console.log(options)
this.setData({
options: options
})
diff --git a/test_mini/pages/collect/main.json b/test_mini/pages/collect/main.json
index 78d7ca7..2c3a563 100644
--- a/test_mini/pages/collect/main.json
+++ b/test_mini/pages/collect/main.json
@@ -1,4 +1,6 @@
{
- "usingComponents": {},
+ "usingComponents": {
+ "parser": "/components/parser/parser"
+ },
"navigationBarTitleText": "收藏集"
}
\ No newline at end of file
diff --git a/test_mini/pages/collect/main.wxml b/test_mini/pages/collect/main.wxml
index 2ecbde4..7523ccc 100644
--- a/test_mini/pages/collect/main.wxml
+++ b/test_mini/pages/collect/main.wxml
@@ -7,14 +7,17 @@
{{tm_current.type}}
{{tm_current.questioncat_name}}
- {{tm_current.name}}
+
+
+
','').substring(0,18)+'...'
res.data.results[i].value = res.data.results[i].id
}
resolve(res.data.results)
diff --git a/test_mini/pages/material/video.js b/test_mini/pages/material/video.js
index 4acc33b..20dd5d4 100644
--- a/test_mini/pages/material/video.js
+++ b/test_mini/pages/material/video.js
@@ -106,6 +106,9 @@ Page({
this.setData({
results:this.data.results
})
+ api.request('/cms/material/'+e.currentTarget.dataset.id+'/down/', 'GET').then(res=>{
+
+ }).catch(e=>{})
},
pause:function(e){
let index = e.currentTarget.dataset.index
diff --git a/test_mini/pages/material/video.wxml b/test_mini/pages/material/video.wxml
index c6b5319..e6699bd 100644
--- a/test_mini/pages/material/video.wxml
+++ b/test_mini/pages/material/video.wxml
@@ -8,6 +8,7 @@
bindpause="pause"
bindended="pause"
data-index = "{{index}}"
+ data-id="{{item.id}}"
>
{{item.name}}
diff --git a/test_mini/pages/test/test.js b/test_mini/pages/test/test.js
index c2fc62d..c223adc 100644
--- a/test_mini/pages/test/test.js
+++ b/test_mini/pages/test/test.js
@@ -10,6 +10,7 @@ Page({
tms:[],
tm_index: 0,
ctms:[],
+ domain:getApp().globalData.mediahost,
},
radioChange: function (e) {
var that = this
@@ -181,7 +182,7 @@ Page({
for (let key in tm_current.options) {
let option = {}
option.key = key
- option.value = key + ':' + tm_current.options[key]
+ option.value = tm_current.options[key].toString()
if (tm_current.user_answer) {
if (key == tm_current.user_answer || tm_current.user_answer.indexOf(key) != -1) {
option.checked = true
diff --git a/test_mini/pages/test/test.json b/test_mini/pages/test/test.json
index 33273aa..792ac14 100644
--- a/test_mini/pages/test/test.json
+++ b/test_mini/pages/test/test.json
@@ -1,4 +1,6 @@
{
- "usingComponents": {},
+ "usingComponents": {
+ "parser": "/components/parser/parser"
+ },
"navigationBarTitleText": "答题中"
}
\ No newline at end of file
diff --git a/test_mini/pages/test/test.wxml b/test_mini/pages/test/test.wxml
index 512e77d..914ec6b 100644
--- a/test_mini/pages/test/test.wxml
+++ b/test_mini/pages/test/test.wxml
@@ -16,14 +16,17 @@
({{tm_current.total_score}}分)
({{tm_current.questioncat_name}})
- {{tm_current.name}}
+
+
+
- {{item.value}}
+ {{item.key}}:
+
@@ -37,7 +40,8 @@
- {{item.value}}
+ {{item.key}}:
+
diff --git a/test_mini/project.config.json b/test_mini/project.config.json
index ab2eac1..1c112e8 100644
--- a/test_mini/project.config.json
+++ b/test_mini/project.config.json
@@ -1,65 +1,65 @@
{
- "description": "项目配置文件",
- "packOptions": {
- "ignore": []
- },
- "setting": {
- "urlCheck": false,
- "es6": true,
- "enhance": true,
- "postcss": true,
- "preloadBackgroundData": false,
- "minified": true,
- "newFeature": true,
- "coverView": true,
- "nodeModules": true,
- "autoAudits": false,
- "showShadowRootInWxmlPanel": true,
- "scopeDataCheck": false,
- "uglifyFileName": false,
- "checkInvalidKey": true,
- "checkSiteMap": true,
- "uploadWithSourceMap": true,
- "compileHotReLoad": false,
- "useMultiFrameRuntime": true,
- "useApiHook": false,
- "babelSetting": {
- "ignore": [],
- "disablePlugins": [],
- "outputPath": ""
- },
- "useIsolateContext": true,
- "useCompilerModule": true,
- "userConfirmedUseCompilerModuleSwitch": false,
- "packNpmManually": false,
- "packNpmRelationList": []
- },
- "compileType": "miniprogram",
- "libVersion": "2.10.3",
- "appid": "wxf1e9471c93f05ad6",
- "projectname": "test_mini",
- "debugOptions": {
- "hidedInDevtools": []
- },
- "isGameTourist": false,
- "simulatorType": "wechat",
- "simulatorPluginLibVersion": {},
- "condition": {
- "search": {
- "current": -1,
- "list": []
- },
- "conversation": {
- "current": -1,
- "list": []
- },
- "game": {
- "currentL": -1,
- "list": []
- },
- "miniprogram": {
- "current": -1,
- "list": []
- }
- }
+ "description": "项目配置文件",
+ "packOptions": {
+ "ignore": []
+ },
+ "setting": {
+ "urlCheck": false,
+ "es6": true,
+ "enhance": true,
+ "postcss": true,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "newFeature": true,
+ "coverView": true,
+ "nodeModules": true,
+ "autoAudits": false,
+ "showShadowRootInWxmlPanel": true,
+ "scopeDataCheck": false,
+ "uglifyFileName": false,
+ "checkInvalidKey": true,
+ "checkSiteMap": true,
+ "uploadWithSourceMap": true,
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ },
+ "useCompilerModule": true,
+ "userConfirmedUseCompilerModuleSwitch": false,
+ "compileHotReLoad": false,
+ "useMultiFrameRuntime": true,
+ "useApiHook": false,
+ "useIsolateContext": true,
+ "packNpmManually": false,
+ "packNpmRelationList": []
+ },
+ "compileType": "miniprogram",
+ "libVersion": "2.10.3",
+ "appid": "wxf1e9471c93f05ad6",
+ "projectname": "test_mini",
+ "debugOptions": {
+ "hidedInDevtools": []
+ },
+ "isGameTourist": false,
+ "simulatorType": "wechat",
+ "simulatorPluginLibVersion": {},
+ "condition": {
+ "search": {
+ "current": -1,
+ "list": []
+ },
+ "conversation": {
+ "current": -1,
+ "list": []
+ },
+ "game": {
+ "currentL": -1,
+ "list": []
+ },
+ "miniprogram": {
+ "current": -1,
+ "list": []
+ }
+ }
}
\ No newline at end of file
diff --git a/test_server/qtest/views.py b/test_server/qtest/views.py
index 95aa371..c4e0670 100644
--- a/test_server/qtest/views.py
+++ b/test_server/qtest/views.py
@@ -26,4 +26,5 @@ class ConsultViewSet(ModelViewSet):
serializer_class = ConsultSerializer
pagination_class = CommonPagination
filter_backends = [DjangoFilterBackend,SearchFilter, OrderingFilter]
- search_fields = ['name','tests', 'phone']
\ No newline at end of file
+ search_fields = ['name','tests', 'phone']
+ ordering=['-pk']
\ No newline at end of file
diff --git a/test_server/question/views.py b/test_server/question/views.py
index 99b138d..b40e507 100644
--- a/test_server/question/views.py
+++ b/test_server/question/views.py
@@ -238,7 +238,7 @@ class ExerciseView(APIView):
perms_map=[{'post':'exercise'}]
def post(self, request):
questioncat = request.data['questioncat']
- queryset = Question.objects.filter(is_delete=0,questioncat=questioncat).order_by('type','name')
+ queryset = Question.objects.filter(is_delete=0,questioncat=questioncat).order_by('type','pk', '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_']: