1578 lines
82 KiB
JavaScript
1578 lines
82 KiB
JavaScript
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/index/index"],{
|
||
|
||
/***/ 81:
|
||
/*!***************************************************************************************************************!*\
|
||
!*** C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/main.js?{"page":"pages%2Findex%2Findex"} ***!
|
||
\***************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* WEBPACK VAR INJECTION */(function(wx, createPage) {
|
||
|
||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
||
__webpack_require__(/*! uni-pages */ 26);
|
||
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
|
||
var _index = _interopRequireDefault(__webpack_require__(/*! ./pages/index/index.vue */ 82));
|
||
// @ts-ignore
|
||
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
|
||
createPage(_index.default);
|
||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["createPage"]))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 82:
|
||
/*!********************************************************************************************!*\
|
||
!*** C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/pages/index/index.vue ***!
|
||
\********************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=57280228& */ 83);
|
||
/* harmony import */ var _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js& */ 85);
|
||
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||
/* harmony import */ var _index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.vue?vue&type=style&index=0&lang=scss& */ 88);
|
||
/* harmony import */ var _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 37);
|
||
|
||
var renderjs
|
||
|
||
|
||
|
||
|
||
|
||
/* normalize component */
|
||
|
||
var component = Object(_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
||
_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
|
||
_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__["render"],
|
||
_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
|
||
false,
|
||
null,
|
||
null,
|
||
null,
|
||
false,
|
||
_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__["components"],
|
||
renderjs
|
||
)
|
||
|
||
component.options.__file = "pages/index/index.vue"
|
||
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 83:
|
||
/*!***************************************************************************************************************************!*\
|
||
!*** C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/pages/index/index.vue?vue&type=template&id=57280228& ***!
|
||
\***************************************************************************************************************************/
|
||
/*! exports provided: render, staticRenderFns, recyclableRender, components */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./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--17-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!./index.vue?vue&type=template&id=57280228& */ 84);
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__["render"]; });
|
||
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
|
||
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
|
||
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_57280228___WEBPACK_IMPORTED_MODULE_0__["components"]; });
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 84:
|
||
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
!*** ./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--17-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!C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/pages/index/index.vue?vue&type=template&id=57280228& ***!
|
||
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||
/*! 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 = {
|
||
uniNavBar: function () {
|
||
return __webpack_require__.e(/*! import() | components/uni-nav-bar/uni-nav-bar */ "components/uni-nav-bar/uni-nav-bar").then(__webpack_require__.bind(null, /*! @/components/uni-nav-bar/uni-nav-bar.vue */ 1485))
|
||
},
|
||
uniIcons: function () {
|
||
return Promise.all(/*! import() | components/uni-icons/uni-icons */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/uni-icons/uni-icons")]).then(__webpack_require__.bind(null, /*! @/components/uni-icons/uni-icons.vue */ 1470))
|
||
},
|
||
coupon: function () {
|
||
return Promise.all(/*! import() | components/coupon/coupon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/coupon/coupon")]).then(__webpack_require__.bind(null, /*! @/components/coupon/coupon.vue */ 311))
|
||
},
|
||
}
|
||
} 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 g0 = _vm.loadPageFlag ? _vm.tabBars.length : null
|
||
var g1 = _vm.loadPageFlag ? _vm.tabBars.length : null
|
||
var m0 = _vm.loadPageFlag && g1 > 1 && false ? _vm.__("分类") : null
|
||
var l0 = _vm.loadPageFlag
|
||
? _vm.__map(_vm.swiperTabItems, function (tab, index1) {
|
||
var $orig = _vm.__get_orig(tab)
|
||
var m1 = !tab.loadPageFlag
|
||
? tab.loadingText || _vm.__("加载中....")
|
||
: null
|
||
return {
|
||
$orig: $orig,
|
||
m1: m1,
|
||
}
|
||
})
|
||
: null
|
||
var m2 = _vm.loadPageFlag && _vm.bannerShow ? _vm.__("语言选择") : null
|
||
var m3 =
|
||
_vm.loadPageFlag && _vm.bannerShow && false ? _vm.__("汇率选择") : null
|
||
var m4 = _vm.loadPageFlag && _vm.bannerShow && false ? _vm.__("AED") : null
|
||
var m5 = _vm.loadPageFlag && _vm.bannerShow && false ? _vm.__("SAR") : null
|
||
var m6 = _vm.loadPageFlag && _vm.bannerShow && false ? _vm.__("BHD") : null
|
||
var m7 = _vm.loadPageFlag && _vm.bannerShow && false ? _vm.__("OMR") : null
|
||
var m8 = _vm.loadPageFlag && _vm.bannerShow && false ? _vm.__("KWD") : null
|
||
var m9 = _vm.loadPageFlag && _vm.bannerShow && false ? _vm.__("USD") : null
|
||
var m10 = _vm.loadPageFlag && _vm.bannerShow ? _vm.__("确认选择") : null
|
||
if (!_vm._isMounted) {
|
||
_vm.e0 = function ($event) {
|
||
$event.stopPropagation()
|
||
return _vm.$.gopage("/member/member/message")
|
||
}
|
||
}
|
||
_vm.$mp.data = Object.assign(
|
||
{},
|
||
{
|
||
$root: {
|
||
g0: g0,
|
||
g1: g1,
|
||
m0: m0,
|
||
l0: l0,
|
||
m2: m2,
|
||
m3: m3,
|
||
m4: m4,
|
||
m5: m5,
|
||
m6: m6,
|
||
m7: m7,
|
||
m8: m8,
|
||
m9: m9,
|
||
m10: m10,
|
||
},
|
||
}
|
||
)
|
||
}
|
||
var recyclableRender = false
|
||
var staticRenderFns = []
|
||
render._withStripped = true
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 85:
|
||
/*!*********************************************************************************************************************!*\
|
||
!*** C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/pages/index/index.vue?vue&type=script&lang=js& ***!
|
||
\*********************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-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!./index.vue?vue&type=script&lang=js& */ 86);
|
||
/* harmony import */ var _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||
/* harmony default export */ __webpack_exports__["default"] = (_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 86:
|
||
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-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!C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/pages/index/index.vue?vue&type=script&lang=js& ***!
|
||
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* WEBPACK VAR INJECTION */(function(uni, wx) {
|
||
|
||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = void 0;
|
||
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
|
||
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
|
||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
||
var _vuex = __webpack_require__(/*! vuex */ 34);
|
||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||
var statusBar = function statusBar() {
|
||
__webpack_require__.e(/*! require.ensure | components/status-bar */ "components/status-bar").then((function () {
|
||
return resolve(__webpack_require__(/*! ../../components/status-bar.vue */ 304));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var uniNavBar = function uniNavBar() {
|
||
__webpack_require__.e(/*! require.ensure | components/uni-nav-bar/uni-nav-bar */ "components/uni-nav-bar/uni-nav-bar").then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/uni-nav-bar/uni-nav-bar.vue */ 1485));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var downloadApp = function downloadApp() {
|
||
__webpack_require__.e(/*! require.ensure | components/download-app */ "components/download-app").then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/download-app.vue */ 1492));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var diy = function diy() {
|
||
Promise.all(/*! require.ensure | components/themes/diy */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/themes/diy")]).then((function () {
|
||
return resolve(__webpack_require__(/*! ../../components/themes/diy.vue */ 297));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var bmap = __webpack_require__(/*! ../../libs/bmap-wx.js */ 87);
|
||
var _default = {
|
||
components: {
|
||
statusBar: statusBar,
|
||
uniNavBar: uniNavBar,
|
||
diy: diy,
|
||
downloadApp: downloadApp
|
||
},
|
||
data: function data() {
|
||
var _ref;
|
||
return _ref = {
|
||
poisList: [],
|
||
// 附近地址
|
||
originalData: {},
|
||
// 百度地图返回的数据
|
||
marker: {
|
||
id: 1,
|
||
height: 50,
|
||
width: 40
|
||
},
|
||
address: "获取中..",
|
||
longitude: "116.404",
|
||
latitude: "39.915",
|
||
options: {},
|
||
pageId: "",
|
||
loadPageFlag: false,
|
||
CouponAmount: 0,
|
||
userIsNew: 1,
|
||
PageContent: [],
|
||
BgConfig: {
|
||
BackgroundObj: {
|
||
type: 1,
|
||
bgColor: "#ffffff",
|
||
pathColor: "#f8f8f8",
|
||
path: ""
|
||
}
|
||
},
|
||
PageNav: {
|
||
window: {
|
||
navigationBarBackgroundColor: "#ffffff",
|
||
navigationBarTextStyle: "black",
|
||
navigationBarTitleText: "",
|
||
backgroundColor: "#f8f8f8",
|
||
backgroundTextStyle: "dark"
|
||
}
|
||
}
|
||
}, (0, _defineProperty2.default)(_ref, "loadPageFlag", false), (0, _defineProperty2.default)(_ref, "hideDiy", false), (0, _defineProperty2.default)(_ref, "chatInfo", {}), (0, _defineProperty2.default)(_ref, "shareImg", ""), (0, _defineProperty2.default)(_ref, "shareTitle", ""), (0, _defineProperty2.default)(_ref, "refresh", true), (0, _defineProperty2.default)(_ref, "pageId", 0), (0, _defineProperty2.default)(_ref, "screenHeight", 0), (0, _defineProperty2.default)(_ref, "swiperHeight", 0), (0, _defineProperty2.default)(_ref, "w", 0), (0, _defineProperty2.default)(_ref, "chatUrl", ""), (0, _defineProperty2.default)(_ref, "scrollLeft", 0), (0, _defineProperty2.default)(_ref, "isClickChange", false), (0, _defineProperty2.default)(_ref, "tabIndex", 0), (0, _defineProperty2.default)(_ref, "swiperTabItems", []), (0, _defineProperty2.default)(_ref, "tabBars", []), (0, _defineProperty2.default)(_ref, "city", "全中国"), (0, _defineProperty2.default)(_ref, "showSubsiteFlag", true), (0, _defineProperty2.default)(_ref, "rightFlag", true), (0, _defineProperty2.default)(_ref, "leftWidth", "0rpx"), (0, _defineProperty2.default)(_ref, "rightWidth", "70rpx"), (0, _defineProperty2.default)(_ref, "showPopFlag", false), (0, _defineProperty2.default)(_ref, "index_pop_wap_img", ""), (0, _defineProperty2.default)(_ref, "index_pop_wap_url", ""), (0, _defineProperty2.default)(_ref, "bannerShow", false), (0, _defineProperty2.default)(_ref, "current_currency", 86), (0, _defineProperty2.default)(_ref, "current_lang", "zh-CN"), (0, _defineProperty2.default)(_ref, "current_standard", true), (0, _defineProperty2.default)(_ref, "current_img", "https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/lancerdt/flags/square/5322affbc4d56.png"), (0, _defineProperty2.default)(_ref, "current_label", "中文"), (0, _defineProperty2.default)(_ref, "initX", "690"), (0, _defineProperty2.default)(_ref, "initY", "1336"), (0, _defineProperty2.default)(_ref, "oldscposition", 0), (0, _defineProperty2.default)(_ref, "isQuickNav", false), (0, _defineProperty2.default)(_ref, "scrollTop", 0), (0, _defineProperty2.default)(_ref, "commonAppIsHeaderNavFixed", true), (0, _defineProperty2.default)(_ref, "commonAppIsEnableSearch", true), (0, _defineProperty2.default)(_ref, "topContentStyle", "padding-top:8px;"), (0, _defineProperty2.default)(_ref, "searchStyle", ""), (0, _defineProperty2.default)(_ref, "searchIsFixed", false), (0, _defineProperty2.default)(_ref, "topDistance", 0), (0, _defineProperty2.default)(_ref, "siteNameColor", "#fff"), (0, _defineProperty2.default)(_ref, "borderColor", "#dfdfdf"), (0, _defineProperty2.default)(_ref, "fontColor", "#fff"), (0, _defineProperty2.default)(_ref, "backgroundColor", "transparent"), (0, _defineProperty2.default)(_ref, "provinceData", []), (0, _defineProperty2.default)(_ref, "cityData", []), (0, _defineProperty2.default)(_ref, "areaData", []), _ref;
|
||
},
|
||
watch: {},
|
||
computed: (0, _vuex.mapState)(["Config", "StateCode", "notice", "plantformInfo", "shopInfo", "userInfo", "hasLogin", "newMsgNum", "Lang"]),
|
||
mounted: function mounted() {
|
||
var view = uni.createSelectorQuery().in(this).select(".movableArea");
|
||
var that = this;
|
||
view.fields({
|
||
size: true,
|
||
scrollOffset: true
|
||
}, function (data) {
|
||
if (data) {
|
||
that.setData({
|
||
initX: data.width,
|
||
initY: data.height - 100
|
||
});
|
||
}
|
||
}).exec();
|
||
},
|
||
onLoad: function onLoad(options) {
|
||
var _this2 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||
var that, scene, opts, w;
|
||
return _regenerator.default.wrap(function _callee$(_context) {
|
||
while (1) {
|
||
switch (_context.prev = _context.next) {
|
||
case 0:
|
||
_context.next = 2;
|
||
return _this2.$onLaunched;
|
||
case 2:
|
||
_this2.rightFlag = true;
|
||
_this2.rightWidth = 40;
|
||
that = _this2;
|
||
that.$.getSystemInfo({
|
||
success: function success(t) {
|
||
that.setData({
|
||
screenHeight: t.screenHeight
|
||
});
|
||
}
|
||
});
|
||
that.setData({
|
||
current_currency: that.Lang.currency_id,
|
||
current_lang: that.Lang.lang,
|
||
current_standard: that.Lang.standard,
|
||
current_label: that.Lang.label,
|
||
current_img: that.Lang.img
|
||
});
|
||
if (options.scene) {
|
||
scene = decodeURIComponent(options.scene);
|
||
opts = {};
|
||
opts = that.$.parse_str(scene);
|
||
options = Object.assign(options, opts);
|
||
}
|
||
w = that.$.getSystemInfoSync().windowWidth;
|
||
that.setData({
|
||
w: w,
|
||
options: options
|
||
});
|
||
|
||
//动态设置swiper的高度
|
||
_this2.$nextTick(function () {
|
||
_this2.setSwiperHeight();
|
||
});
|
||
that.initPageData();
|
||
that.notice.addNotification("RefreshStoreName", that.RefreshStoreName, that);
|
||
that.notice.addNotification("RefreshOrderChain", that.RefreshOrderChain, that);
|
||
that.notice.addNotification("RefreshSubsite", that.RefreshSubsite, that);
|
||
that.notice.addNotification("ScanCode", that.onScanCode, that);
|
||
setTimeout(function () {
|
||
try {
|
||
$.showModal({
|
||
title: "订阅提示",
|
||
content: "是否订阅活动消息通知?",
|
||
cancelText: "暂不订阅",
|
||
confirmText: "立即订阅",
|
||
success: function success(n) {
|
||
if (n.confirm) {
|
||
wx.requestSubscribeMessage({
|
||
tmplIds: that.tmplIds,
|
||
success: function success(res) {
|
||
console.log("success res====", res);
|
||
// uni.showToast({
|
||
// title: "消息已订阅",
|
||
// });
|
||
},
|
||
fail: function fail(res) {
|
||
console.log("fail res====", res);
|
||
// uni.showToast({
|
||
// title: "稍后再试",
|
||
// });
|
||
}
|
||
});
|
||
}
|
||
}
|
||
});
|
||
} catch (error) {}
|
||
}, 1000);
|
||
case 17:
|
||
case "end":
|
||
return _context.stop();
|
||
}
|
||
}
|
||
}, _callee);
|
||
}))();
|
||
},
|
||
/**
|
||
* 生命周期函数--监听页面初次渲染完成
|
||
*/
|
||
onReady: function onReady() {},
|
||
/**
|
||
* 生命周期函数--监听页面显示
|
||
*/
|
||
onShow: function onShow() {
|
||
var _this = this;
|
||
this.getAppDistrict();
|
||
//_this.$.isNull(_this.plantformInfo) || uni.setNavigationBarTitle({title: _this.plantformInfo.name});
|
||
//this.refresh || this.setData({refresh: true})
|
||
|
||
this.showCartNum();
|
||
var currentAddress = uni.getStorageSync("currentAddress");
|
||
if (currentAddress) {
|
||
this.address = currentAddress.name;
|
||
} else {
|
||
_this.isPhoneLocationEnabled();
|
||
}
|
||
_this.resetLang();
|
||
},
|
||
/**
|
||
* 生命周期函数--监听页面隐藏
|
||
*/
|
||
onHide: function onHide() {},
|
||
/**
|
||
* 生命周期函数--监听页面卸载
|
||
*/
|
||
onUnload: function onUnload() {
|
||
// 离开页面,注销事件
|
||
var that = this;
|
||
//that.notice.removeNotification("RefreshProduct", that);
|
||
that.notice.removeNotification("RefreshStoreName", that);
|
||
that.notice.removeNotification("RefreshOrderChain", that);
|
||
that.notice.removeNotification("RefreshSubsite", that);
|
||
that.notice.removeNotification("ScanCode", that);
|
||
},
|
||
/**
|
||
* 页面相关事件处理函数--监听用户下拉动作
|
||
*/
|
||
onPullDownRefresh: function onPullDownRefresh() {
|
||
this.initData(true);
|
||
},
|
||
/**
|
||
* 页面上拉触底事件的处理函数
|
||
*/
|
||
onReachBottom: function onReachBottom() {},
|
||
/**
|
||
* 用户点击右上角分享
|
||
*/
|
||
onShareAppMessage: function onShareAppMessage() {
|
||
wx.showShareMenu({
|
||
withShareTicket: true,
|
||
menus: ["shareAppMessage", "shareTimeline"]
|
||
});
|
||
return {
|
||
title: this.shareTitle,
|
||
imageUrl: this.shareImg,
|
||
path: "/pages/index/index?uid=" + this.userInfo.user_id
|
||
};
|
||
},
|
||
/**
|
||
* 用户点击右上角分享朋友圈
|
||
*/
|
||
onShareTimeline: function onShareTimeline() {
|
||
return {
|
||
title: this.shareTitle,
|
||
query: {
|
||
uid: this.userInfo.user_id
|
||
},
|
||
imageUrl: this.shareImg
|
||
};
|
||
},
|
||
/**
|
||
* 页面滚动触发事件的处理函数
|
||
*/
|
||
onPageScroll: function onPageScroll() {},
|
||
methods: _objectSpread(_objectSpread({}, (0, _vuex.mapMutations)(["login", "logout", "getPlantformInfo", "forceUserInfo", "getUserInfo", "showCartNum"])), {}, {
|
||
handerSkipuSelectShippingAddress: function handerSkipuSelectShippingAddress() {
|
||
uni.navigateTo({
|
||
url: "/address/selectShippingAddress"
|
||
});
|
||
},
|
||
getAppDistrict: function getAppDistrict() {
|
||
var that = this;
|
||
// 读取地区数据 【为了不同项目的小程序包体大小考虑,这里不能直接把数据放前端,可以使用服务端缓存和浏览器与小程序的本地存储来优化】
|
||
var district_data = uni.getStorageSync("district_data");
|
||
if (!district_data) {
|
||
that.$.request({
|
||
url: that.cf.URL.getAppDistrict,
|
||
data: {},
|
||
loading: false,
|
||
ajaxCache: {
|
||
timeout: this.cf.CACHE_EXPIRE
|
||
},
|
||
success: function success(data, status, msg, code) {
|
||
if (status == 200) {
|
||
uni.setStorageSync("district_data", data);
|
||
that.setDistrictData(data);
|
||
}
|
||
}
|
||
});
|
||
} else {
|
||
that.setDistrictData(district_data);
|
||
}
|
||
},
|
||
setDistrictData: function setDistrictData(district_data) {
|
||
this.provinceData = district_data.provinceData;
|
||
this.cityData = district_data.cityData;
|
||
this.areaData = district_data.areaData;
|
||
},
|
||
isPhoneLocationEnabled: function isPhoneLocationEnabled() {
|
||
var _this = this;
|
||
// 获取用户手机系统信息
|
||
uni.getSystemInfo({
|
||
success: function success(res) {
|
||
var locationEnabled = res.locationEnabled;
|
||
if (locationEnabled) {
|
||
// 手机GPS定位已开启则判断微信APP是否已获取访问定位信息的权限
|
||
_this.isAppAuthorized();
|
||
} else {
|
||
// 手机GPS定位未开启则引导用户手动前往开启
|
||
uni.showModal({
|
||
title: "提示",
|
||
content: '小程序需要基于您的手机定位信息为您提供服务,当前检测到您的手机并未打开定位开关,请关闭小程序后前往 "设置 - 定位服务/位置信息" 开启手机定位,然后重新进入小程序~',
|
||
showCancel: false,
|
||
confirmText: "我已知悉"
|
||
});
|
||
}
|
||
},
|
||
fail: function fail(err) {
|
||
console.log("用户手机系统信息获取失败", err);
|
||
debugger;
|
||
}
|
||
});
|
||
},
|
||
isAuthorized: function isAuthorized() {
|
||
var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "scope.userLocation";
|
||
// 检查当前是否已经授权访问scope属性
|
||
var _this = this;
|
||
uni.getSetting({
|
||
success: function success(res) {
|
||
var userLocation = res.authSetting[a];
|
||
if (!userLocation) {
|
||
// 判断当前是否获得授权,如果没有就去申请授权
|
||
_this.getAuthorize();
|
||
} else {
|
||
_this.getLocation();
|
||
}
|
||
},
|
||
fail: function fail(err) {
|
||
_this.openSetting();
|
||
}
|
||
});
|
||
},
|
||
isAppAuthorized: function isAppAuthorized() {
|
||
var _this = this;
|
||
// 微信APP授权设置
|
||
var appAuthorizeSetting = uni.getAppAuthorizeSetting();
|
||
// 是否允许微信使用定位信息的开关
|
||
var locationAuthorized = appAuthorizeSetting.locationAuthorized;
|
||
switch (locationAuthorized) {
|
||
case "authorized":
|
||
_this.isAuthorized();
|
||
break;
|
||
case "denied":
|
||
uni.showModal({
|
||
title: "提示",
|
||
content: "已拒绝微信获取定位权限,即将打开权限管理页面,请把定位权限设置为允许~",
|
||
confirmText: "前往设置",
|
||
success: function success(res) {
|
||
if (res.confirm) {
|
||
_this.openAppAuthorizeSetting();
|
||
} else if (res.cancel) {
|
||
_this.rejectGetLocation();
|
||
}
|
||
}
|
||
});
|
||
break;
|
||
case "not determined":
|
||
uni.showModal({
|
||
title: "提示",
|
||
content: "请授权微信获取定位权限~",
|
||
confirmText: "同意授权",
|
||
success: function success(res) {
|
||
if (res.confirm) {
|
||
_this.openAppAuthorizeSetting();
|
||
} else if (res.cancel) {
|
||
_this.rejectGetLocation();
|
||
}
|
||
}
|
||
});
|
||
break;
|
||
}
|
||
},
|
||
getAuthorize: function getAuthorize() {
|
||
var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "scope.userLocation";
|
||
var _this = this;
|
||
// uniapp弹窗弹出获取授权(地理,个人微信信息等授权信息)弹窗
|
||
uni.authorize({
|
||
scope: a,
|
||
success: function success() {
|
||
_this.getLocation();
|
||
},
|
||
fail: function fail() {
|
||
_this.openSetting();
|
||
}
|
||
});
|
||
},
|
||
openSetting: function openSetting() {
|
||
var _this = this;
|
||
uni.showModal({
|
||
title: "提示",
|
||
content: "我们需要获取您的位置信息,为您提供服务~",
|
||
success: function success(res) {
|
||
if (res.confirm) {
|
||
uni.openSetting({
|
||
success: function success(res) {
|
||
if (res.authSetting["scope.userLocation"] === true) {
|
||
_this.getLocation();
|
||
} else {
|
||
_this.rejectGetLocation();
|
||
}
|
||
},
|
||
fail: function fail(err) {
|
||
console.log("小程序授权弹窗打开失败", err);
|
||
}
|
||
});
|
||
} else if (res.cancel) {
|
||
_this.rejectGetLocation();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
rejectGetLocation: function rejectGetLocation() {
|
||
uni.showToast({
|
||
title: "您拒绝了位置授权,小程序无法继续提供出行服务~",
|
||
icon: "none",
|
||
duration: 3000
|
||
});
|
||
},
|
||
openAppAuthorizeSetting: function openAppAuthorizeSetting() {
|
||
var _this = this;
|
||
uni.openAppAuthorizeSetting({
|
||
success: function success(res) {
|
||
console.log("打开系统微信授权管理页成功", res);
|
||
_this.isAuthorized();
|
||
},
|
||
fail: function fail(err) {
|
||
console.log("打开系统微信授权管理页失败", err);
|
||
}
|
||
});
|
||
},
|
||
fuzzyMatch: function fuzzyMatch(shortStr, longStr) {
|
||
if (!shortStr || !longStr) {
|
||
console.log("找不到地址");
|
||
return;
|
||
}
|
||
var lowerShortStr = shortStr.toLowerCase();
|
||
var lowerLongStr = longStr.toLowerCase();
|
||
return lowerShortStr.includes(lowerLongStr);
|
||
},
|
||
getLocation: function getLocation() {
|
||
var that = this;
|
||
var location = "";
|
||
uni.getLocation({
|
||
type: "wgs84",
|
||
success: function success(res) {
|
||
location = res.latitude + "," + res.longitude;
|
||
var BMap = new bmap.BMapWX({
|
||
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
|
||
ak: that.bdMapAk
|
||
});
|
||
var fail = function fail(res) {
|
||
console.log("fail", res);
|
||
};
|
||
var city = {
|
||
label: "",
|
||
value: 0
|
||
};
|
||
var success = function success(res) {
|
||
console.log("结果地址", res);
|
||
var data = res.originalData.result.addressComponent;
|
||
that.address = res.originalData.result.sematic_description;
|
||
that.cityData.forEach(function (group) {
|
||
group.forEach(function (group1) {
|
||
var isFind = that.fuzzyMatch(group1.label, data.city);
|
||
if (isFind) {
|
||
city = group1;
|
||
}
|
||
});
|
||
});
|
||
uni.setStorageSync("district_id", city.value);
|
||
};
|
||
BMap.regeocoding({
|
||
location: location,
|
||
coordtype: "wgs84ll",
|
||
ret_coordtype: "gcj02ll",
|
||
fail: fail,
|
||
success: success
|
||
});
|
||
},
|
||
fail: function fail(error) {
|
||
console.error("获取位置失败:", error);
|
||
}
|
||
});
|
||
},
|
||
toMain: function toMain(userInfo) {
|
||
var that = this;
|
||
that.$.request({
|
||
url: this.Config.URL.user.overview,
|
||
success: function success(data, status, msg, code) {
|
||
userInfo = Object.assign(userInfo, data.member_info);
|
||
that.login(userInfo);
|
||
if (userInfo.im && that.plantformInfo.config.chat_global) {
|
||
that.$Socket.connectserver(userInfo.im);
|
||
}
|
||
that.notice.postNotificationName("RefreshCart", 0);
|
||
|
||
//判断是否需要进入激活页面
|
||
if (2 == userInfo.user_state) {
|
||
that.$.toActive();
|
||
}
|
||
|
||
/**
|
||
* 强制登录时使用reLaunch方式跳转过来
|
||
* 返回首页也使用reLaunch方式
|
||
*/
|
||
if (that.forcedLoginState) {
|
||
that.$.reLaunch({
|
||
url: "/pages/index/member"
|
||
});
|
||
} else {
|
||
if (getCurrentPages()[getCurrentPages().length - 1].route == "pages/login/login" || getCurrentPages()[getCurrentPages().length - 1].route == "/pages/login/login") {
|
||
if (getCurrentPages().length > 1) {
|
||
var prePage = getCurrentPages()[getCurrentPages().length - 2];
|
||
if ("pages/login/login" == prePage.route || "/pages/login/login" == prePage.route) {
|
||
that.$.switchTab({
|
||
url: "/pages/index/member"
|
||
});
|
||
} else {
|
||
if (prePage.refreshData) {
|
||
prePage.refreshData(prePage.options);
|
||
that.$.navigateBack();
|
||
} else if (prePage.onLoad) {
|
||
prePage.onLoad(prePage.options);
|
||
that.$.navigateBack();
|
||
} else {
|
||
var pre_url = "/" + that.$.createUrl(prePage.route, prePage.options);
|
||
that.$.gotopage(pre_url);
|
||
}
|
||
}
|
||
} else {
|
||
//回到上个页面
|
||
that.$.switchTab({
|
||
url: "/pages/index/member"
|
||
});
|
||
}
|
||
} else {
|
||
var prePage = getCurrentPages()[getCurrentPages().length - 1];
|
||
if ("pages/login/login" == prePage.route || "/pages/login/login" == prePage.route) {
|
||
that.$.switchTab({
|
||
url: "/pages/index/member"
|
||
});
|
||
} else {
|
||
prePage.onLoad && prePage.onLoad(prePage.options);
|
||
}
|
||
|
||
//that.$.navigateBack();
|
||
}
|
||
}
|
||
}
|
||
});
|
||
},
|
||
bindLogin: function bindLogin() {
|
||
/**
|
||
* 下面简单模拟下服务端的处理
|
||
* 检测用户账号密码是否在已注册的用户列表中
|
||
* 实际开发中,使用 that.$.request 将账号信息发送至服务端,客户端在回调函数中获取结果信息。
|
||
*/
|
||
var that = this;
|
||
//SYS.URL.login,
|
||
var params = {
|
||
ccbParamSJ: this.$route.query.ccbParamSJ,
|
||
CITYID: this.$route.query.CITYID,
|
||
USERCITYID: this.$route.query.USERCITYID
|
||
};
|
||
that.$.request({
|
||
url: this.Config.URL.loginCCB,
|
||
data: params,
|
||
success: function success(data, status, msg, code) {
|
||
//console.info(JSON.stringify(data));
|
||
|
||
if (200 == status) {
|
||
var id = that.$.setStorageSync("uid", data.user_id);
|
||
var key = that.$.setStorageSync("ukey", data.key);
|
||
that.toMain(data);
|
||
} else {
|
||
that.$.showToast({
|
||
icon: "none",
|
||
// title: that.__('用户账号或密码不正确')
|
||
title: that.__(msg)
|
||
});
|
||
}
|
||
},
|
||
fail: function fail(err, status) {
|
||
that.$.showToast({
|
||
icon: "none",
|
||
title: that.__("登录有误,请重试")
|
||
});
|
||
}
|
||
});
|
||
},
|
||
initPageData: function initPageData() {
|
||
var that = this;
|
||
that.getPlantformInfo(function (plantform) {
|
||
that.Config.SUBSITE_ENABLE = plantform.config.subsite_enable;
|
||
if (!!that.Config.LANG_ENABLE && (!!that.Config.SUBSITE_ENABLE || !!that.Config.CHAIN_ENABLE)) {
|
||
that.leftWidth = "160rpx";
|
||
} else {
|
||
if (!!that.Config.SUBSITE_ENABLE || !!that.Config.CHAIN_ENABLE) {
|
||
that.leftWidth = "120rpx";
|
||
}
|
||
}
|
||
|
||
//
|
||
that.setData({
|
||
city: that.$.getStorageSync("site_name") ? that.$.getStorageSync("site_name") : that.__("全国站")
|
||
});
|
||
that.$.request({
|
||
url: that.Config.URL.category_mobile_nav,
|
||
loading: false,
|
||
ajaxCache: {
|
||
timeout: that.Config.CACHE_EXPIRE
|
||
},
|
||
success: function success(data, msg, status) {
|
||
if (!data) {
|
||
if (status == 250) {
|
||
uni.showToast({
|
||
title: "shop/mobile/getCategoryMobileNav" + msg,
|
||
icon: "error",
|
||
duration: 500
|
||
});
|
||
}
|
||
return;
|
||
}
|
||
var tmp = data.items;
|
||
tmp.unshift({
|
||
id: 0,
|
||
category_name: that.__("推荐"),
|
||
category_alias: that.__("推荐")
|
||
});
|
||
that.setData({
|
||
tabBars: tmp
|
||
});
|
||
var ary = [];
|
||
for (var i = 0, length = that.tabBars.length; i < length; i++) {
|
||
ary.push({
|
||
loadPageFlag: false,
|
||
category_id: that.tabBars.category_id
|
||
});
|
||
}
|
||
that.swiperTabItems = ary;
|
||
that.loadBrandsAndProduncts(that.tabIndex, 0, 1, false);
|
||
}
|
||
});
|
||
|
||
//start 门店选择
|
||
if ( true && that.Config.CHAIN_ENABLE) {
|
||
var chain_name = uni.getStorageSync("chain_name");
|
||
that.setData({
|
||
city: that.$.getStorageSync("chain_name") ? that.$.getStorageSync("chain_name") + "" : that.__("选择门店")
|
||
});
|
||
if (that.$.getStorageSync("chain_name")) {
|
||
that.setData({
|
||
city: that.$.getStorageSync("chain_name") ? that.$.getStorageSync("chain_name") + "" : that.__("选择门店")
|
||
});
|
||
} else {
|
||
that.$.confirm(that.__("请选择门店"), function (data) {
|
||
if (data.confirm) {
|
||
that.showCity();
|
||
} else {
|
||
//存入本地
|
||
uni.setStorageSync("chain_id", 1001);
|
||
uni.setStorageSync("chain_name", that.__("一号店"));
|
||
that.notice.postNotificationName("RefreshOrderChain", {
|
||
chain_id: 1001,
|
||
chain_name: that.__("一号店"),
|
||
ChainInfo: {
|
||
chain_id: 1001,
|
||
chain_name: that.__("一号店")
|
||
}
|
||
});
|
||
}
|
||
}, true);
|
||
}
|
||
}
|
||
//end 门店选择
|
||
|
||
//start 店铺选择
|
||
if (false) { var store_name; }
|
||
//end 店铺选择
|
||
|
||
uni.setNavigationBarTitle({
|
||
title: that.plantformInfo.name
|
||
});
|
||
});
|
||
},
|
||
//初始化数据
|
||
initData: function initData(force_refresh) {
|
||
var that = this;
|
||
var param = {};
|
||
|
||
//that.$.setNavigationBarTitle({title: that.plantformInfo.name});
|
||
|
||
//
|
||
var $title = that.plantformInfo.name;
|
||
var $desc = false || this.plantformInfo.site_meta_description;
|
||
var $link = that.$.sprintf("%s/h5/pages/index/index", that.Config.SiteUrl);
|
||
var $img_url = this.shareImg || this.plantformInfo.logo;
|
||
|
||
//初始化微信分享
|
||
|
||
that.$.wxShare($title, $desc, $link, $img_url);
|
||
|
||
/*
|
||
let category_id = 0;
|
||
if (!that.$.isNull(this.tabBars[this.tabIndex].category_id))
|
||
{
|
||
category_id = that.$.isNull(this.tabBars[this.tabIndex].category_id);
|
||
}
|
||
*/
|
||
|
||
that.loadBrandsAndProduncts(that.tabIndex, this.tabBars[this.tabIndex].category_id || 0, 1, force_refresh);
|
||
},
|
||
goDetail: function goDetail(e) {
|
||
uni.navigateTo({
|
||
url: "/pages/template/tabbar/detail/detail?title=" + e.title
|
||
});
|
||
},
|
||
close: function close(index1, index2) {
|
||
var _this3 = this;
|
||
var that = this;
|
||
that.$.showModal({
|
||
content: "是否删除本条信息?",
|
||
success: function success(res) {
|
||
if (res.confirm) {
|
||
_this3.swiperTabItems[index1].items.splice(index2, 1);
|
||
}
|
||
}
|
||
});
|
||
},
|
||
loadMore: function loadMore(e) {
|
||
var _this4 = this;
|
||
setTimeout(function () {
|
||
_this4.addData(e);
|
||
}, 1200);
|
||
},
|
||
addData: function addData(e) {
|
||
if (this.swiperTabItems[e].total <= this.swiperTabItems[e].page) {
|
||
this.swiperTabItems[e].loadingText = "没有更多了";
|
||
return;
|
||
}
|
||
var category_id = this.tabBars[this.tabIndex].category_id;
|
||
this.loadBrandsAndProduncts(this.tabIndex, category_id, this.swiperTabItems[e].page + 1, false);
|
||
},
|
||
loadBrandsAndProduncts: function loadBrandsAndProduncts(index, category_id, page, force_refresh) {
|
||
var that = this;
|
||
var params = {};
|
||
var site_id = that.$.getStorageSync("site_id");
|
||
if (site_id) {
|
||
params["site_id"] = site_id;
|
||
}
|
||
params.category_id = category_id;
|
||
params.page = page;
|
||
params.page_type = "page_index";
|
||
that.$.request({
|
||
url: that.Config.URL.index_app,
|
||
data: params,
|
||
ajaxCache: {
|
||
timeout: that.Config.CACHE_EXPIRE,
|
||
forceRefresh: force_refresh
|
||
},
|
||
success: function success(data, status, msg, code) {
|
||
if (status == 250) {
|
||
uni.showToast({
|
||
title: "shop/mobile/app" + msg,
|
||
icon: "error",
|
||
duration: 1000
|
||
});
|
||
return;
|
||
}
|
||
uni.stopPullDownRefresh();
|
||
var tmp = that.swiperTabItems[index];
|
||
tmp = {
|
||
pageId: data.page_id,
|
||
PageContent: that.$.parseJSON(data.page_code),
|
||
BgConfig: that.$.parseJSON(data.page_config),
|
||
PageNav: that.$.parseJSON(data.page_nav),
|
||
shareImg: data.page_share_image,
|
||
shareTitle: data.page_share_title || data.page_name
|
||
};
|
||
tmp.loadPageFlag = true;
|
||
tmp.page = data.page;
|
||
|
||
//console.info(tmp.PageNav.window.navigationBarTextStyle);
|
||
//console.info(tmp.PageNav.window.navigationBarBackgroundColor);
|
||
|
||
if (tmp.PageNav.window.navigationBarTextStyle == "black") {
|
||
tmp.PageNav.window.navigationBarTextStyle = "#000000";
|
||
}
|
||
if (tmp.PageNav.window.navigationBarTextStyle == "white") {
|
||
tmp.PageNav.window.navigationBarTextStyle = "#ffffff";
|
||
}
|
||
uni.setNavigationBarColor({
|
||
frontColor: tmp.PageNav.window.navigationBarTextStyle,
|
||
backgroundColor: tmp.PageNav.window.navigationBarBackgroundColor,
|
||
animation: {
|
||
duration: 400,
|
||
timingFunc: "easeIn"
|
||
}
|
||
});
|
||
|
||
//that.$.setNavigationBarTitle({title: tmp.shareTitle});
|
||
|
||
/*
|
||
if (data.page >= data.total)
|
||
{
|
||
tmp.loadingText = that.__('没有更多了');
|
||
}
|
||
else
|
||
{
|
||
tmp.loadingText = that.__('加载中....');
|
||
}
|
||
*/
|
||
|
||
that.$set(that.swiperTabItems, index, tmp);
|
||
that.setData({
|
||
pageId: tmp.pageId,
|
||
PageContent: tmp.PageContent,
|
||
BgConfig: tmp.BgConfig,
|
||
PageNav: tmp.PageNav,
|
||
shareImg: tmp.shareImg,
|
||
shareTitle: tmp.shareTitle,
|
||
loadPageFlag: true
|
||
});
|
||
that.setData({
|
||
chatInfo: {
|
||
im_enable: data.im_enable,
|
||
im_user_id: data.im_user_id,
|
||
puid: data.puid
|
||
},
|
||
showPopFlag: data.index_pop_wap_enable && index == 0 ? true : false,
|
||
index_pop_wap_img: data.index_pop_wap_img,
|
||
index_pop_wap_url: data.index_pop_wap_url
|
||
});
|
||
|
||
//动态设置swiper的高度
|
||
that.$nextTick(function () {
|
||
that.setSwiperHeight();
|
||
});
|
||
}
|
||
});
|
||
},
|
||
changeTab: function changeTab(e) {
|
||
var _this5 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
||
var that, index, category_id, tmp, tabBar, tabBarScrollLeft, width, i, result, winWidth, nowElement, nowWidth;
|
||
return _regenerator.default.wrap(function _callee2$(_context2) {
|
||
while (1) {
|
||
switch (_context2.prev = _context2.next) {
|
||
case 0:
|
||
that = _this5;
|
||
index = e.target.current; //this.tabIndex = index;
|
||
if (!_this5.swiperTabItems[index].loadPageFlag) {
|
||
category_id = _this5.tabBars[index].category_id;
|
||
_this5.loadBrandsAndProduncts(index, category_id, 1, false);
|
||
} else {
|
||
tmp = that.swiperTabItems[index]; //console.info(tmp.PageNav.window.navigationBarTextStyle);
|
||
//console.info(tmp.PageNav.window.navigationBarBackgroundColor);
|
||
if (tmp.PageNav.window.navigationBarTextStyle == "black") {
|
||
tmp.PageNav.window.navigationBarTextStyle = "#000000";
|
||
}
|
||
if (tmp.PageNav.window.navigationBarTextStyle == "white") {
|
||
tmp.PageNav.window.navigationBarTextStyle = "#ffffff";
|
||
}
|
||
uni.setNavigationBarColor({
|
||
frontColor: tmp.PageNav.window.navigationBarTextStyle,
|
||
backgroundColor: tmp.PageNav.window.navigationBarBackgroundColor,
|
||
animation: {
|
||
duration: 400,
|
||
timingFunc: "easeIn"
|
||
}
|
||
});
|
||
|
||
// that.$.setNavigationBarTitle({title: tmp.shareTitle});
|
||
|
||
that.setData({
|
||
pageId: tmp.pageId,
|
||
PageContent: tmp.PageContent,
|
||
BgConfig: tmp.BgConfig,
|
||
PageNav: tmp.PageNav,
|
||
shareImg: tmp.shareImg,
|
||
shareTitle: tmp.shareTitle
|
||
});
|
||
}
|
||
if (!_this5.isClickChange) {
|
||
_context2.next = 7;
|
||
break;
|
||
}
|
||
_this5.tabIndex = index;
|
||
_this5.isClickChange = false;
|
||
return _context2.abrupt("return");
|
||
case 7:
|
||
_context2.next = 9;
|
||
return _this5.getElSize("tab-bar");
|
||
case 9:
|
||
tabBar = _context2.sent;
|
||
tabBarScrollLeft = tabBar.scrollLeft;
|
||
width = 0;
|
||
i = 0;
|
||
case 13:
|
||
if (!(i < index)) {
|
||
_context2.next = 21;
|
||
break;
|
||
}
|
||
_context2.next = 16;
|
||
return _this5.getElSize(_this5.tabBars[i].id);
|
||
case 16:
|
||
result = _context2.sent;
|
||
width += result.width;
|
||
case 18:
|
||
i++;
|
||
_context2.next = 13;
|
||
break;
|
||
case 21:
|
||
winWidth = uni.getSystemInfoSync().windowWidth;
|
||
_context2.next = 24;
|
||
return _this5.getElSize(_this5.tabBars[index].id);
|
||
case 24:
|
||
nowElement = _context2.sent;
|
||
nowWidth = nowElement.width;
|
||
if (width + nowWidth - tabBarScrollLeft > winWidth) {
|
||
_this5.scrollLeft = width + nowWidth - winWidth;
|
||
}
|
||
if (width < tabBarScrollLeft) {
|
||
_this5.scrollLeft = width;
|
||
}
|
||
_this5.isClickChange = false;
|
||
_this5.tabIndex = index; //一旦访问data就会出问题
|
||
case 30:
|
||
case "end":
|
||
return _context2.stop();
|
||
}
|
||
}
|
||
}, _callee2);
|
||
}))();
|
||
},
|
||
getElSize: function getElSize(id) {
|
||
//得到元素的size
|
||
return new Promise(function (res, rej) {
|
||
uni.createSelectorQuery().select("#tab_" + id).fields({
|
||
size: true,
|
||
scrollOffset: true
|
||
}, function (data) {
|
||
res(data);
|
||
}).exec();
|
||
});
|
||
},
|
||
tapTab: function tapTab(e) {
|
||
var _this6 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||
var that, tabIndex, tabBar, tabBarScrollLeft;
|
||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||
while (1) {
|
||
switch (_context3.prev = _context3.next) {
|
||
case 0:
|
||
//点击tab-bar
|
||
that = _this6;
|
||
tabIndex = e.currentTarget.dataset.current;
|
||
if (!_this6.swiperTabItems[tabIndex].loadPageFlag) {} else {}
|
||
if (!(_this6.tabIndex === tabIndex)) {
|
||
_context3.next = 7;
|
||
break;
|
||
}
|
||
return _context3.abrupt("return", false);
|
||
case 7:
|
||
_context3.next = 9;
|
||
return _this6.getElSize("tab-bar");
|
||
case 9:
|
||
tabBar = _context3.sent;
|
||
tabBarScrollLeft = tabBar.scrollLeft;
|
||
//点击的时候记录并设置scrollLeft
|
||
_this6.scrollLeft = tabBarScrollLeft;
|
||
_this6.isClickChange = true;
|
||
_this6.tabIndex = tabIndex;
|
||
case 14:
|
||
case "end":
|
||
return _context3.stop();
|
||
}
|
||
}
|
||
}, _callee3);
|
||
}))();
|
||
},
|
||
RefreshStoreName: function RefreshStoreName(e) {
|
||
//console.info(e);
|
||
|
||
var refresh = false;
|
||
if (e.store_row.store_id != this.$.getStorageSync("store_id")) {
|
||
refresh = true;
|
||
}
|
||
this.setData({
|
||
city: e.store_row.store_name
|
||
});
|
||
this.$.setStorageSync("store_id", e.store_row.store_id);
|
||
this.$.setStorageSync("store_name", e.store_row.store_name);
|
||
if (refresh) {
|
||
//刷新首页
|
||
this.setData({
|
||
indexArray: []
|
||
});
|
||
this.initData(true);
|
||
}
|
||
},
|
||
RefreshOrderChain: function RefreshOrderChain(e) {
|
||
//console.info(e);
|
||
//console.info(e.chain_name);
|
||
|
||
var refresh = false;
|
||
if (e.chain_id != this.$.getStorageSync("chain_id")) {
|
||
refresh = true;
|
||
}
|
||
this.setData({
|
||
city: e.ChainInfo.chain_name
|
||
});
|
||
this.$.setStorageSync("chain_id", e.chain_id);
|
||
this.$.setStorageSync("chain_name", e.ChainInfo.chain_name);
|
||
if (refresh) {
|
||
//刷新首页
|
||
this.setData({
|
||
indexArray: []
|
||
});
|
||
this.initData(true);
|
||
}
|
||
},
|
||
RefreshSubsite: function RefreshSubsite(e) {
|
||
//console.info(e.subsite_id);
|
||
//console.info(e.subsite_name);
|
||
|
||
var refresh = false;
|
||
if (e.subsite_id != this.$.getStorageSync("site_id")) {
|
||
refresh = true;
|
||
}
|
||
this.setData({
|
||
city: e.subsite_name
|
||
});
|
||
this.$.setStorageSync("site_id", e.subsite_id);
|
||
this.$.setStorageSync("site_name", e.subsite_name);
|
||
this.initPageData();
|
||
if (refresh) {
|
||
this.initData(true);
|
||
}
|
||
},
|
||
cancel: function cancel() {
|
||
this.setData({
|
||
isCancel: false
|
||
});
|
||
},
|
||
cancelsuccess: function cancelsuccess() {
|
||
this.setData({
|
||
isCancelSuccess: true
|
||
});
|
||
},
|
||
innertouch: function innertouch() {},
|
||
userReceiveCoupon: function userReceiveCoupon() {
|
||
var params = {
|
||
couponIds: "",
|
||
userIsNew: this.userIsNew
|
||
};
|
||
var that = this;
|
||
|
||
//领取操作
|
||
that.$.request({
|
||
url: that.Config.URL.user.voucher_add,
|
||
data: params,
|
||
success: function success(data, status, msg, code) {
|
||
if (status == 200) {
|
||
that.setData({
|
||
isCancelSuccess: false,
|
||
coupons: data.items
|
||
});
|
||
} else {
|
||
that.$.confirm(msg);
|
||
}
|
||
}
|
||
});
|
||
},
|
||
onPopClose: function onPopClose() {
|
||
this.setData({
|
||
showPopFlag: false
|
||
});
|
||
},
|
||
onPopClick: function onPopClick() {
|
||
this.$.gopage(this.index_pop_wap_url);
|
||
},
|
||
confirm: function confirm() {},
|
||
onSearch: function onSearch(e) {
|
||
var that = this;
|
||
that.$.gopage("/pagesub/search/search");
|
||
},
|
||
showCity: function showCity() {
|
||
var that = this;
|
||
if (false) {} else {
|
||
//that.$.gopage("/pagesub/subsite/subsitelist?city=" + that.city);
|
||
|
||
//选择店铺模式
|
||
//that.$.gopage("/pagesub/index/store-list?issub=1");
|
||
|
||
//选择门店模式
|
||
if (this.Config.CHAIN_ENABLE) {
|
||
that.$.gopage("/chain/chain/list?issub=1");
|
||
} else {
|
||
that.$.gopage("/pagesub/subsite/subsitelist?city=" + that.city);
|
||
}
|
||
}
|
||
},
|
||
scan: function scan(e) {
|
||
var that = this;
|
||
that.$.scanCode({
|
||
success: function success(e) {
|
||
//console.info(e.result);
|
||
that.onScanCode(e.result);
|
||
//
|
||
|
||
return;
|
||
var t = e.result.split("=");
|
||
t.length > 2 || t.length < 2 ? that.$.alert(that.__("无法识别")) : t[0] == "productId" ? that.$.isNull(t[1]) ? that.$.alert(that.__("无法识别")) : that.$.navigateTo("/pages/product/detail?pid=" + t[1]) : t[0] == "eventId" ? that.$.isNull(t[1]) ? that.$.alert(that.__("无法识别")) : that.$.navigateTo("../activitycheckin/activitycheckin?eventId=" + t[1]) : that.$.alert(that.__("无法识别"));
|
||
},
|
||
fail: function fail(e) {
|
||
that.$.alert(that.__("无法识别"));
|
||
}
|
||
});
|
||
},
|
||
onScanCode: function onScanCode(e) {
|
||
//console.info('sss')
|
||
//console.info(e)
|
||
var that = this;
|
||
that.$.gopage("/pagesub/webpage/web?u=" + encodeURIComponent(e));
|
||
},
|
||
showConfirmLang: function showConfirmLang() {
|
||
this.bannerShow = true;
|
||
},
|
||
closeBanner: function closeBanner() {
|
||
this.bannerShow = false;
|
||
},
|
||
onConfirmLang: function () {
|
||
var _onConfirmLang = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
||
var that, idx;
|
||
return _regenerator.default.wrap(function _callee4$(_context4) {
|
||
while (1) {
|
||
switch (_context4.prev = _context4.next) {
|
||
case 0:
|
||
that = this;
|
||
this.bannerShow = false;
|
||
_context4.t0 = _regenerator.default.keys(that.Lang.data.items);
|
||
case 3:
|
||
if ((_context4.t1 = _context4.t0()).done) {
|
||
_context4.next = 10;
|
||
break;
|
||
}
|
||
idx = _context4.t1.value;
|
||
if (!(that.Lang.data.items[idx].lang == that.current_lang)) {
|
||
_context4.next = 8;
|
||
break;
|
||
}
|
||
that.setData({
|
||
current_standard: that.Lang.data.items[idx].standard,
|
||
current_label: that.Lang.data.items[idx].label,
|
||
current_img: that.Lang.data.items[idx].img,
|
||
current_currency: that.Lang.data.items[idx].currency_id
|
||
});
|
||
return _context4.abrupt("break", 10);
|
||
case 8:
|
||
_context4.next = 3;
|
||
break;
|
||
case 10:
|
||
that.Lang.data.lang = this.current_lang;
|
||
that.Lang.data.standard = this.current_standard;
|
||
that.Lang.data.currency_id = this.current_currency;
|
||
that.Lang.data.label = this.current_label;
|
||
that.Lang.data.img = this.current_img;
|
||
that.Lang.lang = this.current_lang;
|
||
that.Lang.currency_id = this.current_currency;
|
||
that.Lang.standard = this.current_standard;
|
||
that.Lang.label = this.current_label;
|
||
that.Lang.img = this.current_img;
|
||
uni.setStorageSync("selang", that.Lang.lang);
|
||
uni.setStorageSync("standard", that.Lang.standard);
|
||
uni.setStorageSync("currency_id", that.Lang.currency_id);
|
||
that.Lang.setLang(this.current_lang, this.current_standard, this.current_currency);
|
||
that.resetLang();
|
||
|
||
//重新发请求 站点数据
|
||
_context4.next = 27;
|
||
return this.$store.dispatch("getSysInfo", function (plantformInfo) {});
|
||
case 27:
|
||
//uni.navigateBack();
|
||
|
||
uni.reLaunch({
|
||
url: "/pages/index/index"
|
||
});
|
||
case 28:
|
||
case "end":
|
||
return _context4.stop();
|
||
}
|
||
}
|
||
}, _callee4, this);
|
||
}));
|
||
function onConfirmLang() {
|
||
return _onConfirmLang.apply(this, arguments);
|
||
}
|
||
return onConfirmLang;
|
||
}(),
|
||
onCurrencyChange: function onCurrencyChange(e) {
|
||
var that = this;
|
||
that.setData({
|
||
current_currency: e.detail.value
|
||
});
|
||
},
|
||
onLangChange: function onLangChange(e) {
|
||
var that = this;
|
||
that.setData({
|
||
current_lang: e.detail.value
|
||
});
|
||
that.onConfirmLang();
|
||
},
|
||
scrolltolower: function scrolltolower(index) {
|
||
uni.$emit("diy-scrollbottom", {
|
||
uniId: index
|
||
});
|
||
},
|
||
goToCate: function goToCate() {
|
||
var that = this;
|
||
that.$.gopage("/pages/category/category");
|
||
},
|
||
// 页面滚动监听
|
||
onScroll: function onScroll(e) {
|
||
var _this7 = this;
|
||
var element = "#product-pageIndex-" + this.tabIndex;
|
||
var that = this;
|
||
var query = wx.createSelectorQuery();
|
||
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 44;
|
||
query.selectAll(element).boundingClientRect();
|
||
query.exec(function (res) {
|
||
res[0].forEach(function (item) {
|
||
if (item.top <= 100) {
|
||
that.isFilterFixed = true;
|
||
that.topDistance = statusBarHeight;
|
||
_this7.isShow = true;
|
||
} else {
|
||
that.isFilterFixed = false;
|
||
that.topDistance = 0;
|
||
_this7.isShow = false;
|
||
}
|
||
});
|
||
});
|
||
this.oldscposition = e.detail.scrollTop;
|
||
|
||
/*
|
||
if (100 < e.detail.scrollTop) {
|
||
that.setData({opacity: 1, background: "f8f8f8"});
|
||
} else {
|
||
that.setData({
|
||
opacity: 0,
|
||
background: "fff"
|
||
})
|
||
}
|
||
*/
|
||
|
||
if (e.detail.scrollTop >= this.screenHeight) {
|
||
this.setData({
|
||
isQuickNav: true
|
||
});
|
||
} else {
|
||
this.setData({
|
||
isQuickNav: false
|
||
});
|
||
}
|
||
if (this.commonAppIsHeaderNavFixed && this.commonAppIsEnableSearch) {
|
||
var top = e.detail.scrollTop > 35 ? 35 : e.detail.scrollTop;
|
||
var num = top * 7;
|
||
this.oldscposition = e.detail.scrollTop;
|
||
var base = 230;
|
||
var len = 3;
|
||
base = len <= 0 ? 0 : 66 * len;
|
||
|
||
// 开启哀悼插件的时候不需要浮动导航并且搜索框也不需要缩短、开启站点灰度会导致浮动失效
|
||
if ((this.plugins_mourning_data || 0) != 1) {
|
||
var top_val = 35;
|
||
var val = num > base ? base : num;
|
||
this.setData({
|
||
searchStyle: "width: calc(100% - " + val + "rpx);",
|
||
searchIsFixed: top >= top_val
|
||
});
|
||
}
|
||
}
|
||
},
|
||
returnTop: function returnTop() {
|
||
var that = this;
|
||
//视图会发生重新渲染
|
||
that.scrollTop = that.oldscposition;
|
||
//当视图渲染结束 重新设置为0
|
||
that.$nextTick(function () {
|
||
that.scrollTop = 0;
|
||
});
|
||
this.setData({
|
||
isQuickNav: false
|
||
});
|
||
},
|
||
doNothing: function doNothing() {},
|
||
//动态设置swiper的高度
|
||
setSwiperHeight: function setSwiperHeight() {
|
||
var _this8 = this;
|
||
var element = "#content-wrap" + this.tabIndex;
|
||
var query = uni.createSelectorQuery().in(this);
|
||
query.select(element).boundingClientRect();
|
||
query.exec(function (res) {
|
||
if (res && res[0]) {
|
||
_this8.swiperHeight = res[0].height;
|
||
}
|
||
});
|
||
},
|
||
handerSkipu: function handerSkipu() {
|
||
uni.navigateTo({
|
||
url: "/member/member/supermarketlList"
|
||
});
|
||
}
|
||
})
|
||
};
|
||
exports.default = _default;
|
||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 88:
|
||
/*!******************************************************************************************************************************!*\
|
||
!*** C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/pages/index/index.vue?vue&type=style&index=0&lang=scss& ***!
|
||
\******************************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./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/@dcloudio/vue-cli-plugin-uni/packages/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!./index.vue?vue&type=style&index=0&lang=scss& */ 89);
|
||
/* harmony import */ var _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||
/* harmony default export */ __webpack_exports__["default"] = (_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 89:
|
||
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
!*** ./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/@dcloudio/vue-cli-plugin-uni/packages/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!C:/Users/lihy/Desktop/company/wechat_miniProgram/java-mall-app/pages/index/index.vue?vue&type=style&index=0&lang=scss& ***!
|
||
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"theme_bg":"#f30213"};
|
||
if(false) { var cssReload; }
|
||
|
||
|
||
/***/ })
|
||
|
||
},[[81,"common/runtime","common/vendor"]]]);
|
||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
|