1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-229b201e","chunk-2d0d83d6"],{"2244f":function(t,e,i){"use strict";i.r(e);var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"mygroups"}},[i("c-title",{attrs:{hide:!1,text:"我的拼购"}}),i("div",{staticClass:"content"},[i("van-tabs",{attrs:{sticky:""},on:{change:t.getData},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[i("van-tab",{attrs:{title:"拼购中",name:"a"}},[i("div",{staticClass:"list_box"},t._l(t.info,(function(e,o){return i("div",{key:o,staticClass:"list"},[i("div",{staticClass:"time_state"},[i("span",{staticClass:"time"},[t._v(t._s(e.created_at))]),i("span",{staticClass:"state"},[t._v("拼购中,还差"+t._s(e.surplus_num)+"人")])]),i("div",{staticClass:"goods_box"},[i("div",{staticClass:"goods_img"},[i("img",{attrs:{src:t.fun.isTextEmpty(e.thumb)?"":e.thumb}})]),i("ul",{staticClass:"goods_name"},[i("li",{staticClass:"name_price"},[i("h2",{staticClass:"name",staticStyle:{"-webkit-box-orient":"vertical"}},[t._v(" "+t._s(e.title)+" ")])]),i("li",{staticClass:"option"},[i("span",{staticClass:"timestamp_box"},[t._v("剩余: "),i("van-count-down",{attrs:{time:t.fun.getTimeDifference(e.end_time),format:"DD天HH时mm分ss秒"}})],1),i("span",{staticClass:"total_price"},[t._v(t._s(t.$i18n.t("money"))+t._s(e.price))])])])]),i("div",{staticClass:"allbt"},[t._l(e.button_models,(function(o){return i("button",{key:o.value,attrs:{type:"button"},on:{click:function(i){return t.operation(e.order_id,o)}}},[t._v(" "+t._s(o.name)+" ")])})),i("button",{attrs:{type:"button"},on:{click:function(i){return t.gotoOrderDetail(e.order_id)}}},[t._v(" 订单详情 ")]),i("button",{staticClass:"groupDetail",attrs:{type:"button"},on:{click:function(i){return t.gotoGroup(e.order_id)}}},[t._v(" 拼购详情 ")])],2)])})),0)]),i("van-tab",{attrs:{title:"拼购成功",name:"b"}},[i("div",{staticClass:"list_box"},t._l(t.info,(function(e,o){return i("div",{key:o,staticClass:"list"},[i("div",{staticClass:"time_state"},[i("span",{staticClass:"time"},[t._v(t._s(e.created_at))]),i("span",{staticClass:"state"},[t._v(t._s(e.state_name))])]),i("div",{staticClass:"goods_box"},[i("div",{staticClass:"goods_img"},[i("img",{attrs:{src:t.fun.isTextEmpty(e.thumb)?"":e.thumb}})]),i("ul",{staticClass:"goods_name"},[i("li",{staticClass:"name_price"},[i("h2",{staticClass:"name",staticStyle:{"-webkit-box-orient":"vertical"}},[t._v(" "+t._s(e.title)+" ")])]),i("li",{staticClass:"option"},[i("span",{staticClass:"total_price"},[t._v(t._s(t.$i18n.t("money"))+t._s(e.price))])])])]),i("div",{staticClass:"allbt"},[t._l(e.button_models,(function(o){return i("button",{key:o.value,attrs:{type:"button"},on:{click:function(i){return t.operation(e.order_id,o)}}},[t._v(" "+t._s(o.name)+" ")])})),i("button",{attrs:{type:"button"},on:{click:function(i){return t.gotoOrderDetail(e.order_id)}}},[t._v(" 订单详情 ")]),i("button",{staticClass:"groupDetail",attrs:{type:"button"},on:{click:function(i){return t.gotoGroup(e.order_id)}}},[t._v(" 拼购详情 ")])],2)])})),0)]),i("van-tab",{attrs:{title:"拼购失败",name:"c"}},[i("div",{staticClass:"list_box"},t._l(t.info,(function(e,o){return i("div",{key:o,staticClass:"list"},[i("div",{staticClass:"time_state"},[i("span",{staticClass:"time"},[t._v(t._s(e.created_at))]),i("span",{staticClass:"state"},[t._v(t._s(e.state_name))])]),i("div",{staticClass:"goods_box"},[i("div",{staticClass:"goods_img"},[i("img",{attrs:{src:t.fun.isTextEmpty(e.thumb)?"":e.thumb}})]),i("ul",{staticClass:"goods_name"},[i("li",{staticClass:"name_price"},[i("h2",{staticClass:"name",staticStyle:{"-webkit-box-orient":"vertical"}},[t._v(" "+t._s(e.title)+" ")])]),i("li",{staticClass:"option"},[i("span",{staticClass:"total_price"},[t._v(t._s(t.$i18n.t("money"))+t._s(e.price))])])])]),i("div",{staticClass:"allbt"},[t._l(e.button_models,(function(o){return i("button",{key:o.value,attrs:{type:"button"},on:{click:function(i){return t.operation(e.order_id,o)}}},[t._v(" "+t._s(o.name)+" ")])})),i("button",{attrs:{type:"button"},on:{click:function(i){return t.gotoOrderDetail(e.order_id)}}},[t._v(" 订单详情 ")]),i("button",{staticClass:"groupDetail",attrs:{type:"button"},on:{click:function(i){return t.gotoGroup(e.order_id)}}},[t._v(" 拼购详情 ")])],2)])})),0)])],1),i("yz-blank",{attrs:{datas:t.info,text:"暂无记录",isBtn:!0,btnText:"返回首页",tolink:"home"}})],1)],1)},s=[],a=(i("e7e5"),i("d399")),n=(i("b0c0"),i("99af"),i("6968")),l=i("ac0d"),r=i("eb17"),c={mixins:[l["a"]],data:function(){return{info:[],active:"a",page:1,isLoadMore:!0,total_page:0}},activated:function(){this.init(),this.getData(0)},methods:{init:function(){this.info={},this.isLoadMore=!0,this.total_page=0,this.page=1},getData:function(){var t=this;this.info=[];var e=null;"a"==this.active?e=1:"b"==this.active?e=2:"c"==this.active&&(e=3);var i={state:e,art:"buyList"};$http.get("plugin.together-purchase.api.index.getTogetherData",i,"").then((function(e){1===e.result?(t.isLoadMore=!0,t.total_page=e.data.buyList.last_page,t.total_page||(t.total_page=0),t.info=e.data.buyList.data):Object(a["a"])(e.msg)}),(function(t){}))},operation:function(t,e){"together_purchase_pay"===e.value?this.toPay(t,e):this.publicMessage(t,e.api,e.name)},publicMessage:function(t,e,i){var o=this,s=i||"";e&&this.$dialog.confirm({message:"确定".concat(s,"?")}).then((function(){var i=o,n={order_id:t};$http.get(e,n).then((function(t){1==t.result?(Object(a["a"])("".concat(s,"成功")),i.getData()):i.$dialog.alert({message:"确定".concat(s,"?")})}),(function(t){}))})).catch((function(){}))},toPay:function(t,e){this.$router.push(this.fun.getUrl("orderpay",{status:1,order_ids:t},{api:e.api}))},gotoGroup:function(t){this.$router.push(this.fun.getUrl("groupBuyDetail",{id:t}))},gotoOrderDetail:function(t){this.$router.push(this.fun.getUrl("orderdetail",{order_id:t,orderType:"groupsBuy"}))},getMoreData:function(){this.isLoadMore=!1;var t=this,e=null;"a"==this.active?e=1:"b"==this.active?e=2:"c"==this.active&&(e=3);var i={state:e,art:"buyList"};t.page>=t.total_page||(t.page+=1,i.page=t.page,$http.get("plugin.together-purchase.api.index.getTogetherData",i,"加载中").then((function(e){if(t.isLoadMore=!0,1!=e.result)return t.page=t.page-1,void(t.isLoadMore=!1);var i=e.data.buyList.data;t.info=t.info.concat(i)})).catch((function(t){})))}},components:{cTitle:n["a"],yzBlank:r["default"]},filters:{startTimes:function(t){var e=new Date(1e3*t),i=e.getFullYear()+"-",o=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-",s=e.getDate()+" ",a=e.getHours()+":",n=e.getMinutes()+":",l=e.getSeconds();return i+o+s+a+n+l}}},d=c,u=(i("fe2b"),i("2877")),b=Object(u["a"])(d,o,s,!1,null,"1590b428",null);e["default"]=b.exports},"79db":function(t,e,i){t.exports=i.p+"static/app/img/empty-image-search.ef236a93.png"},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var o=document.documentElement,s=document.body,a={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return o&&o.scrollTop?t=o.scrollTop:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&o.clientHeight?Math.min(s.clientHeight,o.clientHeight):Math.max(s.clientHeight,o.clientHeight),t},getScrollHeight:function(){return Math.max(s.scrollHeight,o.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},b70a:function(t,e,i){var o=i("d48f");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var s=i("499e").default;s("7efee88c",o,!0,{sourceMap:!1,shadowMode:!1})},d48f:function(t,e,i){var o=i("24fb");e=o(!1),e.push([t.i,"#mygroups .content .list_box .list[data-v-1590b428]{background:#fff;margin:.875rem;overflow:hidden;border-radius:.375rem}#mygroups .content .list_box .list .time_state[data-v-1590b428]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;font-size:14px;height:2.5rem;line-height:2.5rem;padding:0 .875rem}#mygroups .content .list_box .list .time_state .state[data-v-1590b428]{color:#f15353}#mygroups .content .list_box .list .goods_box[data-v-1590b428]{padding:.5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#mygroups .content .list_box .list .goods_box .goods_img[data-v-1590b428]{width:7.875rem;height:7.875rem;overflow:hidden;background:#f2f2f2;border-radius:.25rem;margin-right:.875rem;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}#mygroups .content .list_box .list .goods_box .goods_img img[data-v-1590b428]{width:100%}#mygroups .content .list_box .list .goods_box .goods_name[data-v-1590b428]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}#mygroups .content .list_box .list .goods_box .goods_name[data-v-1590b428],#mygroups .content .list_box .list .goods_box .goods_name .name_price[data-v-1590b428]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#mygroups .content .list_box .list .goods_box .goods_name .name_price .name[data-v-1590b428]{width:100%;font-size:.875rem;color:#000;line-height:1.125rem;height:4.5rem;text-align:left;font-weight:400;text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical}#mygroups .content .list_box .list .goods_box .goods_name .name_price .price[data-v-1590b428]{font-size:14px;text-align:right;line-height:1.25rem}#mygroups .content .list_box .list .goods_box .goods_name .name_price .price span[data-v-1590b428]{color:#8c8c8c}#mygroups .content .list_box .list .goods_box .goods_name .option[data-v-1590b428]{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;color:#f15353;font-size:14px;text-align:left}#mygroups .content .list_box .list .goods_box .goods_name .option .timestamp_box[data-v-1590b428]{display:block;padding:0 .5rem;height:1.25rem;line-height:1.25rem;border-radius:.625rem;background-color:rgba(255,44,41,.1)}#mygroups .content .list_box .list .goods_box .goods_name .option .timestamp_box .van-count-down[data-v-1590b428]{display:inline-block;color:#f15353;font-size:14px;line-height:1.25rem}#mygroups .content .list_box .list .goods_box .goods_name .option .total_price[data-v-1590b428]{font-size:1rem;line-height:1.5rem}#mygroups .content .list_box .list .all_price[data-v-1590b428]{height:2.5rem;line-height:2.5rem;padding:0 .875rem;text-align:right;font-size:14px;font-weight:400}#mygroups .content .list_box .list .all_price span[data-v-1590b428]{font-weight:700;font-size:18px}#mygroups .content .list_box .list .allbt[data-v-1590b428]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;padding:.5rem .875rem;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}#mygroups .content .list_box .list .allbt button[data-v-1590b428]{border-radius:.75rem;border:.0625rem solid #ff2c29;font-size:12px;padding:.25rem .625rem;margin:0 0 .625rem .625rem;color:#ff2c29}#mygroups .content .list_box .list .allbt .groupDetail[data-v-1590b428]{color:#fff;background:#ff2c29}",""]),t.exports=e},fe2b:function(t,e,i){"use strict";i("b70a")}}]); |