<template>
  <view class="bottom" @click="signOut">
   <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1664188705000_453.png" mode="" class="img" />
    <text>退出登录</text>
  </view>
</template>
<script>
  import { reactive, toRefs, onMounted } from "vue";
  export default {
    name: "",
    props: [],
    components: {},
    setup(props) {
      let data = reactive({
        
      });
      let methods = {
        signOut(){
            uni.showModal({
                title: '提示',
                content: '将退出登录,是否继续',
                success: function(res) {
                    if (res.confirm) {
                      uni.removeStorageSync('userWxInfo') 
                      uni.removeStorageSync('wxUserAuthInfo')
                      uni.removeStorageSync('ErpStus') 
                      uni.removeStorageSync('erpUserInfo')
                      uni.removeStorageSync('userInfo') 
                      uni.removeStorageSync('users')
                      uni.reLaunch({
                          url: '/pages/login/accountLogin'
                      });
                        
                    } else if (res.cancel) {
                        
                    }
                }
            });
            
        }
      };
  
      onMounted(() => {
        
      });
      return {
        ...toRefs(data),
        ...methods,
      };
    },
  };
  </script>
<style scoped>
.bottom {
  width: 100vw;
  height: 130rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 100rpx;
  font-size: 30rpx;
  font-weight: bold;
  color: #DC3241;
  line-height: 70rpx;
}
.img {
  width: 29rpx;
  height: 30rpx;
}
.bottom text{
  margin-left: 17rpx;
}
</style>
