parent
304dd489bb
commit
9d1a68b05f
@ -0,0 +1,5 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
@ -1,5 +1,29 @@
|
||||
/*
|
||||
* 公共方法
|
||||
*
|
||||
*/
|
||||
* 公共方法
|
||||
*
|
||||
*/
|
||||
|
||||
//时间
|
||||
export function formatDate(date, fmt) {
|
||||
if (/(y+)/.test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
|
||||
}
|
||||
let o = {
|
||||
'M+': date.getMonth() + 1,
|
||||
'd+': date.getDate(),
|
||||
'h+': date.getHours(),
|
||||
'm+': date.getMinutes(),
|
||||
's+': date.getSeconds()
|
||||
};
|
||||
for (let k in o) {
|
||||
if (new RegExp(`(${k})`).test(fmt)) {
|
||||
let str = o[k] + '';
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
};
|
||||
|
||||
function padLeftZero(str) {
|
||||
return ('00' + str).substr(str.length);
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,188 +1,207 @@
|
||||
<template>
|
||||
<view>
|
||||
<cpn-navbar title="设置" :isBack="true"></cpn-navbar>
|
||||
|
||||
<view>
|
||||
<!-- 个人信息 -->
|
||||
<view class="user-info">
|
||||
<view class="user-info-title">个人信息</view>
|
||||
|
||||
<view class="user-info-content">
|
||||
<view class="head-img">
|
||||
<view class="text">头像</view>
|
||||
<view style="display: flex;">
|
||||
<view class="avatar">
|
||||
<u-image src="/static/logo.png" height="104" width="104" shape="circle"></u-image>
|
||||
</view>
|
||||
<view class="arrow">
|
||||
<u-icon name="arrow-right" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="line"></view>
|
||||
|
||||
<view class="name">
|
||||
<view class="name-text">账户名</view>
|
||||
<view class="name-user">王老师</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 版本信息 -->
|
||||
<view class="sys-info">
|
||||
<view class="sys-info-title">版本信息</view>
|
||||
|
||||
<view class="sys-info-content">
|
||||
<view>当前版本</view>
|
||||
<view>V2.0</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="logout">
|
||||
<u-button :hair-line="false" :custom-style="btnStyle">退出登录</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<cpn-navbar title="设置" :isBack="true"></cpn-navbar>
|
||||
|
||||
<view>
|
||||
<!-- 个人信息 -->
|
||||
<view class="user-info">
|
||||
<view class="user-info-title">个人信息</view>
|
||||
|
||||
<view class="user-info-content">
|
||||
<view class="head-img">
|
||||
<view class="text">头像</view>
|
||||
<view style="display: flex">
|
||||
<view class="avatar">
|
||||
<u-image
|
||||
:src="vuex_user.avatar || '/static/logo.png'"
|
||||
height="104"
|
||||
width="104"
|
||||
shape="circle"
|
||||
></u-image>
|
||||
</view>
|
||||
<view class="arrow">
|
||||
<u-icon name="arrow-right" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="line"></view>
|
||||
|
||||
<view class="name">
|
||||
<view class="name-text">账户名</view>
|
||||
<view class="name-user">{{ vuex_user.name || "" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 版本信息 -->
|
||||
<view class="sys-info">
|
||||
<view class="sys-info-title">版本信息</view>
|
||||
|
||||
<view class="sys-info-content">
|
||||
<view>当前版本</view>
|
||||
<view>V{{ vuex_version }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="logout">
|
||||
<u-button :hair-line="false" :custom-style="btnStyle" @click="logout"
|
||||
>退出登录</u-button
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
btnStyle: {
|
||||
width: "670rpx",
|
||||
height: "76rpx",
|
||||
color: "#1479FF",
|
||||
border: "2rpx solid #1479FF"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
btnStyle: {
|
||||
width: "670rpx",
|
||||
height: "76rpx",
|
||||
color: "#1479FF",
|
||||
border: "2rpx solid #1479FF",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
logout() {
|
||||
this.$u.api.logout().then((res) => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login",
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
uni.clearStorageSync();
|
||||
},1500)
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.user-info {
|
||||
|
||||
margin-top: 28rpx;
|
||||
|
||||
&-title {
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #ABAEBE;
|
||||
line-height: 40rpx;
|
||||
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
&-content {
|
||||
width: 750rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
|
||||
|
||||
margin: 26rpx auto 0 auto;
|
||||
|
||||
.head-img {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&>view>view {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
|
||||
padding: 18rpx 0rpx;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
|
||||
padding: 0 50rpx 0 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 670rpx;
|
||||
height: 2rpx;
|
||||
border: 2rpx solid #EEEFF5;
|
||||
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
padding: 20rpx 40rpx;
|
||||
|
||||
&-text {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&-user {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sys-info {
|
||||
|
||||
margin-top: 34rpx;
|
||||
|
||||
&-title {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #ABAEBE;
|
||||
|
||||
padding: 0 0 26rpx 36rpx;
|
||||
}
|
||||
|
||||
&-content {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
padding: 22rpx 40rpx;
|
||||
|
||||
&>view {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logout {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.user-info {
|
||||
margin-top: 28rpx;
|
||||
|
||||
&-title {
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #abaebe;
|
||||
line-height: 40rpx;
|
||||
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
&-content {
|
||||
width: 750rpx;
|
||||
background: #ffffff;
|
||||
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
|
||||
|
||||
margin: 26rpx auto 0 auto;
|
||||
|
||||
.head-img {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
& > view > view {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
padding: 18rpx 0rpx;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
padding: 0 50rpx 0 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 670rpx;
|
||||
height: 2rpx;
|
||||
border: 2rpx solid #eeeff5;
|
||||
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
padding: 20rpx 40rpx;
|
||||
|
||||
&-text {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&-user {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sys-info {
|
||||
margin-top: 34rpx;
|
||||
|
||||
&-title {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #abaebe;
|
||||
|
||||
padding: 0 0 26rpx 36rpx;
|
||||
}
|
||||
|
||||
&-content {
|
||||
background: #ffffff;
|
||||
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
padding: 22rpx 40rpx;
|
||||
|
||||
& > view {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logout {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in new issue