1 line
7.4 KiB
JavaScript
1 line
7.4 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-760109ee","chunk-2d0d83d6"],{"2d6f":function(t,e,i){var a=i("bdd3");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("499e").default;o("01bc7e5b",a,!0,{sourceMap:!1,shadowMode:!1})},"79db":function(t,e,i){t.exports=i.p+"static/app/img/empty-image-search.ef236a93.png"},"8c21":function(t,e,i){"use strict";i("2d6f")},9017:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"my_prize"}},[i("c-title",{attrs:{hide:!1,text:"我的奖品"}}),i("van-tabs",{attrs:{sticky:"","offset-top":"40px",animated:""},on:{click:t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.titleArr,(function(e,a){return i("van-tab",{key:a,attrs:{title:e}},[t.dataList[a]&&!t.fun.isTextEmpty(t.dataList[a].list)?i("div",{staticClass:"ul"},t._l(t.dataList[a].list,(function(e,a){return i("div",{key:a,staticClass:"li",on:{click:function(i){return i.stopPropagation(),t.gotoUrl("orderdetail",{order_id:e.order_id,orderType:"luck-draw"})}}},[i("div",{staticClass:"top-box flex-style"},[i("div",[t._v(t._s(e.created_at))]),i("div",{staticClass:"color-text"},[t._v(t._s(e.status_name))])]),i("div",{staticClass:"good-box flex-style"},[i("img",{staticClass:"good-img",attrs:{src:e.goods_thumb,alt:""}}),i("div",{staticClass:"good-other flex-style"},[i("div",{staticClass:"tt flex-style"},[i("div",{staticClass:"good-title"},[t._v(t._s(e.goods_name))]),i("div",{staticClass:"num"},[t._v("x"+t._s(e.goods_total))])]),i("div",{staticClass:"tt flex-style"},[i("div",{}),i("div",{staticClass:"num"},[t._v(t._s(t.$i18n.t("money"))+t._s(e.goods_money))])])])]),i("div",{staticClass:"order-btn"},[2==e.status||3==e.status?i("div",{staticClass:"btn",on:{click:function(i){return i.stopPropagation(),t.confirmBtn(e.order_id,0)}}},[t._v("查看物流")]):t._e(),2==e.status?i("div",{staticClass:"btn btn-bg",on:{click:function(i){return i.stopPropagation(),t.confirmBtn(e.order_id,1)}}},[t._v("确认收货")]):t._e()])])})),0):i("yz-blank",{attrs:{text:"暂无数据",isBtn:!1}})],1)})),1)],1)},o=[],s=(i("e7e5"),i("d399")),r=(i("d3b7"),i("159b"),i("99af"),i("ac0d")),n=i("eb17"),c={mixins:[r["a"]],data:function(){return{activeName:0,dataList:[],titleArr:["全部","待发货","待收货","已完成"],isLoadMore:!0}},activated:function(){this.dataList=[],this.setNewArr()},components:{yzBlank:n["default"]},computed:{},methods:{gotoUrl:function(t,e){this.$router.push(this.fun.getUrl(t,e))},confirmBtn:function(t,e){0==e?this.$router.push(this.fun.getUrl("logistics",{id:t,fromGrab:1,api:"plugin.luck-draw.frontend.index.express"})):this.publicMessage(t,{api:"order.operation.receive"},"确认收货")},publicMessage:function(t,e,i){var a=this,o=i||"";e.api&&this.$dialog.confirm({message:"确定".concat(o,"?")}).then((function(){var i=a,s={order_id:t},r=e.api||"";$http.get(r,s).then((function(t){1==t.result?(i.dataList=[],i.setNewArr(),i.$notify({background:"#f0f9eb",message:"".concat(o,"成功"),color:"#67c23a"})):i.$dialog.alert({message:t.msg})}),(function(t){}))})).catch((function(){}))},setNewArr:function(){var t=this;this.titleArr.forEach((function(e,i){t.dataList.push({isLoadMore:!0,page:1,total_page:0,list:[]})})),this.handleClick()},handleClick:function(){var t=this,e=this;this.fun.isTextEmpty(this.dataList[e.activeName].list)?$http.post("plugin.luck-draw.frontend.index.myPrize",{state:this.activeName},"").then((function(i){1===i.result?(e.isLoadMore=!0,e.$set(t.dataList[e.activeName],"isLoadMore",!0),e.$set(t.dataList[e.activeName],"total_page",i.data.last_page),t.dataList[e.activeName].total_page||(e.$set(t.dataList[e.activeName],"total_page",0),t.dataList[e.activeName].total_page=0),e.$set(t.dataList[e.activeName],"list",i.data.data)):Object(s["a"])(i.msg)})).catch((function(t){})):e.isLoadMore=this.dataList[e.activeName].isLoadMore},getMoreData:function(){var t=this;if(t.dataList[t.activeName].isLoadMore=!1,t.isLoadMore=!1,!(t.dataList[t.activeName].page>=t.dataList[t.activeName].total_page)){var e="plugin.luck-draw.frontend.index.myPrize",i={state:this.activeName};t.dataList[t.activeName].page=t.dataList[t.activeName].page+1,i.page=t.dataList[t.activeName].page,$http.get(e,i,"加载中").then((function(e){if(t.isLoadMore=!0,t.dataList[t.activeName].isLoadMore=!0,1===e.result){var i=e.data.data;t.dataList[t.activeName].list=t.dataList[t.activeName].list.concat(i)}else t.dataList[t.activeName].page=t.dataList[t.activeName].page-1,t.dataList[t.activeName].isLoadMore=!1,t.isLoadMore=!1}),(function(t){}))}}}},l=c,d=(i("8c21"),i("2877")),f=Object(d["a"])(l,a,o,!1,null,"cc305ff2",null);e["default"]=f.exports},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var a=document.documentElement,o=document.body,s={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:o&&(t=o.scrollTop),t},getClientHeight:function(){var t=0;return t=o.clientHeight&&a.clientHeight?Math.min(o.clientHeight,a.clientHeight):Math.max(o.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(o.scrollHeight,a.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(){}}}},bdd3:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,"#my_prize .flex-style[data-v-cc305ff2]{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}#my_prize .color-text[data-v-cc305ff2]{color:#f14e4e}#my_prize .ul[data-v-cc305ff2]{padding:.875rem}#my_prize .ul .li[data-v-cc305ff2]{padding:.75rem;background-color:#fff;border-radius:10px;overflow:hidden;font-size:10px;color:#666;margin-bottom:.75rem}#my_prize .ul .li .top-box[data-v-cc305ff2]{width:100%;line-height:1.5rem;padding-bottom:.5rem}#my_prize .ul .li .good-box .good-img[data-v-cc305ff2]{width:3.125rem;height:3.125rem;background-color:#666;border-radius:.125rem;margin:0 .75rem 0 0}#my_prize .ul .li .good-box .good-other[data-v-cc305ff2]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}#my_prize .ul .li .good-box .good-other .good-title[data-v-cc305ff2]{font-size:14px;padding-right:1rem;color:#333;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}#my_prize .ul .li .order-btn[data-v-cc305ff2]{padding-top:.75rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}#my_prize .ul .li .order-btn .btn[data-v-cc305ff2]{padding:0 .75rem;height:1.5rem;line-height:1.5rem;border-radius:.75rem;border:1px solid #b4b4b4;margin-left:.875rem}#my_prize .ul .li .order-btn .btn-bg[data-v-cc305ff2]{background:#f14e4e;border-color:#f14e4e;color:#fff}",""]),t.exports=e}}]); |