You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
186 lines
4.0 KiB
186 lines
4.0 KiB
<template>
|
|
<view>
|
|
<!-- <view class="profile_item ">
|
|
<text>Country</text>
|
|
<image src="../../static/img/right1.png" mode="" class="right_img"></image>
|
|
</view>
|
|
<view class="profile_item ">
|
|
<text>Language</text>
|
|
<image src="../../static/img/right1.png" mode="" class="right_img"></image>
|
|
</view> -->
|
|
<view class="profile_item "@click="gotopage(1)">
|
|
<text>My account</text>
|
|
<image src="../../static/img/right1.png" mode="" class="right_img"></image>
|
|
</view>
|
|
<view class="profile_item "@click="gotopage(2)">
|
|
<text>Privacy policy</text>
|
|
<image src="../../static/img/right1.png" mode="" class="right_img"></image>
|
|
</view>
|
|
<view class="profile_item "@click="gotopage(3)">
|
|
<text>Legal</text>
|
|
<image src="../../static/img/right1.png" mode="" class="right_img"></image>
|
|
</view>
|
|
<view class="set_button">
|
|
<button @click="signOut">SIGN OUT</button>
|
|
</view>
|
|
<view class="edition">
|
|
<view class="edition_title">DOPE PLUS</view>
|
|
<text>Version {{appver}}</text>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {defaultRequest2} from '../../api/index.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
appver:'',
|
|
|
|
}
|
|
},
|
|
methods:{
|
|
signOut(){
|
|
let data={_action:'logout'}
|
|
uni.showModal({
|
|
title: 'Confirm SING OUT?',
|
|
cancelText: "cancel", // 取消按钮的文字
|
|
confirmText: "confirm", // 确认按钮的文字
|
|
showCancel: true, // 是否显示取消按钮,默认为 true
|
|
// confirmColor:'#ccc',
|
|
// cancelColor: '#000',
|
|
success: (res) => {
|
|
if(res.confirm) {
|
|
console.log('comfirm')
|
|
defaultRequest2(data).then(res=>{
|
|
console.info(res)
|
|
if(res.error==0){
|
|
// uni.clearStorageSync()
|
|
uni.setStorageSync('isLogin',0)
|
|
uni.setStorageSync('user_info',' ')
|
|
// uni.reLaunch({
|
|
// url:'../login/index'
|
|
// })
|
|
uni.navigateTo({
|
|
url:'../login/index'
|
|
})
|
|
}
|
|
})
|
|
|
|
} else {
|
|
console.log('cancel')
|
|
|
|
}
|
|
}
|
|
})
|
|
|
|
},
|
|
gotopage(a){
|
|
if(a==1){
|
|
uni.navigateTo({
|
|
url:'./myProfile'
|
|
})
|
|
}else if(a==2) {
|
|
var urlStr = encodeURI("https://en.meixx.com/help/privacy.html")
|
|
// plus.runtime.openURL(urlStr);
|
|
uni.navigateTo({
|
|
url:'../order/paypalWebview?src='+urlStr
|
|
})
|
|
}
|
|
else{
|
|
var urlStr2 = encodeURI("https://dopeplus.com/help/Terms.html")
|
|
// plus.runtime.openURL(urlStr);
|
|
uni.navigateTo({
|
|
url:'../order/paypalWebview?src='+urlStr2
|
|
})
|
|
}
|
|
},
|
|
getAppnum(){
|
|
let data = {
|
|
_action:'getnewversion'
|
|
}
|
|
defaultRequest2(data).then(res =>{
|
|
console.log(res)
|
|
if(res.error == 0){
|
|
let v = uni.getStorageSync('appdata')
|
|
console.log(v)
|
|
if(!res.data.ver_name){
|
|
this.appver = v.appver
|
|
}else{
|
|
this.appver = res.data.ver_name
|
|
}
|
|
|
|
}
|
|
})
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getAppnum()
|
|
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss">
|
|
page{
|
|
border-top: 14.67rpx #F7F7F7 solid;
|
|
padding-left: 26.67rpx;
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
</style>
|
|
<style lang="scss" scoped>
|
|
page{
|
|
|
|
}
|
|
.profile_item{
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: 24rpx;
|
|
font-weight: bold;
|
|
padding: 40rpx 0;
|
|
padding-right: 33.33rpx;
|
|
border-bottom: 1.33rpx #ECECEC solid;
|
|
box-sizing: border-box;
|
|
|
|
.right_img{
|
|
width: 18.67rpx;
|
|
height: 18.67rpx;
|
|
margin-left: 20rpx;
|
|
}
|
|
|
|
}
|
|
.profile_item:last-child{
|
|
border-bottom: none;
|
|
}
|
|
.set_button{
|
|
width: 686.67rpx;
|
|
height: 73.33rpx;
|
|
margin-top: 133.33rpx;
|
|
|
|
button{
|
|
background-color: #191919;
|
|
font-size: 26.67rpx;
|
|
color: white;
|
|
font-weight: bold;
|
|
height: 100%;
|
|
line-height: 73.33rpx;
|
|
border-radius: 0;
|
|
}
|
|
}
|
|
.edition{
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100%;
|
|
line-height: 50rpx;
|
|
font-size: 20rpx;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
margin-bottom: 112rpx;
|
|
.edition_title{
|
|
font-size: 25.33rpx;
|
|
margin-bottom: 16rpx;
|
|
}
|
|
}
|
|
</style>
|