更新小程序仓库

This commit is contained in:
zoujiandong
2023-11-17 09:51:35 +08:00
parent 13f54a26df
commit 4506940c2d
936 changed files with 60022 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
// pages/notify/notigy.js
const app = getApp()
import {
getConfig,
editConfig
} from "../../api/personCenter"
Page({
/**
* 页面的初始数据
*/
data: {
checked:true,
},
onChangeSwitch({ detail }){
this.setData({ checked: detail });
this.handleEditConfig(detail);
},
handleEditConfig(detail){
let is_accept_im_message_push=detail?1:0;
editConfig({is_accept_im_message_push:is_accept_im_message_push}).then(data=>{
wx.showToast({
title: '设置成功',
icon:"none"
})
})
},
handleGetConfig(){
getConfig().then(data=>{
this.setData({
checked:data.is_accept_im_message_push==1?true:false
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.handleGetConfig();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"nav":"../../components/nav/nav",
"van-switch": "@vant/weapp/switch/index"
},
"navigationStyle":"custom"
}
+12
View File
@@ -0,0 +1,12 @@
<!--pages/notify/notigy.wxml-->
<nav navName="消息通知"></nav>
<view class="page">
<view class="cellbox">
<view class="cell">
<view class="left">消息提醒</view>
<view class="right" >
<van-switch checked="{{ checked }}" active-color="#3CC7C0" bind:change="onChangeSwitch" inactive-color="#ccc" size="24px"/>
</view>
</view>
</view>
</view>
+46
View File
@@ -0,0 +1,46 @@
/* pages/notify/notigy.wxss */
.page{
position: relative;
width: 100vw;
height:100vh;
overflow: scroll;
-webkit-overflow-scrolling: touch;
background: #F2F2F2;
}
.cellbox{
margin-top: 172rpx;
}
.cell{
overflow: hidden;
display: flex;
width:100%;
background-color: #fff;
height: 112rpx;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid#F2F2F2;
}
.righticon {
width: 24rpx;
height: 48rpx;
}
.box{
width:100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.left{
margin-left: 32rpx;
}
.right{
position: relative;
flex:1;
font-size: 28rpx;
margin-right: 32rpx;
display: flex;
justify-content: flex-end;
color: #666666;
align-items: center;
}