text: (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/ProductDetail/ProductDetail"],{185:
  /*!***********************************************************************************!*\
    !*** D:/工作/shengxianbao/main.js?{"page":"pages%2FProductDetail%2FProductDetail"} ***!
    \***********************************************************************************/
  /*! no static exports found */function(t,e,n){"use strict";(function(t){n(/*! uni-pages */5);r(n(/*! vue */3));var e=r(n(/*! ./pages/ProductDetail/ProductDetail.vue */186));function r(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */1)["createPage"])},186:
  /*!****************************************************************!*\
    !*** D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue ***!
    \****************************************************************/
  /*! no static exports found */function(t,e,n){"use strict";n.r(e);var r=n(/*! ./ProductDetail.vue?vue&type=template&id=9a2e6c70&scoped=true& */187),i=n(/*! ./ProductDetail.vue?vue&type=script&lang=js& */189);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n(/*! ./ProductDetail.vue?vue&type=style&index=0&lang=css& */191),n(/*! ./ProductDetail.vue?vue&type=style&index=1&id=9a2e6c70&scoped=true&lang=scss& */193);var u,o=n(/*! ../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */14),c=Object(o["default"])(i["default"],r["render"],r["staticRenderFns"],!1,null,"9a2e6c70",null,!1,r["components"],u);c.options.__file="pages/ProductDetail/ProductDetail.vue",e["default"]=c.exports},187:
  /*!***********************************************************************************************************!*\
    !*** D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=template&id=9a2e6c70&scoped=true& ***!
    \***********************************************************************************************************/
  /*! exports provided: render, staticRenderFns, recyclableRender, components */function(t,e,n){"use strict";n.r(e);var r=n(/*! -!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ProductDetail.vue?vue&type=template&id=9a2e6c70&scoped=true& */188);n.d(e,"render",(function(){return r["render"]})),n.d(e,"staticRenderFns",(function(){return r["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return r["recyclableRender"]})),n.d(e,"components",(function(){return r["components"]}))},188:
  /*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=template&id=9a2e6c70&scoped=true& ***!
    \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  /*! exports provided: render, staticRenderFns, recyclableRender, components */function(t,e,n){"use strict";var r;n.r(e),n.d(e,"render",(function(){return i})),n.d(e,"staticRenderFns",(function(){return u})),n.d(e,"recyclableRender",(function(){return a})),n.d(e,"components",(function(){return r}));var i=function(){var t=this,e=t.$createElement;t._self._c},a=!1,u=[];i._withStripped=!0},189:
  /*!*****************************************************************************************!*\
    !*** D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=script&lang=js& ***!
    \*****************************************************************************************/
  /*! no static exports found */function(t,e,n){"use strict";n.r(e);var r=n(/*! -!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ProductDetail.vue?vue&type=script&lang=js& */190),i=n.n(r);for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},190:
  /*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=script&lang=js& ***!
    \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  /*! no static exports found */function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n(/*! ./node_modules/@babel/runtime/regenerator */9));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e,n,r,i,a,u){try{var o=t[a](u),c=o.value}catch(s){return void n(s)}o.done?e(c):Promise.resolve(c).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var u=t.apply(e,n);function o(t){a(u,r,i,o,c,"next",t)}function c(t){a(u,r,i,o,c,"throw",t)}o(void 0)}))}}var o=function(){n.e(/*! require.ensure | pages/ProductDetail/components/detail-page-header */"pages/ProductDetail/components/detail-page-header").then(function(){return resolve(n(/*! ./components/detail-page-header */607))}.bind(null,n)).catch(n.oe)},c=function(){n.e(/*! require.ensure | pages/ProductDetail/components/mix-swiper */"pages/ProductDetail/components/mix-swiper").then(function(){return resolve(n(/*! ./components/mix-swiper */614))}.bind(null,n)).catch(n.oe)},s=function(){n.e(/*! require.ensure | pages/ProductDetail/components/bottom-operation */"pages/ProductDetail/components/bottom-operation").then(function(){return resolve(n(/*! ./components/bottom-operation */621))}.bind(null,n)).catch(n.oe)},d={components:{pageHeader:o,mixSwiper:c,bottomOperation:s},data:function(){return{currentSku:{},data:{images:[]},ratingData:{}}},onLoad:function(t){this.id=t.id},onShow:function(){},onPageScroll:function(t){this.$refs.pageHeader&&this.$refs.pageHeader.pageScroll(t)},onShareAppMessage:function(t){return{title:this.data.title,path:"/pages/product/detail?id="+this.data._id,imageUrl:this.data.thumb}},methods:{loadData:function(){var e=this;return u(r.default.mark((function n(){var i,a;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$request("product","getDetail",{id:e.id});case 2:if(i=n.sent,0!==i.status){n.next=7;break}return e.$util.msg(i.msg||"产品不存在或已下架"),setTimeout((function(){t.navigateBack()}),1e3),n.abrupt("return");case 7:a=i.data,a.content=a.content.replace(/img src="/g,'img style="display:block;width:100%;height:auto" src="'),e.data=a,e.$nextTick((function(){e.calcAnchor()})),e.addProductHistory();case 12:case"end":return n.stop()}}),n)})))()},loadRating:function(){var t=this;return u(r.default.mark((function e(){var n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$request("rating","getDetailRating",{product_id:t.id});case 2:n=e.sent,t.ratingData=n,t.$nextTick((function(){t.calcAnchor()}));case 5:case"end":return e.stop()}}),e)})))()},addToCart:function(){var e=this;this.$util.throttle(u(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.getConfirmData(),i){n.next=3;break}return n.abrupt("return");case 3:return n.next=5,e.$request("cart","add",i,{showLoading:!0,login:!0});case 5:if(a=n.sent,a){n.next=8;break}return n.abrupt("return");case 8:e.log(a),e.$util.msg(a.msg),1===a.status&&(e.hidePopup("skuPopup"),e.$store.dispatch("getCartCount"),t.$emit("refreshCart"));case 11:case"end":return n.stop()}}),n)}))))},buyNow:function(){var t=this.getConfirmData();t&&(this.hidePopup("skuPopup"),this.navTo("/pages/order/createOrder?data="+JSON.stringify(t),{login:!0}))},setCurrentSku:function(t){this.currentSku=t},getConfirmData:function(){var t=this.currentSku._id?this.currentSku:this.data.sku[0];if(t.stock<=0||this.data.stock<=0)return this.$util.msg("库存不足"),!1;var e={product_id:this.data._id,number:this.$refs.skuPopup.buyNumber||1,sku:this.currentSku._id?this.currentSku:this.data.sku[0]};return e},calcAnchor:function(){var e=this;return u(r.default.mark((function n(){var i,a,u,o;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,new Promise((function(e){t.createSelectorQuery().select("#rating").boundingClientRect((function(t){e(t)})).exec()}));case 2:i=n.sent,a=e.systemInfo.statusBarHeight+e.systemInfo.navigationBarHeight,u=(i?i.top:0)-a,o=(i?i.bottom:0)+t.upx2px(12)-a,e.$refs.pageHeader.anchorList[1].top=u,e.$refs.pageHeader.anchorList[2].top=o,[0,u,o];case 9:case"end":return n.stop()}}),n)})))()},addProductHistory:function(){var e=this.data,n=t.getStorageSync("productHistory");n||(n=[]);var r=n.findIndex((function(t){return t.id===e._id}));-1!==r&&n.splice(r,1),n.unshift({id:e._id,thumb:e.thumb}),t.setStorageSync("productHistory",n)},delHistory:function(){var e=t.getStorageSync("productHistory");if(e){var n=e.findIndex((function(t){return t._id===data._id}));-1!==n&&(e.splice(n,1),t.setStorageSync("productHistory",e))}},showPopup:function(t,e){this.$refs[t].open(e)},onOprationClick:function(t){this.showPopup("skuPopup",t)},doAppShare:function(){var e=this;this.$util.throttle(u(r.default.mark((function n(){var i;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i={provider:"weixin",scene:"WXSceneSession",type:5,imageUrl:e.data.thumb,title:e.data.title,miniProgram:{id:"gh_3dada2e0f833",path:"/pages/product/detail?id="+e.data._id,type:0,webUrl:"http://guoyunnet.com"},success:function(t){console.log("success:"+JSON.stringify(t))},fail:function(t){console.log("fail:"+JSON.stringify(t))}},t.share(i);case 2:case"end":return n.stop()}}),n)}))))}}};e.default=d}).call(this,n(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */1)["default"])},191:
  /*!*************************************************************************************************!*\
    !*** D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=style&index=0&lang=css& ***!
    \*************************************************************************************************/
  /*! no static exports found */function(t,e,n){"use strict";n.r(e);var r=n(/*! -!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ProductDetail.vue?vue&type=style&index=0&lang=css& */192),i=n.n(r);for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},192:
  /*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=style&index=0&lang=css& ***!
    \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  /*! no static exports found */function(t,e,n){},193:
  /*!**************************************************************************************************************************!*\
    !*** D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=style&index=1&id=9a2e6c70&scoped=true&lang=scss& ***!
    \**************************************************************************************************************************/
  /*! no static exports found */function(t,e,n){"use strict";n.r(e);var r=n(/*! -!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--8-oneOf-1-3!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../开发工具/hbuilderx/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ProductDetail.vue?vue&type=style&index=1&id=9a2e6c70&scoped=true&lang=scss& */194),i=n.n(r);for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},194:
  /*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
    !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/工作/shengxianbao/pages/ProductDetail/ProductDetail.vue?vue&type=style&index=1&id=9a2e6c70&scoped=true&lang=scss& ***!
    \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
  /*! no static exports found */function(t,e,n){}},[[185,"common/runtime","common/vendor"]]]);
  //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/ProductDetail/ProductDetail.js.map