测试扫码
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 () => {
|
const doScanCode = async () => {
|
||||||
|
console.log("ssss")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await dd.scan({ type: "all" })
|
const res = await dd.scan({ type: "all" })
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@@ -42,13 +44,14 @@ const doScanCode = async () => {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("error", error)
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: JSON.stringify(error),
|
title: JSON.stringify(error),
|
||||||
icon: "none",
|
icon: "none",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const res11 = window.dd.scan({ type: "all" })
|
console.log("eee")
|
||||||
|
|
||||||
|
const res11 = await window.dd.scan({ type: "all" })
|
||||||
console.log(res11)
|
console.log(res11)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: JSON.stringify(res11),
|
title: JSON.stringify(res11),
|
||||||
@@ -57,34 +60,29 @@ const doScanCode = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 测试扫扫
|
// 测试扫扫
|
||||||
dd.ready(async function () {
|
// dd.ready(async function () {
|
||||||
dd.confirm({
|
// dd.confirm({
|
||||||
message: "2022年亚运会在哪里举办",
|
// message: "2022年亚运会在哪里举办",
|
||||||
title: "提问",
|
// title: "提问",
|
||||||
buttonLabels: ["杭州", "上海"],
|
// buttonLabels: ["杭州", "上海"],
|
||||||
})
|
// })
|
||||||
.then((res) => {
|
// .then((res) => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
})
|
// })
|
||||||
.catch((err) => {
|
// .catch((err) => {
|
||||||
console.error(err)
|
// console.error(err)
|
||||||
})
|
// })
|
||||||
|
|
||||||
const res = await dd.scan({ type: "all" })
|
// const res = await dd.scan({ type: "all" })
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: JSON.stringify(res),
|
// title: JSON.stringify(res),
|
||||||
icon: "none",
|
// icon: "none",
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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">
|
<crud-layout bg="/static/page/blue-bg.png">
|
||||||
<z-paging
|
<z-paging
|
||||||
ref="pageRef"
|
ref="pageRef"
|
||||||
@@ -101,6 +99,13 @@ dd.ready(async function () {
|
|||||||
@scroll="pageHook.scroll"
|
@scroll="pageHook.scroll"
|
||||||
>
|
>
|
||||||
<view class="h-20rpx" />
|
<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)">
|
<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" />
|
<image class="w-180rpx h-180rpx rounded-12rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||||
<view class="flex-1 flex-col m-l-20rpx">
|
<view class="flex-1 flex-col m-l-20rpx">
|
||||||
|
|||||||
Reference in new issue
Block a user