|
@@ -13,13 +13,47 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-col>
|
|
|
+ <a-col :span="12" v-if="acpUrl">
|
|
|
+ <div class="wrap new">
|
|
|
+ <img src="../../../assets/payments/zfb.png" />
|
|
|
+ <div class="content">
|
|
|
+ <p class="title">阿里支付ACP</p>
|
|
|
+ <p class="describe">阿里跨境支付解决方案,支持多币种收款,安全便捷的跨境支付体验</p>
|
|
|
+ <p class="info">
|
|
|
+ <a-button type="primary" @click="openWindow(acpUrl)">去使用</a-button>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getACPUrlParams } from './index.api';
|
|
|
+
|
|
|
export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ acpUrl: '',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ await this.initACPUrl();
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ async initACPUrl() {
|
|
|
+ try {
|
|
|
+ const result = await getACPUrlParams();
|
|
|
+ if (result?.params?.signature && result?.params?.encrypt) {
|
|
|
+ this.acpUrl = `https://payment.alibaba.com/home.html?from=suhaotong&&signature=${result.params.signature}&platformParam=${result.params.encrypt}`;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ if (error?.response?.status !== 500) {
|
|
|
+ console.error('Failed to get ACP URL params:', error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
openWindow(url) {
|
|
|
// 获取屏幕的宽度和高度
|
|
|
const screenWidth = window.screen.width;
|