|
@@ -15,6 +15,8 @@ import { isEmpty } from 'radash'
|
|
import TasksCard from './components/tasks-card.vue'
|
|
import TasksCard from './components/tasks-card.vue'
|
|
import { useRouter } from '../../core/utils/router'
|
|
import { useRouter } from '../../core/utils/router'
|
|
import { NetImages } from '../../core/libs/net-images'
|
|
import { NetImages } from '../../core/libs/net-images'
|
|
|
|
+import { qrCodeString2Object, toQrCodeString } from '../../core/utils/common'
|
|
|
|
+import { QrCodeBusinessType } from '@/core/libs/models'
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
@@ -121,6 +123,15 @@ const handleToHomepage = () => {
|
|
const handleMenuClick = (path) => {
|
|
const handleMenuClick = (path) => {
|
|
path && uni.navigateTo({ url: path })
|
|
path && uni.navigateTo({ url: path })
|
|
}
|
|
}
|
|
|
|
+const handleClickScan = async () => {
|
|
|
|
+ const { result } = await uni.scanCode({})
|
|
|
|
+ console.log(result)
|
|
|
|
+ const a = qrCodeString2Object('WIFI:S:KM;T:WPA;P:km666888;H:false;;')
|
|
|
|
+ console.log(a)
|
|
|
|
+ console.log(toQrCodeString('到店', { a: 1, orderId: 2222 }))
|
|
|
|
+ console.log(qrCodeString2Object(toQrCodeString('到店', { a: 1, orderId: 2222 })))
|
|
|
|
+ router.push(`/pages/mine/scan/result/index?result=${result}`)
|
|
|
|
+}
|
|
onMounted(async () => {})
|
|
onMounted(async () => {})
|
|
const navBarProps = ref({ customClass: 'bg-transparent!' })
|
|
const navBarProps = ref({ customClass: 'bg-transparent!' })
|
|
onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
@@ -139,7 +150,13 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
v-bind="navBarProps"
|
|
v-bind="navBarProps"
|
|
>
|
|
>
|
|
<template #left>
|
|
<template #left>
|
|
- <wd-button type="text" size="small" custom-class="p-0!" :round="false">
|
|
|
|
|
|
+ <wd-button
|
|
|
|
+ type="text"
|
|
|
|
+ size="small"
|
|
|
|
+ custom-class="p-0!"
|
|
|
|
+ :round="false"
|
|
|
|
+ @click="handleClickScan"
|
|
|
|
+ >
|
|
<wd-img width="25" height="25" :src="scan" custom-class="vertical-bottom"></wd-img>
|
|
<wd-img width="25" height="25" :src="scan" custom-class="vertical-bottom"></wd-img>
|
|
</wd-button>
|
|
</wd-button>
|
|
</template>
|
|
</template>
|