dsg
INSERT INTO `cp_filejs` (`id`,`app`,`path`,`modul`,`file_name`,`content`) VALUES ('173','1','u2/creator','scanner','js/qr-scanner.js-','import {\r\n verifyScan\r\n} from \\\"./api/scanner.js\\\"\r\nimport store from \\\"./store.js\\\"\r\n\r\nexport const onScanSuccess = async (decodedText) => {\r\n // https://mydrivelife.com/qr/clpmhHGEXyUD\r\n // get the qr code and verify it\r\n\r\n if (store.getters.isScanningQrCode.value) {\r\n return\r\n }\r\n\r\n store.dispatch(\\\'setScanningQrCode\\\', true)\r\n\r\n try {\r\n const url = new URL(decodedText)\r\n\r\n if (url.hostname === \\\'mydrivelife.com\\\') {\r\n const qrCode = url.pathname.split(\\\'/\\\').pop()\r\n if (qrCode) {\r\n const response = await verifyScan(qrCode)\r\n store.dispatch(\\\'setScannedData\\\', response)\r\n store.dispatch(\\\'setScanningQrCode\\\', false)\r\n }\r\n } else {\r\n store.dispatch(\\\'setScannedData\\\', {\r\n status: \\\'error\\\',\r\n message: \\\'Oops, looks like you scanned an invalid QR code\\\',\r\n available: false\r\n })\r\n store.dispatch(\\\'setScanningQrCode\\\', false)\r\n }\r\n } catch (error) {\r\n console.log(\\\'error\\\', error)\r\n }\r\n}\r\n\r\nexport function onScanFailure(error) {\r\n // handle scan failure, usually better to ignore and keep scanning.\r\n // for example:\r\n // console.warn(`Code scan error = ${error}`)\r\n}');
Copy This

Warning: file_get_contents(/home/u340524018/domains/agniaga.com/public_html/sub/u2/creator/js/qr-scanner.js-): Failed to open stream: No such file or directory in /home/u340524018/domains/agniaga.com/public_html/sub/u2/cp/inc.filejs.php on line 190
import {
    verifyScan
} from \"./api/scanner.js\"
import store from \"./store.js\"

export const onScanSuccess = async (decodedText) => {
    // https://mydrivelife.com/qr/clpmhHGEXyUD
    // get the qr code and verify it

    if (store.getters.isScanningQrCode.value) {
        return
    }

    store.dispatch(\'setScanningQrCode\', true)

    try {
        const url = new URL(decodedText)

        if (url.hostname === \'mydrivelife.com\') {
            const qrCode = url.pathname.split(\'/\').pop()
            if (qrCode) {
                const response = await verifyScan(qrCode)
                store.dispatch(\'setScannedData\', response)
                store.dispatch(\'setScanningQrCode\', false)
            }
        } else {
            store.dispatch(\'setScannedData\', {
                status: \'error\',
                message: \'Oops, looks like you scanned an invalid QR code\',
                available: false
            })
            store.dispatch(\'setScanningQrCode\', false)
        }
    } catch (error) {
        console.log(\'error\', error)
    }
}

export function onScanFailure(error) {
    // handle scan failure, usually better to ignore and keep scanning.
    // for example:
    // console.warn(`Code scan error = ${error}`)
}
Add JS Function Name