require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugin/scoreshop/order/success"],{"1ea4":function(t,e,r){"use strict";(function(t,e){var o=r("47a9");r("4c1a");o(r("3240"));var n=o(r("b328"));t.__webpack_require_UNI_MP_PLUGIN__=r,e(n.default)}).call(this,r("3223")["default"],r("df3c")["createPage"])},"6d29":function(t,e,r){"use strict";(function(t){var o=r("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r("7ca3")),i=r("8f59");function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}var a={data:function(){return{icoUrl:this.$icoUrl,order_no:"",order_id:"",orderInfo:{}}},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,i.mapGetters)(["base","is_login"])),onLoad:function(e){e.order_no?(this.order_no=e.order_no,this.getOrderInfo()):e.id?(this.order_id=e.id,this.getOrderInfoById()):this.$util.toast("订单号不存在",2e3,(function(){t.navigateBack()}))},methods:{getOrderInfo:function(){var e=this;this.$util.get("scoreshop/order/list",{status:-1}).then((function(r){if(1==r.code&&r.data&&r.data.length>0){var o=r.data.find((function(t){return t.order_no===e.order_no}));o?(e.order_id=o.id,e.getOrderInfoById()):e.$util.toast("订单不存在",2e3,(function(){t.navigateBack()}))}else e.$util.toast("获取订单信息失败",2e3)})).catch((function(t){e.$util.toast("获取订单信息失败",2e3)}))},getOrderInfoById:function(){var e=this;this.$util.get("scoreshop/order/detail",{id:this.order_id}).then((function(r){1==r.code?(e.orderInfo=r.data,e.setStatusText()):e.$util.toast(r.msg||r.message,2e3,(function(){t.navigateBack()}))})).catch((function(t){e.$util.toast("获取订单信息失败",2e3)}))},setStatusText:function(){this.orderInfo.statusText={0:"待支付",1:"待发货",2:"已发货",3:"已完成","-1":"已关闭"}[this.orderInfo.status]||"未知"},copyOrderNo:function(){var e=this;this.orderInfo.order_no&&t.setClipboardData({data:this.orderInfo.order_no,success:function(){e.$util.toast("复制成功")}})},backHome:function(){t.reLaunch({url:"/pages/index/index"})},viewOrder:function(){t.redirectTo({url:"/plugin/scoreshop/order/index"})}}};e.default=a}).call(this,r("df3c")["default"])},"8cac":function(t,e,r){"use strict";r.r(e);var o=r("6d29"),n=r.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return o[t]}))}(i);e["default"]=n.a},"91ec":function(t,e,r){"use strict";var o=r("cff3"),n=r.n(o);n.a},b328:function(t,e,r){"use strict";r.r(e);var o=r("c0a7"),n=r("8cac");for(var i in n)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(i);r("91ec");var c=r("828b"),a=Object(c["a"])(n["default"],o["b"],o["c"],!1,null,"56c40054",null,!1,o["a"],void 0);e["default"]=a.exports},c0a7:function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"c",(function(){return i})),r.d(e,"a",(function(){return o}));var o={uIcon:function(){return Promise.all([r.e("common/vendor"),r.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(r.bind(null,"b248"))}},n=function(){var t=this.$createElement,e=(this._self._c,this.$util.lightColor(this.mainColor,.2)),r=this.orderInfo.order_goods&&this.orderInfo.order_goods.length>0;this.$mp.data=Object.assign({},{$root:{g0:e,g1:r}})},i=[]},cff3:function(t,e,r){}},[["1ea4","common/runtime","common/vendor"]]]);