/**
 * Created by xiaoqiang on 2018/7/27.
 */
var VERSION = "1.0.5";
var VERSION_CODE = 105;
var APP_NAME = "Sketch.Mirror";
var app = new Vue({
    el: '#wrapper',
    data: {
        name: 'main',
        isLogin: false,
        user: null
    },
    created: function () {
        var _this = this;
        Store.init().then(function () {
            bridge.readFile('user.json').then(function (result) {
                _this.user = JSON.parse(result.toString());
                _this.isLogin = true;
            }, function () {
                _this.isLogin = false;
            });
        });
    },
    methods: {
        test: function () {
            alert('test app');
        },
        onLogin: function (data) {
            this.user = JSON.parse(data);
            this.isLogin = true;
        },
        onLogout: function () {
            this.user = null;
            this.isLogin = false;
        },
    }
});
