|
@@ -126,17 +126,18 @@ Page({ |
|
@@ -126,17 +126,18 @@ Page({ |
126
|
//提交
|
126
|
//提交
|
127
|
submit() {
|
127
|
submit() {
|
128
|
if (this.data.is_choose_session) {
|
128
|
if (this.data.is_choose_session) {
|
|
|
129
|
+ console.log(this.data.experiment_id, this.data.current_session_id, this.data.student_num);
|
129
|
let url = '/portal/Experiment/submit_session';
|
130
|
let url = '/portal/Experiment/submit_session';
|
130
|
let header = {
|
131
|
let header = {
|
131
|
"XX-token": wx.getStorageSync('token')
|
132
|
"XX-token": wx.getStorageSync('token')
|
132
|
};
|
133
|
};
|
133
|
let params = {
|
134
|
let params = {
|
134
|
- experiment_id: this.data.experiment_id,
|
|
|
135
|
- session_id: this.data.current_session_id,
|
|
|
136
|
- student_num: this.data.student_num,
|
135
|
+ experiment_id: +this.data.experiment_id,
|
|
|
136
|
+ session_id: +this.data.current_session_id,
|
|
|
137
|
+ student_num: +this.data.student_num,
|
137
|
};
|
138
|
};
|
138
|
app.post(url, params, header).then((res) => {
|
139
|
app.post(url, params, header).then((res) => {
|
139
|
- // console.log(res);
|
140
|
+ console.log(res);
|
140
|
wx.navigateTo({
|
141
|
wx.navigateTo({
|
141
|
url: '/pages/index/confirm-appointment-info/confirm-appointment-info?experiment_id=' + this.data.experiment_id
|
142
|
url: '/pages/index/confirm-appointment-info/confirm-appointment-info?experiment_id=' + this.data.experiment_id
|
142
|
+ '&session_id=' + this.data.current_session_id
|
143
|
+ '&session_id=' + this.data.current_session_id
|
|
@@ -182,11 +183,11 @@ Page({ |
|
@@ -182,11 +183,11 @@ Page({ |
182
|
"XX-token": wx.getStorageSync('token')
|
183
|
"XX-token": wx.getStorageSync('token')
|
183
|
};
|
184
|
};
|
184
|
app.post(url, params, header).then((res) => {
|
185
|
app.post(url, params, header).then((res) => {
|
185
|
- // console.log('实验',res.list);
|
186
|
+ // console.log('实验',res);
|
186
|
// console.log(res.list,res.list[0],res.list[0].lab_list,res.list[0].lab_list[0],);
|
187
|
// console.log(res.list,res.list[0],res.list[0].lab_list,res.list[0].lab_list[0],);
|
187
|
this.setData({
|
188
|
this.setData({
|
188
|
areaTest: res.list,
|
189
|
areaTest: res.list,
|
189
|
- student_num: res.student_num,
|
190
|
+ student_num: res.student_num == 0?1:res.student_num,
|
190
|
current_test_id: res.list.length>0 && res.list[0].lab_list && res.list[0].lab_list.length>0 ? res.list[0].lab_list[0].id:'',
|
191
|
current_test_id: res.list.length>0 && res.list[0].lab_list && res.list[0].lab_list.length>0 ? res.list[0].lab_list[0].id:'',
|
191
|
description: res.list.length>0 && res.list[0].lab_list && res.list[0].lab_list.length>0 ? res.list[0].lab_list[0].description : '',//默认显示第一个实验室的描述
|
192
|
description: res.list.length>0 && res.list[0].lab_list && res.list[0].lab_list.length>0 ? res.list[0].lab_list[0].description : '',//默认显示第一个实验室的描述
|
192
|
session_list: res.list.length>0 && res.list[0].lab_list.length>0 ? res.list[0].lab_list[0].session_list : ''//默认显示第一个实验室的实验时间
|
193
|
session_list: res.list.length>0 && res.list[0].lab_list.length>0 ? res.list[0].lab_list[0].session_list : ''//默认显示第一个实验室的实验时间
|