<template>
	<view class="AIbox" @click="nato()">
		<image class="img" v-if="sex=='1'" :src="getImg('AI-ruirui.png')" mode=""></image>
		<image class="img" v-if="sex=='2'||sex=='0'" :src="getImg('AI-anan.png')" mode=""></image>
	</view>
</template>

<script>
var key;
var web = require('../utils/request.js');
export default {
	data() {
		return {
			sex:'2' //0：未知，1：男，2：女
		};
	},
	mounted() {		
		// if(this.info!=''&&this.info!=null){
		// 	console.log(11111)
		// 	this.sex=this.info;
		// }else{
		// 	this.sex='2'
		// }
		key = uni.getStorageSync('allsex');
		if(key==''){
			this.sex='2';
		}else{
			if(key==1){
				this.sex='2';
			}else{
				this.sex='1';
			}
			
		}
		
	},
	methods: {
		getUrl(url) {
			return 'https://ruianm.tour-ma.com' + url;
		},
		getImg(url) {
			return 'https://ruianm.tour-ma.com/r/cms/www/xcx/img/' + url;
		},
		nato() {
			uni.navigateTo({
				url: '../AI/jqr'
			});
		}
	}
};
</script>

<style>
	.AIbox{
		width: 132upx;
		height: 200upx;
		position: fixed;
		bottom: 8%;
		right: 4%;
		z-index: 100;
	}
	.AIbox .img{
		width: 100%;
		height: 100%;
	}
</style>
