Commit b297e13b by 周志凯

profile

1 parent de395c36
<template>
<view>
<headerComp :title="titleStr"></headerComp>
<view style="height: 25.36upx"></view>
<view class="profile-item" @tap="switchConnect">
<span class="texts">切换服务器地址</span>
<img class="arrows" :src="rArrow" alt=""/>
</view>
<view class="profile-item">
<span class="texts">修改密码</span>
<img class="arrows" :src="rArrow" alt=""/>
</view>
<view class="logout">
<button type="primary" class="primary logout-btn" @tap="logoutHandle">退出登录</button>
</view>
</view>
</template>
<script>
import headerComp from '../../components/header'
import backArrow from '../../static/header/backArrow.png'
import rArrow from "../../static/analysis/rArrow.png"
// import MobileMessage from 'mobile-message'
// import 'mobile-message/dist/message.css'
export default {
onLoad(option) {
console.log(option)
},
components: {
headerComp
},
data() {
return {
titleStr: '我的',
backArrow: backArrow,
rArrow: rArrow
}
},
methods: {
switchConnect() {
this.$message.confirm('<div class="dialog-content" style="color: #333; font-size: 17px;text-align: center;">确认切换该服务器地址?</div>', function(res, body) {
}, [{
className: 'dialog-btn',
label: '取消',
callback: function(res, $body) {
return true;
}
}, {
className: 'dialog-btn',
label: '确定',
callback: function(res, $body) {
console.log(res, $body)
// model.switchConnectType() // 调用swift 无参
}
}], '提示');
},
logoutHandle() {
Object.keys(window.localStorage).forEach(item => {
window.localStorage.removeItem(item)
})
uni.reLaunch({
url: '../login/login',
});
},
},
}
</script>
<style>
.profile-item {
background: #FFFFFF;
position: relative;
}
.texts {
display: block;
height: 90.57upx;
line-height: 90.57upx;
margin-left: 23.55upx;
font-size: 28.98upx;
color: #333;
border-bottom: 1.81upx solid rgba(151, 151, 151, .2);
box-sizing: border-box;
}
.profile-item:last-of-type .texts {
border-bottom: none;
}
.arrows {
width: 14.49upx;
height: 25.36upx;
position: absolute;
right: 23.55upx;
top: 32.6upx;
}
.logout {
margin-top: 255.43upx;
padding: 0 41.66upx;
}
.logout-btn {
background-color: transparent;
border: 1px solid #0069FF;
color: #0069FF;
border-radius: 41.66upx;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!