From 58ae2ba21efcd85df331cf996a94038a77302b51 Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Wed, 27 May 2020 17:07:48 +0800 Subject: [PATCH] 修改报错问题 --- SunshineLnsMinApp/pages/createSub/createSub.wxml | 41 ++++++++++++++--------------------------- 1 files changed, 14 insertions(+), 27 deletions(-) diff --git a/SunshineLnsMinApp/pages/createSub/createSub.wxml b/SunshineLnsMinApp/pages/createSub/createSub.wxml index 60fb792..68627ab 100644 --- a/SunshineLnsMinApp/pages/createSub/createSub.wxml +++ b/SunshineLnsMinApp/pages/createSub/createSub.wxml @@ -6,44 +6,31 @@ <view class="question" wx:for="{{question.psqList}}" wx:key="{{index}}"> <view class="questionB"> <view class="questionT"> - <text wx:if="{{item.isMust == 1}}">*</text> {{index+1}}、{{item.question}} + <text wx:if="{{item.required == 'true'}}">*</text> {{index+1}}、{{item.title}} <view wx:if="{{confirm}}" catchtap="edit" data-index="{{index}}"> <!-- <icon class="iconfont icon-icon_edit"></icon> 修改 --> </view> </view> <view class="questionA"> - <!-- <radio-group class="radio-group" - wx:if="{{item.type == 1}}"> - <label class="radio" wx:for="{{item.answerslist}}" wx:key="{{index}}"> - <radio value="{{item.id}}"/>{{item.answer}} - </label> - </radio-group> --> - <wux-checkbox-group name="a" data-index="{{index}}" value="{{ item.value || [] }}" bind:change="onChange" wx:if="{{item.type == 1}}"> - <wux-checkbox color="positive" title="{{item.answer}}" value="{{item.answer}}" wx:for="{{item.answerslist}}" wx:key="{{index}}"> - {{item.answer}} + <wux-radio-group name="a" data-index="{{index}}" data-questionId="{{item.questionId}}" value="{{ item.value || [] }}" bind:change="onChange1" wx:if="{{item.type == 'radio'}}"> + <wux-radio color="positive" title="{{item}}" data-index="{{index}}" value="{{item}}" wx:for="{{item.options}}" wx:key="{{index}}"> + {{item}} + </wux-radio> + </wux-radio-group> + + <wux-checkbox-group name="a" data-index="{{index}}" data-questionId="{{item.questionId}}" value="{{ item.value || [] }}" bind:change="onChange" wx:if="{{item.type == 'checkbox'}}"> + <wux-checkbox color="positive" title="{{item}}" value="{{item}}" wx:for="{{item.options}}" wx:key="{{index}}"> + {{item}} </wux-checkbox> </wux-checkbox-group> - <view class="textarea" wx:if="{{item.type == 0}}"> + <view class="textarea" wx:if="{{item.type == 'text'}}"> <textarea placeholder="请输入回答" /> </view> </view> </view> </view> - <view class="question" wx:if="{{confirm}}"> - <view class="selectType"> - <view class="toRadio" data-type="1" catchtap="toRadio"> - <icon class="iconfont icon-guanbi"></icon> - 单选题 - </view> - <view class="toFillBlack" data-type="0" catchtap="toRadio"> - <icon class="iconfont icon-combinedshapecopy2"></icon> - 填空题 - </view> - </view> - </view> - <button class="btn" catchtap='submit' wx:if="{{confirm}}">提交</button> - <button class="btn" catchtap='publish' wx:if="{{!confirm}}">确认发布</button> - <button class="btn" catchtap='returnEdit' wx:if="{{!confirm}}">返回修改</button> -</view> \ No newline at end of file +</view> +<button class="btn" wx:if="{{!disabled}}" catchtap='submit'>提交</button> +<button class="btn" wx:if="{{disabled}}" disabled catchtap='submit'>已提交</button> -- Gitblit v1.8.0