feat: 替换sass版本,定义全局样式,实现简单的页面布局操作,比如颜色、边距、圆角等

This commit is contained in:
duanshuwen
2025-10-06 13:13:16 +08:00
parent e0f0e90635
commit c8e51e4975
108 changed files with 366 additions and 517 deletions

View File

@@ -3,14 +3,23 @@
<view class="content">
<view class="title">隐私保护指引</view>
<view class="des">
请您仔细阅读并充分理解<text class="link" @click="handleOpenPrivacyContract">{{ privacyContractName }}</text>
如您同意前述协议的全部内容请点击同意开始使用<text class="cancel">如您不同意将被限制使用部分功能或将在您使用具体功能前再次询问以取得您的授权同意</text>
请您仔细阅读并充分理解<text
class="link"
@click="handleOpenPrivacyContract"
>{{ privacyContractName }}</text
>
如您同意前述协议的全部内容请点击同意开始使用<text class="cancel"
>如您不同意将被限制使用部分功能或将在您使用具体功能前再次询问以取得您的授权同意</text
>
</view>
<view class="btns">
<button class="reject" @click="handleDisagree">拒绝</button>
<button class="agree" open-type="agreePrivacyAuthorization"
@agreeprivacyauthorization="handleAgreePrivacyAuthorization">
<button
class="agree"
open-type="agreePrivacyAuthorization"
@agreeprivacyauthorization="handleAgreePrivacyAuthorization"
>
同意
</button>
</view>
@@ -19,11 +28,11 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref } from "vue";
import { onShow } from "@dcloudio/uni-app";
const showPrivacy = ref(true)
const privacyContractName = ref('隐私保护指引')
const showPrivacy = ref(true);
const privacyContractName = ref("隐私保护指引");
onShow(() => {
// 条件编译微信小程序
@@ -34,7 +43,7 @@ onShow(() => {
console.log("cj隐私配置", res);
if (res.errMsg == "getPrivacySetting:ok" && res.needAuthorization) {
privacyContractName.value = res.privacyContractName;
showPrivacy.value = res.needAuthorization
showPrivacy.value = res.needAuthorization;
}
},
});
@@ -44,36 +53,33 @@ onShow(() => {
// #ifdef MP-TOUTIAO
uni.getPrivacySetting({
success: (res) => {
console.log(res)
}
})
console.log(res);
},
});
// #endif
})
});
// 拒绝
const handleDisagree = () => {
showPrivacy.value = false
}
showPrivacy.value = false;
};
// 同意
const handleAgreePrivacyAuthorization = () => {
showPrivacy.value = false
}
showPrivacy.value = false;
};
// 打开隐私保护指引
const handleOpenPrivacyContract = () => {
// 条件编译微信小程序
// #ifdef MP-WEIXIN
wx.openPrivacyContract({
fail: () => { }
})
fail: () => {},
});
// #endif
}
};
</script>
<style scoped lang="scss">
@use "./styles/index.scss";
@import "./styles/index.scss";
</style>