blob: b19ae8ab41e8ecaaad3fde0100477678cd49ad5f [file] [log] [blame]
guangchao.xu6cdd45e2021-04-16 17:44:30 +08001<template>
2 <view class="setting">
3 <u-cell-group>
4 <u-cell-item title="通知功能" :arrow="false">
5 <u-icon slot="icon" size="32" name="notice"></u-icon>
6 <u-switch slot="right-icon" v-model="is_open" @change="notice"></u-switch>
7 </u-cell-item>
8 </u-cell-group>
9 </view>
10</template>
11
12<script>
13 export default {
14 data() {
15 return {
16 is_open: true,
17 }
18 },
19 onShow() {
20 let is_notice = uni.getStorageSync('is_notice')
21 this.is_open = is_notice
22 },
23 onLoad() {
24
25 },
26 methods: {
27 notice(e) {
28 uni.setStorageSync('is_notice', e)
29 }
30 }
31 }
32</script>
33
34<style scoped lang="scss">
35
36</style>