|
@@ -22,7 +22,7 @@
|
|
:autosize="true"
|
|
:autosize="true"
|
|
>
|
|
>
|
|
<template #right-icon>
|
|
<template #right-icon>
|
|
- <svg-icon style="width: 16px; height: 16px;" name="sm" />
|
|
|
|
|
|
+ <svg-icon style="width: 16px; height: 16px;" name="sm" @click="changeSM"/>
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
</div>
|
|
</div>
|
|
@@ -103,6 +103,7 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { verifyFingerprint } from "@/components/Biometrics/biometrics.js"
|
|
import { verifyFingerprint } from "@/components/Biometrics/biometrics.js"
|
|
|
|
+import { startScan } from "@/composables/barcodeScanner.js"
|
|
import { cryptoDecode } from "@/utils/crypto.js"
|
|
import { cryptoDecode } from "@/utils/crypto.js"
|
|
import { useRouter,useRoute } from 'vue-router'
|
|
import { useRouter,useRoute } from 'vue-router'
|
|
import { useWalletStore } from "@/stores/modules/walletStore";
|
|
import { useWalletStore } from "@/stores/modules/walletStore";
|
|
@@ -110,6 +111,7 @@ import Web3 from "web3";
|
|
import pubData from "@/utils/pub.json";
|
|
import pubData from "@/utils/pub.json";
|
|
import { showLoadingToast,showToast } from 'vant';
|
|
import { showLoadingToast,showToast } from 'vant';
|
|
import { showNotify } from 'vant';
|
|
import { showNotify } from 'vant';
|
|
|
|
+
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const walletStore = useWalletStore();
|
|
const walletStore = useWalletStore();
|
|
@@ -193,6 +195,11 @@ const changeList = (item) => {
|
|
showWallet.value = false;
|
|
showWallet.value = false;
|
|
unitNum.value = ''
|
|
unitNum.value = ''
|
|
}
|
|
}
|
|
|
|
+// 扫码
|
|
|
|
+const changeSM = async () => {
|
|
|
|
+ const result = await startScan();
|
|
|
|
+ walletAddress.value = result.ScanResult;
|
|
|
|
+}
|
|
// 确认
|
|
// 确认
|
|
const confirm = async () => {
|
|
const confirm = async () => {
|
|
showWallet.value = false;
|
|
showWallet.value = false;
|