app 弹框协议等

master
yeliang-king 2022-04-24 22:41:00 +08:00
parent 884d3e8c34
commit b4e2761b1f
6 changed files with 146 additions and 5 deletions

11
App.vue
View File

@ -66,7 +66,16 @@ export default {
onShow() { onShow() {
// #ifndef H5 // #ifndef H5
this.getClipboard(); // this.getClipboard();
// #endif
// #ifdef APP-PLUS
console.log(storage.getShow());
if (storage.getShow()) {
if(uni.getSystemInfoSync().platform == 'ios'){
this.$u.route("/pages/tabbar/screen/fullScreen");
// uni.reLaunch({ url: "/pages/tabbar/screen/fullScreen" });
}
}
// #endif // #endif
}, },
methods: { methods: {

17
androidPrivacy.json Normal file
View File

@ -0,0 +1,17 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://pc-b2b2c.pickmall.cn/article/detail?id=1371992704333905920\">《服务协议》</a>和<a href=\"https://pc-b2b2c.pickmall.cn/article/detail?id=1371779927900160000\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"https://pc-b2b2c.pickmall.cn/article/detail?id=1371992704333905920\">《服务协议》</a>和<a href=\"https://pc-b2b2c.pickmall.cn/article/detail?id=1371779927900160000\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"styles" : {
"borderRadius" : "5px"
}
}

View File

@ -1,6 +1,6 @@
{ {
"name" : "lili商城", "name" : "lili商城",
"appid" : "__UNI__C100675", "appid" : "__UNI__83F0C3D",
"description" : "", "description" : "",
"versionName" : "4.2.4.1", "versionName" : "4.2.4.1",
"versionCode" : 4000241, "versionCode" : 4000241,

View File

@ -14,7 +14,18 @@
"enablePullDownRefresh":true "enablePullDownRefresh":true
} }
}, },
{
"path":"pages/tabbar/screen/fullScreen",
"style": {
"navigationStyle": "custom", //
"app-plus":{
"animationType": "fade-in", // fade-in
"background": "transparent", //
"backgroundColor": "rgba(0,0,0,0)", //
"popGesture": "none" // IOS
}
}
},
{ {
"path": "pages/tabbar/cart/cartList", "path": "pages/tabbar/cart/cartList",
"style": { "style": {

View File

@ -0,0 +1,95 @@
<template>
<u-modal v-model="show" cancelText="不同意" confirmText="同意" showCancelButton="btnShow" title="服务协议和隐私政策" @confirm="confirm" @cancel="cancel">
<view class="u-update-content">
请您务必审慎阅读,充分理解服务协议隐私政策各条款
包括但不限于为了更好的向你提供服务我们需要收集你的设备标识,
操作日志等信息用于分析优化应用性能 您可阅读你可阅读
<a @click="gotoLink"></a>
<a @click="gotoB"> </a>
如果您同意请点击下面按钮开始接受我们的服务
</view>
</u-modal>
</template>
<script>
import storage from "@/utils/storage";
export default {
created() {
// created
// if (storage.getShow()) {
// // true
// console.log(this.show); // this.show true
// if (!this.show) {
// // false
// this.show = storage.getShow(); //false
// setTimeout(() => {
// //
// uni.reLaunch({
// //
// url: "/pages/tabbar/home/index",
// });
// }, 500);
// }
// }
},
data() {
return {
show: true, //
btnShow:true,
a: "",
};
},
// onReady() {
// this.show = true;
// },
methods: {
gotoLink() {
uni.navigateTo({
//
url:
"/pages/tabbar/home/web-view?src=https://pc-b2b2c.pickmall.cn/article/detail?id=1371992704333905920",
});
},
gotoB() {
uni.navigateTo({
url:
"/pages/tabbar/home/web-view?src=https://pc-b2b2c.pickmall.cn/article/detail?id=1371779927900160000",
});
},
//
cancel(){
// #ifdef APP-PLUS
const threadClass = plus.ios.importClass("NSThread");
const mainThread = plus.ios.invoke(threadClass, "mainThread");
plus.ios.invoke(mainThread, "exit")
// #endif
},
confirm() {
//
this.show = false; // false
storage.setShow(this.show); //
if (!this.show) {
//
setTimeout(() => {
uni.reLaunch({
//
url: "/pages/tabbar/home/index",
});
}, 500);
}
},
},
};
</script>
<style scoped>
.u-update-content {
font-size: 26rpx;
padding: 30rpx;
}
a {
text-decoration: blue;
color: blue;
}
</style>

View File

@ -18,7 +18,16 @@ export default {
getHotWords() { getHotWords() {
return uni.getStorageSync(`hotWords`); return uni.getStorageSync(`hotWords`);
}, },
//写入 展示还是不展示
setShow(val) {
uni.setStorageSync("show", val);
},
getShow() {
if (uni.getStorageSync(`show`) === "" || uni.getStorageSync(`show`) === undefined) {
return true;
}
return uni.getStorageSync(`show`);
},
// 获取face id登录 // 获取face id登录
getFaceLogin() { getFaceLogin() {
return uni.getStorageSync(FACE_LOGIN); return uni.getStorageSync(FACE_LOGIN);