|
@@ -126,15 +126,14 @@
|
|
|
// 粘贴并识别功能
|
|
// 粘贴并识别功能
|
|
|
const handleSearch = async (type) => {
|
|
const handleSearch = async (type) => {
|
|
|
try {
|
|
try {
|
|
|
- // 1. 读取剪贴板内容
|
|
|
|
|
- const clipboardText = await new Promise((resolve, reject) => {
|
|
|
|
|
- uni.getClipboardData({
|
|
|
|
|
- success: res => resolve(res.data),
|
|
|
|
|
- fail: err => reject(err)
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
if (type == 1) {
|
|
if (type == 1) {
|
|
|
|
|
+ // 1. 读取剪贴板内容
|
|
|
|
|
+ const clipboardText = await new Promise((resolve, reject) => {
|
|
|
|
|
+ uni.getClipboardData({
|
|
|
|
|
+ success: res => resolve(res.data),
|
|
|
|
|
+ fail: err => reject(err)
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
if (!clipboardText) {
|
|
if (!clipboardText) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '剪贴板内容为空',
|
|
title: '剪贴板内容为空',
|
|
@@ -203,7 +202,7 @@
|
|
|
|
|
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '识别成功,请核对地址信息',
|
|
title: '识别成功,请核对地址信息',
|
|
|
- icon: 'success'
|
|
|
|
|
|
|
+ icon: 'none'
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|