js面向对象插件的做法框架new goBuy('.cakeItem',{ add:'.add', reduce:'.reduce' },[1,0.7,0.6]);


/*弹窗购买蛋糕*/
;(function(){

var $DialogBg=$(".Dialogbg-Select");
var $Dialog=$(".Dialog-Select");
var $close=$(".s-closes");

function goBuy(els,opts,disArr,dis) {
this.$els = $(els);
this.$add = this.$els.find(opts.add);
this.$reduce = this.$els.find(opts.reduce);
this.num=1;
this.max=50;
this.oldPrice =0;
this.totalPrice =0;
this.newPrice =0;
this.disArr = disArr;
this.dis = dis;
this._init();
}

goBuy.prototype = {
strArr:[],
add:function (ele) {

},
reduce:function (ele) {

},
/*价格计算*/
counts:function (ele) {

},
initialize:function (ele) {
/*初始化数据*/
var self = this;

},

showDialog:function () {
$DialogBg.fadeIn();
$Dialog.fadeIn();
},