测试扫码
This commit is contained in:
1 parent
6f16fe7e89
commit
36d52e26cd
1 file changed
+31
-26
+31
-26
@@ -34,6 +34,8 @@ const toDetail = async (v: any) => {
|
||||
|
||||
// 测试扫扫
|
||||
const doScanCode = async () => {
|
||||
console.log("ssss")
|
||||
|
||||
try {
|
||||
const res = await dd.scan({ type: "all" })
|
||||
console.log(res)
|
||||
@@ -42,13 +44,14 @@ const doScanCode = async () => {
|
||||
icon: "none",
|
||||
})
|
||||
} catch (error) {
|
||||
console.log("error", error)
|
||||
uni.showToast({
|
||||
title: JSON.stringify(error),
|
||||
icon: "none",
|
||||
})
|
||||
}
|
||||
const res11 = window.dd.scan({ type: "all" })
|
||||
console.log("eee")
|
||||
|
||||
const res11 = await window.dd.scan({ type: "all" })
|
||||
console.log(res11)
|
||||
uni.showToast({
|
||||
title: JSON.stringify(res11),
|
||||
@@ -57,34 +60,29 @@ const doScanCode = async () => {
|
||||
}
|
||||
|
||||
// 测试扫扫
|
||||
dd.ready(async function () {
|
||||
dd.confirm({
|
||||
message: "2022年亚运会在哪里举办",
|
||||
title: "提问",
|
||||
buttonLabels: ["杭州", "上海"],
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
// dd.ready(async function () {
|
||||
// dd.confirm({
|
||||
// message: "2022年亚运会在哪里举办",
|
||||
// title: "提问",
|
||||
// buttonLabels: ["杭州", "上海"],
|
||||
// })
|
||||
// .then((res) => {
|
||||
// console.log(res)
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.error(err)
|
||||
// })
|
||||
|
||||
const res = await dd.scan({ type: "all" })
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: JSON.stringify(res),
|
||||
icon: "none",
|
||||
})
|
||||
})
|
||||
// const res = await dd.scan({ type: "all" })
|
||||
// console.log(res)
|
||||
// uni.showToast({
|
||||
// title: JSON.stringify(res),
|
||||
// icon: "none",
|
||||
// })
|
||||
// })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="flex-col-center m-t-40rpx m-x-30rpx">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff" @tap="doScanCode">
|
||||
扫扫测试
|
||||
</view>
|
||||
</view>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
@@ -101,6 +99,13 @@ dd.ready(async function () {
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<view class="h-20rpx" />
|
||||
|
||||
<view class="flex-col-center m-t-40rpx m-x-30rpx">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff" @tap="doScanCode">
|
||||
扫扫测试
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex-row card p-20rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i" @tap="toDetail(v)">
|
||||
<image class="w-180rpx h-180rpx rounded-12rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
|
||||
Reference in new issue
Block a user