|
@@ -0,0 +1,66 @@
|
|
|
+<template>
|
|
|
+ <div class="cashier-wrapper">
|
|
|
+ <form ref="formDom" :action="pageData.formData.actionUrl" method="post" id="submitForm">
|
|
|
+ <input type="hidden" name="merchantNo" :value="pageData.formData.merchantNo">
|
|
|
+ <input type="hidden" name="language" :value="pageData.formData.language">
|
|
|
+ <input type="hidden" name="timeStamp" :value="pageData.formData.timeStamp">
|
|
|
+ <input type="hidden" name="version" :value="pageData.formData.version">
|
|
|
+ <input type="hidden" name="merchantOrderNo" :value="pageData.formData.merchantOrderNo">
|
|
|
+ <input type="hidden" name="orderAmount" :value="pageData.formData.orderAmount">
|
|
|
+ <input type="hidden" name="currency" :value="pageData.formData.currency">
|
|
|
+ <input type="hidden" name="productDetail" :value="pageData.formData.productDetail">
|
|
|
+ <input type="hidden" name="callbackUrl" :value="pageData.formData.callbackUrl">
|
|
|
+ <input type="hidden" name="noticeUrl" :value="pageData.formData.noticeUrl">
|
|
|
+ <input type="hidden" name="sign" :value="pageData.formData.sign">
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { onMounted, ref, reactive, nextTick } from "vue";
|
|
|
+
|
|
|
+import {setChromeStorage, getChromeStorage} from "@/uilts/chromeExtension"
|
|
|
+
|
|
|
+let formDom = ref(null);
|
|
|
+
|
|
|
+let pageData = reactive({
|
|
|
+ formData: {
|
|
|
+ actionUrl: '',
|
|
|
+ merchantNo: '',
|
|
|
+ language: '',
|
|
|
+ timeStamp: '',
|
|
|
+ version: '',
|
|
|
+ merchantOrderNo: '',
|
|
|
+ orderAmount: '',
|
|
|
+ currency: '',
|
|
|
+ productDetail: '',
|
|
|
+ callbackUrl: '',
|
|
|
+ noticeUrl: '',
|
|
|
+ sign: ''
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const getLocalPayInfo = async () => {
|
|
|
+ let payInfo = await getChromeStorage('achPayInfo');
|
|
|
+
|
|
|
+ console.log(payInfo,'payInfo');
|
|
|
+ if(payInfo) {
|
|
|
+ chrome.storage.local.remove("achPayInfo");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getLocalPayInfo();
|
|
|
+ // setTimeout(() => {
|
|
|
+ // console.log('form', formDom.value);
|
|
|
+ // formDom.value && formDom.value.submit();
|
|
|
+ // }, 600)
|
|
|
+})
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.cashier-wrapper {
|
|
|
+}
|
|
|
+</style>
|