| <template> |
| <view class="setting"> |
| <u-cell-group> |
| <u-cell-item title="通知功能" :arrow="false"> |
| <u-icon slot="icon" size="32" name="notice"></u-icon> |
| <u-switch slot="right-icon" v-model="is_open" @change="notice"></u-switch> |
| </u-cell-item> |
| </u-cell-group> |
| </view> |
| </template> |
| |
| <script> |
| export default { |
| data() { |
| return { |
| is_open: true, |
| } |
| }, |
| onShow() { |
| let is_notice = uni.getStorageSync('is_notice') |
| this.is_open = is_notice |
| }, |
| onLoad() { |
| |
| }, |
| methods: { |
| notice(e) { |
| uni.setStorageSync('is_notice', e) |
| } |
| } |
| } |
| </script> |
| |
| <style scoped lang="scss"> |
| |
| </style> |