feat: 添加二维码扫描页面,优化用户界面和扫描功能
This commit is contained in:
@@ -12,9 +12,9 @@ import TradeSettings from "./components/trade-settings.vue";
|
||||
import UserInfo from "./components/user-info.vue";
|
||||
import WalletCard from "./components/wallet-card.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const { vibrate } = useHaptics();
|
||||
const walletStore = useWalletStore();
|
||||
const { open } = useQRScanner();
|
||||
|
||||
async function handleRefresh(event: RefresherCustomEvent) {
|
||||
vibrate();
|
||||
@@ -27,15 +27,7 @@ async function handleRefresh(event: RefresherCustomEvent) {
|
||||
// 处理扫描二维码
|
||||
async function handleScan() {
|
||||
vibrate();
|
||||
const result = await open({
|
||||
title: "扫描二维码",
|
||||
});
|
||||
|
||||
if (result) {
|
||||
console.log("扫描结果:", result);
|
||||
// TODO: 根据扫描结果进行相应处理
|
||||
// 例如:跳转到对应页面、显示信息等
|
||||
}
|
||||
router.push("/scan_qr");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user