-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathcamera.wxml
More file actions
56 lines (52 loc) · 1.84 KB
/
camera.wxml
File metadata and controls
56 lines (52 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<import src="../../../common/head.wxml" />
<import src="../../../common/foot.wxml" />
<view class="container">
<template is="head" data="{{title: 'camera'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<camera
flash="off"
device-position="{{position}}"
binderror="error"
>
</camera>
<view class="page-section">
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell weui-cell_switch">
<view class="weui-cell__bd">帧高度</view>
<view class="weui-cell__ft">
{{ frameHeight }}
</view>
</view>
<view class="weui-cell weui-cell_switch">
<view class="weui-cell__bd">帧宽度</view>
<view class="weui-cell__ft">
{{ frameWidth }}
</view>
</view>
</view>
</view>
<view class="btn-area first-btn">
<button type="primary" bindtap="togglePosition">切换摄像头</button>
</view>
<view class="btn-area">
<button type="primary" bindtap="takePhoto">拍照</button>
</view>
<view class="btn-area">
<button type="primary" bindtap="startRecord">开始录像</button>
</view>
<view class="btn-area">
<button type="primary" bindtap="stopRecord">结束录像</button>
</view>
<view class="btn-area">
<navigator url="/page/component/pages/camera-scan-code/camera-scan-code">
<button type="primary">扫描一维码</button>
</navigator>
</view>
<view class="preview-tips">预览</view>
<image wx:if="{{src}}" mode="widthFix" class="photo" src="{{src}}"></image>
<video wx:if="{{videoSrc}}" class="video" src="{{videoSrc}}"></video>
</view>
</view>
<template is="foot" />
</view>