1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-index"],{"0db3":function(e,t,i){"use strict";i.r(t);var o=i("1a27"),n=i("2c40");for(var r in n)"default"!==r&&function(e){i.d(t,e,(function(){return n[e]}))}(r);i("dc28");var a,d=i("f0c5"),s=Object(d["a"])(n["default"],o["b"],o["c"],!1,null,"1f3d65f6",null,!1,o["a"],a);t["default"]=s.exports},"1a27":function(e,t,i){"use strict";var o;i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return o}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"header"},[i("v-uni-view",{staticClass:"tabs"},[i("v-uni-view",{staticClass:"item",class:{show:"paid"==e.listType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabs("paid")}}},[e._v("待发货")]),i("v-uni-view",{staticClass:"item",class:{show:"delivered"==e.listType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabs("delivered")}}},[e._v("已发货")]),i("v-uni-view",{staticClass:"item",class:{show:"signed"==e.listType},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.onTabs("signed")}}},[e._v("已签收")])],1)],1),e.orderArr.length>0?i("v-uni-view",{staticClass:"order"},e._l(e.orderArr,(function(t,o){return i("v-uni-view",{key:o,staticClass:"While order-list"},[i("v-uni-view",{staticClass:"order-top"},[i("v-uni-view",{staticClass:"order-top-number"},[e._v(e._s(t.order_no))]),i("v-uni-view",{staticClass:"order-top-tips"},[e._v(e._s(t.state))])],1),e._l(t.items,(function(t,o){return i("v-uni-view",{key:o,staticClass:"order-name"},[i("v-uni-image",{staticClass:"order-img",attrs:{src:t.sku.cover,mode:"aspectFill"}}),i("v-uni-view",{staticClass:"order-goods"},[i("v-uni-view",{staticClass:"order-label"},[i("v-uni-view",{staticClass:"nowrap order-label-name"},[e._v(e._s(t.sku.goods_name))]),i("v-uni-view",{staticClass:"order-label-price"},[e._v("¥"+e._s(t.sku.price))])],1),i("v-uni-view",{staticClass:"order-specs"},[e._v("x"+e._s(t.qty))])],1)],1)})),i("v-uni-view",{staticClass:"order-text"},[i("v-uni-view",{staticClass:"order-time"},[e._v("下单时间:"+e._s(t.created_at))]),i("v-uni-view",{staticClass:"order-price"},[e._v("合计金额:"),i("v-uni-text",{staticClass:"red"},[e._v("¥"+e._s(t.amount))])],1)],1),i("v-uni-view",{staticClass:"order-btn"},[1==t.can.sign?i("v-uni-view",{staticClass:"order-btn-atn active",on:{click:function(i){arguments[0]=i=e.$handleEvent(i),e.orderSign(t.order_no)}}},[e._v("立即签收")]):e._e(),i("v-uni-view",{staticClass:"order-btn-atn",on:{click:function(i){arguments[0]=i=e.$handleEvent(i),e.$Router.push({name:"OrderDetails",params:{orderNo:t.order_no,listType:e.listType}})}}},[e._v("订单详情")])],1)],2)})),1):i("v-uni-view",{staticClass:"pack-center pages-hint"},[i("v-uni-image",{attrs:{src:"/static/imgs/coupon_null.png"}}),i("v-uni-view",[e._v("暂无数据")])],1)],1)},r=[]},2981:function(e,t,i){"use strict";var o=i("4ea4");i("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.uploading=t.request=void 0;var n=o(i("6c25")),r={apiUrl:"http://api.water.shangkelian.cn/api/",timeout:6e4};t.config=r;var a=!1,d=function(e,t){if("undefined"!==e.url&&""!==e.url)return r.header={Accept:"application/json",Authorization:n.default.getters.getToken||""},t||uni.showLoading({title:"加载中",mask:!0}),new Promise((function(t,i){uni.request({url:r.apiUrl+e.url,timeout:r.timeout,header:r.header||{},data:e.data||{},method:e.method||"GET",success:function(e){if(e.header.Authorization&&c("token",e.header.Authorization),200===e.statusCode){uni.hideLoading();var o=e.data;return 200===o.status_code?void t(o.data):401===o.status_code?void l():void i(o)}f(e.statusCode)}})}));uni.showToast({title:"请求地址不能为空",icon:"none"})};t.request=d;var s=function(e){return uni.showLoading({title:"上传中",mask:!0}),r.header={Accept:"application/json",Authorization:n.default.getters.getToken||""},new Promise((function(t,i){uni.uploadFile({url:r.apiUrl+"storage/uploads",files:e,header:r.header||{},success:function(e){if(200===e.statusCode){uni.hideLoading();var o=JSON.parse(e.data);return 200===o.status_code?void t(o.data):void i(o)}f(e.statusCode)}})}))};t.uploading=s;var f=function(e){switch(e){case 404:uni.showToast({title:e+"接口不存在,请联系系统管理员",icon:"none"});break;case 405:uni.showToast({title:e+"请检查接口请求方式错误",icon:"none"});break;case 500:uni.showToast({title:e+"服务端错误,请检查服务器信息",icon:"none"});break}},c=function(e){n.default.commit("setToken",e)},l=function(){a||(a||(a=!0),c(""),uni.showModal({title:"登录提示",content:"您的登录信息已过期,请重新登录",confirmColor:"#8b64fd",showCancel:!1,success:function(e){a=!1,e.confirm&&uni.reLaunch({url:"/pages/index/index"})}}))}},"2c40":function(e,t,i){"use strict";i.r(t);var o=i("be62"),n=i.n(o);for(var r in o)"default"!==r&&function(e){i.d(t,e,(function(){return o[e]}))}(r);t["default"]=n.a},9863:function(e,t,i){var o=i("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* uview scss */\n/* 引入自定义的scss */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-1f3d65f6]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-1f3d65f6]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-1f3d65f6]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-1f3d65f6]{padding-top:0}.vertical[data-v-1f3d65f6]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-1f3d65f6]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-1f3d65f6]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-page-body[data-v-1f3d65f6]{background-color:#f3f4f6}.content[data-v-1f3d65f6]{overflow:hidden;background:#f3f4f6;padding:%?30?%;box-sizing:border-box}.While[data-v-1f3d65f6]{border-radius:%?10?%;margin-bottom:%?30?%;background-color:#fff;padding:0 %?30?%;box-sizing:border-box;box-shadow:0 0 %?10?% rgba(0,0,0,.05)}.order[data-v-1f3d65f6]{margin-top:%?90?%}.order-top[data-v-1f3d65f6]{line-height:%?90?%;box-sizing:border-box;display:flex;font-size:%?28?%;border-bottom:%?2?% #f2f2f2 solid}.order-top .order-top-number[data-v-1f3d65f6]{flex:1}.order-top .order-top-tips[data-v-1f3d65f6]{font-size:%?26?%;color:#edb25f}.order-name[data-v-1f3d65f6]{padding:%?20?% 0;box-sizing:border-box;position:relative}.order-name .order-img[data-v-1f3d65f6]{width:%?90?%;height:%?90?%;margin-right:%?20?%;border-radius:%?10?%}.order-name .order-goods[data-v-1f3d65f6]{position:absolute;width:100%;left:0;top:0;padding:%?20?% %?20?% %?20?% %?110?%;box-sizing:border-box}.order-name .order-goods .order-label[data-v-1f3d65f6]{display:flex;font-size:%?30?%;margin-bottom:%?15?%}.order-name .order-goods .order-label .order-label-name[data-v-1f3d65f6]{flex:1;margin-right:%?30?%}.order-name .order-goods .order-label .order-label-price[data-v-1f3d65f6]{font-weight:600}.order-name .order-goods .order-specs[data-v-1f3d65f6]{font-size:%?24?%;color:#919191;display:flex}.order-name .order-goods .order-specs uni-text[data-v-1f3d65f6]{display:inline-block;flex:1}.order-text[data-v-1f3d65f6]{font-size:%?28?%;line-height:%?40?%;display:flex;padding-bottom:%?20?%;border-top:%?2?% solid #f2f2f2;border-bottom:%?2?% solid #f2f2f2;padding-top:%?20?%}.order-text .order-time[data-v-1f3d65f6]{color:#919191;font-size:%?26?%;flex:1}.order-text .order-price uni-text[data-v-1f3d65f6]{font-weight:600;color:#6d79ec}.order-btn[data-v-1f3d65f6]{text-align:right;padding:%?30?% 0;box-sizing:border-box;position:relative}.order-btn .order-btn-atn[data-v-1f3d65f6]{border:%?2?% solid #f2f2f2;border-radius:%?40?%;padding:0 %?30?%;height:%?52?%;line-height:%?52?%;color:#767676;display:inline-block;margin-left:%?15?%;font-size:%?24?%}.order-btn .order-btn-atn.active[data-v-1f3d65f6]{color:#6d79ec;border-color:#bfc5ff}.header[data-v-1f3d65f6]{position:fixed;top:0;left:0;right:0;z-index:99}.header .tabs[data-v-1f3d65f6]{display:flex;justify-content:space-around;background:#fff;padding:%?15?% 0;font-size:%?30?%;color:#9d9d9d}.header .tabs .item[data-v-1f3d65f6]{height:%?60?%;line-height:%?60?%}.header .tabs .item.show[data-v-1f3d65f6]{color:#6d79ec;border-bottom:solid %?4?% #6d79ec}.header .tabs-type[data-v-1f3d65f6]{display:flex;padding:%?20?% %?30?%;background:#fff}.header .tabs-type .item[data-v-1f3d65f6]{font-size:%?26?%;height:%?46?%;line-height:%?46?%;border-radius:%?23?%;padding:0 %?20?%;background:#fff;margin-right:%?15?%;color:#9d9d9d}.header .tabs-type .item.show[data-v-1f3d65f6]{background-color:#6d79ec;color:#6d79ec}body.?%PAGE?%[data-v-1f3d65f6]{background-color:#f3f4f6}',""]),e.exports=t},be62:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i("cc66"),n={data:function(){return{listType:"paid",orderArr:[]}},onLoad:function(){this.listType=this.$Route.query.listType,this.ordersInfo()},methods:{ordersInfo:function(){var e=this;(0,o.orders)({state:this.listType}).then((function(t){e.orderArr=t.data})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))},onTabs:function(e){this.listType!==e&&(this.listType=e,this.ordersInfo())},orderSign:function(e){var t=this;(0,o.goodsSign)(e).then((function(e){uni.showToast({title:"签收成功",icon:"none"}),setTimeout((function(){t.ordersInfo()}),2e3)})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))}}};t.default=n},cc66:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invite=t.relations=t.goodsSign=t.goodsDet=t.orders=t.setting=t.userIndex=void 0;var o=i("2981"),n=function(){return(0,o.request)({url:"user/info"})};t.userIndex=n;var r=function(e,t){return(0,o.request)({url:"user/setting/"+e,method:"PUT",data:t})};t.setting=r;var a=function(e){return(0,o.request)({url:"mall/orders",data:e})};t.orders=a;var d=function(e){return(0,o.request)({url:"mall/orders/"+e})};t.goodsDet=d;var s=function(e){return(0,o.request)({url:"mall/orders/"+e+"/sign",method:"PUT"},!0)};t.goodsSign=s;var f=function(){return(0,o.request)({url:"user/relations"})};t.relations=f;var c=function(){return(0,o.request)({url:"user/invite"})};t.invite=c},dc28:function(e,t,i){"use strict";var o=i("ec46"),n=i.n(o);n.a},ec46:function(e,t,i){var o=i("9863");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=i("4f06").default;n("3749553f",o,!0,{sourceMap:!1,shadowMode:!1})}}]); |