Files
cuotibiye/miniprogram/pages/queue/queue.wxml
T

93 lines
4.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<view class="wrap">
<view class="pick">
<view class="chip {{subject === item.k ? 'on' : ''}}" wx:for="{{subjects}}" wx:key="k" data-k="{{item.k}}" bindtap="onSubject">{{item.name}}</view>
<view class="chip mode" bindtap="onToggleMode">{{mode === "photo" ? "改成手输" : "改成拍一张"}}</view>
</view>
<!-- ① 拍一张 -->
<block wx:if="{{mode === 'photo'}}">
<view class="shot {{subject === 'chinese' ? 'chn' : 'math'}}" bindtap="onPick">
<block wx:if="{{images.length}}">
<image class="thumb" src="{{images[0]}}" mode="aspectFill" />
<view class="shot-n">已选 {{images.length}} 张,点一下重拍</view>
</block>
<block wx:else>
<view class="plus">+</view>
<view class="shot-t">整页拍一张</view>
<view class="shot-s">卷子放平、光打亮,一次拍半页(5–8 道)最准</view>
</block>
</view>
<button class="btn" bindtap="onCut" disabled="{{cutting}}">
{{cutting ? "识别中…" : "识别这一页"}}
</button>
<view class="cutinfo" wx:if="{{cutInfo}}">{{cutInfo}}</view>
</block>
<!-- ② 手输一道 -->
<block wx:else>
<view class="card">
<view class="card-title">手输一道错题</view>
<textarea class="ta" placeholder="把题干抄进来,比如:36 + 47 =( )" value="{{stem}}" bindinput="onStem" maxlength="400" auto-height />
<view class="muted small" style="margin-top:6px">{{stem.length}} / 400</view>
<view class="line">
<text class="lk">正确答案</text>
<input class="ipt" placeholder="不填就让孩子自己判" value="{{answer}}" bindinput="onAnswer" />
</view>
<view class="line">
<text class="lk">是选择题</text>
<switch checked="{{isChoice}}" bindchange="onChoice" color="#E4634A" />
</view>
<block wx:if="{{isChoice}}">
<view class="line">
<text class="lk">选项</text>
<input class="ipt" placeholder="用顿号或逗号分开,如:48、54、56、64" value="{{optionsText}}" bindinput="onOptions" />
</view>
<view class="muted small">答案填字母(A/B/C/D);不填字母就让孩子自己做对错判断。</view>
</block>
<button class="btn" style="margin-top:14px" bindtap="onManualAdd" disabled="{{saving}}">
{{saving ? "加入中…" : "加入错题本"}}
</button>
<view class="muted small" style="margin-top:8px">手输的题和拍照的题走同一条路:第一次错先进「观察中」,明天开始复习。</view>
</view>
</block>
<!-- ③ 切出来的题:勾选 -->
<view class="card" style="margin-top:18px" wx:if="{{questions.length}}">
<view class="card-title">切出 {{questions.length}} 道,把做错的勾上</view>
<view class="muted" style="margin-bottom:6px">默认全选,你只需要取消勾选「做对了」的。</view>
<view class="q" wx:for="{{questions}}" wx:key="id" data-i="{{index}}" bindtap="toggleQ">
<view class="box {{item.checked ? 'on' : ''}}">{{item.checked ? "✓" : ""}}</view>
<view class="qmain">
<view class="qstem">{{item.stem}}</view>
<view class="muted small">{{item.tag}}</view>
</view>
</view>
<button class="btn" style="margin-top:14px" bindtap="onImport" disabled="{{importing}}">
{{importing ? "入库中…" : "加入错题本"}}
</button>
</view>
<!-- ④ 题单预览:排完就地显示今天的量 -->
<view class="card queue" wx:if="{{queue.n > 0}}">
<view class="card-title">今天的题单</view>
<view class="qbig">
<text class="qnum">{{queue.n}}</text>
<text class="qunit">道 · 约 {{queue.minutes}} 分钟</text>
</view>
<view class="muted">按遗忘曲线排的,错的多的先做。做完这两件事就结束:连对两次、讲一遍。</view>
<button class="btn" style="margin-top:12px" bindtap="onWorkbench">去工作台做题</button>
<view class="muted small" style="margin-top:8px">手机上拍题,做题在电脑或平板上——题目和解析要横着看。</view>
</view>
<view class="note">
{{mode === "photo" ? "识别用的是本机的 Windows 中文 OCR(不联网、不上传第三方)。算式的答案会自己算出来;应用题、看拼音写词这类没有标准答案的,标成「你自己判」。" : "手输适合几种情况:卷子已经扔了、老师口头报的题、错题想马上记一道。题干抄关键词就行,不用一字不差。"}}
</view>
</view>