mall-laonong/unpackage/dist/dev/mp-weixin/pagesB/shop-detail/shop-detail.js

402 lines
26 KiB
JavaScript
Raw Normal View History

2022-07-31 02:14:22 +00:00
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pagesB/shop-detail/shop-detail"],{
/***/ 100:
2022-08-03 03:30:25 +00:00
/*!**********************************************************************************!*\
!*** D://mall-laonong/main.js?{"page":"pagesB%2Fshop-detail%2Fshop-detail"} ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 5);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
var _shopDetail = _interopRequireDefault(__webpack_require__(/*! ./pagesB/shop-detail/shop-detail.vue */ 101));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // @ts-ignore
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;createPage(_shopDetail.default);
2022-08-03 03:30:25 +00:00
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
/***/ }),
/***/ 101:
/*!***************************************************************!*\
!*** D://mall-laonong/pagesB/shop-detail/shop-detail.vue ***!
\***************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./shop-detail.vue?vue&type=template&id=374e5d04& */ 102);
/* harmony import */ var _shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shop-detail.vue?vue&type=script&lang=js& */ 104);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 11);
var renderjs
/* normalize component */
var component = Object(_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__["render"],
_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null,
false,
_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__["components"],
renderjs
)
component.options.__file = "pagesB/shop-detail/shop-detail.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 102:
2022-08-01 10:31:20 +00:00
/*!**********************************************************************************************!*\
!*** D://mall-laonong/pagesB/shop-detail/shop-detail.vue?vue&type=template&id=374e5d04& ***!
\**********************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
2022-08-03 03:30:25 +00:00
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./shop-detail.vue?vue&type=template&id=374e5d04& */ 103);
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__["render"]; });
2022-08-01 10:31:20 +00:00
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
2022-08-01 10:31:20 +00:00
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
2022-08-01 10:31:20 +00:00
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_template_id_374e5d04___WEBPACK_IMPORTED_MODULE_0__["components"]; });
2022-08-01 10:31:20 +00:00
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 103:
2022-07-31 02:14:22 +00:00
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** ./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://mall-laonong/pagesB/shop-detail/shop-detail.vue?vue&type=template&id=374e5d04& ***!
2022-07-31 02:14:22 +00:00
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
try {
components = {
shareCoupon: function() {
return Promise.all(/*! import() | components/share-coupon/share-coupon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/share-coupon/share-coupon")]).then(__webpack_require__.bind(null, /*! @/components/share-coupon/share-coupon.vue */ 158))
2022-07-31 02:14:22 +00:00
}
}
} catch (e) {
if (
e.message.indexOf("Cannot find module") !== -1 &&
e.message.indexOf(".vue") !== -1
) {
console.error(e.message)
console.error("1. 排查组件名称拼写是否正确")
console.error(
"2. 排查组件是否符合 easycom 规范文档https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
)
console.error(
"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
)
} else {
throw e
}
}
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 104:
2022-07-31 02:14:22 +00:00
/*!****************************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** D://mall-laonong/pagesB/shop-detail/shop-detail.vue?vue&type=script&lang=js& ***!
2022-07-31 02:14:22 +00:00
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
2022-08-03 03:30:25 +00:00
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./shop-detail.vue?vue&type=script&lang=js& */ 105);
2022-08-03 03:20:44 +00:00
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shop_detail_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
2022-07-31 02:14:22 +00:00
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 105:
2022-07-31 02:14:22 +00:00
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** ./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://mall-laonong/pagesB/shop-detail/shop-detail.vue?vue&type=script&lang=js& ***!
2022-07-31 02:14:22 +00:00
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
var _publicApi = __webpack_require__(/*! @/jsFile/public-api.js */ 24);
var _vuex = __webpack_require__(/*! vuex */ 13);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;} //引入mapState
var _default = {
data: function data() {
return {
statusHeight: uni.getSystemInfoSync().statusBarHeight,
scroolTop: false, //是否显示顶部
shopDetail: {}, //商品详情
shopSku: [], //商品规格
showSku: false, //是否展示规格弹窗
skuIndex: 0, //规格选中位置
id: 0, //商品id
vip_level: 0, // 是否会员
isLoading: true,
2022-08-01 09:46:21 +00:00
shareImg: '', // 分享图片
shareFlag: true };
2022-07-31 02:14:22 +00:00
},
onLoad: function onLoad(op) {
2022-08-01 09:46:21 +00:00
if (op.invite_code) {
// 缓存invite_code
uni.setStorageSync('inviteCode', op.invite_code);
}
if (op.id) {
2022-07-31 02:14:22 +00:00
this.id = op.id;
// 查询商品详情
this.getDetail(op.id);
// 查询商品规格
this.getSku(op.id);
}
},
onShow: function onShow() {
this.vip_level = uni.getStorageSync('vip_level');
(0, _publicApi.getCartInfo)();
},
computed: _objectSpread({},
(0, _vuex.mapState)({
cartNum: function cartNum(state) {return state.moduleA.cartNum;} })),
onPageScroll: function onPageScroll(object) {
if (object.scrollTop > 50) {
this.scroolTop = true;
} else {
this.scroolTop = false;
}
},
2022-08-03 09:06:58 +00:00
// 分享到微信
2022-07-31 02:14:22 +00:00
onShareAppMessage: function onShareAppMessage(res) {
2022-08-03 09:06:58 +00:00
var shareObj = {
title: this.shopDetail.name,
2022-08-04 05:38:20 +00:00
path: uni.getStorageSync('page-path-options') + '&invite_code=' + uni.getStorageSync('invite_code'),
2022-08-03 09:06:58 +00:00
imageUrl: this.shopDetail.images[0] };
2022-07-31 02:14:22 +00:00
2022-08-03 09:06:58 +00:00
// 返回shareObj
return shareObj;
2022-07-31 02:14:22 +00:00
},
// 分享到朋友圈
onShareTimeline: function onShareTimeline(res) {
2022-08-03 09:06:58 +00:00
var shareObj = {
title: this.shopDetail.name,
query: '?invite_code=' + uni.getStorageSync('invite_code'),
imageUrl: this.shopDetail.images[0] };
2022-07-31 02:14:22 +00:00
2022-08-03 09:06:58 +00:00
// 返回shareObj
return shareObj;
2022-07-31 02:14:22 +00:00
},
mounted: function mounted() {
// 获取当前页面路径
this.$toolAll.tools.obtainPagePath();
},
methods: {
// 查询商品详情
getDetail: function getDetail(id) {var _this = this;
uni.showLoading({
title: '加载中' });
this.isLoading = false;
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
if (res.code == 0) {
console.log(res, '详情');
var shopObj = {
id: res.data.detail.id,
images: res.data.detail.images.split(','),
name: res.data.detail.name,
content: _this.$toolAll.tools.escape2Html(res.data.detail.content) };
_this.shopDetail = shopObj; // 商品详情
}
uni.hideLoading();
_this.isLoading = true;
});
},
// 查询商品规格
getSku: function getSku(id) {var _this2 = this;
this.$requst.get('/api/spu/spec', { id: id }).then(function (res) {
if (res.code == 0) {
console.log(res, '规格');
_this2.shopSku = res.data.sku_list; //商品规格
}
});
},
// 打开规格选择
openSpecs: function openSpecs() {
this.showSku = true;
},
// 规格选择
changeSpecs: function changeSpecs(index) {
if (this.skuIndex !== index) {
this.skuIndex = index;
}
},
// 关闭规格选择
closeSpecs: function closeSpecs() {
this.showSku = false;
},
// 加入购物车
joinCart: function joinCart() {var _this3 = this;
if (this.$toolAll.tools.judgeAuth()) {
this.$requst.post('/api/order/shopping-cart-add', { sku_id: this.shopSku[this.skuIndex].id, num: 1 }).then(function (res) {
if (res.code == 0) {
_this3.$toolAll.tools.showToast('加入购物车成功(*^▽^*)');
(0, _publicApi.getCartInfo)();
// 关闭弹窗
_this3.closeSpecs();
} else {
_this3.$toolAll.tools.showToast(res.msg);
}
});
}
},
// 立即购买
buyNow: function buyNow() {var _this4 = this;
if (this.$toolAll.tools.judgeAuth()) {
this.$requst.post('/api/order/shopping-cart-add', { sku_id: this.shopSku[this.skuIndex].id, num: 1 }).then(function (res) {
if (res.code == 0) {
// 关闭弹窗
_this4.closeSpecs();
2022-08-01 09:46:21 +00:00
// 去购物车
_this4.goCart();
2022-07-31 02:14:22 +00:00
} else {
_this4.$toolAll.tools.showToast(res.msg);
}
});
}
},
// 去首页
goHome: function goHome() {
uni.reLaunch({
url: '/pages/index/index' });
},
// 去购物车
goCart: function goCart() {
2022-08-01 09:46:21 +00:00
if (this.$toolAll.tools.judgeAuth()) {
uni.navigateTo({
url: '/pages/cart/cart' });
2022-07-31 02:14:22 +00:00
2022-08-01 09:46:21 +00:00
}
2022-07-31 02:14:22 +00:00
},
// 返回
backEv: function backEv() {
uni.navigateBack({
delta: 1 });
} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
/***/ })
2022-08-03 03:30:25 +00:00
},[[100,"common/runtime","common/vendor"]]]);
2022-07-31 02:14:22 +00:00
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pagesB/shop-detail/shop-detail.js.map