question img mini

This commit is contained in:
caoqianming 2020-06-01 22:52:46 +08:00
parent 52eb9bbf48
commit 1bf8298e6a
3 changed files with 11 additions and 0 deletions

View File

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

View File

@ -7,6 +7,7 @@
<span class="txlabel">{{tm_current.type}}</span>
</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>
<view class="weui-cells weui-cells_radio">
<radio-group class="radio-group" bindchange="radioChange" wx:if="{{(tm_current.type=='单选' ||tm_current.type=='判断')}}">

3
test_server/s_server.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
call venv\scripts\activate.bat
python manage.py runserver