连云港陪玩陪聊
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chunwan/pages/users/site/index.vue

201 lines
4.7 KiB

3 months ago
<template>
<view class="site">
<view class="site-hd">
1 month ago
<view class="item" @click="openPage('/pages/users/yinsi/index')">
3 months ago
<view class="a">隐私设置</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
1 month ago
<view class="item" @click="openPage('/pages/users/notice/index')">
3 months ago
<view class="a">新消息通知</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
1 month ago
<view class="item" @click="openPage('/pages/users/qingshaonian/index')">
3 months ago
<view class="a">青少年模式</view>
1 month ago
<view class="b">{{userInfo.teenageMode == 0?'未开启':'已开启'}}
3 months ago
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
1 month ago
<view class="item" @click="openPage('/pages/login/password')">
3 months ago
<view class="a">修改密码</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
1 month ago
<view class="item" @click="openPage('/pages/users/dashan/index')">
3 months ago
<view class="a">搭讪语设置</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
</view>
<view class="site-hd">
1 month ago
<view class="item" @click="openPage('/pages/xiaoxi/heimingdan')">
3 months ago
<view class="a">黑名单</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
</view>
<view class="site-hd">
1 month ago
<view class="item" @click="openPage('/pages/users/about/index?type=CONFIG_ABOUT_AS')">
3 months ago
<view class="a">关于我们</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
1 month ago
<view class="item" @click="openPage('/pages/users/about/index?type=CONFIG_PRIVACY_POLICY')">
3 months ago
<view class="a">隐私协议</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
1 month ago
<view class="item" @click="openPage('/pages/users/about/index?type=CONFIG_USER_AGREEMENT')">
3 months ago
<view class="a">用户协议</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
1 month ago
<view class="item" @click="openPage('/pages/users/zhuxiao/index')">
3 months ago
<view class="a">注销账号</view>
<view class="b">
<image src="@/static/icon-arrow.png"></image>
</view>
</view>
</view>
<view class="site-fd">
1 month ago
<view class="btn" @click="toLoginOut()">退出登录</view>
3 months ago
</view>
1 month ago
3 months ago
</view>
</template>
<script>
export default {
data() {
return {
1 month ago
isPopup: false,
userInfo: {},
3 months ago
};
1 month ago
},
onShow() {
this.getUserInfo();
2 months ago
},
1 month ago
methods: {
//查询个人信息
async getUserInfo() {
const { code, data , msg } = await this.$api.findUserInfo({userId: uni.getStorageSync("userInfo").id});
if(code == 200){
this.userInfo = data;
uni.setStorageSync("userInfo",data);
}else{
uni.showToast({
1 month ago
title: msg,
1 month ago
position: "bottom",
icon: "none",
})
}
},
openPage(url){
uni.navigateTo({
url
})
},
toLoginOut() {
const that = this;
uni.showModal({
title: "温馨提示",
content: "是否确认退出登录?",
confirmColor: "#000",
success(res){
if(res.confirm){
uni.clearStorageSync();
uni.showToast({
title: "退出成功"
})
1 month ago
uni.closeSocket();
1 month ago
setTimeout(()=>{
uni.reLaunch({
url: "/pages/login/index"
})
},2000)
2 months ago
}
1 month ago
}
})
},
3 months ago
}
}
</script>
<style lang="scss">
.site{
padding: 0 25rpx;
overflow: hidden;
3 weeks ago
padding-bottom: 140rpx;
1 month ago
3 months ago
&-hd{
width: 100%;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
.item{
padding: 40rpx 0;
border-top: 1px solid #EAEAEA;
display: flex;
align-items: center;
justify-content: space-between;
&:first-child{
border-top-color: #FFFFFF;
}
.a{
font-weight: 500;
font-size: 30rpx;
color: #333333;
}
.b{
flex: 1;
text-align: right;
font-weight: 500;
font-size: 30rpx;
color: #999999;
display: flex;
align-items: center;
justify-content: flex-end;
image{
margin-left: 20rpx;
width: 30rpx;
height: 30rpx;
}
}
}
}
&-fd{
background-color: #F3F4F5;
width: 100%;
padding: 30rpx 25rpx;
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 0;
z-index: 22;
.btn{
width: 100%;
line-height: 98rpx;
background: linear-gradient(0deg, #000000, #3D3B38);
box-shadow: 0px 4rpx 18rpx 0px rgba(42,41,39,0.34);
border-radius: 98rpx;
text-align: center;
font-weight: 400;
font-size: 30rpx;
color: #FFFFFF;
letter-spacing: 5rpx;
}
}
}
</style>