flinfo/dc-App/pages/my/Settings.vue
2025-03-01 10:26:49 +08:00

262 lines
4.3 KiB
Vue

<template>
<view class="container">
<view class="box_">
<view class="d_lang" @click="goDetails(1)">
<view class="left_">Notifications</view>
<view class="right_">
<u-icon name="arrow-right" size="16"></u-icon>
</view>
</view>
<view class="d_lang" @click="goDetails(2)">
<view class="left_">Privacy security</view>
<view class="right_">
<u-icon name="arrow-right" size="16"></u-icon>
</view>
</view>
<view class="d_lang" @click="show = true">
<view class="left_">Language</view>
<view class="right_">
<u-icon name="arrow-right" size="16"></u-icon>
</view>
</view>
</view>
<view class="box_">
<view class="d_lang" @click="qcode()">
<view class="left_" >Clear cache</view>
<view class="right_">
<u-icon name="arrow-right" size="16"></u-icon>
</view>
</view>
<view class="d_lang" @click="goDetails(3)">
<view class="left_">Terms of service</view>
<view class="right_">
<u-icon name="arrow-right" size="16"></u-icon>
</view>
</view>
<view class="d_lang" @click="goDetails(4)">
<view class="left_">Contact us</view>
<view class="right_">
<u-icon name="arrow-right" size="16"></u-icon>
</view>
</view>
</view>
<view class="lv_button" @click="goback()">
Log Out
</view>
<u-picker :show="show" :columns="columns" cancelText="cancel" confirmText="confirm" @confirm="show = false"
@cancel="show = false"></u-picker>
</view>
</template>
<script>
import request from '../../utils/request'
export default {
data() {
return {
msg: "3",
List: [],
columns: [
['English']
],
show: false,
status: 'loading',
tel: ''
}
},
onLoad() {
this.getSet()
},
methods: {
async getSet() {
let res = await request({
url: 'system/settings/1 ',
method: 'get',
})
if (res.code == 200) {
console.log("res1231", res)
this.tel = res.contactPhone
}
},
secure() {
uni.showToast({
title: "This feature is currently under development",
icon: 'none'
})
},
getTel() {
uni.makePhoneCall({
phoneNumber: this.tel //仅为示例
});
},
qcode() {
uni.removeStorageSync('Trip')
uni.removeStorageSync('Budget')
uni.removeStorageSync('Ai')
uni.removeStorageSync('Translator')
uni.showToast({
title:'success',
icon: 'success'
})
},
goDetails(num) {
uni.navigateTo({
url: '/pages/my/Details?data=' + num
})
},
goback() {
uni.clearStorage();
uni.reLaunch({
url: '/pages/login/login'
})
}
}
}
</script>
<style scoped lang="scss">
.container {
height: 100vh;
background: #f8f8f8;
box-sizing: border-box;
padding-top: 1px;
}
.top_ {
width: 100%;
height: 170px;
box-sizing: border-box;
padding-top: 20px;
background-color: #32714f;
}
.ds_ {
width: 85%;
margin: 15px auto;
display: flex;
align-items: center;
color: #fff;
}
.user_t {
width: 100px;
height: 100px;
border-radius: 50%;
overflow: hidden;
margin: 20px auto;
image {
width: 100%;
height: 100%;
}
}
.user_title {
font-weight: bold;
font-size: 20px;
color: #FFFFFF;
margin-bottom: 10px;
}
.user_emil {
font-weight: 500;
font-size: 16px;
}
.box_ {
width: 90%;
background: #FFFFFF;
box-sizing: border-box;
border-radius: 6px;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
margin: 15px auto;
}
.title_ {
font-size: 16px;
font-weight: bold;
box-sizing: border-box;
padding: 15px;
padding-bottom: 0px;
}
.d_lang {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #F2F2F2;
box-sizing: border-box;
padding: 10px 15px;
}
.f_ {
width: 25%;
font-weight: 500;
font-size: 12px;
color: #333333;
text-align: center;
}
.icon_ {
width: 22px;
height: 22px;
margin: 0 auto;
margin-bottom: 5px;
image {
width: 100%;
height: 100%;
}
}
.left_ {
font-weight: 500;
font-size: 16px;
color: #000000;
}
.right_ {
display: flex;
align-items: center;
font-weight: 500;
font-size: 16px;
color: #333333;
}
.lv_button {
width: 80%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
margin: 0px auto;
margin-top: 155px;
height: 48px;
background: #E13A3A;
border-radius: 6px 6px 6px 6px;
}
</style>