|
|
|
@ -114,35 +114,36 @@ |
|
|
|
|
</u-checkbox> |
|
|
|
|
</u-checkbox-group> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 0" |
|
|
|
|
:style="item.answerOptions.length > 1 ? 'display: flex; flex-wrap: wrap;' : ''" |
|
|
|
|
:class="item.answerOptions.length > 1 ? '' : 'btnBox'" |
|
|
|
|
> |
|
|
|
|
<view v-for="(item, index) in item.answerOptions" :key="index" |
|
|
|
|
:style="item.answerOptions.length > 1 ? 'padding: 8px 8px;margin:0 0 8px 8px;background-color: #ededed;' : ''" |
|
|
|
|
:class="item.answerOptions.length > 1 ? '' : 'btn'" |
|
|
|
|
@click="handleGroup(item)"> |
|
|
|
|
{{ item }} |
|
|
|
|
<view v-for="(it, ind) in item.answerOptions" :key="ind" |
|
|
|
|
:style="it.length > 1 ? 'padding: 8px 8px;margin:0 0 8px 8px;background-color: #ededed;' : ''" |
|
|
|
|
:class="it.length > 1 ? '' : 'btn'" |
|
|
|
|
@click="handleGroup(it)"> |
|
|
|
|
{{ it }} |
|
|
|
|
</view> |
|
|
|
|
<!-- <u-radio-group |
|
|
|
|
v-model="item.radiovalue1" |
|
|
|
|
v-model="it.radiovalue1" |
|
|
|
|
placement="column" |
|
|
|
|
iconPlacement="right" |
|
|
|
|
style="width: 100%; padding: 0 15px; box-sizing: border-box" |
|
|
|
|
v-if="item.optionType == 0" |
|
|
|
|
v-if="it.optionType == 0" |
|
|
|
|
> |
|
|
|
|
<u-radio |
|
|
|
|
:customStyle="{ marginBottom: '8px' }" |
|
|
|
|
v-for="(item, index) in item.answerOptions" |
|
|
|
|
v-for="(it, index) in it.answerOptions" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item" |
|
|
|
|
:name="item" |
|
|
|
|
:label="it" |
|
|
|
|
:name="it" |
|
|
|
|
> |
|
|
|
|
</u-radio> |
|
|
|
|
</u-radio-group> --> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view |
|
|
|
|
class="btnBox" |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 1" |
|
|
|
@ -157,6 +158,9 @@ |
|
|
|
|
<view class="bounce-dot"></view> |
|
|
|
|
<view class="bounce-dot"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="loading-animation2" v-if="loading"> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
<view |
|
|
|
|
class="input-wrapper" |
|
|
|
@ -345,7 +349,7 @@ export default { |
|
|
|
|
answerId, |
|
|
|
|
data: res.result.data.content, |
|
|
|
|
optionType: res.result.data?.optionType, |
|
|
|
|
answerOptions: res.result.data?.answerOptions || [], |
|
|
|
|
answerOptions: res.result.data?res.result.data.answerOptions : [], |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
} else { |
|
|
|
@ -358,7 +362,7 @@ export default { |
|
|
|
|
this.msgList[this.msgList.length - 1].optionType = |
|
|
|
|
res.result.data?.optionType; |
|
|
|
|
this.msgList[this.msgList.length - 1].answerOptions = |
|
|
|
|
res.result.data?.answerOptions || []; |
|
|
|
|
res.result.data?res.result.data.answerOptions : []; |
|
|
|
|
} else { |
|
|
|
|
//最后一个是问题 |
|
|
|
|
this.msgList = [ |
|
|
|
@ -367,7 +371,7 @@ export default { |
|
|
|
|
answerId: "1", |
|
|
|
|
data: res.result.data.content, |
|
|
|
|
optionType: res.result.data?.optionType, |
|
|
|
|
answerOptions: res.result.data?.answerOptions || [], |
|
|
|
|
answerOptions: res.result.data?res.result.data.answerOptions : [], |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
@ -942,6 +946,11 @@ console.log({ |
|
|
|
|
animation-delay: 0.4s; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.loading-animation2 { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 120rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|