diff --git a/pages/exercise/index.js b/pages/exercise/index.js
index caf453b..ed4e72b 100644
--- a/pages/exercise/index.js
+++ b/pages/exercise/index.js
@@ -119,7 +119,12 @@ wx.getStorage({
},
choosequestioncat:function(){
wx.navigateTo({
- url: '/pages/questioncat/index',
+ url: '/pages/questioncat/index?type=2',
+ })
+ },
+ choosequestioncat2:function(){
+ wx.navigateTo({
+ url: '/pages/questioncat/index?type=3',
})
},
start1:function(){
diff --git a/pages/exercise/index.wxml b/pages/exercise/index.wxml
index 3325528..5b74ea2 100644
--- a/pages/exercise/index.wxml
+++ b/pages/exercise/index.wxml
@@ -4,7 +4,14 @@
选择题库分类进行练习。
-
+
+
+
+
+
+
+
+
已选分类
{{catsname}}
diff --git a/pages/questioncat/index.js b/pages/questioncat/index.js
index 4089c87..4c7a2fb 100644
--- a/pages/questioncat/index.js
+++ b/pages/questioncat/index.js
@@ -11,13 +11,17 @@ Page({
selectList: [], //已选择的元素列表
originalList: [], //最原始的数据列表
indexList: [], //存储目录层级的数组,用于准确的返回上一层
- selectList: [], //已选中的人员列表
+ selectList: [], //已选中的人员列表,
+ type:2
},
onLoad: function (options) {
wx.setNavigationBarTitle({
title: '选择分类'
})
+ if(options.type){
+ this.data.type = options.type
+ }
this.init();
},
@@ -25,7 +29,7 @@ Page({
//上次选中的列表,用于判断是不是取消选中了
this.lastTimeSelect = []
wx.request({
- url: getApp().globalData.serverUrl + 'api/questioncat?a=tree3',
+ url: getApp().globalData.serverUrl + 'api/questioncat?a=tree' + this.data.type.toString(),
header: {
'content-type': 'application/json', // 默认值
'Cookie': getApp().globalData.sessionId,