123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <template>
- <view class="page">
- <view class="cell-wrapper">
-
- <view class="cell" style="font-size: 14px;height: 35px;line-height: 35px;color: #666;">
-
- 群组通知
- </view>
- <view class="cell" >
- <view class="cell-hd">声音</view>
- <switch @change="noteChanage(1)" :checked="shownote(user.note1)" />
- </view>
- <view class="cell" >
- <view class="cell-hd">震动</view>
- <switch @change="noteChanage(2)" :checked="shownote(user.note2)" />
- </view>
-
-
-
-
-
- <view class="cell" style="font-size: 14px;height: 35px;line-height: 35px;color: #666;">
-
- 私信通知
- </view>
- <view class="cell" >
- <view class="cell-hd">声音</view>
- <switch @change="noteChanage(3)" :checked="shownote(user.note3)" />
- </view>
- <view class="cell" >
- <view class="cell-hd">震动</view>
- <switch @change="noteChanage(4)" :checked="shownote(user.note4)" />
- </view>
-
- </view>
-
- </view>
- </template>
- <script>
- import http from "../../library/http.js"
- export default {
- data() {
- return {
- user: uni.getStorageSync('userInfo'),
- note1:true,
- note2:true
-
- }
- },
- methods: {
-
- shownote(note){
- if(note==1) return true;
- else return false;
- },
- noteChanage(num){
- if(num==1){
- var note=this.user.note1==1?0:1;
-
- var data={id:this.user.id,note1: note};
- }
- if(num==2){
- var note=this.user.note2==1?0:1;
- var data={id:this.user.id,note2: note};
- }
- if(num==3){
- var note=this.user.note3==1?0:1;
- var data={id:this.user.id,note3: note};
- }
- if(num==4){
- var note=!this.user.note4==1?0:1;
- var data={id:this.user.id,note4: note};
- }
- http.setWait(false).post('user.php?act=profile',data).then(res=>{
- this.user=res.data;
- uni.setStorageSync('userInfo',this.user)
-
- })
-
- },
-
-
- },
- onLoad() {
-
-
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .cell-wrapper {
- margin-top: 0;
- }
- .avatar {
- line-height: 1;
- padding-top: $uni-spacing-col-base;
- padding-bottom: $uni-spacing-col-base;
- .cell-hb {
- display: flex;
- flex-direction: column;
- }
- image {
- width: 140upx;
- height: 140upx;
- border-radius: $uni-border-radius-base;
- background-color: #eee;
- }
- }
- .fromInput {
- text-align: right;
- font-size: 32upx;
- color: #777;
- border: 1px sold #eee !important;padding: 0px 5px;;
-
- }
- .uploadBtn{
- width: 90%;
- margin-top: 100upx;
- }
- </style>
|