<template>
	<view :style="{ minHeight: sys.windowHeight + 'px' }"
		:class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']" style="padding-bottom:50px;">
		<tm-menubars title="" :shadow="0" :showback="false"></tm-menubars>
		<view class="tou C1b1b1b">
			<view class="info">
				<image class="chuandaimg fl" src="/static/img/55.png" mode="widthFix"></image>
				<view class="chuandazi fl ml-30">
					<view class="text-size-lg text-weight-b text-overflow-2 mt-20">Hahhhnxsm_</view>
					<view class="tm-cartCellListFood-label text-size-s text-grey">15077854701</view>
					<tm-button size="s" class="mt-10">编辑个人资料</tm-button>
				</view>
				<view style="clear: both;"></view>
				<tm-row class="sange mt-40 pb-30">
					<tm-col color="" @click="dingdan">
						<view class="py-10 text-size-xs">
							<image class="sange1" src="/static/img/56.png"></image>
							<text>我的订单</text>
							<view class="aa"></view>
						</view>
					</tm-col>
					<tm-col color="" @click="dizhi">
						<view class="py-10 text-size-xs">
							<image class="sange2" src="/static/img/57.png"></image>
							<text>我的地址</text>
							<view class="aa"></view>
						</view>
					</tm-col>
					<tm-col color="">
						<view class="py-10 text-size-xs">
							<image class="sange3" src="/static/img/58.png"></image>
							<text>我的设置</text>
						</view>
					</tm-col>
				</tm-row>
			</view>
		</view>
		<!-- 列表 -->
		<tm-grouplist class="liebiao pt-20">
			<tm-listitem v-for="item in libiaoList" @click="tiaozhuan(item.type)" :title="item.title" left-icon="" show-left-icon :show-right-icon="item.type==9?false:true">
				<template #rightValue v-if="item.type==9">
					<view class="xiangji">
						<tm-col :grid="3"><tm-switch :text="['','']" color="primary" v-model="on"></tm-switch></tm-col>
					</view>
				</template>
			</tm-listitem>
		</tm-grouplist>
		<view class="px-24">
			<tm-button@click="show=true" theme="primary" :round="24" block class="mt-50 logincla">退出账号</tm-button>
		</view>
		<!-- <tm-button theme="primary">上传图片</tm-button> -->
		<tm-dialog v-model="show" content="确认退出系统？" @confirm="queren"></tm-dialog>
		<!-- 弹出层消息 -->
		<tm-message ref="toast"></tm-message>
		<view style="width: 100%;height: 40px;"></view>
	</view>
</template>	
<script>
	// {title:'衣服录入',type:'10'},{title:'创建家庭',type:'8'},
import{myRequest} from '@/api/request.js'
export default {
	data() {
		return {
			show:true,
			on:true,
			libiaoList:[
			{title:'我的钱包',type:'1'},
			// {title:'我的评价',type:'2'},
			{title:'意见反馈',type:'3'},
			{title:'我的消息',type:'4'},
			{title:'我的关注',type:'5'},
			// {title:'系统通知',type:'6'},
			// {title:'历史记录',type:'7'},
			{title:'内容推送',type:'9'},
			]
		};
	},
	onLoad() {
		
	},
	created() {
		this.sys = uni.getSystemInfoSync();
	},
	methods: {
		tiaozhuan(type){
			if(type==1){
				uni.navigateTo({
					url: "/pages/qianbao/index",
				})
			}else if(type==2){
				uni.navigateTo({
					url: "/pages/pingjia/index",
				})
			}else if(type==3){
				uni.navigateTo({
					url: "/pages/fankui/index",
				})
			}else if(type==4){
				uni.navigateTo({
					url: "/pages/xiaoxi/index",
				})
			}else if(type==5){
				uni.navigateTo({
					url: "/pages/guanzhu/index",
				})
			}else if(type==8){
				uni.navigateTo({
					url: "/pages/chuanghome/index",
				})
			}else if(type==10){
				uni.navigateTo({
					url: "/pages/luru/index",
				})
			}
		},
		dizhi(){
			uni.navigateTo({
				url: "/pages/dizhi/index",
			})
		},
		dingdan(){
			uni.navigateTo({
				url: "/pages/dingdan/index",
			})
		},
		queren(){
			var that=this;
			if(uni.getStorageSync("token")==""){
				uni.redirectTo({
					url:"/pages/login/index"
				})
				return
			}
			myRequest({
				url: "/api/Logout/logout",
				method:'get',
				data:{}
			}).then(res => {
				uni.setStorageSync("token","")
				uni.redirectTo({
					url:"/pages/login/index"
				})
			})
		}
		
	},
}
</script>

<style lang="scss">
	/deep/ .tm-menubars .body{
		background-color: #1b1b1b !important;
	}
	.chuandaimg{width: 100px;}
	.info{width: 90%;margin:0 auto;}
	/deep/ .info uni-button{background-color: #303440 !important;}
	.sange image{vertical-align: middle;margin-right: 8px;}
	/deep/ .tm-col{width: 33% !important;}
	.sange1{width: 22px;height: 22px;}
	.sange2{width: 18px;height: 22px;}
	.sange3{width: 22px;height: 22px;}
	.aa{float: right;width: 1px;height: 18px;background-color: #D8D8D8;margin-top: 2px;}
	/deep/ .tm-grouplist{margin:5px !important;margin-top: 15px !important;}
	/deep/ .liebiao .grey-darken-4.bk{background-color: #0D0D0D !important;}
	/deep/ .liebiao .py-24{padding-top: 15px;padding-bottom: 15px;}
	/deep/ .logincla .primary{
		background-color: #303440 !important;
	}
</style>
