完成登录功能

This commit is contained in:
future
2026-06-24 22:25:36 +08:00
parent 0bebce3dc1
commit 74876e0923
57 changed files with 1773 additions and 60 deletions
@@ -1,41 +0,0 @@
<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>