<view class="wrapper">
    <view wx:if="{{false}}" class="camoverlay">
        <image class="square" src="/static/camoverlay.png"
            style="filter: grayscale({{camoverlay_grayscale}})"
        >
        </image>
        <image class="gray" src="/static/black.png" class="gray"></image>
    </view>
    <view class="qrarc {{ qrarc_class }}">
        <image class="topleft arc" src="/static/arc.png"></image>
        <image class="topright arc" src="/static/arc.png"></image>
        <image class="bottomleft arc" src="/static/arc.png"></image>
        <image class="bottomright arc" src="/static/arc.png"></image>
    </view>
    <view class="qrmarkers {{ qrmarkers_class }}">
        <image class="square" src="/static/qrmarkers.png">
        </image>
    </view>
    <view class="osd">
        <view class="upper" bindtap="debug_tap">
            {{ hint_text }}
        </view>
    </view>
    <camera wx:if="{{ show_modal == '' }}" class="camera" flash="{{ camera_flash }}"
        mode="normal"
        frame-size="large"
        resolution="high"
        bindinitdone="setup_camera"></camera>
    <canvas id="output" type="2d"></canvas>
    <view class="debug" wx:if="{{ enable_debug }}">
        <view> <image src="{{ debug_image_data_url }}"> </image> </view>
        <view wx:for="{{ debug_msgs }}">{{ item }}</view>
        <view>model: {{ phone_model }}</view>
        <view>zoom: {{ zoom }}</view>
        <view>sensitivity: {{ camera_sensitivity }}</view>
        <view>frame uploaded: {{ frame_uploaded }} (upload cost {{ frame_upload_time_cost }}ms)</view>
        <view>max zoom: {{ max_zoom }}</view>
        <view>result: {{ result }}</view>
    </view>
    <view class="bottomfixed">
        <view class="actions">
            <view class="half {{ show_tip ? 'brighter' : '' }}" bindtap="show_scanguide" >
                <view class="icon">
                    <image src="/assets/play-button.png"></image>
                </view>
                <view class="text">
                    验证演示
                </view>
            </view>
            <view class="half {{ camera_flash == 'torch' ? 'brighter' : '' }}" bindtap="toggle_torch">
                <view class="icon">
                    <image src="/assets/flash-button.png"></image>
                </view>
                <view class="text">
                    开启补光
                </view>
            </view>
        </view>
        <view wx:if="{{ false }}" class="subtite" bindtap="debug_tap">
            * 本系统仅支持实物扫描辨别真伪
        </view>
    </view>
</view>
<view wx:if="{{ show_tip && show_modal == '' }}" class="tooltip">
    <tooltip />
</view>
<servicemodal wx:if="{{ show_modal == 'service' }}" />
<verifyspin wx:if="{{ show_modal == 'verifying' }}" />
<verifyfailed wx:if="{{ show_modal == 'verifyfailed' }}" bindback="restart_camera" bindservice="show_service" />
<scanguide wx:if="{{ show_modal == 'scanguide' }}" bindback="restart_camera" bindservice="show_service" />
