pages-order-order.1bedb6fa.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-order"],{"19ba":function(a,t,e){var i=e("f3a6");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[a.i,i,""]]),i.locals&&(a.exports=i.locals);var o=e("4f06").default;o("7e128e82",i,!0,{sourceMap:!1,shadowMode:!1})},"2deb":function(a,t,e){"use strict";e("7a82");var i=e("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,e("a434"),e("d81d"),e("99af"),e("c740");var o=i(e("f84e")),n=i(e("ef70")),r=e("f7db"),d={components:{uniLoadMore:o.default,empty:n.default},data:function(){return{tabCurrentIndex:0,navList:[{state:0,text:"待付款",loadingType:"more",orderList:[],page:1,limit:10},{state:1,text:"待发货",loadingType:"more",orderList:[],page:1,limit:10},{state:2,text:"待收货",loadingType:"more",orderList:[],page:1,limit:10},{state:3,text:"待评价",loadingType:"more",orderList:[],page:1,limit:10},{state:4,text:"已完成",loadingType:"more",orderList:[],page:1,limit:10}]}},onLoad:function(a){this.tabCurrentIndex=+a.state,this.loadData()},onBackPress:function(a){return uni.switchTab({url:"/pages/user/user"}),!0},methods:{moneyNum:function(a){return+a},orderTake:function(a,t){var e=this;uni.showModal({title:"是否确认收货?",success:function(){(0,r.orderTake)({uni:a.order_id}).then((function(a){e.navList[e.tabCurrentIndex].orderList.splice(t,1),uni.showToast({title:"收货成功"})})).catch((function(a){console.log(a)}))}})},goToOrderDetail:function(a){uni.navigateTo({url:"/pages/order/orderDetail?id="+a.order_id})},orderRefund:function(a){uni.navigateTo({url:"/pages/order/orderRefund?id="+a.order_id})},orderPay:function(a){uni.navigateTo({url:"/pages/money/pay?type=1&ordid="+a.order_id+"&money="+a.pay_price})},loadData:function(a){var t=this,e=this.tabCurrentIndex,i=this.navList[e],o=i.state;"tabChange"===a&&!0===i.loaded||"loading"!==i.loadingType&&"noMore"!==i.loadingType&&(i.loadingType="loading",(0,r.orderList)({type:o,page:i.page,limit:i.limit}).then((function(a){var e=a.data,o=e.map((function(a){var e=t.orderStateExp(a.status);return a.stateTip=e.stateTip,a.stateTipColor=e.stateTipColor,a}));i.orderList=i.orderList.concat(o),i.page++,i.limit!=e.length?(i.loadingType="noMore",uni.hideLoading(),t.$set(i,"loaded",!0)):i.loadingType="more"})).catch((function(a){console.log(a)})))},changeTab:function(a){this.tabCurrentIndex=a.target.current,this.loadData("tabChange")},tabClick:function(a){this.tabCurrentIndex=a},deleteOrder:function(a){var t=this;uni.showLoading({title:"请稍后"}),setTimeout((function(){t.navList[t.tabCurrentIndex].orderList.splice(a,1),uni.hideLoading()}),600)},cancelOrder:function(a){var t=this;uni.showModal({title:"订单取消",content:"是否取消订单?",success:function(e){if(e.confirm){uni.showLoading({title:"请稍后"}),(0,r.orderCancel)({id:a.order_id}).then((function(a){uni.showToast({title:"取消成功",duration:2e3,position:"top"})})).catch((function(a){console.log(a)}));var i=t.navList[t.tabCurrentIndex].orderList,o=i.findIndex((function(t){return t.id===a.id}));-1!==o&&i.splice(o,1),uni.hideLoading()}}})},orderStateExp:function(a){var t="",e="#fa436a";switch(+a){case 0:t="待付款";break;case 1:t="待发货";break;case 2:t="待收货";break;case 3:t="待评价";break;case 4:t="已完成",e="#5dbc7c";break;case 9:t="订单已关闭",e="#909399";break}return{stateTip:t,stateTipColor:e}}}};t.default=d},"4a82":function(a,t,e){"use strict";var i=e("19ba"),o=e.n(i);o.a},5992:function(a,t,e){"use strict";e.r(t);var i=e("f388"),o=e("d4f2");for(var n in o)["default"].indexOf(n)<0&&function(a){e.d(t,a,(function(){return o[a]}))}(n);e("4a82");var r=e("f0c5"),d=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"a2a908a2",null,!1,i["a"],void 0);t["default"]=d.exports},d4f2:function(a,t,e){"use strict";e.r(t);var i=e("2deb"),o=e.n(i);for(var n in i)["default"].indexOf(n)<0&&function(a){e.d(t,a,(function(){return i[a]}))}(n);t["default"]=o.a},f388:function(a,t,e){"use strict";e.d(t,"b",(function(){return o})),e.d(t,"c",(function(){return n})),e.d(t,"a",(function(){return i}));var i={uniLoadMore:e("f84e").default},o=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("v-uni-view",{staticClass:"content"},[e("v-uni-view",{staticClass:"navbar"},a._l(a.navList,(function(t,i){return e("v-uni-view",{key:i,staticClass:"nav-item",class:{current:a.tabCurrentIndex===i},on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.tabClick(i)}}},[a._v(a._s(t.text))])})),1),e("v-uni-swiper",{staticClass:"swiper-box",attrs:{current:a.tabCurrentIndex,duration:"300"},on:{change:function(t){arguments[0]=t=a.$handleEvent(t),a.changeTab.apply(void 0,arguments)}}},a._l(a.navList,(function(t,i){return e("v-uni-swiper-item",{key:i,staticClass:"tab-content"},[e("v-uni-scroll-view",{staticClass:"list-scroll-content",attrs:{"scroll-y":!0},on:{scrolltolower:function(t){arguments[0]=t=a.$handleEvent(t),a.loadData.apply(void 0,arguments)}}},[!0===t.loaded&&0===t.orderList.length?e("empty"):a._e(),a._l(t.orderList,(function(t,i){return e("v-uni-view",{key:i,staticClass:"order-item",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.goToOrderDetail(t)}}},[e("v-uni-view",{staticClass:"i-top b-b"},[e("v-uni-text",{staticClass:"time"},[a._v(a._s(t._add_time))]),e("v-uni-text",{staticClass:"state",style:{color:t.stateTipColor}},[a._v(a._s(t._status._title))]),4===t.status?e("v-uni-text",{staticClass:"del-btn iconfont icondelete",on:{click:function(t){arguments[0]=t=a.$handleEvent(t),a.deleteOrder(i)}}}):a._e()],1),t.cartInfo.length>1?e("v-uni-scroll-view",{staticClass:"goods-box",attrs:{"scroll-x":!0}},a._l(t.cartInfo,(function(a,t){return e("v-uni-view",{key:t,staticClass:"goods-item"},[e("v-uni-image",{staticClass:"goods-img",attrs:{src:a.productInfo.image,mode:"aspectFill"}})],1)})),1):a._e(),a._l(t.cartInfo,(function(t,i){return e("v-uni-view",{key:i,staticClass:"goods-box-single"},[e("v-uni-image",{staticClass:"goods-img",attrs:{src:t.productInfo.image,mode:"scaleToFill"}}),e("v-uni-view",{staticClass:"right"},[e("v-uni-view",{staticClass:"flex-start"},[e("v-uni-text",{staticClass:"title clamp"},[a._v(a._s(t.productInfo.store_name))]),e("v-uni-text",{staticClass:"price"},[a._v(a._s(a._f("moneyNum")(t.productInfo.price)))])],1),e("v-uni-view",{staticClass:"row flex"},[e("v-uni-text",{staticClass:"row_title"},[a._v(a._s(t.productInfo.attrInfo?t.productInfo.attrInfo.suk:""))]),e("v-uni-text",{staticClass:"attr-box"},[a._v("x "+a._s(t.cart_num))])],1)],1)],1)})),e("v-uni-view",{staticClass:"price-box"},[a._v("共"),e("v-uni-text",{staticClass:"num"},[a._v(a._s(t.cartInfo.length))]),a._v("件商品 邮费"),e("v-uni-text",{staticClass:"price"},[a._v(a._s(a.moneyNum(t.pay_postage)))]),a._v("实付款"),e("v-uni-text",{staticClass:"price"},[a._v(a._s(a.moneyNum(t.pay_price)))])],1),5!=t.status?e("v-uni-view",{staticClass:"action-box b-t"},["未支付"==t._status._title?e("v-uni-button",{staticClass:"action-btn",on:{click:function(e){e.stopPropagation(),arguments[0]=e=a.$handleEvent(e),a.cancelOrder(t)}}},[a._v("取消订单")]):a._e(),"未支付"==t._status._title?e("v-uni-button",{staticClass:"action-btn recom",on:{click:function(e){e.stopPropagation(),arguments[0]=e=a.$handleEvent(e),a.orderPay(t)}}},[a._v("立即支付")]):a._e(),"待评价"==t._status._title?e("v-uni-button",{staticClass:"action-btn"},[a._v("评价")]):a._e(),"待收货"==t._status._title?e("v-uni-button",{staticClass:"action-btn",on:{click:function(e){e.stopPropagation(),arguments[0]=e=a.$handleEvent(e),a.orderTake(t,i)}}},[a._v("确认收货")]):a._e(),"未发货"==t._status._title?e("v-uni-button",{staticClass:"action-btn",on:{click:function(e){e.stopPropagation(),arguments[0]=e=a.$handleEvent(e),a.orderRefund(t)}}},[a._v("申请退款")]):a._e()],1):a._e()],2)})),e("uni-load-more",{attrs:{status:t.loadingType}})],2)],1)})),1)],1)},n=[]},f3a6:function(a,t,e){var i=e("24fb");t=i(!1),t.push([a.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-a2a908a2],\n.content[data-v-a2a908a2]{background:#f8f8f8;height:100%}body.?%PAGE?%[data-v-a2a908a2]{background:#f8f8f8}.swiper-box[data-v-a2a908a2]{height:calc(100% - 40px)}.list-scroll-content[data-v-a2a908a2]{height:100%}.navbar[data-v-a2a908a2]{display:flex;height:40px;padding:0 5px;background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.06);position:relative;z-index:10}.navbar .nav-item[data-v-a2a908a2]{flex:1;display:flex;justify-content:center;align-items:center;height:100%;font-size:15px;color:#303133;position:relative}.navbar .nav-item.current[data-v-a2a908a2]{color:#ff4e4a}.navbar .nav-item.current[data-v-a2a908a2]:after{content:"";position:absolute;left:50%;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:44px;height:0;border-bottom:2px solid #ff4e4a}.uni-swiper-item[data-v-a2a908a2]{height:auto}.order-item[data-v-a2a908a2]{display:flex;flex-direction:column;padding-left:%?30?%;background:#fff;margin-top:%?16?%\n /* 多条商品 */\n /* 单条商品 */}.order-item .i-top[data-v-a2a908a2]{display:flex;align-items:center;height:%?80?%;padding-right:%?30?%;font-size:%?28?%;color:#303133;position:relative}.order-item .i-top .time[data-v-a2a908a2]{flex:1}.order-item .i-top .state[data-v-a2a908a2]{color:#ff4e4a}.order-item .i-top .del-btn[data-v-a2a908a2]{padding:%?10?% 0 %?10?% %?36?%;font-size:%?32?%;color:#909399;position:relative}.order-item .i-top .del-btn[data-v-a2a908a2]:after{content:"";width:0;height:%?30?%;border-left:1px solid #dcdfe6;position:absolute;left:%?20?%;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.order-item .goods-box[data-v-a2a908a2]{height:%?160?%;padding:%?20?% 0;white-space:nowrap}.order-item .goods-box .goods-item[data-v-a2a908a2]{width:%?120?%;height:%?120?%;display:inline-block;margin-right:%?24?%}.order-item .goods-box .goods-img[data-v-a2a908a2]{display:block;width:100%;height:100%}.order-item .goods-box-single[data-v-a2a908a2]{display:flex;padding:%?20?% 0}.order-item .goods-box-single .goods-img[data-v-a2a908a2]{display:block;width:%?120?%;height:%?120?%}.order-item .goods-box-single .right[data-v-a2a908a2]{flex:1;display:flex;flex-direction:column;padding:0 %?30?% 0 %?24?%;overflow:hidden}.order-item .goods-box-single .right .row[data-v-a2a908a2]{margin-top:%?10?%}.order-item .goods-box-single .right .row_title[data-v-a2a908a2]{padding:%?5?% %?10?%;background-color:#ddd;border-radius:%?10?%;font-size:%?22?%;color:#fff}.order-item .goods-box-single .right .title[data-v-a2a908a2]{font-size:%?30?%;color:#303133;line-height:1;width:80%}.order-item .goods-box-single .right .attr-box[data-v-a2a908a2]{display:flex;justify-content:flex-end;font-size:%?26?%;color:#909399}.order-item .goods-box-single .right .price[data-v-a2a908a2]{display:inline;font-size:%?30?%;color:#303133}.order-item .goods-box-single .right .price[data-v-a2a908a2]:before{content:"¥";font-size:%?24?%}.order-item .price-box[data-v-a2a908a2]{display:flex;justify-content:flex-end;align-items:baseline;padding:%?20?% %?30?%;font-size:%?26?%;color:#909399}.order-item .price-box .num[data-v-a2a908a2]{margin:0 %?8?%;color:#303133}.order-item .price-box .price[data-v-a2a908a2]{font-size:%?32?%;color:#303133}.order-item .price-box .price[data-v-a2a908a2]:before{content:"¥";font-size:%?24?%;margin:0 %?2?% 0 %?8?%}.order-item .action-box[data-v-a2a908a2]{display:flex;justify-content:flex-end;align-items:center;height:%?100?%;position:relative;padding-right:%?30?%}.order-item .action-btn[data-v-a2a908a2]{width:%?160?%;height:%?60?%;margin:0;margin-left:%?24?%;padding:0;text-align:center;line-height:%?60?%;font-size:%?26?%;color:#303133;background:#fff;border-radius:100px}.order-item .action-btn[data-v-a2a908a2]:after{border-radius:100px}.order-item .action-btn.recom[data-v-a2a908a2]{color:#ff4e4a}.order-item .action-btn.recom[data-v-a2a908a2]:after{border-color:#ff4e4a}.order-item .action-btn.evaluate[data-v-a2a908a2]{color:#fd5b23}.order-item .action-btn.evaluate[data-v-a2a908a2]:after{border-color:#fd5b23}\n/* load-more */.uni-load-more[data-v-a2a908a2]{display:flex;flex-direction:row;height:%?80?%;align-items:center;justify-content:center}.uni-load-more__text[data-v-a2a908a2]{font-size:%?28?%;color:#999}.uni-load-more__img[data-v-a2a908a2]{height:24px;width:24px;margin-right:10px}.uni-load-more__img > uni-view[data-v-a2a908a2]{position:absolute}.uni-load-more__img > uni-view uni-view[data-v-a2a908a2]{width:6px;height:2px;border-top-left-radius:1px;border-bottom-left-radius:1px;background:#999;position:absolute;opacity:.2;-webkit-transform-origin:50%;transform-origin:50%;-webkit-animation:load-data-v-a2a908a2 1.56s ease infinite;animation:load-data-v-a2a908a2 1.56s ease infinite}.uni-load-more__img > uni-view uni-view[data-v-a2a908a2]:nth-child(1){-webkit-transform:rotate(90deg);transform:rotate(90deg);top:2px;left:9px}.uni-load-more__img > uni-view uni-view[data-v-a2a908a2]:nth-child(2){-webkit-transform:rotate(180deg);transform:rotate(180deg);top:11px;right:0}.uni-load-more__img > uni-view uni-view[data-v-a2a908a2]:nth-child(3){-webkit-transform:rotate(270deg);transform:rotate(270deg);bottom:2px;left:9px}.uni-load-more__img > uni-view uni-view[data-v-a2a908a2]:nth-child(4){top:11px;left:0}.load1[data-v-a2a908a2],\n.load2[data-v-a2a908a2],\n.load3[data-v-a2a908a2]{height:24px;width:24px}.load2[data-v-a2a908a2]{-webkit-transform:rotate(30deg);transform:rotate(30deg)}.load3[data-v-a2a908a2]{-webkit-transform:rotate(60deg);transform:rotate(60deg)}.load1 uni-view[data-v-a2a908a2]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.load2 uni-view[data-v-a2a908a2]:nth-child(1){-webkit-animation-delay:.13s;animation-delay:.13s}.load3 uni-view[data-v-a2a908a2]:nth-child(1){-webkit-animation-delay:.26s;animation-delay:.26s}.load1 uni-view[data-v-a2a908a2]:nth-child(2){-webkit-animation-delay:.39s;animation-delay:.39s}.load2 uni-view[data-v-a2a908a2]:nth-child(2){-webkit-animation-delay:.52s;animation-delay:.52s}.load3 uni-view[data-v-a2a908a2]:nth-child(2){-webkit-animation-delay:.65s;animation-delay:.65s}.load1 uni-view[data-v-a2a908a2]:nth-child(3){-webkit-animation-delay:.78s;animation-delay:.78s}.load2 uni-view[data-v-a2a908a2]:nth-child(3){-webkit-animation-delay:.91s;animation-delay:.91s}.load3 uni-view[data-v-a2a908a2]:nth-child(3){-webkit-animation-delay:1.04s;animation-delay:1.04s}.load1 uni-view[data-v-a2a908a2]:nth-child(4){-webkit-animation-delay:1.17s;animation-delay:1.17s}.load2 uni-view[data-v-a2a908a2]:nth-child(4){-webkit-animation-delay:1.3s;animation-delay:1.3s}.load3 uni-view[data-v-a2a908a2]:nth-child(4){-webkit-animation-delay:1.43s;animation-delay:1.43s}@-webkit-keyframes load-data-v-a2a908a2{0%{opacity:1}100%{opacity:.2}}',""]),a.exports=t},f7db:function(a,t,e){"use strict";e("7a82");var i=e("dbce").default;Object.defineProperty(t,"__esModule",{value:!0}),t.computedOrderkey=function(a){return(0,o.default)({url:"/api/order/computed/"+a.orderkey,method:"post",data:a})},t.confirm=function(a){return(0,o.default)({url:"/api/order/confirm",method:"post",data:a})},t.couponsOrder=function(a,t){return(0,o.default)({url:"/api/coupons/order/"+t,method:"get",data:a})},t.createOrderkey=function(a,t){return(0,o.default)({url:"/api/order/create/"+t,method:"post",data:a})},t.express_query=function(a){return(0,o.default)({url:"/api/order/express_query",method:"get",data:a})},t.getCouponsList=function(a,t){return(0,o.default)({url:"/api/coupons/user/"+t,method:"get",data:a})},t.orderCancel=function(a){return(0,o.default)({url:"/api/order/cancel",method:"post",data:a})},t.orderDel=function(a){return(0,o.default)({url:"/api/order/del",method:"get",data:a})},t.orderDetail=function(a,t){return(0,o.default)({url:"/api/order/detail/"+t,method:"get",data:a})},t.orderList=function(a){return(0,o.default)({url:"/api/order/list",method:"get",data:a})},t.orderPay=function(a){return(0,o.default)({url:"/api/order/pay",method:"post",data:a})},t.orderTake=function(a){return(0,o.default)({url:"/api/order/take",method:"post",data:a})},t.order_comment=function(a){return(0,o.default)({url:"/api/order/comment",method:"post",data:a})},t.product=function(a){return(0,o.default)({url:"/api/order/product",method:"post",data:a})},t.refund=function(a){return(0,o.default)({url:"/api/order/refund/verify",method:"post",data:a})},t.refundReason=function(a){return(0,o.default)({url:"/api/order/refund/reason",method:"get",data:a})},t.upload=function(a){return(0,o.upFilse)({url:"/api/upload/image",method:"post",data:a})};var o=i(e("559e"))}}]);