feat: 旅游卡页面重设计 + uni-app升级 + Sass迁移@use
- 旅游卡页面(qrcode/index): 卡面背景图、持卡人信息直接显示、 头像点击查看大图、绑定入口、入园码二维码、卡号复制按钮 - App.vue: getSystemInfoSync → getDeviceInfo, try/catch兜底 - uni-app 升级到 3.0.0-alpha-5010320260611001 (5.13) - Sass: @import → @use 迁移(main.scss, _mixins.scss, _utilities.scss) - pnpm-workspace.yaml 配置更新 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+17
-13
@@ -5,18 +5,22 @@ import { useUserStore } from './store/user'
|
||||
onLaunch(() => {
|
||||
// #ifdef MP-WEIXIN
|
||||
// 仅真机检查隐私协议,模拟器中跳过(getPrivacySetting 在模拟器会触发框架级 timeout)
|
||||
const sysInfo = uni.getSystemInfoSync()
|
||||
if (sysInfo.platform !== 'devtools' && wx.getPrivacySetting) {
|
||||
wx.getPrivacySetting({
|
||||
success: (res: any) => {
|
||||
if (res.needAuthorization) {
|
||||
uni.setStorageSync('needPrivacy', true)
|
||||
} else {
|
||||
uni.removeStorageSync('needPrivacy')
|
||||
}
|
||||
},
|
||||
fail: () => {},
|
||||
})
|
||||
try {
|
||||
const deviceInfo = wx.getDeviceInfo()
|
||||
if (deviceInfo.platform !== 'devtools' && typeof wx.getPrivacySetting === 'function') {
|
||||
wx.getPrivacySetting({
|
||||
success: (res: any) => {
|
||||
if (res.needAuthorization) {
|
||||
uni.setStorageSync('needPrivacy', true)
|
||||
} else {
|
||||
uni.removeStorageSync('needPrivacy')
|
||||
}
|
||||
},
|
||||
fail: () => {},
|
||||
})
|
||||
}
|
||||
} catch (_e) {
|
||||
// wx.getDeviceInfo 或 wx.getPrivacySetting 不支持时静默跳过
|
||||
}
|
||||
// #endif
|
||||
|
||||
@@ -31,7 +35,7 @@ onLaunch(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './styles/main.scss';
|
||||
@use './styles/main.scss' as *;
|
||||
|
||||
page {
|
||||
min-height: 100vh;
|
||||
|
||||
Reference in New Issue
Block a user