You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
3.5 KiB
2 lines
3.5 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/ship_detail"],{274:function(e,t,n){"use strict";(function(e,t){var i=n(4);n(26);i(n(25));var r=i(n(275));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n(1)["default"],n(2)["createPage"])},275:function(e,t,n){"use strict";n.r(t);var i=n(276),r=n(278);for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n(280);var c,o=n(33),u=Object(o["default"])(r["default"],i["render"],i["staticRenderFns"],!1,null,"bbc5a964",null,!1,i["components"],c);u.options.__file="pages/index/ship_detail.vue",t["default"]=u.exports},276:function(e,t,n){"use strict";n.r(t);var i=n(277);n.d(t,"render",(function(){return i["render"]})),n.d(t,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(t,"components",(function(){return i["components"]}))},277:function(e,t,n){"use strict";var i;n.r(t),n.d(t,"render",(function(){return r})),n.d(t,"staticRenderFns",(function(){return c})),n.d(t,"recyclableRender",(function(){return a})),n.d(t,"components",(function(){return i}));var r=function(){var e=this,t=e.$createElement,n=(e._self._c,e.ship?e.getFileUrl(e.ship.picture1):null),i=e.ship?e.getFileUrl(e.ship.picture2):null,r=e.ship?e.getFileUrl(e.ship.picture3):null;e.$mp.data=Object.assign({},{$root:{m0:n,m1:i,m2:r}})},a=!1,c=[];r._withStripped=!0},278:function(e,t,n){"use strict";n.r(t);var i=n(279),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);t["default"]=r.a},279:function(e,t,n){"use strict";(function(e){var i=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(44)),a=i(n(46)),c=n(30),o=function(){n.e("components/NavBar").then(function(){return resolve(n(314))}.bind(null,n)).catch(n.oe)},u={name:"ShipDetailPage",components:{NavBar:o},data:function(){return{ship:null,id:null}},onLoad:function(e){if(this.id=e.id,e.item)try{this.ship=JSON.parse(decodeURIComponent(e.item))}catch(t){this.ship=null}this.fetchShipDetail()},methods:{fetchShipDetail:function(){var t=this;return(0,a.default)(r.default.mark((function n(){var i,a;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=e.getStorageSync("token"),i){n.next=4;break}return e.showToast({title:"请先登录",icon:"none"}),n.abrupt("return");case 4:return e.showLoading({title:"加载中..."}),n.prev=5,n.next=8,new Promise((function(n,r){e.request({url:"".concat(c.API.SHIP_DETAIL,"/").concat(t.id),method:"GET",data:{token:i},success:n,fail:r})}));case 8:a=n.sent,e.hideLoading(),a.data&&0===a.data.errcode?t.ship=a.data.data:e.showToast({title:a.data.errmsg||"获取失败",icon:"none"}),n.next=17;break;case 13:n.prev=13,n.t0=n["catch"](5),e.hideLoading(),e.showToast({title:n.t0.message||"网络错误",icon:"none"});case 17:case"end":return n.stop()}}),n,null,[[5,13]])})))()},getFileUrl:function(e){return e?"".concat(c.API.BASE_URL,"/api/customer/upload-file/preview?id=").concat(e):""},onEdit:function(){if(this.ship){var t=encodeURIComponent(JSON.stringify(this.ship));e.navigateTo({url:"/pages/index/ship_add?edit=1&ship=".concat(t)})}}}};t.default=u}).call(this,n(2)["default"])},280:function(e,t,n){"use strict";n.r(t);var i=n(281),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);t["default"]=r.a},281:function(e,t,n){}},[[274,"common/runtime","common/vendor"]]]);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/ship_detail.js.map
|