com.kailaimei.carbon/unpackage/dist/dev/mp-weixin/pages/count/count.js

916 lines
44 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/count/count"],{
/***/ 41:
/*!****************************************************************************!*\
!*** D:/碳足迹/com.kailaimei.carbon/main.js?{"page":"pages%2Fcount%2Fcount"} ***!
\****************************************************************************/
/*! 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 _count = _interopRequireDefault(__webpack_require__(/*! ./pages/count/count.vue */ 42));
// @ts-ignore
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_count.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"]))
/***/ }),
/***/ 42:
/*!*********************************************************!*\
!*** D:/碳足迹/com.kailaimei.carbon/pages/count/count.vue ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.vue?vue&type=template&id=378efeb4& */ 43);
/* harmony import */ var _count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./count.vue?vue&type=script&lang=js& */ 45);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _count_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 _count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _HbuilderX_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/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 32);
var renderjs
/* normalize component */
var component = Object(_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__["render"],
_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null,
false,
_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__["components"],
renderjs
)
component.options.__file = "pages/count/count.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 43:
/*!****************************************************************************************!*\
!*** D:/碳足迹/com.kailaimei.carbon/pages/count/count.vue?vue&type=template&id=378efeb4& ***!
\****************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./count.vue?vue&type=template&id=378efeb4& */ 44);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_template_id_378efeb4___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/***/ }),
/***/ 44:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./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:/碳足迹/com.kailaimei.carbon/pages/count/count.vue?vue&type=template&id=378efeb4& ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! 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 = {
statusNav: function () {
return __webpack_require__.e(/*! import() | components/status-nav/status-nav */ "components/status-nav/status-nav").then(__webpack_require__.bind(null, /*! @/components/status-nav/status-nav.vue */ 52))
},
lEchart: function () {
return Promise.all(/*! import() | uni_modules/lime-echart/components/l-echart/l-echart */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/lime-echart/components/l-echart/l-echart")]).then(__webpack_require__.bind(null, /*! @/uni_modules/lime-echart/components/l-echart/l-echart.vue */ 59))
},
}
} 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.current == 0 ? _vm.cateTagList.length : null
var l1 =
_vm.current == 0 && g0 > 0
? _vm.__map(_vm.cateList, function (item, index) {
var $orig = _vm.__get_orig(item)
var l0 = _vm.__map(item, function (item1, index1) {
var $orig = _vm.__get_orig(item1)
var g1 = _vm.cateTagList.indexOf(item1.tag)
return {
$orig: $orig,
g1: g1,
}
})
return {
$orig: $orig,
l0: l0,
}
})
: null
var g2 =
_vm.current == 0 && _vm.subTotal[0] ? _vm.subTotal[0].toFixed(2) : null
var g3 =
_vm.current == 0 && _vm.subTotal[1] ? _vm.subTotal[1].toFixed(2) : null
var g4 =
_vm.current == 0 && _vm.subTotal[2] ? _vm.subTotal[2].toFixed(2) : null
var g5 =
_vm.current == 0 && _vm.subTotal[3] ? _vm.subTotal[3].toFixed(2) : null
var g6 =
_vm.current == 0 && _vm.subTotal[4] ? _vm.subTotal[4].toFixed(2) : null
var g7 = _vm.current == 0 && _vm.total > 0 ? _vm.total.toFixed(2) : null
var g8 = _vm.current == 2 ? _vm.treeNum.toFixed(2) : null
var g9 = _vm.current == 2 ? _vm.money.toFixed(2) : null
if (!_vm._isMounted) {
_vm.e0 = function ($event) {
_vm.ifShow = true
}
_vm.e1 = function ($event) {
$event.stopPropagation()
_vm.ifShow = false
}
}
_vm.$mp.data = Object.assign(
{},
{
$root: {
g0: g0,
l1: l1,
g2: g2,
g3: g3,
g4: g4,
g5: g5,
g6: g6,
g7: g7,
g8: g8,
g9: g9,
},
}
)
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ 45:
/*!**********************************************************************************!*\
!*** D:/碳足迹/com.kailaimei.carbon/pages/count/count.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 _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./count.vue?vue&type=script&lang=js& */ 46);
/* harmony import */ var _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_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 _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_count_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 46:
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./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:/碳足迹/com.kailaimei.carbon/pages/count/count.vue?vue&type=script&lang=js& ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni, wx) {
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var echarts = _interopRequireWildcard(__webpack_require__(/*! @/uni_modules/lime-echart/static/echarts.min.js */ 47));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var statusNav = function statusNav() {
__webpack_require__.e(/*! require.ensure | components/status-nav/status-nav */ "components/status-nav/status-nav").then((function () {
return resolve(__webpack_require__(/*! @/components/status-nav/status-nav.vue */ 52));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
var swiperPull = function swiperPull() {
__webpack_require__.e(/*! require.ensure | components/swiper/swiper-pull */ "components/swiper/swiper-pull").then((function () {
return resolve(__webpack_require__(/*! @/components/swiper/swiper-pull.vue */ 71));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
// 初始化
var multiScreen = uni.requireNativePlugin('SPT-MultiScreen');
var _default = {
components: {
statusNav: statusNav,
swiperPull: swiperPull
},
data: function data() {
return {
statusHeight: uni.getSystemInfoSync().statusBarHeight,
//状态栏高度
navList: ['/pages/count/count', '/pages/assess/assess', '/pages/eliminate/eliminate'],
current: 0,
//当前选择
cateList: {
'衣': [{
'title': '购买衣服数量',
'company': '件',
'carbon': 7.01,
'num': '',
'tag': 'a1'
}, {
'title': '洗衣粉使用量',
'company': '千克',
'carbon': 1.46,
'num': '',
'tag': 'a2'
}],
'食': [{
'title': '吸烟数量',
'company': '包',
'carbon': 0.1182,
'num': '',
'tag': 'b1'
}, {
'title': '喝白酒数量',
'company': '升',
'carbon': 4.5,
'num': '',
'tag': 'b2'
}, {
'title': '喝红酒数量',
'company': '升',
'carbon': 1.75,
'num': '',
'tag': 'b3'
}, {
'title': '喝啤酒数量',
'company': '瓶',
'carbon': 0.43,
'num': '',
'tag': 'b4'
}, {
'title': '肉类消费',
'company': '千克',
'carbon': 8.823,
'num': '',
'tag': 'b5'
}, {
'title': '粮食消费',
'company': '千克',
'carbon': 0.918,
'num': '',
'tag': 'b6'
}],
'住': [{
'title': '用电',
'company': '度',
'carbon': 0.581,
'num': '',
'tag': 'c1'
}, {
'title': '煤气',
'company': '立方米',
'carbon': 2.826,
'num': '',
'tag': 'c2'
}, {
'title': '天然气',
'company': '立方米',
'carbon': 2.826,
'num': '',
'tag': 'c3'
}, {
'title': '燃煤',
'company': '千克',
'carbon': 3.0978,
'num': '',
'tag': 'c4'
}, {
'title': '集中取暖',
'company': '立方米',
'carbon': 46.57,
'num': '',
'tag': 'c5'
}, {
'title': '装修用木材',
'company': '千克',
'carbon': 0.31,
'num': '',
'tag': 'c6'
}, {
'title': '装修用陶瓷',
'company': '千克',
'carbon': 0.74,
'num': '',
'tag': 'c7'
}, {
'title': '装修用钢材',
'company': '千克',
'carbon': 2.3,
'num': '',
'tag': 'c8'
}, {
'title': '装修用铝材',
'company': '千克',
'carbon': 15.8,
'num': '',
'tag': 'c9'
}],
'行': [{
'title': '飞机',
'company': '千米',
'carbon': 0.088,
'num': '',
'tag': 'd1'
}, {
'title': '火车',
'company': '千米',
'carbon': 0.0262,
'num': '',
'tag': 'd2'
}, {
'title': '轮船',
'company': '千米',
'carbon': 0.128,
'num': '',
'tag': 'd3'
}, {
'title': '地铁',
'company': '千米',
'carbon': 0.0153,
'num': '',
'tag': 'd4'
}, {
'title': '公共汽车',
'company': '千米',
'carbon': 0.03344,
'num': '',
'tag': 'd5'
}, {
'title': '低油耗小轿车',
'company': '千米',
'carbon': 0.16,
'num': '',
'tag': 'd6'
}, {
'title': '中油耗小轿车',
'company': '千米',
'carbon': 0.24,
'num': '',
'tag': 'd7'
}, {
'title': '高油耗小轿车',
'company': '千米',
'carbon': 0.33,
'num': '',
'tag': 'd8'
}],
'用': [{
'title': '塑料袋使用量',
'company': '个',
'carbon': 0.0821,
'num': '',
'tag': 'e1'
}, {
'title': '纸制品',
'company': '千克',
'carbon': 1.4,
'num': '',
'tag': 'e2'
}, {
'title': '一次性筷子',
'company': '双',
'carbon': 0.023,
'num': '',
'tag': 'e3'
}]
},
numlist: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '00', '.'],
operateList: ['DEL', 'AC', '计算'],
cateTagList: [],
//分类标题
subTotal: [0, 0, 0, 0, 0],
//小计
total: 0,
//总计
focusIndex: '',
//选中一级分类
focusIndex1: 0,
//选中二级分类
// 评估碳足迹
member: 1,
//家庭成员
average: 0,
//平均值
cacheTotal: 0,
//缓存总计
cacheSubTotal: [],
//缓存小计
showTotal: [],
//显示总计
histogram: {},
//柱状图数据
pie: {},
//饼图数据
heightList: [],
//柱状高度
averageHeight: 0,
//足迹icon图片
// 消除碳足迹
treeNum: 0,
//树数量
money: 0,
//捐款额
ifShow: false,
//是否显示证书
code: '',
//证书编码
experients: 0,
//体验者编号
difference: 0,
//补齐位数
date: '',
//报告时间
webViewUrl: '',
//web-view地址
// 双击控制
index: 0,
start_time: 0,
end_time: 0,
scrollTop: 0
};
},
onLoad: function onLoad() {
var _this = this;
if (uni.getStorageSync('cateTagList')) {
this.cateTagList = uni.getStorageSync('cateTagList');
}
if (uni.getStorageSync('cacheTotal')) {
this.total = uni.getStorageSync('cacheTotal');
}
if (uni.getStorageSync('cacheSubTotal')) {
this.subTotal = uni.getStorageSync('cacheSubTotal');
}
if (uni.getStorageSync('cateList')) {
this.cateList = uni.getStorageSync('cateList');
}
setTimeout(function () {
var query = wx.createSelectorQuery().in(_this);
query.select('.message-scroll').boundingClientRect(function (rect) {
_this.scrollTop = rect.height;
}).exec();
}, 200);
},
methods: {
//切换页面
changeNav: function changeNav(index) {
var _this2 = this;
switch (index) {
case 0:
if (index !== this.current) {
this.current = index;
if (uni.getStorageSync('cateTagList')) {
this.cateTagList = uni.getStorageSync('cateTagList');
}
if (uni.getStorageSync('cacheTotal')) {
this.total = uni.getStorageSync('cacheTotal');
}
if (uni.getStorageSync('cacheSubTotal')) {
this.subTotal = uni.getStorageSync('cacheSubTotal');
}
if (uni.getStorageSync('cateList')) {
this.cateList = uni.getStorageSync('cateList');
}
}
break;
case 1:
if (uni.getStorageSync('subTotal')) {
if (index !== this.current) {
this.current = index;
if (uni.getStorageSync('allTotal')) {
this.cacheTotal = uni.getStorageSync('allTotal');
this.showTotal = this.cacheTotal.toString().split('');
// 计算平均值
this.averageEv();
}
if (uni.getStorageSync('subTotal')) {
this.cacheSubTotal = uni.getStorageSync('subTotal');
}
// 计算柱状高度
var height01 = "".concat((this.subTotal[0] / this.total * 280).toFixed(2), "%");
var height02 = "".concat((this.subTotal[1] / this.total * 280).toFixed(2), "%");
var height03 = "".concat((this.subTotal[2] / this.total * 280).toFixed(2), "%");
var height04 = "".concat((this.subTotal[3] / this.total * 280).toFixed(2), "%");
var height05 = "".concat((this.subTotal[4] / this.total * 280).toFixed(2), "%");
this.heightList = [height01, height02, height03, height04, height05];
// 绘制饼图
this.pieEv();
}
} else {
uni.showToast({
title: '请先计算碳足迹',
icon: 'none',
duration: 2000
});
}
break;
case 2:
if (uni.getStorageSync('average')) {
if (index !== this.current) {
this.current = index;
if (uni.getStorageSync('newUser') !== 'newUser') {
if (uni.getStorageSync('experients')) {
this.experients = uni.getStorageSync('experients') + 1;
} else {
this.experients = 1;
}
uni.setStorageSync('experients', this.experients);
uni.setStorageSync('newUser', 'newUser');
} else {
this.experients = uni.getStorageSync('experients');
}
this.difference = 6 - this.experients.toString().length;
if (uni.getStorageSync('allTotal') && uni.getStorageSync('average')) {
this.total = uni.getStorageSync('allTotal');
this.average = uni.getStorageSync('average');
this.treeNum = this.average / 440.00 * 1;
this.money = this.treeNum * 67.6 * 1;
this.webViewUrl = "http://e-file.thjj.org/tools/thjj-c.htm?cid=122104&y=0&mn=".concat(this.money);
}
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var hour = date.getHours();
var minute = date.getMinutes();
var second = date.getSeconds();
var random = Math.ceil(Math.random() * 99 + 1);
this.date = "".concat(year, "\u5E74").concat(month < 10 ? '0' + month : month, "\u6708").concat(day < 10 ? '0' + day : day, "\u65E5");
this.code = "".concat(year.toString().substr(2)).concat(month < 10 ? '0' + month : month).concat(day < 10 ? '0' + day : day).concat(hour < 10 ? '0' + hour : hour).concat(minute < 10 ? '0' + minute : minute).concat(second < 10 ? '0' + second : second).concat(random < 10 ? '0' + random : random);
}
} else {
uni.showToast({
title: '请先评估碳足迹',
icon: 'none',
duration: 2000
});
}
break;
case 3:
if (index !== this.current) {
this.current = index;
setTimeout(function () {
// webView信息
var iframeInfo = {};
var query = wx.createSelectorQuery().in(_this2);
query.select('.iframe-box').boundingClientRect(function (rect) {
iframeInfo.top = rect.top;
iframeInfo.left = rect.left;
iframeInfo.width = rect.width;
iframeInfo.height = rect.height;
}).exec();
var currentWebview = _this2.$scope.$getAppWebview();
setTimeout(function () {
var wv = currentWebview.children()[0];
wv.setStyle({
top: iframeInfo.top,
left: iframeInfo.left,
width: iframeInfo.width,
height: iframeInfo.height
});
wv.overrideUrlLoading({
mode: "reject",
match: '.*www\.thjj\.org/list.html#key.*'
}, function (e) {
var wxCode = e.url.substr(e.url.indexOf('=') + 1);
console.log(wxCode + '微信证书编号');
_this2.webViewUrl = "http://e-file.thjj.org/ajaxserv/webform/zfb/show.aspx?no=".concat(wxCode);
});
wv.addEventListener('titleUpdate', function (_ref) {
var title = _ref.title;
console.log(title + '标题url');
if (title.indexOf('show.aspx?no=') !== -1) {
var zfbCode = title.substr(title.indexOf('show.aspx?no=') + 1);
console.log(zfbCode + '支付宝编号');
}
});
}, 100);
}, 100);
}
break;
}
},
// 选择分类
changeEv: function changeEv(index, index1) {
var _this3 = this;
var delIndex = this.cateTagList.indexOf(this.cateList[index][index1].tag);
this.index = this.index == 0 ? 1 : this.index + 1;
if (this.index == 1) {
this.start_time = new Date().getTime();
setTimeout(function () {
_this3.index = _this3.start_time = _this3.end_time = 0;
if (delIndex == -1) {
_this3.cateTagList.push(_this3.cateList[index][index1].tag);
_this3.focusIndex = index;
_this3.focusIndex1 = index1;
// 缓存已选分类
uni.setStorageSync('cateTagList', _this3.cateTagList);
}
}, 200);
} else if (this.index == 2) {
this.end_time = new Date().getTime();
if (this.end_time - this.start_time < 300) {
if (delIndex !== -1) {
this.cateTagList.splice(delIndex, 1);
this.cateList[index][index1].num = '';
this.focusIndex = '';
// 缓存已选分类
uni.setStorageSync('cateTagList', this.cateTagList);
}
}
this.index = this.start_time = this.end_time = 0;
}
},
// 获取光标
changeFocus: function changeFocus(index, index1) {
this.focusIndex = index;
this.focusIndex1 = index1;
},
// 计算器按钮
chengeNum: function chengeNum(num) {
if (this.cateTagList.length > 0) {
var curNum = this.cateList[this.focusIndex][this.focusIndex1].num;
if (curNum.indexOf('.') == -1 && curNum !== '') {
this.cateList[this.focusIndex][this.focusIndex1].num = curNum + num;
} else {
if (num !== '.') {
this.cateList[this.focusIndex][this.focusIndex1].num = curNum + num;
}
}
}
},
// 计算 || 清除
choseEv: function choseEv(index) {
if (this.cateTagList.length > 0) {
if (index == 0) {
this.cateList[this.focusIndex][this.focusIndex1].num = '';
} else if (index == 1) {
// 清除所有数据
this.clearEv();
} else {
// 计算
this.calculationEv();
}
}
},
// 清除所有数据
clearEv: function clearEv() {
this.cateList['衣'].forEach(function (item) {
return item.num = '';
});
this.cateList['食'].forEach(function (item) {
return item.num = '';
});
this.cateList['住'].forEach(function (item) {
return item.num = '';
});
this.cateList['行'].forEach(function (item) {
return item.num = '';
});
this.cateList['用'].forEach(function (item) {
return item.num = '';
});
this.cateTagList = [];
this.subTotal = [0, 0, 0, 0, 0];
this.total = 0; //总计
// 清除缓存
var res = uni.getStorageInfoSync();
res.keys.map(function (item) {
if (item !== 'experients') {
uni.removeStorageSync(item);
}
});
},
// 计算
calculationEv: function calculationEv() {
this.focusIndex = '';
// 小计
var subTotalArr1 = this.cateList['衣'].filter(function (item) {
return item.num !== '';
});
var subTotalNum1 = 0;
subTotalArr1.forEach(function (item) {
subTotalNum1 += item.num * item.carbon * 1;
});
this.subTotal[0] = parseFloat(subTotalNum1);
var subTotalArr2 = this.cateList['食'].filter(function (item) {
return item.num !== '';
});
var subTotalNum2 = 0;
subTotalArr2.forEach(function (item) {
subTotalNum2 += item.num * item.carbon * 1;
});
this.subTotal[1] = parseFloat(subTotalNum2);
var subTotalArr3 = this.cateList['住'].filter(function (item) {
return item.num !== '';
});
var subTotalNum3 = 0;
subTotalArr3.forEach(function (item) {
subTotalNum3 += item.num * item.carbon * 1;
});
this.subTotal[2] = parseFloat(subTotalNum3);
var subTotalArr4 = this.cateList['行'].filter(function (item) {
return item.num !== '';
});
var subTotalNum4 = 0;
subTotalArr4.forEach(function (item) {
subTotalNum4 += item.num * item.carbon * 1;
});
this.subTotal[3] = parseFloat(subTotalNum4);
var subTotalArr5 = this.cateList['用'].filter(function (item) {
return item.num !== '';
});
var subTotalNum5 = 0;
subTotalArr5.forEach(function (item) {
subTotalNum5 += item.num * item.carbon * 1;
});
this.subTotal[4] = parseFloat(subTotalNum5);
uni.setStorageSync('cacheSubTotal', this.subTotal);
// 总计
var totalArr = this.subTotal.filter(function (item) {
return item !== 0;
});
var totalNum = 0;
totalArr.forEach(function (item) {
totalNum += item * 1;
});
this.total = parseFloat(totalNum);
uni.setStorageSync('cacheTotal', this.total);
// 缓存小计数据
var cacheTotal = [];
cacheTotal[0] = this.subTotal[0].toFixed(2);
cacheTotal[1] = this.subTotal[1].toFixed(2);
cacheTotal[2] = this.subTotal[2].toFixed(2);
cacheTotal[3] = this.subTotal[3].toFixed(2);
cacheTotal[4] = this.subTotal[4].toFixed(2);
uni.setStorageSync('subTotal', cacheTotal);
// 缓存总计数据
uni.setStorageSync('allTotal', this.total.toFixed(2));
// 缓存分类数组
uni.setStorageSync('cateList', this.cateList);
// 滚动到底部
this.scrollToButtom();
},
// 滚动到底部
scrollToButtom: function scrollToButtom() {
var _this4 = this;
var query = wx.createSelectorQuery().in(this);
query.select('.message-scroll').boundingClientRect(function (rect) {
_this4.scrollTop = rect.height;
}).exec();
},
// 获取饼图数据
pieEv: function pieEv() {
this.pie = {
tooltip: {
trigger: 'item'
},
series: [{
type: 'pie',
color: ['#a6fea5', '#ffb0ae', '#92dede', '#ffdaad', '#8888ac'],
radius: '50%',
label: {
fontSize: 15,
color: '#000',
fontWeight: 'bold'
},
data: [{
value: this.subTotal[0],
name: "".concat((this.subTotal[0] / this.total * 100).toFixed(2), "%")
}, {
value: this.subTotal[1],
name: "".concat((this.subTotal[1] / this.total * 100).toFixed(2), "%")
}, {
value: this.subTotal[2],
name: "".concat((this.subTotal[2] / this.total * 100).toFixed(2), "%")
}, {
value: this.subTotal[3],
name: "".concat((this.subTotal[3] / this.total * 100).toFixed(2), "%")
}, {
value: this.subTotal[4],
name: "".concat((this.subTotal[4] / this.total * 100).toFixed(2), "%")
}]
}]
};
},
// 绘制饼图
init: function init() {
var _this5 = this;
this.$refs.chart.init(echarts, function (chart) {
chart.setOption(_this5.pie);
});
},
// 改变数量
changeNum: function changeNum(type) {
if (type == 'reduce') {
if (this.member > 1) {
this.member--;
}
}
if (type == 'add') {
this.member++;
}
// 计算平均值
this.averageEv();
},
// 计算平均值
averageEv: function averageEv() {
var averageNum = this.total / this.member * 1;
this.average = averageNum.toFixed(2);
this.averageHeight = Math.ceil(this.average * 30 / 2330 * 1);
uni.setStorageSync('average', this.average);
}
},
onReady: function onReady() {
// 检查是否开启浮窗权限
multiScreen.canDrawOverlays(function (res) {
if (res.result) {
// 已开启
// 如果加载本地html推荐使用vue cli创建的项目uni-app打包的H5项目会白屏打包后放在项目的static目录中需要使用plus.io.convertLocalFileSystemURL(),转成安卓项目中的绝对地址。
var url = plus.io.convertLocalFileSystemURL('/static/dist/index.html');
multiScreen.showURL(url);
} else {
// 未开启
uni.showModal({
title: '提示',
content: '您尚未开启浮窗权限,副屏无法正常显示内容',
confirmText: '前往设置',
success: function success(modalRes) {
// 点击确定
if (modalRes.confirm) {
// 前往设置
multiScreen.gotoSetDrawOverlays();
}
}
});
}
});
}
};
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"]))
/***/ })
},[[41,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/count/count.js.map