goods.js 4.6 KB

12
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageB/goods"],{388:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26);o(t(25));var i=o(t(389));e.__webpack_require_UNI_MP_PLUGIN__=t,n(i.default)}).call(this,t(1)["default"],t(2)["createPage"])},389:function(e,n,t){"use strict";t.r(n);var o=t(390),i=t(392);for(var a in i)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(a);t(394);var s,u=t(45),r=Object(u["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"2d9390bc",null,!1,o["components"],s);r.options.__file="pageB/goods.vue",n["default"]=r.exports},390:function(e,n,t){"use strict";t.r(n);var o=t(391);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},391:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return i})),t.d(n,"staticRenderFns",(function(){return s})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return o}));try{o={uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-icon/u-icon")]).then(t.bind(null,980))},uNumberBox:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-number-box/u-number-box")]).then(t.bind(null,972))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,n=e.$createElement,t=(e._self._c,e.i18n.length);e._isMounted||(e.e0=function(n){e.goodname=""},e.e1=function(n){e.weight++},e.e2=function(n){e.number++}),e.$mp.data=Object.assign({},{$root:{g0:t}})},a=!1,s=[];i._withStripped=!0},392:function(e,n,t){"use strict";t.r(n);var o=t(393),i=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a},393:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={data:function(){return{value:1,goods:[],language:"zh-CN",goodname:"",number:1,weight:1,goodid:"",goodtype:"normal",length:"",width:"",height:"",typea:""}},computed:{i18n:function(){return this.$t("index")}},onLoad:function(e){if(e.goodinfo){var n=JSON.parse(decodeURIComponent(e.goodinfo));this.goodid=n.goodid,this.goodname=n.goodname,this.goodtype=n.goodtype,this.height=n.height,this.length=n.length,this.number=n.number,this.weight=n.weight,this.width=n.width}e.goodtype&&(this.goodtype=e.goodtype,console.log(this.goodtype),this.typea="pin"),this.getgoods()},onShow:function(){""!=e.getStorageSync("language")&&(this.language=e.getStorageSync("language")),e.setNavigationBarTitle({title:this.i18n.item})},methods:{enter:function(){if(""!=this.goodid)if(""!=this.goodtype){var n=this.getOpenerEventChannel();n.emit("goodinfo",{goodid:this.goodid,goodtype:this.goodtype,goodname:this.goodname,number:this.number,weight:this.weight,length:this.length,width:this.width,height:this.height}),e.navigateBack()}else this.$u.toast(this.i18n.selectitemType);else this.$u.toast(this.i18n.itemtoSend)},changeweight:function(){1==this.weight?this.$u.toast(this.i18n.Weightnotlessthan):this.weight--},changenumber:function(){1==this.number?this.$u.toast(this.i18n.cannotbelessthan):this.number--},type:function(e){"pin"==this.typea||(this.goodtype=e)},activename:function(e){"zh-CN"==this.language?this.goodname=e.name_cn:"en-US"==this.language?this.goodname=e.name_en:"es-ES"==this.language?this.goodname=e.name_es:"it-IT"==this.language&&(this.goodname=e.name_ita),this.goodid=e.id},getgoods:function(){var n=this;e.$u.http.get("/api/express-goods-info",{params:{is_hot:1}}).then((function(e){n.goods=e})).catch((function(){}))},tosearch:function(){var n=this;e.navigateTo({url:"/pageB/search",events:{searchinfo:function(e){"zh-CN"==n.language?n.goodname=e.name_cn:"en-US"==n.language?n.goodname=e.name_en:"es-ES"==n.language?n.goodname=e.name_es:"it-IT"==n.language&&(n.goodname=e.name_ita),n.goodid=e.id}}})}}};n.default=t}).call(this,t(2)["default"])},394:function(e,n,t){"use strict";t.r(n);var o=t(395),i=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a},395:function(e,n,t){}},[[388,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../.sourcemap/mp-weixin/pageB/goods.js.map