考试记录富文本显示

This commit is contained in:
caoqianming 2020-11-19 09:31:01 +08:00
parent 988bab1002
commit b82a0491d5
6 changed files with 16 additions and 8 deletions

View File

@ -264,7 +264,6 @@ Page({
}
options.push(option)
}
console.log(options)
this.setData({
options: options
})

View File

@ -20,6 +20,8 @@
<view class="weui-media-box__desc">单位:
<span wx:if="{{userinfo && userinfo.company_name}}">{{ userinfo.company_name }}</span>
</view>
<view class="weui-media-box__desc">如需解绑账号请联系课程顾问
</view>
</view>
</view>
</view>

View File

@ -8,7 +8,8 @@ Page({
data: {
tm_index:0,
results:[],
tm_current:null
tm_current:null,
domain:getApp().globalData.mediahost,
},
/**
@ -117,7 +118,7 @@ Page({
for (let key in question_options) {
let option = {}
option.key = key
option.value = key + ':' + question_options[key]
option.value = question_options[key]
if (user_answer) {
if (key == user_answer || user_answer.indexOf(key) != -1) {
option.checked = true

View File

@ -1,3 +1,5 @@
{
"usingComponents": {}
"usingComponents": {
"parser": "/components/parser/parser"
}
}

View File

@ -7,14 +7,17 @@
<span class="txlabel">{{tm_current.question.type}}</span>
<span style="color:gray">({{tm_current.question.questioncat_name}})</span>
</view>
<view class="weui-article__title">{{tm_current.question.name}}</view>
<view class="weui-article__title">
<parser html="{{tm_current.question.name}}" domain="{{domain}}" selectable/>
</view>
<view wx:if="{{tm_current.img}}" style="text-align:center"><image src="{{tm_current.img}}" mode="aspectFit"></image></view>
</view>
<view class="weui-cells weui-cells_radio">
<radio-group class="radio-group" wx:if="{{(tm_current.question.type=='单选' ||tm_current.question.type=='判断')}}">
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
<view class="weui-cell__bd">
<view>{{item.value}}</view>
<view style="float:left;width:10%">{{item.key}}:</view>
<view style="float:left;width:90%"><parser html="{{item.value}}" domain="{{domain}}" selectable /></view>
</view>
<view class="weui-cell__ft">
<radio class="weui-check" value="{{item.key}}" checked="{{item.checked}}" />
@ -28,7 +31,8 @@
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
<view class="weui-cell__bd">
<view>{{item.value}}</view>
<view style="float:left;width:10%">{{item.key}}:</view>
<view style="float:left;width:90%"><parser html="{{item.value}}" domain="{{domain}}" selectable /></view>
</view>
<view class="weui-cell__hd">
<checkbox class="weui-check" value="{{item.key}}" checked="{{item.checked}}"/>

View File

@ -1,7 +1,7 @@
<view class="head">
共{{count}}条考试记录</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cells weui-cells_after-title" style="margin-top:0px">
<block wx:for="{{results}}" wx:key="unique">
<navigator url="detail?id={{item.id}}" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">