fix: privacy policy compliance - checkbox must be manually checked, add WeChat privacy API

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
yuzhiran
2026-06-18 18:46:57 +08:00
parent f72312ea52
commit 4ac42f6575
3 changed files with 47 additions and 13 deletions
+28 -1
View File
@@ -1,7 +1,34 @@
<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
onLaunch(() => { console.log('职引 App launched') })
onLaunch(() => {
console.log('职引 App launched')
// #ifdef MP-WEIXIN
initPrivacy()
// #endif
})
// #ifdef MP-WEIXIN
function initPrivacy() {
if (wx.onNeedPrivacyAuthorization) {
wx.onNeedPrivacyAuthorization((resolve) => {
uni.showModal({
title: '隐私政策授权',
content: '请仔细阅读并同意《用户服务协议》和《隐私政策》后再使用本应用。您的个人信息将仅用于求职服务。',
confirmText: '同意',
cancelText: '拒绝',
success: (res) => {
if (res.confirm) {
resolve({ event: 'agree' })
} else {
resolve({ event: 'disagree' })
}
},
})
})
}
}
// #endif
onShow(() => { console.log('职引 App shown') })
onHide(() => { console.log('职引 App hidden') })
</script>