//done js
export default{
  data(){
    return {
      pagedata:{
        image:'',
        success:false,
        summary:'正在安装...'
      }
    };
  },
  mounted(){
    //onez.data(this,['items']);
    this.install();
  },
  methods:{
    done(){
      location.href='index.php';
    },
    prev(){
      this.$emit('prev');
    },
    install(){
      var data=onez.install_get();
      data.ac='install';
      onez.loading(true);
      this.post(data,(res)=>{
        onez.loading(false);
        if(res.error){
          onez.alert(res.error);
        }else if(res.pagedata){
          if(res.pagedata.clear){
            onez.cache('install_info','{}');
          }
          this.pagedata=res.pagedata;
        }
      });
    }
  }
}