|
|
-define(["base","$","native","product","api"],function(e,t,n,r,i){var s=function(){if(typeof s.instance=="object")return s.instance;s.instance=this,this.storagePrefix="order_",this.memo="",this.cost=0,this.bookingDate="",this.bookingTime="",this.bookingTimeStr="",this.address=this.getCache("address",null),this.productType="",this.productID="",this.productCount=1,this.price="",this.couponID="",this.stationID=this.getCache("stationID",null,""),this.cacheReview=this.getCache("cacheReview",null,""),this.precedence="",this.extraService=[],this.extraServiceType=[],this.serviceName="",this.servicePrice="",this.appendID="",this.beautician={name:"请选择",id:""}};return s.prototype=new e,s.prototype.reset=function(){this.couponID="",this.bookingTime="",this.bookingTimeStr="",this.bookingDate="",this.productType="",this.productID="",this.extraService=[],this.serviceName="",this.servicePrice="",this.productCount=1,this.precedence="",this.extraServiceType=[],this.beautician={name:"",id:""}},s.prototype.addOrder=function(e,t,n){var r=this,s=[{product_id:this.productID,count:this.productCount}],o=[];this.couponID!=""&&o.push(this.couponID),i.addOrder({products:JSON.stringify(s),memo:this.memo,precedence:"0",booking_time:this.bookingDate+" "+this.bookingTime+":00",address_id:this.address.address_id,coupons:JSON.stringify(o),station:this.stationID,type:this.productType,counts:"1",extra:[this.appendID],tech_id:this.beautician.id,user_id:e,order_channel:t},function(e){e.success&&(r.id=e.data.id),typeof n=="function"&&n(e)})},s.prototype.appendOrder=function(e,t,n,r){var s=this;i.appendOrder({order_id:e,products:n,user_id:t},function(e){e.success&&(s.appendID=e.data.id),typeof r=="function"&&r(e)})},new s});
|
|
|
+define(["base","$","native","product","api"],function(e,t,n,r,i){var s=function(){if(typeof s.instance=="object")return s.instance;s.instance=this,this.storagePrefix="order_",this.memo="",this.cost=0,this.bookingDate="",this.bookingTime="",this.bookingTimeStr="",this.address=this.getCache("address",null),this.productType="",this.productID="",this.productCount=1,this.price="",this.couponID="",this.stationID=this.getCache("stationID",null,""),this.cacheReview=this.getCache("cacheReview",null,""),this.precedence="",this.extraService=[],this.extraServiceType=[],this.serviceName="",this.servicePrice="",this.appendID="",this.beautician={name:"请选择",id:""}};return s.prototype=new e,s.prototype.reset=function(){this.couponID="",this.bookingTime="",this.bookingTimeStr="",this.bookingDate="",this.productType="",this.productID="",this.extraService=[],this.serviceName="",this.servicePrice="",this.productCount=1,this.precedence="",this.extraServiceType=[],this.beautician={name:"",id:""}},s.prototype.addOrder=function(e,t,n){var r=this,s=[{product_id:this.productID,count:this.productCount}],o=[];this.couponID!=""&&o.push(this.couponID),i.addOrder({products:JSON.stringify(s),memo:this.memo,precedence:"0",booking_time:this.bookingDate+" "+this.bookingTime+":00",address_id:this.address.address_id,coupons:JSON.stringify(o),station:this.stationID,type:this.productType,counts:"1",extra:JSON.stringify("[type:"+this.appendID+"]"),tech_id:this.beautician.id,user_id:e,order_channel:t},function(e){e.success&&(r.id=e.data.id),typeof n=="function"&&n(e)})},s.prototype.appendOrder=function(e,t,n,r){var s=this;i.appendOrder({order_id:e,products:n,user_id:t},function(e){e.success&&(s.appendID=e.data.id),typeof r=="function"&&r(e)})},new s});
|