Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
best_AI
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
常超凡
best_AI
Commits
8eba9724
提交
8eba9724
authored
4月 23, 2024
作者:
羊富学
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
贝因美拍照框和请求500跳转到失败页
上级
65328492
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
87 行增加
和
16 行删除
+87
-16
beiyinmei.js
pages/beiyinmei/beiyinmei.js
+30
-14
beiyinmei.wxml
pages/beiyinmei/beiyinmei.wxml
+7
-2
beiyinmei.wxss
pages/beiyinmei/beiyinmei.wxss
+50
-0
没有找到文件。
pages/beiyinmei/beiyinmei.js
浏览文件 @
8eba9724
// pages/beiyinmei/beiyinmei.js
// pages/beiyinmei/beiyinmei.js
import
qrcode
,
{
height
}
from
'../../utils/llqrcodefrankyin.js'
import
qrcode
,
{
height
}
from
'../../utils/llqrcodefrankyin.js'
// const base64js = require('base64-arraybuffer');
// const base64js = require('base64-arraybuffer');
...
@@ -134,8 +136,7 @@ Page({
...
@@ -134,8 +136,7 @@ Page({
console
.
log
(
'5555'
)
console
.
log
(
'5555'
)
const
photo2
=
await
that
.
handleTakePoto
(
const
photo2
=
await
that
.
handleTakePoto
(
wx
.
createCameraContext
(),
wx
.
createCameraContext
(),
4
,
4
,
{
{
flash
:
'on'
flash
:
'on'
}
}
)
)
...
@@ -157,18 +158,28 @@ Page({
...
@@ -157,18 +158,28 @@ Page({
that
.
handleApiCheck
(
base64_1
,
'small'
),
that
.
handleApiCheck
(
base64_1
,
'small'
),
that
.
handleApiCheck
(
base64_2
,
'big'
)
that
.
handleApiCheck
(
base64_2
,
'big'
)
]).
then
((
value
)
=>
{
]).
then
((
value
)
=>
{
let
pageType
=
'error'
try
{
const
result1
=
value
[
0
],
let
pageType
=
'error'
result2
=
value
[
1
]
const
result1
=
value
[
0
],
// data.result == 2 为真
result2
=
value
[
1
]
if
(
// data.result == 2 为真
result1
.
data
.
result
==
2
&&
if
(
result2
.
data
.
result
==
2
result1
.
data
.
result
==
2
&&
)
{
result2
.
data
.
result
==
2
pageType
=
'success'
)
{
pageType
=
'success'
}
that
.
setData
({
showPage
:
pageType
})
}
catch
(
error
)
{
that
.
setData
({
showPage
:
'error'
})
}
}
}).
catch
(()
=>
{
that
.
setData
({
that
.
setData
({
showPage
:
pageType
showPage
:
'error'
})
})
})
})
}
}
...
@@ -295,6 +306,10 @@ Page({
...
@@ -295,6 +306,10 @@ Page({
that
.
setData
({
that
.
setData
({
showPage
:
pageType
showPage
:
pageType
})
})
}).
catch
(()
=>
{
that
.
setData
({
showPage
:
'error'
})
})
})
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -404,4 +419,4 @@ Page({
...
@@ -404,4 +419,4 @@ Page({
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{}
onShareAppMessage
()
{}
})
})
\ No newline at end of file
pages/beiyinmei/beiyinmei.wxml
浏览文件 @
8eba9724
<!--pages/beiyinmei/beiyinmei.wxml-->
<!--pages/beiyinmei/beiyinmei.wxml-->
<view wx:if="{{
!showPage
}}" style="height: 100vh;width: 100vw;position: relative;z-index: 99;">
<view wx:if="{{
howPage !== 'success' && showPage !== 'error'
}}" style="height: 100vh;width: 100vw;position: relative;z-index: 99;">
<!-- <image src="{{src}}" mode="widthFix" style="position: absolute;top: 0px;left: 0px;z-index: 9999;"/> -->
<!-- <image src="{{src}}" mode="widthFix" style="position: absolute;top: 0px;left: 0px;z-index: 9999;"/> -->
<camera style="height: 100%;width: 100%;" flash="on" devic-position="back" frame-size="large" resolution="high">
<camera style="height: 100%;width: 100%;" flash="on" devic-position="back" frame-size="large" resolution="high">
</camera>
</camera>
<view class="prompt" style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);z-index: 999999;">
<view class="prompt" style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);z-index: 999999;">
<image src="/assets/imgs/拍照框.png" style="position: relative;z-index: 99999999;" style="width: 25%;" mode="widthFix" />
<!-- <image src="/assets/imgs/拍照框.png" style="position: relative;z-index: 99999999;" style="width: 25%;" mode="widthFix" /> -->
<view class="takephoto-focus">
<view class="top"></view>
<view class="top2"></view>
</view>
<text>请把二维码放置拍照框内</text>
<text>请把二维码放置拍照框内</text>
</view>
</view>
</view>
</view>
...
...
pages/beiyinmei/beiyinmei.wxss
浏览文件 @
8eba9724
...
@@ -15,6 +15,56 @@
...
@@ -15,6 +15,56 @@
color: #fff;
color: #fff;
}
}
.prompt .takephoto-focus {
position:relative;
height: 200rpx;
width: 200rpx;
/* border: 2px solid #fff; */
}
.prompt .takephoto-focus .top,.top2 {
position: absolute;
top: -2px;
left: -2px;
width: 20rpx;
height: 20rpx;
border: 2px solid #fff;
border-bottom: transparent;
border-right: transparent;
}
.prompt .takephoto-focus .top2 {
left: auto;
right: -2px;
border-left: 0;
border-right: 2px solid #fff;
}
.prompt .takephoto-focus::before {
position: absolute;
bottom: -2px;
left: -2px;
content: '';
width: 20rpx;
height: 20rpx;
border: 2px solid #fff;
border-top: transparent;
border-right: transparent;
}
.prompt .takephoto-focus::after {
position: absolute;
bottom: -2px;
right: -2px;
content: '';
width: 20rpx;
height: 20rpx;
border: 2px solid #fff;
border-top: transparent;
border-left: transparent;
}
.prompt text {
.prompt text {
margin-top: 50px;
margin-top: 50px;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论