question ing

This commit is contained in:
caoqianming 2020-06-03 23:18:21 +08:00
parent 1bf8298e6a
commit 7af86c34b2
2 changed files with 7 additions and 8 deletions

View File

@ -66,13 +66,12 @@ Page({
} }
api.request('/question/question/exercise/?limit=10&page='+that.data.page, 'POST', query).then(res => { api.request('/question/question/exercise/?limit=10&page='+that.data.page, 'POST', query).then(res => {
if(res.code>=200){ if(res.code>=200){
// let list = [] for (var i = 0; i < res.data.results.length; i++) {
// for (var i = 0; i < res.data.results.length; i++) { if(res.data.results[i].img){
// if(res.data.results[i].img){ res.data.results[i].img = getApp().globalData.mediahost + res.data.results[i].img
// list.push(getApp().globalData.mediahost + res.data.results[i].img) }
// } }
// }
that.data.tms = that.data.tms.concat(res.data.results) that.data.tms = that.data.tms.concat(res.data.results)
that.showTm(that.data.tm_index) //展示题目和答案 that.showTm(that.data.tm_index) //展示题目和答案
that.setData({ that.setData({

View File

@ -7,7 +7,7 @@
<span class="txlabel">{{tm_current.type}}</span> <span class="txlabel">{{tm_current.type}}</span>
</view> </view>
<view class="weui-article__title">{{tm_current.name}}</view> <view class="weui-article__title">{{tm_current.name}}</view>
<view wx:if="{{tm_current.img}}"><image src="{{tm_current.img}}" style="width:70%;height:auto"></image></view> <view wx:if="{{tm_current.img}}" style="text-align:center"><image src="{{tm_current.img}}" mode="aspectFit"></image></view>
</view> </view>
<view class="weui-cells weui-cells_radio"> <view class="weui-cells weui-cells_radio">
<radio-group class="radio-group" bindchange="radioChange" wx:if="{{(tm_current.type=='单选' ||tm_current.type=='判断')}}"> <radio-group class="radio-group" bindchange="radioChange" wx:if="{{(tm_current.type=='单选' ||tm_current.type=='判断')}}">