更新记录
1.0(2023-09-12) 下载此版本
发布
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | √ | - | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
√ | - | - | - | - | - | - | - | - | - | - |
如果有任何问题请在底部留言描述清楚,如需付费远程协助或进群请加微信
qq:913349747【备注来意】 不备注的不加
1. 下载插件
下载插件后将 /components/privacy-popup 文件夹复制到你项目的/components 目录下
2. 引入插件
如果只在某些页面引入,在对应页面引入插件,例如:登录页或者注册页
如果需要全局引入, 在 app.vue 引入js,然后在需要使用的页面引入template
<script>
import PrivacyPopup from '@/components/privacy-popup/privacy-popup.vue';
export default {
components: {
PrivacyPopup
},
}
</script>
默认显示在中间
<template>
<!-- 隐私协议 -->
<!-- #ifdef MP-WEIXIN -->
<!-- 默认显示在中间 -->
<privacy-popup ref="privacyComponent" ></privacy-popup>
<!-- #endif -->
</template>
如需显示在底部,增加position="bottom"
<template>
<!-- 隐私协议 -->
<!-- #ifdef MP-WEIXIN -->
<!-- 显示在底部 -->
<privacy-popup ref="privacyComponent" position="bottom" ></privacy-popup>
<!-- #endif -->
</template>
3. manifest.json
切换为源码视图中添加usePrivacyCheck
"mp-weixin" : {
"__usePrivacyCheck__": true
},