Suzhou-SafetyToolsWarning-WX/components/trd-privacy/privacy.js

61 lines
943 B
JavaScript
Raw Normal View History

2025-11-07 14:54:09 +08:00
// components/privacy/privacy.js
Component({
/**
* 组件的属性列表
*/
properties: {
name: {
type: String,
value: '',
},
date: {
type: String,
value: '',
},
winStyle: {
type: Boolean,
value: false,
},
},
/**
* 组件的初始数据
*/
data: {
win: false,
privacy: false,
},
/**
* 组件的方法列表
*/
methods: {
showPrivacyDetail() {
this.setData({
win: false,
privacy: true,
});
},
privacyConfirm() {
this.setData({
privacy: false,
win: false,
});
wx.setStorageSync('TIMIShowPrivacy', true);
},
showPrivacyWin() {
this.setData({
win: true,
});
},
},
ready() {
const TIMIShowPrivacy = wx.getStorageSync('TIMIShowPrivacy');
if (!TIMIShowPrivacy) {
this.setData({
win: true,
});
}
},
});