index.page.js 585 Bytes
var yoho = require('yoho');
var $ = require('jquery');
const util = require('common/util');

if (!yoho.isLogin) {
    $('.auth').addClass('no-intercept');
    $('.auth').on('click', function() {
        yoho.goLogin();
        return false;
    });
} else {
    // 地址管理
    $('#address').on('click', function() {
        yoho.goAddress({
            type: '2'
        });
        return false;
    });
}

// 系统设置
$('#setting').on('click', function() {
    yoho.goSetting();
    return false;
});

$(() => {
    yoho.showLoading(false);
    util.visibilitychange();
});