微信小程式開發---學生評教系統
阿新 • • 發佈:2019-02-16
1.在微信公眾號平臺註冊一個小程式,然後登陸小程式,得到APPID.
2.在官網下載開發者工具
3.建立專案資料夾,然後登陸開發工具,填寫appid,選擇快速建立模板
然後我們上面建立一個登陸login頁面:
程式碼如下:
<view class="container"> <form bindsubmit="formSubmit" bindreset="formReset"> <view class="section"> <text>學號</text> <input type="number" name="no" value="1635050138" placeholder='請輸入學號'></input> </view> <view class="section"> <text>密碼</text> <input password="true" name="pwd" value="123456"></input> </view> <view class="section"> <button type="primary" form-type="submit">登入</button> </view> </form> </view>
然後在建立登陸之後評教teachers的頁面:
<view> <view class="teacher1" wx:for="{{teachers}}"> <cover-image class="img" src="./images/teacher.png" /> <view class="xx"> <view class="name">姓名:{{item.teachername}}</view> <view name="rk">任課:{{item.course}}</view> <!-- <button form-type="submit" type="primary" class="submit" url="../testpaper/testpaper?teacherid={{item.teacherid}}">評教</button> --> <navigator open-type='navigate' url="../testpaper/testpaper?teacherid={{item.teacherid}}" style="border:1px solid red;width:60px;text-align:center;">評教</navigator> <navigator open-type='navigate' url="" style="border:1px solid red;width:60px;text-align:center;">留言</navigator> <!-- <button form-type="submit" type="warn" class="submit">留言</button> --> </view> </view> </view>
最後建立評教頁面:
這樣一個簡單的評教頁面就出來了。<text >被評老師:{{name}}</text> <!-- <text>{{teacherid}}</text> --> <view class='content'wx:for="{{typee}}"> <view class='right'> <view class='pj'>評教名稱:{{item.name}} </view> <view class='pj'>型別:{{item.type}} </view> <view class='time'>時間:2018-6-5 | 2018-6-30</view> <navigator id='name' url="../testpaper/testpaper?teacherid={{teacherid}}">開始評教</navigator> </view> </view>