mall-laonong/unpackage/dist/dev/mp-weixin/pages/cart/settlement.js

674 lines
32 KiB
JavaScript
Raw Normal View History

2022-07-31 02:14:22 +00:00
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/cart/settlement"],{
2022-08-03 03:30:25 +00:00
/***/ 39:
2022-07-31 02:14:22 +00:00
/*!*************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** D://mall-laonong/main.js?{"page":"pages%2Fcart%2Fsettlement"} ***!
2022-07-31 02:14:22 +00:00
\*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 5);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));
2022-08-03 03:30:25 +00:00
var _settlement = _interopRequireDefault(__webpack_require__(/*! ./pages/cart/settlement.vue */ 40));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // @ts-ignore
2022-07-31 02:14:22 +00:00
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;createPage(_settlement.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 40:
2022-07-31 02:14:22 +00:00
/*!******************************************************!*\
2022-07-31 02:39:16 +00:00
!*** D://mall-laonong/pages/cart/settlement.vue ***!
2022-07-31 02:14:22 +00:00
\******************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
2022-08-03 03:30:25 +00:00
/* harmony import */ var _settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settlement.vue?vue&type=template&id=5371580f& */ 41);
/* harmony import */ var _settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settlement.vue?vue&type=script&lang=js& */ 43);
2022-07-31 02:14:22 +00:00
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
2022-08-03 03:20:44 +00:00
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 11);
2022-07-31 02:14:22 +00:00
var renderjs
/* normalize component */
2022-08-03 03:20:44 +00:00
var component = Object(_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
2022-07-31 02:14:22 +00:00
_settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__["render"],
_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null,
false,
_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__["components"],
renderjs
)
component.options.__file = "pages/cart/settlement.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 41:
2022-07-31 02:14:22 +00:00
/*!*************************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** D://mall-laonong/pages/cart/settlement.vue?vue&type=template&id=5371580f& ***!
2022-07-31 02:14:22 +00:00
\*************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
2022-08-03 03:30:25 +00:00
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./settlement.vue?vue&type=template&id=5371580f& */ 42);
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__["render"]; });
2022-07-31 02:14:22 +00:00
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
2022-07-31 02:14:22 +00:00
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
2022-07-31 02:14:22 +00:00
2022-08-03 03:20:44 +00:00
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_template_id_5371580f___WEBPACK_IMPORTED_MODULE_0__["components"]; });
2022-07-31 02:14:22 +00:00
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 42:
2022-07-31 02:14:22 +00:00
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D://mall-laonong/pages/cart/settlement.vue?vue&type=template&id=5371580f& ***!
2022-07-31 02:14:22 +00:00
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
try {
components = {
statusNav: function() {
2022-08-03 03:30:25 +00:00
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 */ 137))
2022-07-31 02:14:22 +00:00
}
}
} catch (e) {
if (
e.message.indexOf("Cannot find module") !== -1 &&
e.message.indexOf(".vue") !== -1
) {
console.error(e.message)
console.error("1. 排查组件名称拼写是否正确")
console.error(
"2. 排查组件是否符合 easycom 规范文档https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
)
console.error(
"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
)
} else {
throw e
}
}
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
2022-08-03 10:49:15 +00:00
var m0 = _vm.isLoading ? parseFloat(_vm.orderInfo.available_balance) : null
2022-07-31 02:14:22 +00:00
var l0 = _vm.isLoading
? _vm.__map(_vm.couponList, function(item, index) {
var $orig = _vm.__get_orig(item)
2022-08-01 09:46:21 +00:00
var g0 = item.amount.split(".")
var g1 = item.amount.split(".")
2022-08-03 10:49:15 +00:00
var m1 = parseInt(item.condition)
var m2 = parseInt(item.amount)
2022-07-31 02:14:22 +00:00
return {
$orig: $orig,
2022-08-01 09:46:21 +00:00
g0: g0,
g1: g1,
2022-08-03 10:49:15 +00:00
m1: m1,
m2: m2
2022-07-31 02:14:22 +00:00
}
})
: null
if (!_vm._isMounted) {
_vm.e0 = function($event) {
_vm.wechatCheck = !_vm.wechatCheck
}
2022-08-02 05:51:36 +00:00
_vm.e1 = function($event) {
2022-07-31 02:14:22 +00:00
_vm.priceCheck = !_vm.priceCheck
}
}
_vm.$mp.data = Object.assign(
{},
{
$root: {
2022-08-03 10:49:15 +00:00
m0: m0,
2022-07-31 02:14:22 +00:00
l0: l0
}
}
)
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 43:
2022-07-31 02:14:22 +00:00
/*!*******************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** D://mall-laonong/pages/cart/settlement.vue?vue&type=script&lang=js& ***!
2022-07-31 02:14:22 +00:00
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
2022-08-03 03:30:25 +00:00
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./settlement.vue?vue&type=script&lang=js& */ 44);
2022-08-03 03:20:44 +00:00
/* harmony import */ var _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_settlement_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
2022-07-31 02:14:22 +00:00
/***/ }),
2022-08-03 03:30:25 +00:00
/***/ 44:
2022-07-31 02:14:22 +00:00
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
2022-07-31 02:39:16 +00:00
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D://mall-laonong/pages/cart/settlement.vue?vue&type=script&lang=js& ***!
2022-07-31 02:14:22 +00:00
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
2022-08-01 09:46:21 +00:00
//
//
//
//
//
//
//
//
//
2022-07-31 02:14:22 +00:00
var _default =
{
data: function data() {
return {
orderInfo: {}, //订单信息
default_address: {}, //地址信息
orderShopList: [], // 商品信息
couponList: [], //优惠券列表
couponIndex: 0, //优惠券选择
vipCheck: false, //会员折扣
couponCheck: false, // 优惠选择
scoreCheck: false, //积分抵扣
2022-08-01 09:46:21 +00:00
wechatCheck: true, //微信支付
2022-07-31 02:14:22 +00:00
priceCheck: false, //余额支付
isCoupon: false, //优惠券弹窗
flag: true,
preferential_options: 'coupon', //优惠选择
totalPrice: '', //总价
discountPrice: '', //优惠价格
2022-08-02 12:01:54 +00:00
discountNum: 0, //优惠价格数字
2022-08-02 05:51:36 +00:00
isLoading: false,
2022-08-02 12:01:54 +00:00
score_rule: 1, //多少积分抵扣
checkedYes: true };
2022-07-31 02:14:22 +00:00
},
onShow: function onShow() {
2022-08-03 10:49:15 +00:00
// 获取信息
2022-07-31 02:14:22 +00:00
this.getOrderInfo();
},
methods: {
// 选择地址
toAddress: function toAddress() {
uni.navigateTo({
url: "/pagesA/address/address?type=change" });
},
// 计算价格
computePrice: function computePrice() {
2022-08-02 05:51:36 +00:00
// 原需支付
var totalNum = this.orderInfo.total_price;
totalNum = parseFloat(this.$toolAll.tools.addXiaoShu(totalNum));
var totalPrice = this.$toolAll.tools.addXiaoShu(totalNum);
// 会员折扣
var vipNum = this.orderInfo.vip_level > 0 ? this.orderInfo.total_price * (1 - this.$toolAll.tools.addXiaoShu(this.orderInfo.membership_discount) / 10) : 0;
vipNum = parseFloat(this.$toolAll.tools.addXiaoShu(vipNum));
var vipPrice = this.$toolAll.tools.addXiaoShu(vipNum);
// 优惠券折扣
var couponNum = this.couponList.length > 0 ? this.couponList[this.couponIndex].amount : 0;
couponNum = parseFloat(this.$toolAll.tools.addXiaoShu(couponNum));
var couponPrice = this.$toolAll.tools.addXiaoShu(couponNum);
// 积分可抵扣额度
var scoreNum = this.orderInfo.available_score * this.score_rule;
2022-08-03 06:00:21 +00:00
scoreNum = parseInt(this.$toolAll.tools.addXiaoShu(scoreNum));
2022-08-02 05:51:36 +00:00
var scorePrice = this.$toolAll.tools.addXiaoShu(scoreNum);
// 只有会员则扣
if (this.vipCheck && !this.scoreCheck) {
2022-08-02 12:01:54 +00:00
this.discountNum = vipNum;
2022-08-02 05:51:36 +00:00
this.discountPrice = vipPrice;
2022-07-31 02:14:22 +00:00
}
2022-08-02 05:51:36 +00:00
// 只有优惠券
if (this.couponCheck && !this.scoreCheck) {
2022-08-02 12:01:54 +00:00
this.discountNum = couponNum;
2022-08-02 05:51:36 +00:00
this.discountPrice = couponPrice;
2022-07-31 02:14:22 +00:00
}
2022-08-02 05:51:36 +00:00
// 只有积分
if (!this.vipCheck && !this.couponCheck && this.scoreCheck) {
if (scoreNum >= totalNum) {
2022-08-02 12:01:54 +00:00
this.discountNum = totalNum;
2022-08-02 05:51:36 +00:00
this.discountPrice = totalPrice;
} else {
2022-08-02 12:01:54 +00:00
this.discountNum = scoreNum;
2022-08-02 05:51:36 +00:00
this.discountPrice = scorePrice;
}
}
// 会员折扣+积分
if (this.vipCheck && this.scoreCheck) {
if (scoreNum + vipNum >= totalNum) {
2022-08-02 12:01:54 +00:00
this.discountNum = totalNum;
2022-08-02 05:51:36 +00:00
this.discountPrice = totalPrice;
} else {
2022-08-02 12:01:54 +00:00
this.discountNum = scoreNum + vipNum;
this.discountPrice = this.$toolAll.tools.addXiaoShu(scoreNum + vipNum);
2022-08-02 05:51:36 +00:00
}
}
// 优惠券+积分
if (this.couponCheck && this.scoreCheck) {
if (scoreNum + couponNum >= totalNum) {
2022-08-02 12:01:54 +00:00
this.discountNum = totalNum;
2022-08-02 05:51:36 +00:00
this.discountPrice = totalPrice;
} else {
2022-08-02 12:01:54 +00:00
this.discountNum = scoreNum + couponNum;
this.discountPrice = this.$toolAll.tools.addXiaoShu(scoreNum + couponNum);
2022-08-02 05:51:36 +00:00
}
}
// 都不选择
if (!this.vipCheck && !this.couponCheck && !this.scoreCheck) {
2022-08-02 12:01:54 +00:00
this.discountNum = 0;
2022-07-31 02:14:22 +00:00
this.discountPrice = 0;
}
2022-08-02 05:51:36 +00:00
// 计算支付价格
2022-08-02 12:01:54 +00:00
this.totalPrice = this.$toolAll.tools.addXiaoShu(totalNum - this.discountNum);
2022-07-31 02:14:22 +00:00
},
// 获取订单准备信息
getOrderInfo: function getOrderInfo() {var _this = this;
uni.showLoading({
title: '加载中' });
var params = {
sku_list: uni.getStorageSync('buyList') };
this.$requst.post('/api/order/prepare-info', params).then(function (res) {
if (res.code == 0) {
console.log(res, '订单准备信息');
// 其他信息
_this.orderInfo = res.data;
// 优惠券信息
var baseArr = res.data.available_coupon_list;
var couponArr = baseArr.sort(function (a, b) {
return b.amount - a.amount;
});
_this.couponList = couponArr;
if (_this.couponList.length == 0) {
_this.couponCheck = false;
}
// 商品信息
_this.orderShopList = res.data.list;
2022-08-02 05:51:36 +00:00
// 积分抵扣规则
var score_num = res.data.integral_rule.deduction_points_score;
var score_value = res.data.integral_rule.deduction_points_score_value;
_this.score_rule = parseFloat(score_value) / parseFloat(score_num);
2022-08-02 12:01:54 +00:00
// 积分是否可选
var scoreA = _this.orderInfo.available_score * _this.score_rule;
var scoreB = parseFloat(_this.$toolAll.tools.addXiaoShu(scoreA));
if (scoreB < 1) {
_this.checkedYes = false;
}
2022-07-31 02:14:22 +00:00
// 地址信息
var addr_id = uni.getStorageSync('addr_id');
if (addr_id) {
// 获取地址
_this.getAddrDetail(addr_id);
} else {
_this.default_address = res.data.default_address;
}
2022-08-02 05:51:36 +00:00
// 价格
2022-07-31 02:14:22 +00:00
_this.discountPrice = 0;
_this.totalPrice = _this.$toolAll.tools.addXiaoShu(_this.orderInfo.total_price);
2022-08-03 10:49:15 +00:00
// 计算价格
if (_this.vipCheck || _this.couponCheck || _this.scoreCheck) {
// 计算价格
_this.computePrice();
}
2022-07-31 02:14:22 +00:00
}
uni.hideLoading();
_this.isLoading = true;
});
},
// 获取地址
getAddrDetail: function getAddrDetail(id) {var _this2 = this;
this.$requst.post('/api/user/address-info', { id: id }).then(function (res) {
if (res.code == 0) {
console.log(res, '地址详情');
_this2.default_address = res.data;
}
});
},
// 打开优惠券弹窗
toCoupon: function toCoupon() {
if (this.couponList.length) {
this.isCoupon = true;
} else {
2022-08-01 09:46:21 +00:00
this.$toolAll.tools.showToast('暂无可用的优惠券');
2022-07-31 02:14:22 +00:00
}
},
// 选择优惠券
changeCoupon: function changeCoupon(index) {
if (index !== this.couponIndex) {
this.couponIndex = index;
}
},
//确认选择
useCoupon: function useCoupon() {
this.isCoupon = false;
2022-08-01 10:31:20 +00:00
this.vipCheck = false;
this.couponCheck = true;
2022-08-02 05:51:36 +00:00
// 计算价格
this.computePrice();
2022-07-31 02:14:22 +00:00
},
//取消选择
closeCoupon: function closeCoupon() {
this.isCoupon = false;
this.couponIndex = 0;
},
// 选择按钮
chooseEv: function chooseEv(type) {
2022-08-01 09:46:21 +00:00
if (type == 'vip' && this.orderInfo.vip_level > 0) {
2022-07-31 02:14:22 +00:00
if (this.vipCheck) {
this.vipCheck = false;
} else {
this.vipCheck = true;
this.couponCheck = false;
}
this.computePrice();
}
2022-08-01 09:46:21 +00:00
if (type == 'coupon' && this.couponList.length) {
2022-07-31 02:14:22 +00:00
if (this.couponCheck) {
this.couponCheck = false;
} else {
this.couponCheck = true;
this.vipCheck = false;
}
this.computePrice();
}
2022-08-02 05:51:36 +00:00
if (type == 'score' && this.orderInfo.available_score > 0) {
2022-08-02 12:01:54 +00:00
if (this.checkedYes) {
if (this.scoreCheck) {
this.scoreCheck = false;
} else {
this.scoreCheck = true;
}
this.computePrice();
2022-08-02 05:51:36 +00:00
} else {
2022-08-02 12:01:54 +00:00
this.$toolAll.tools.showToast('当前积分无法抵扣');
2022-08-02 05:51:36 +00:00
}
}
2022-07-31 02:14:22 +00:00
},
// 提交
submitEv: function submitEv() {var _this3 = this;
this.flag = false;
if (this.vipCheck) {
this.preferential_options = 'membership_discount';
}
if (this.couponCheck) {
this.preferential_options = 'coupon';
}
if (!this.couponCheck && !this.vipCheck) {
this.preferential_options = '';
}
if (this.default_address == null) {
this.$toolAll.tools.showToast('请填写地址信息');
} else {
if (this.wechatCheck || this.priceCheck) {
var params = {
sku_list: uni.getStorageSync('buyList'),
preferential_options: this.preferential_options,
coupon_id: this.couponCheck ? this.couponList[this.couponIndex].id : '',
deduction_points: this.scoreCheck ? 1 : 0,
is_balance: this.priceCheck ? 1 : 0,
is_wechat: this.wechatCheck ? 1 : 0,
address_id: this.default_address.id };
this.$requst.post('/api/order/create', params).then(function (res) {
if (res.code == 0) {
console.log(res, '支付返回');
if (res.data.need_wechat_pay == 1) {
// 调用微信支付
2022-08-01 09:46:21 +00:00
_this3.callPayMent(res.data.payment_params, res.data.id, res.data.coding);
2022-07-31 02:14:22 +00:00
} else {
2022-08-01 09:46:21 +00:00
// 成功状态
_this3.successEv(res.data.coding);
// 清除缓存
2022-07-31 02:14:22 +00:00
uni.removeStorageSync('addr_id');
2022-08-01 09:46:21 +00:00
// 页面跳转
2022-07-31 02:14:22 +00:00
uni.navigateTo({
url: "/pages/cart/finish?id=".concat(res.data.id) });
}
} else {
console.log(res.msg, '提示信息');
_this3.$toolAll.tools.showToast(res.msg);
_this3.flag = true;
}
});
} else {
this.$toolAll.tools.showToast('请选择支付方式');
}
}
},
// 调用微信支付
2022-08-01 09:46:21 +00:00
callPayMent: function callPayMent(data, id, coding) {var _this4 = this;
2022-07-31 02:14:22 +00:00
//调起支付
wx.requestPayment({
'timeStamp': data.timeStamp,
'nonceStr': data.nonceStr,
'package': data.package,
"signType": data.signType,
'paySign': data.sign,
'success': function success(res) {// 接口调用成功的回调函数
console.log('支付成功:', res);
2022-08-01 09:46:21 +00:00
// 成功状态
_this4.successEv(coding);
// 清除缓存
2022-07-31 02:14:22 +00:00
uni.removeStorageSync('addr_id');
2022-08-01 09:46:21 +00:00
// 页面跳转
2022-07-31 02:14:22 +00:00
uni.navigateTo({
2022-08-01 09:46:21 +00:00
url: "/pages/cart/finish?id=".concat(id) });
2022-07-31 02:14:22 +00:00
},
'fail': function fail(res) {// 接口调用失败的回调函数
2022-08-02 05:51:36 +00:00
_this4.$toolAll.tools.showToast('您已取消支付');
setTimeout(function () {
// 页面跳转
uni.navigateTo({
2022-08-02 12:01:54 +00:00
url: "/pagesA/order/order?index=1&backTag=backmy" });
2022-08-02 05:51:36 +00:00
}, 1000);
2022-07-31 02:14:22 +00:00
} });
2022-08-01 09:46:21 +00:00
},
// 成功状态
successEv: function successEv(coding) {var _this5 = this;
this.$requst.post('/api/order/paid', { order_coding: coding }).then(function (res) {
if (res.code == 0) {
console.log(res, '成功状态');
} else {
_this5.$toolAll.tools.showToast(res.msg);
}
});
2022-07-31 02:14:22 +00:00
} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
/***/ })
2022-08-03 03:30:25 +00:00
},[[39,"common/runtime","common/vendor"]]]);
2022-07-31 02:14:22 +00:00
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/cart/settlement.js.map