49 lines
978 B
Vue
49 lines
978 B
Vue
<template>
|
|
<view class="IMsetting-container">
|
|
<view class="sound-setting-content">
|
|
<view class="sound-label">声音设置</view>
|
|
<view class="sound-switch">
|
|
<u-switch
|
|
v-model="soundSwitchValue"
|
|
activeColor="#5ac725"
|
|
inactiveColor="#f56c6c"
|
|
@change="changSound"
|
|
></u-switch>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
soundSwitchValue: true,
|
|
};
|
|
},
|
|
onShow() {
|
|
this.soundSwitchValue = uni.getStorageSync("isImSound");
|
|
},
|
|
methods: {
|
|
changSound(e) {
|
|
uni.setStorageSync("isImSound", e);
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss">
|
|
.IMsetting-container {
|
|
padding: 20rpx;
|
|
min-height: calc(100vh - 88rpx);
|
|
overflow: hidden;
|
|
background-color: #fafafa;
|
|
|
|
.sound-setting-content {
|
|
display: flex;
|
|
background: #fff;
|
|
justify-content: space-between;
|
|
padding: 40rpx;
|
|
border-radius: 12rpx;
|
|
}
|
|
}
|
|
</style>
|