SOURCE

function test() {
    var zan=SCOPE.zan;
    if (zan !== null) {
        return zan
    } else {
        dataService.callHcmOpenApi('private.zantongguo', {
            'name': SCOPE.card_env.env.caption,
            'act_id': SCOPE.card_env.env.id
        }).then(function(data) {
            if (data.if_zan == 1) {
                SCOPE.zan=true;
                return ture
            } else {
                SCOPE.zan=false;
                return false
            }
        })
    }
}
console 命令行工具 X clear

                    
>
console