116 lines
5.6 KiB
Plaintext
116 lines
5.6 KiB
Plaintext
<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 wx:if="{{!photo}}" class="shot {{subject === 'chinese' ? 'chn' : 'math'}}" bindtap="onPick">
|
||
<view class="plus">+</view>
|
||
<view class="shot-t">整页拍一张</view>
|
||
<view class="shot-s">卷子放平、光打亮,一次拍半页(5–8 道)最准</view>
|
||
</view>
|
||
|
||
<block wx:else>
|
||
<view class="stage">
|
||
<image class="page" src="{{photo}}" mode="widthFix" />
|
||
<view class="overlay">
|
||
<view
|
||
wx:for="{{blocks}}"
|
||
wx:key="i"
|
||
class="blk {{item.on ? 'on' : ''}}"
|
||
style="left:{{item.px}}%; top:{{item.py}}%; width:{{item.pw}}%; height:{{item.ph}}%"
|
||
data-i="{{item.i}}"
|
||
catchtap="toggleBlock"
|
||
>
|
||
<view class="blk-n">{{item.i + 1}}<text wx:if="{{item.n > 1}}" class="blk-more">×{{item.n}}</text></view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="cutinfo" wx:if="{{cutInfo}}">{{cutInfo}}</view>
|
||
|
||
<view class="row2" wx:if="{{blocks.length}}">
|
||
<button class="btn plain half" bindtap="onRetake" disabled="{{importing}}">重拍</button>
|
||
<button class="btn half" bindtap="onImport" disabled="{{detecting || importing || !pickedBlocks}}">
|
||
{{importing ? "入库中…" : (pickedBlocks ? "入库选中的 " + pickedQty + " 道" : "先点选做错的")}}
|
||
</button>
|
||
</view>
|
||
</block>
|
||
|
||
<view class="muted small" wx:if="{{photo}}" style="margin-top:8px">看不清就点「重拍」;切多切少无所谓,最后是你在图上点。</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:16px" wx:if="{{pickOpen}}">
|
||
<view class="card-title">这块里有几道?</view>
|
||
<view class="muted" style="margin-bottom:8px">口算卡一块十几道,切题时会把没做错的也一起切进来。取消不要的那几道再入库。</view>
|
||
|
||
<view class="q" wx:for="{{pickItems}}" wx:key="k" data-k="{{index}}" bindtap="togglePick">
|
||
<view class="box {{item.on ? 'on' : ''}}">{{item.on ? "✓" : ""}}</view>
|
||
<view class="qmain">
|
||
<view class="qstem {{item.on ? '' : 'off'}}">{{item.stem}}</view>
|
||
<view class="muted small">{{item.tag}}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="row2" style="margin-top:12px">
|
||
<button class="btn plain half" bindtap="onPickNone">全不勾</button>
|
||
<button class="btn plain half" bindtap="onPickAll">全勾</button>
|
||
</view>
|
||
<button class="btn" style="margin-top:10px" bindtap="confirmPick" disabled="{{importing}}">
|
||
{{importing ? "入库中…" : "入库勾上的"}}
|
||
</button>
|
||
<view class="muted small" style="margin-top:6px" bindtap="closePick">先不入库,回去重新点</view>
|
||
</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" ? "拍一整页,系统先切成块;你在图上点哪几道做错了,只把点中的裁出来单独识别。算式的答案会自己算出来;应用题、看拼音写词这类没有标准答案的,标成「你自己判」。" : "手输适合几种情况:卷子已经扔了、老师口头报的题、错题想马上记一道。题干抄关键词就行,不用一字不差。"}}
|
||
</view>
|
||
</view>
|