整合api请求、添加购买会员卡页面、登陆页面

This commit is contained in:
future
2026-06-23 22:17:53 +08:00
parent 1c547a717e
commit 8d8c823616
70 changed files with 7666 additions and 2656 deletions
@@ -0,0 +1,41 @@
<template>
<view class="webview-container">
<web-view :src="url" @message="handleMessage"></web-view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const url = ref('')
onLoad((options) => {
if (options.url) {
url.value = decodeURIComponent(options.url)
}
})
function handleMessage(e) {
console.log('[webview] 收到消息:', e.detail)
// 处理支付回调消息
const data = e.detail.data
if (data && data.payResult) {
if (data.payResult === 'success') {
// 支付成功
uni.showToast({ title: '支付成功', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 1500)
} else {
uni.showToast({ title: '支付失败', icon: 'none' })
}
}
}
</script>
<style scoped>
.webview-container {
width: 100%;
height: 100vh;
}
</style>