1
This commit is contained in:
72
pages/gpa/gpa.wxml
Normal file
72
pages/gpa/gpa.wxml
Normal file
@@ -0,0 +1,72 @@
|
||||
<!--pages/gpa/gpa.wxml-->
|
||||
<view class="container">
|
||||
<!-- GPA显示卡片 -->
|
||||
<view class="gpa-card">
|
||||
<view class="gpa-label">当前GPA</view>
|
||||
<view class="gpa-value">{{totalGPA}}</view>
|
||||
<view class="credits-info">总学分:{{totalCredits}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 添加课程表单 -->
|
||||
<view class="form-card">
|
||||
<view class="form-title">添加课程</view>
|
||||
|
||||
<view class="form-row">
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="课程名称"
|
||||
value="{{courseName}}"
|
||||
bindinput="onNameInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-row-group">
|
||||
<view class="form-row half">
|
||||
<input
|
||||
class="form-input"
|
||||
type="digit"
|
||||
placeholder="成绩"
|
||||
value="{{courseScore}}"
|
||||
bindinput="onScoreInput"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-row half">
|
||||
<input
|
||||
class="form-input"
|
||||
type="digit"
|
||||
placeholder="学分"
|
||||
value="{{courseCredit}}"
|
||||
bindinput="onCreditInput"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button class="add-btn" bindtap="onAddCourse">添加课程</button>
|
||||
</view>
|
||||
|
||||
<!-- 课程列表 -->
|
||||
<view class="courses-section" wx:if="{{courses.length > 0}}">
|
||||
<view class="section-header">
|
||||
<text class="section-title">课程列表</text>
|
||||
<text class="clear-btn" bindtap="onClearAll">清空</text>
|
||||
</view>
|
||||
|
||||
<view class="course-item" wx:for="{{courses}}" wx:key="id">
|
||||
<view class="course-info">
|
||||
<view class="course-name">{{item.name}}</view>
|
||||
<view class="course-details">
|
||||
<text class="detail-item">成绩:{{item.score}}</text>
|
||||
<text class="detail-item">学分:{{item.credit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="delete-btn"
|
||||
data-id="{{item.id}}"
|
||||
bindtap="onDeleteCourse"
|
||||
>
|
||||
🗑️
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
Reference in New Issue
Block a user