Files
xk-client-wx/subPackages/setup/filed.vue
2024-09-19 12:51:35 +08:00

192 lines
3.3 KiB
Vue

<template>
<view class="container safe-area-inset-bottom">
<!-- 头部 -->
<view class="head">
<image src="/static/empty/login.png" mode=""></image>
<text>萧康诊所门店</text>
</view>
<!-- 卡片 -->
<view class="card">
<view class="box" @click="goserve">
<view class="title">
隐私保护政策
</view>
<text class="iconfont icon-jiantou1"></text>
</view>
<view class="box" @click="goserved">
<view class="title">
服务协议
</view>
<text class="iconfont icon-jiantou1"></text>
</view>
<view class="box">
<view class="title">
客服热线
</view>
<text class="phone">{{msg}}</text>
</view>
</view>
<!-- 按钮 -->
<view class="btn_login" @click="loginOut">
退出登录
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
serviceOnline
} from '../../request/api/api'
export default {
data() {
return {
msg: ""
}
},
onLoad() {
},
methods: {
goserved() {
uni.navigateTo({
url: '/subPackages/setup/fw-serve'
})
},
goserve() {
uni.navigateTo({
url: '/subPackages/setup/ys-serve'
})
},
// 客服热线
getInfo() {
serviceOnline({
method: "post",
data: {
store_id: uni.getStorageSync('store_id') || '11001',
}
}).then((res) => {
// console.log(res, 'dh');
this.msg = res.data.data.msg
})
},
// 退出登录
loginOut() {
uni.showModal({
title: '提示',
content: '确定退出吗?',
confirmText: '立即退出',
success(res) {
if (res.confirm) {
uni.removeStorageSync('token');
uni.clearStorageSync()
uni.showToast({
title: '退出成功',
icon: 'success'
})
setTimeout(() => {
uni.navigateTo({
url: '/pages/home/index'
})
}, 1000)
}
}
})
}
},
mounted() {
this.getInfo()
}
}
</script>
<style lang="scss" scoped>
.container {
width: 100vw;
min-height: 100vh;
max-height: 100%;
background-color: #F8FAFC;
padding-bottom: env(safe-area-inset-bottom);
.head {
width: 750rpx;
height: 480rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image {
width: 260rpx;
height: 260rpx;
border-radius: 16rpx;
margin-bottom: 20rpx;
}
text {
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #475569;
}
}
.card {
width: 750rpx;
margin: 20rpx 0;
padding: 0 60rpx;
background: #FFFFFF;
.box {
display: flex;
justify-content: space-between;
align-items: center;
height: 98rpx;
.title {
font-size: 28rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #232323;
}
.iconfont {
font-size: 30rpx;
color: #A7ABB0;
}
.phone {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #475569;
}
}
}
.btn_login {
width: 686rpx;
height: 86rpx;
background: #1777FF;
border-radius: 44rpx 44rpx 44rpx 44rpx;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
text-align: center;
line-height: 86rpx;
margin: 80rpx auto 0;
}
}
</style>