fix: 手机号脱敏;关于我们,退出登录

property-only-app
wx-jincw 2 months ago
parent b978d37b6a
commit 06f3335f8c

@ -171,6 +171,20 @@
}, {
"path": "pages/index/components/b_combination",
"style": {}
},
{
"path": "pages/about/index",
"style": {
"navigationBarTitleText": "关于我们",
"navigationBarBackgroundColor": "#409EFF",
"app-plus": {
// #ifdef APP-PLUS
"titleNView": {
"type": "default"
}
// #endif
}
}
}
],
@ -931,18 +945,18 @@
"selectedIconPath": "static/images/1-002.png",
"text": "首页"
},
{
"pagePath": "pages/goods_cate/goods_cate",
"iconPath": "static/images/2-001.png",
"selectedIconPath": "static/images/2-002.png",
"text": "分类"
},
{
"pagePath": "pages/order_addcart/order_addcart",
"iconPath": "static/images/3-001.png",
"selectedIconPath": "static/images/3-002.png",
"text": "购物车"
},
// {
// "pagePath": "pages/goods_cate/goods_cate",
// "iconPath": "static/images/2-001.png",
// "selectedIconPath": "static/images/2-002.png",
// "text": "分类"
// },
// {
// "pagePath": "pages/order_addcart/order_addcart",
// "iconPath": "static/images/3-001.png",
// "selectedIconPath": "static/images/3-002.png",
// "text": "购物车"
// },
{
"pagePath": "pages/user/index",
"iconPath": "static/images/4-001.png",

@ -0,0 +1,183 @@
<template>
<view class="about-container">
<!-- <view class="header">
<view class="back" @click="goBack">
<text class="iconfont icon-xiangzuo"></text>
</view>
<view class="title">关于我们</view>
<view class="empty"></view>
</view> -->
<view class="content">
<view class="logo-section">
<image class="logo" src="/static/images/logo.png" mode="aspectFit"></image>
<view class="app-name">八方物业</view>
<view class="version">版本 1.0.0</view>
</view>
<view class="info-section">
<view class="info-item">
<view class="info-label">公司名称</view>
<view class="info-value">...</view>
</view>
<!-- <view class="info-item">
<view class="info-label">联系电话</view>
<view class="info-value"></view>
</view> -->
<view class="info-item">
<view class="info-label">公司地址</view>
<view class="info-value">...</view>
</view>
<!-- <view class="info-item">
<view class="info-label">电子邮箱</view>
<view class="info-value"></view>
</view> -->
</view>
<!-- <view class="desc-section">
<view class="desc-title">关于八方物业</view>
<view class="desc-content">
我们是
</view>
</view> -->
<view class="copyright">
© 2026 八方物业. 保留所有权利
</view>
</view>
</view>
</template>
<script>
export default {
methods: {
goBack() {
uni.navigateBack();
}
}
}
</script>
<style lang="scss" scoped>
.about-container {
width: 100%;
min-height: 100vh;
background-color: #f5f5f5;
.header {
display: flex;
align-items: center;
justify-content: space-between;
height: 90rpx;
background-color: #409EFF;
padding: 0 30rpx;
.back {
width: 50rpx;
height: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.iconfont {
font-size: 36rpx;
color: #fff;
}
}
.title {
font-size: 32rpx;
font-weight: 600;
color: #fff;
}
.empty {
width: 50rpx;
}
}
.content {
padding: 40rpx 30rpx;
.logo-section {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 50rpx;
.logo {
width: 160rpx;
height: 160rpx;
margin-bottom: 20rpx;
}
.app-name {
font-size: 36rpx;
font-weight: 600;
color: #333;
margin-bottom: 10rpx;
}
.version {
font-size: 24rpx;
color: #999;
}
}
.info-section {
background-color: #fff;
border-radius: 14rpx;
padding: 30rpx;
margin-bottom: 30rpx;
.info-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #f2f2f2;
&:last-child {
border-bottom: none;
}
.info-label {
font-size: 28rpx;
color: #666;
}
.info-value {
font-size: 28rpx;
color: #333;
text-align: right;
flex: 1;
margin-left: 30rpx;
}
}
}
.desc-section {
background-color: #fff;
border-radius: 14rpx;
padding: 30rpx;
margin-bottom: 40rpx;
.desc-title {
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 20rpx;
}
.desc-content {
font-size: 26rpx;
color: #666;
line-height: 40rpx;
}
}
.copyright {
font-size: 24rpx;
color: #999;
text-align: center;
margin-top: 20rpx;
}
}
}
</style>

@ -113,6 +113,7 @@
<view class="menu-txt">通知公告</view>
</navigator>
</view>
<template v-if="false">
<!-- menu -->
<view class='nav acea-row' v-if="menus.length">
<block v-for="(item,index) in menus" :key="index">
@ -210,6 +211,7 @@
<text>我是有底线的</text>
</view>
</view>
</template>
</view>
</view>
</view>

@ -423,6 +423,16 @@ export default {
};
});
// yyyy-MM-dd HH:mm:ss
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(now.getDate()).padStart(2, '0');
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
const reportTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
const payload = {
// phone: this.form.phone.trim(),
faultDesc: this.form.faultDesc.trim(),
@ -430,7 +440,8 @@ export default {
houseId: this.selectedHouseId,
houseName: this.selectedHouseName,
files: imagefiles,
faultType: this.form.faultType
faultType: this.form.faultType,
reportTime: reportTime
};
try {

@ -13,15 +13,15 @@
请点击登录
</view>
<view class="name" v-if="uid">
{{userInfo.nickname}}
<view class="vip" v-if="userInfo.vip">
{{userInfo.nickname || '未设置用户名'}}
<view class="vip" v-if="showShop && userInfo.vip">
<image :src="userInfo.vipIcon" alt="">
<view style="margin-left: 10rpx;" class="vip-txt">{{userInfo.vipName || ''}}
</view>
</view>
</view>
<view class="num" v-if="userInfo.phone && uid" @click="goEdit()">
<view class="num-txt">{{userInfo.phone}}</view>
<view class="num-txt">{{phoneDesensitization(userInfo.phone)}}</view>
<view class="icon">
<image src="/static/images/edit.png" mode=""></image>
</view>
@ -29,7 +29,7 @@
<view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone"></view>
</view>
</view>
<view class="num-wrapper">
<view class="num-wrapper" v-if="showShop">
<view class="num-item" @click="goMenuPage('/pages/users/user_money/index')">
<text class="num">{{userInfo.nowMoney && uid ?Number(userInfo.nowMoney).toFixed(2):0}}</text>
<view class="txt">余额</view>
@ -49,7 +49,7 @@
</view>
<!-- <view class="sign" @click="goSignIn"></view> -->
</view>
<view class="order-wrapper">
<view class="order-wrapper" v-if="showShop">
<view class="order-hd flex">
<view class="left">订单中心</view>
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index" open-type="navigate">
@ -70,7 +70,7 @@
</view>
</view>
</view>
<view class="contenBox">
<view class="contenBox" v-if="showShop">
<!-- 轮播 -->
<view class="slider-wrapper" v-if="imgUrls.length>0">
<swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
@ -109,9 +109,13 @@
</view>
</view>
<!-- <image src="/static/images/support.png" alt="" class='support'> -->
<view class="uni-p-b-98"></view>
</view>
<!-- 关于我们 -->
<view class="aboutUs acea-row row-center-wrapper" @click="goAboutUs" style="margin-top: 30rpx; padding: 0 30rpx;">关于我们</view>
<!-- 退出登录 -->
<view class="logOut acea-row row-center-wrapper" @click="outLogin" style="margin-top: 20rpx; padding: 0 30rpx;">退出登录</view>
</scroll-view>
</view>
<!-- #ifdef MP -->
@ -135,17 +139,20 @@
toLogin
} from '@/libs/login.js';
import {
getCity
} from '@/api/api.js';
import {
mapGetters
} from "vuex";
// #ifdef H5
import Auth from '@/libs/wechat';
// #endif
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
getCity
} from '@/api/api.js';
import {
getLogout
} from '@/api/user.js';
import {
mapGetters
} from "vuex";
// #ifdef H5
import Auth from '@/libs/wechat';
// #endif
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
const app = getApp();
export default {
components: {
@ -156,6 +163,7 @@
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo', 'uid']),
data() {
return {
showShop: false,
orderMenu: [{
img: '/static/images/order1.png',
title: '待付款',
@ -243,6 +251,11 @@
}
},
methods: {
//
phoneDesensitization(phone) {
if (!phone) return '';
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
},
// 访
// setVisit(){
// setVisit({
@ -367,6 +380,36 @@
expires: oneDay * 7
}); //
})
},
// 退
outLogin: function() {
let that = this;
uni.showModal({
title: '提示',
content: '确认退出登录?',
success: function(res) {
if (res.confirm) {
getLogout()
.then(res => {
that.$store.commit("LOGOUT");
uni.reLaunch({
url: '/pages/index/index'
});
})
.catch(err => {
console.log(err);
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
goAboutUs() {
uni.navigateTo({
url: '/pages/about/index'
});
}
}
}
@ -380,6 +423,7 @@
.bg {
position: absolute;
z-index: 0;
left: 0;
top: 0;
width: 100%;
@ -670,5 +714,19 @@
padding: 0 8rpx;
border: 1px solid #ee5a52;
}
.aboutUs,
.logOut {
position: relative;
font-size: 32rpx;
text-align: center;
width: 690rpx;
height: 90rpx;
border-radius: 45rpx;
margin: 30rpx auto 0 auto;
z-index: 1;
color: white;
border: 2rpx solid white !important;
}
}
</style>

@ -23,7 +23,7 @@
</navigator>
<navigator url="/pages/users/user_phone/index" hover-class="none" class="input" v-else>
<view class='input acea-row row-between-wrapper'>
<input type='text' disabled='true' name='phone' :value='userInfo.phone'
<input type='text' disabled='true' name='phone' :value='phoneDesensitization(userInfo.phone)'
class='id'></input>
<text class='iconfont icon-xiangyou'></text>
</view>
@ -112,6 +112,11 @@
}
},
methods: {
//
phoneDesensitization(phone) {
if (!phone) return '';
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
},
//
authColse: function(e) {
this.isShowAuth = e

Loading…
Cancel
Save