shop-list.2c0c496a.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["shop-list"],{"09b4":function(t,e,n){"use strict";n("8f77")},"0ffe":function(t,e,n){"use strict";var a=n("c7eb"),r=n("1da1"),s=n("d4ec"),i=n("bee2"),o=n("8f33"),c=n("262e"),u=n("ff2d"),l=n("bc3a"),p=n.n(l),h=n("f121"),d=n.n(h),f=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(o["a"])(this,e),p.a.defaults.baseURL=d.a.HostShop,t}return Object(c["a"])(e,t),Object(i["a"])(e,[{key:"getShopToken",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("Host80","/shop/custom/info/loginByCId",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"customBalance",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/custom/balance",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"customLntegralList",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/custom/integral/search/list",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"commodityTypeList",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/commodity/type/search/list",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"commodityList",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/commodity/search/list",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"commoditySingle",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/commodity/search/single",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"orderAdd",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/order/add",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"orderUpdate",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/order/update",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"orderCancel",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/order/cancel",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"orderComplete",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/order/complete",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"orderList",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/order/search/list",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"orderSingle",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/order/search/single",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"addressAdd",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/custom/address/add",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"addressDelete",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/custom/address/delete",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"addressUpdate",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/custom/address/update",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"addressList",value:function(){var t=Object(r["a"])(Object(a["a"])().mark((function t(){var e,n,r=arguments;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=3,this.postAll("HostShop","/custom/address/search/list",e);case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}])}(u["a"]);e["a"]=new f},"665f":function(t,e,n){"use strict";n.r(e);n("b0c0");var a=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],attrs:{id:"ShopList","element-loading-background":"rgba(43, 48, 67, 0.65)","element-loading-spinner":"el-icon-loading"}},[e("div",{staticClass:"promotion-box"},[e("div",{staticClass:"container"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"promotion-box-white mt-2"},[e("span",{staticClass:"point"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Global.Points",expression:"'Shop.Global.Points'"}]}),t._v(": "+t._s(t._f("NumberFormat1")(t.point))+" ")])])])])])]),e("div",{staticClass:"main-content"},[e("el-row",{staticClass:"recommend"},[e("el-col",{staticClass:"left",attrs:{span:24}},[e("div",{staticClass:"section"},[e("div",{staticClass:"head"},[e("i",{staticClass:"el-icon-menu"}),e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Index.ProductClassification",expression:"'Shop.Index.ProductClassification'"}]})]),e("div",{staticClass:"body"},t._l(t.typeList,(function(n){return e("div",{key:n.id,staticClass:"item",on:{click:function(e){return t.handleType(n.id)}}},[e("i",{staticClass:"iconfont",class:[n.icon?n.icon:"iconzuanshi"]}),e("span",{staticClass:"text"},[t._v(t._s(-1!=["cn","zhHant"].indexOf(t.Session.Get("lang"))?n.name:n.nameEn))]),e("i",{staticClass:"i-right el-icon-arrow-right"})])})),0)])]),e("el-col",{staticClass:"right",attrs:{span:24}},[e("div",{staticClass:"section"},[e("div",{staticClass:"title",attrs:{"data-txt":t.titleName}}),e("div",{staticClass:"search-box"},[e("div",{staticClass:"sort-btn"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Index.LaunchTime",expression:"'Shop.Index.LaunchTime'"}],staticClass:"txt"}),e("i",{staticClass:"i-up el-icon-caret-top",class:{"i-select":"add_time"==t.sortName&&1==t.sortType},on:{click:function(e){return t.isSelect(1)}}}),e("i",{staticClass:"i-down el-icon-caret-bottom",class:{"i-select":"add_time"==t.sortName&&2==t.sortType},on:{click:function(e){return t.isSelect(2)}}})]),e("div",{staticClass:"sort-btn"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Index.IntegralRanking",expression:"'Shop.Index.IntegralRanking'"}],staticClass:"txt"}),e("i",{staticClass:"i-up el-icon-caret-top",class:{"i-select":"integral"==t.sortName&&1==t.sortType},on:{click:function(e){return t.isSelect(3)}}}),e("i",{staticClass:"i-down el-icon-caret-bottom",class:{"i-select":"integral"==t.sortName&&2==t.sortType},on:{click:function(e){return t.isSelect(4)}}})]),e("div",{staticClass:"total"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Index.Total",expression:"'Shop.Index.Total'"}]}),e("span",[t._v(t._s(this.pagerInfo.rowTotal))]),e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Index.Items",expression:"'Shop.Index.Items'"}]})])]),e("div",{staticClass:"body"},[e("el-row",{staticStyle:{"flex-wrap":"wrap","justify-content":"initial"},attrs:{type:"flex",gutter:20,justify:"space-around"}},t._l(t.commodityList,(function(n,a){return e("el-col",{key:a,staticClass:"item",attrs:{md:6}},[e("div",{staticClass:"good",on:{click:function(e){return t.toDetail(n.id)}}},[t._l(n.files,(function(n){return e("img",{directives:[{name:"show",rawName:"v-show",value:n.banner,expression:"item1.banner"}],key:n.id,staticClass:"img crm-cursor",attrs:{src:t.url+n.path,alt:"",srcset:""}})})),e("div",{staticClass:"name crm-tow-font"},[t._v(t._s(n.name))]),e("div",{staticClass:"point"},[e("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Index.Points",expression:"'Shop.Index.Points'"}]}),t._v(t._s(t._f("NumberFormat")(n.integral))+" ")])],2)])})),1),t.pagerInfo.rowTotal?e("div",{staticClass:"crm_pagination"},[e("el-pagination",{staticClass:"page",attrs:{background:"",layout:"prev, pager, next","page-size":t.pagerInfo.row,total:t.pagerInfo.rowTotal},on:{"current-change":t.handleCurrentChange}})],1):e("div",{directives:[{name:"t",rawName:"v-t",value:"State.notDate",expression:"'State.notDate'"}],staticClass:"crm-notDate"})],1)])])],1)],1)])},r=[],s=n("c7eb"),i=n("1da1"),o=(n("14d9"),n("a9e3"),n("b64b"),n("d3b7"),n("0643"),n("4e3e"),n("159b"),n("0ffe")),c=n("f121"),u=n.n(c),l=u.a.Code,p={name:"ShopList",data:function(){return{pictLoading:!1,user:"--",point:"--",titleName:"",titleType:null,sortName:null,sortType:null,typeList:[],commodityList:[],url:u.a.HostShopImg,pagerInfo:{row:12,current:1,pageTotal:0,rowTotal:0}}},computed:{lang:function(){return this.Session.Get("lang")}},methods:{handleType:function(t){var e=this;this.titleType=t,this.typeList.forEach((function(n){n.id==t&&(e.titleName=-1!=["cn","zhHant"].indexOf(e.Session.Get("lang"))?n.name:n.nameEn)}))},toDetail:function(t){this.$router.push({path:"/shop/detail",query:{id:t,type:this.titleType}}).catch((function(t){return t}))},toBank:function(){this.$router.push({path:"/shop/home"}).catch((function(t){return t}))},isSelect:function(t){switch(t){case 1:this.sortName="add_time",this.sortType=1;break;case 2:this.sortName="add_time",this.sortType=2;break;case 3:this.sortName="integral",this.sortType=1;break;case 4:this.sortName="integral",this.sortType=2;break}this.getCommdityInfo()},getTypeInfo:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].commodityTypeList();case 2:n=e.sent,n.code==l.StatusOK?(t.typeList=n.data,t.handleType(t.titleType)):t.$pigeon.MessageError(n.msg);case 4:case"end":return e.stop()}}),e)})))()},getCommdityInfo:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.pictLoading=!0,e.next=3,o["a"].commodityList({show:1,recommender:null,lang:t.lang,typeId:t.titleType,sortName:t.sortName,sortType:t.sortType,page:{current:t.pagerInfo.current,row:t.pagerInfo.row}});case 3:n=e.sent,n.code==l.StatusOK?(t.commodityList=n.data,null!=n.page?(t.pagerInfo.rowTotal=n.page.rowTotal,t.pagerInfo.pageTotal=n.page.pageTotal):t.pagerInfo.rowTotal=0,t.$pigeon.MessageOK(t.$i18n.t("Msg.SearchSuccess")),t.pictLoading=!1):(t.$pigeon.MessageError(n.msg),t.pictLoading=!1);case 5:case"end":return e.stop()}}),e)})))()},getPoint:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var n;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,o["a"].customBalance();case 2:n=e.sent,n.code==l.StatusOK?t.point=n.data:t.$pigeon.MessageError(n.msg);case 4:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.pagerInfo.row=t,this.getCommdityInfo()},handleCurrentChange:function(t){this.pagerInfo.current=t,this.getCommdityInfo()}},mounted:function(){this.user=JSON.parse(this.Session.Get("user",!0)).customInfo.cId,this.titleType=Number(this.$route.query.type)?Number(this.$route.query.type):0,this.getPoint(),this.getTypeInfo()},watch:{titleType:function(){this.sortName=null,this.sortType=null,this.getCommdityInfo()}}},h=p,d=(n("09b4"),n("2877")),f=Object(d["a"])(h,a,r,!1,null,null,null);e["default"]=f.exports},"8f77":function(t,e,n){}}]);