|
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabBar/cart/cart"],{"4c5a":function(t,s,e){},"58a2":function(t,s,e){"use strict";var i;e.d(s,"b",(function(){return o})),e.d(s,"c",(function(){return n})),e.d(s,"a",(function(){return i}));var o=function(){var t=this,s=t.$createElement;t._self._c},n=[]},"634b":function(t,s,e){"use strict";e.r(s);var i=e("fc8f"),o=e.n(i);for(var n in i)"default"!==n&&function(t){e.d(s,t,(function(){return i[t]}))}(n);s["default"]=o.a},"6cc0":function(t,s,e){"use strict";e.r(s);var i=e("58a2"),o=e("634b");for(var n in o)"default"!==n&&function(t){e.d(s,t,(function(){return o[t]}))}(n);e("e56b");var l,c=e("f0c5"),d=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],l);s["default"]=d.exports},e301:function(t,s,e){"use strict";(function(t){e("e5b1");i(e("66fd"));var s=i(e("6cc0"));function i(t){return t&&t.__esModule?t:{default:t}}t(s.default)}).call(this,e("543d")["createPage"])},e56b:function(t,s,e){"use strict";var i=e("4c5a"),o=e.n(i);o.a},fc8f:function(t,s,e){"use strict";(function(t){Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var e={data:function(){return{sumPrice:"0.00",headerPosition:"fixed",headerTop:null,statusTop:null,showHeader:!0,selectedList:[],isAllselected:!1,goodsList:[{id:1,img:"/static/img/banner1.png",name:"100元卡券",spec:"规格:S码",price:127.5,number:1,selected:!1},{id:2,img:"/static/img/banner1.png",name:"200元卡券",spec:"规格:S码",price:127.5,number:1,selected:!1},{id:3,img:"/static/img/banner1.png",name:"150中石化卡券",spec:"规格:S码",price:127.5,number:1,selected:!1},{id:4,img:"/static/img/banner1.png",name:"200中石化卡券",spec:"规格:S码",price:127.5,number:1,selected:!1},{id:5,img:"/static/img/banner1.png",name:"100其他卡券",spec:"规格:S码",price:127.5,number:1,selected:!1}],theIndex:null,oldIndex:null,isStop:!1}},onPageScroll:function(t){this.headerPosition=t.scrollTop>=0?"fixed":"absolute",this.headerTop=t.scrollTop>=0?null:0,this.statusTop=t.scrollTop>=0?null:-this.statusHeight+"px"},onPullDownRefresh:function(){setTimeout((function(){t.stopPullDownRefresh()}),1e3)},onLoad:function(){},methods:{joinGoods:function(t){for(var s=this.goodsList.length,e=!1,o=0;o<s;o++){var n=this.goodsList[o];if(n.id==t.id){this.goodsList[o].number++,e=!0;break}}e||this.goodsList[i].unshift(t)},touchStart:function(t,s){s.touches.length>1?this.isStop=!0:(this.oldIndex=this.theIndex,this.theIndex=null,this.initXY=[s.touches[0].pageX,s.touches[0].pageY])},touchMove:function(t,s){var e=this;if(s.touches.length>1)this.isStop=!0;else{var i=s.touches[0].pageX-this.initXY[0],o=s.touches[0].pageY-this.initXY[1];this.isStop||Math.abs(i)<5||(Math.abs(o)>Math.abs(i)?this.isStop=!0:i<0?(this.theIndex=t,this.isStop=!0):i>0&&null!=this.theIndex&&this.oldIndex==this.theIndex&&(this.oldIndex=t,this.theIndex=null,this.isStop=!0,setTimeout((function(){e.oldIndex=null}),150)))}},touchEnd:function(t,s){this.isStop=!1},toGoods:function(s){t.showToast({title:"商品"+s.id,icon:"none"}),t.navigateTo({url:"../../goods/goods"})},toConfirmation:function(){for(var s=[],e=this.goodsList.length,i=0;i<e;i++)this.goodsList[i].selected&&s.push(this.goodsList[i]);s.length<1?t.showToast({title:"请选择商品结算",icon:"none"}):t.setStorage({key:"buylist",data:s,success:function(){t.navigateTo({url:"../../order/confirmation"})}})},deleteGoods:function(t){for(var s=this.goodsList.length,e=0;e<s;e++)if(t==this.goodsList[e].id){this.goodsList.splice(e,1);break}this.selectedList.splice(this.selectedList.indexOf(t),1),this.sum(),this.oldIndex=null,this.theIndex=null},deleteList:function(){this.selectedList.length;while(this.selectedList.length>0)this.deleteGoods(this.selectedList[0]);this.selectedList=[],this.isAllselected=this.selectedList.length==this.goodsList.length&&this.goodsList.length>0,this.sum()},selected:function(t){this.goodsList[t].selected=!this.goodsList[t].selected;var s=this.selectedList.indexOf(this.goodsList[t].id);s>-1?this.selectedList.splice(s,1):this.selectedList.push(this.goodsList[t].id),this.isAllselect
|