<template> <view> <!-- <web-view :src="PayUrl"></web-view> --> <a ref="payUrlRef" :href="PayUrl"></a> </view> </template> <script> export default { data() { return { PayUrl: "", }; }, onLoad(page) { //15是因为传了‘currentPayUrl’,不要更改参数名 this.PayUrl = this.$u.queryParams(page).slice(15); }, mounted() { this.$refs.payUrlRef.click(); } } </script> <style> </style>