在teacher.wxml里写如下代码:
<!--pages/teacher/teacher.wxml-->
<view class='container'>
<view class="header">
<text>评教系统-教师端</text>
</view>
<view class='section'>
<view wx:for="{
{teachers}}">
<view class='section1'>
<view class='photo'>
<image class='img' src='/images/2.jpg' mode="aspectFill"></image>
</view>
<view class='menu'>
<view class='name'>姓名:{
{item.teachername}}</view>
<view class='course'>任课:{
{item.course}}</view>
</view>
<view class='btn'>
<!-- <button class='ly' form-type="submit" type=&#