

{{#snippet}}
<input type="button" class="btn-default btn-medium" value="送一支鲜花" id="send-flower" />
<div id="send-flower-hint"></div>
<script>
DP.provide(["main::flower","fx/morph"],function(D,Flower){
    var hint = $("#send-flower-hint");
    var trigger = $("#send-flower");
    // 给该条点评送鲜花
    trigger.on("click",function(){
        var type = 1;
        var id = 44803409;
        new Flower(trigger, {
            url: "/ajax/json/shop/reviewflower"
        }).on("update",function (count) {
            hint.html(hint.html() + "update: count " + count + "\n");
        }).on("add",function(num){
            hint.html(hint.html() + "add: " + count + "\n");
        }).pop({
            i: id,
            s: type
        });
    });
});
</script>
{{/snippet}}