From d7004986135c0885c1b9a92fb48919179732c00d Mon Sep 17 00:00:00 2001
From: xuxj <hugeinfo123>
Date: Sat, 09 May 2020 09:20:13 +0800
Subject: [PATCH] BUG修改
---
SunshineLnsMinApp/pages/createSub/createSub.js | 61 +++++++++---------------------
1 files changed, 19 insertions(+), 42 deletions(-)
diff --git a/SunshineLnsMinApp/pages/createSub/createSub.js b/SunshineLnsMinApp/pages/createSub/createSub.js
index 0d1a906..5df15cc 100644
--- a/SunshineLnsMinApp/pages/createSub/createSub.js
+++ b/SunshineLnsMinApp/pages/createSub/createSub.js
@@ -11,7 +11,8 @@
confirm: true,
value1: '',
answer: [],
- id: ''
+ id: '',
+ disabled: false
},
// 去单选页面
toRadio(e) {
@@ -132,6 +133,9 @@
var that = this;
wx.request({
url: app.globalData.url + '/api/question/find/' + id,
+ data: {
+ userId: wx.getStorageSync("user").id
+ },
success: function(res) {
console.log(res)
if (res.data.code == 0) {
@@ -141,52 +145,25 @@
[_m]: {
"paper": {
"title": res.data.data.title,
- "des": res.data.data.content
+ "des": res.data.data.content || ''
},
"psqList": res.data.data.questionDtos
- // "psqList": [{
- // "isMust": 1,
- // "type": 1,
- // "question": "111",
- // "answerslist": [{
- // "answer": "11"
- // }, {
- // "answer": "111"
- // }, {
- // "answer": "11"
- // }, {
- // "answer": "111"
- // }],
- // 'value': []
- // }, {
- // "isMust": 1,
- // "type": 1,
- // "question": "11111",
- // "answerslist": [{
- // "answer": "111"
- // }, {
- // "answer": "111"
- // }],
- // value: []
- // }, {
- // "isMust": 1,
- // "type": 0,
- // "question": "11111"
- // }, {
- // "isMust": 0,
- // "type": 1,
- // "question": "wqwqw",
- // "answerslist": [{
- // "answer": "qw"
- // }, {
- // "answer": "wqw"
- // }, {
- // "answer": "wqw"
- // }]
- // }]
}
});
+ } else if (res.data.code == 3) {
+ that.setData({
+ id: res.data.data.id,
+ [_m]: {
+ "paper": {
+ "title": res.data.data.title,
+ "des": res.data.data.content || ''
+ },
+ "psqList": res.data.data.questionDtos
+ },
+ disabled: true
+
+ });
} else {
wx.showModal({
title: '提示',
--
Gitblit v1.8.0