chore(会员中心): 注销及登出需要多语言提示
This commit is contained in:
@@ -49,6 +49,10 @@ export const lang = {
|
|||||||
// 账户操作
|
// 账户操作
|
||||||
logout: 'Logout',
|
logout: 'Logout',
|
||||||
cancellation: 'Account Cancellation',
|
cancellation: 'Account Cancellation',
|
||||||
|
logoutTitle: 'Tips',
|
||||||
|
logoutContent: 'Are you sure you want to log out',
|
||||||
|
cancellationTitle: 'Risk Warning',
|
||||||
|
cancellationContent: 'Are you sure you want to cancel your current account?',
|
||||||
|
|
||||||
// 协议
|
// 协议
|
||||||
privacyPolicy: 'Privacy Policy',
|
privacyPolicy: 'Privacy Policy',
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ export const lang = {
|
|||||||
// 账户操作
|
// 账户操作
|
||||||
logout: '退出登录',
|
logout: '退出登录',
|
||||||
cancellation: '账号注销',
|
cancellation: '账号注销',
|
||||||
|
logoutTitle: '提示',
|
||||||
|
logoutContent: '确定要退出登录吗',
|
||||||
|
cancellationTitle: '风险提示',
|
||||||
|
cancellationContent: '确定要注销当前账号吗?',
|
||||||
|
|
||||||
// 协议
|
// 协议
|
||||||
privacyPolicy: '隐私协议',
|
privacyPolicy: '隐私协议',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
|
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
|
||||||
|
class="page-img">
|
||||||
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
|
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
|
||||||
:style="{ backgroundImage: bgImg }">
|
:style="{ backgroundImage: bgImg }">
|
||||||
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
|
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
|
||||||
@@ -19,14 +20,16 @@
|
|||||||
<ns-copyright v-show="isShowCopyRight" />
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
|
|
||||||
<view class="foot">
|
<view class="foot">
|
||||||
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">{{ $lang('privacyPolicy')}}</view>
|
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">{{
|
||||||
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">{{ $lang('registrationAgreement')}}</view>
|
$lang('privacyPolicy') }}</view>
|
||||||
|
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">{{
|
||||||
|
$lang('registrationAgreement') }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 退出登录和账号注销按钮 -->
|
<!-- 退出登录和账号注销按钮 -->
|
||||||
<view class="action-buttons">
|
<view class="action-buttons" v-if="storeToken || 1">
|
||||||
<view class="action-btn logout-btn" @click="logout">{{ $lang('logout')}}</view>
|
<view class="action-btn logout-btn" @click="logout">{{ $lang('logout') }}</view>
|
||||||
<view class="action-btn cancel-btn" @click="cancellation">{{ $lang('cancellation')}}</view>
|
<view class="action-btn cancel-btn" @click="cancellation">{{ $lang('cancellation') }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -91,8 +94,8 @@ export default {
|
|||||||
// 退出登录
|
// 退出登录
|
||||||
logout() {
|
logout() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: this.$lang('logoutTitle'),
|
||||||
content: '确定要退出登录吗',
|
content: this.$lang('logoutContent'),
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.$store.commit('setToken', '');
|
this.$store.commit('setToken', '');
|
||||||
@@ -108,8 +111,8 @@ export default {
|
|||||||
// 账号注销
|
// 账号注销
|
||||||
cancellation() {
|
cancellation() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '风险提示',
|
title: this.$lang('cancellationTitle'),
|
||||||
content: '确定要注销当前账号吗?',
|
content: this.$lang('cancellationContent'),
|
||||||
confirmColor: '#000000',
|
confirmColor: '#000000',
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
@@ -154,34 +157,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-buttons {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
margin: 20rpx 30rpx 40rpx;
|
|
||||||
gap: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-btn {
|
|
||||||
width: 100%;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 40rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logout-btn {
|
|
||||||
background-color: #fff;
|
|
||||||
color: #333;
|
|
||||||
border: 1rpx solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cancel-btn {
|
|
||||||
background-color: #F4391c;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -215,4 +190,34 @@ export default {
|
|||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.action-buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin: 20rpx 30rpx 40rpx;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logout-btn {
|
||||||
|
background-color: #F4391c;
|
||||||
|
background-color: var(--main-color);
|
||||||
|
color: #fff;
|
||||||
|
border: 1rpx solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancel-btn {
|
||||||
|
background-color: var(--aux-color);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user