2909 lines
135 KiB
JavaScript
2909 lines
135 KiB
JavaScript
require('../common/vendor.js');(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pkgUpload/isbn-upload/index"],{
|
||
|
||
/***/ 249:
|
||
/*!****************************************************************************!*\
|
||
!*** D:/project/zhizhu/main.js?{"page":"pkgUpload%2Fisbn-upload%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 */ 30);
|
||
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
|
||
var _index = _interopRequireDefault(__webpack_require__(/*! ./pkgUpload/isbn-upload/index.vue */ 250));
|
||
// @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"]))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 250:
|
||
/*!*********************************************************!*\
|
||
!*** D:/project/zhizhu/pkgUpload/isbn-upload/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_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=2afdfd7b&scoped=true& */ 251);
|
||
/* harmony import */ var _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js& */ 253);
|
||
/* 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_id_2afdfd7b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.vue?vue&type=style&index=0&id=2afdfd7b&scoped=true&lang=css& */ 257);
|
||
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 41);
|
||
|
||
var renderjs
|
||
|
||
|
||
|
||
|
||
|
||
/* normalize component */
|
||
|
||
var component = Object(_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_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
|
||
_index_vue_vue_type_template_id_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
|
||
false,
|
||
null,
|
||
"2afdfd7b",
|
||
null,
|
||
false,
|
||
_index_vue_vue_type_template_id_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
|
||
renderjs
|
||
)
|
||
|
||
component.options.__file = "pkgUpload/isbn-upload/index.vue"
|
||
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 251:
|
||
/*!****************************************************************************************************!*\
|
||
!*** D:/project/zhizhu/pkgUpload/isbn-upload/index.vue?vue&type=template&id=2afdfd7b&scoped=true& ***!
|
||
\****************************************************************************************************/
|
||
/*! exports provided: render, staticRenderFns, recyclableRender, components */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=template&id=2afdfd7b&scoped=true& */ 252);
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
|
||
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
|
||
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
|
||
|
||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_template_id_2afdfd7b_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 252:
|
||
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
!*** ./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!D:/project/zhizhu/pkgUpload/isbn-upload/index.vue?vue&type=template&id=2afdfd7b&scoped=true& ***!
|
||
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||
/*! 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 = {
|
||
uPopup: function () {
|
||
return Promise.all(/*! import() | uni_modules/uview-ui/components/u-popup/u-popup */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uview-ui/components/u-popup/u-popup.vue */ 394))
|
||
},
|
||
uPicker: function () {
|
||
return Promise.all(/*! import() | uni_modules/uview-ui/components/u-picker/u-picker */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uview-ui/components/u-picker/u-picker")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uview-ui/components/u-picker/u-picker.vue */ 402))
|
||
},
|
||
}
|
||
} 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.currentTab === "isbn" ? _vm.fileList1.length : null
|
||
var g1 =
|
||
_vm.currentTab === "isbn"
|
||
? _vm.isScanning || _vm.fileList1.length > 0
|
||
: null
|
||
var g2 =
|
||
_vm.currentTab === "isbn"
|
||
? _vm.isScanning || _vm.fileList1.length > 0
|
||
: null
|
||
var g3 = _vm.currentTab === "isbn" ? _vm.fileList1.length : null
|
||
var g4 = _vm.currentTab === "isbn" ? _vm.fileList1.length : null
|
||
var g5 = _vm.currentTab === "isbn" ? _vm.fileList1.length : null
|
||
if (!_vm._isMounted) {
|
||
_vm.e0 = function ($event) {
|
||
_vm.popupDialog.showPicker = true
|
||
}
|
||
_vm.e1 = function ($event) {
|
||
_vm.popupDialog.showPicker = false
|
||
}
|
||
}
|
||
_vm.$mp.data = Object.assign(
|
||
{},
|
||
{
|
||
$root: {
|
||
g0: g0,
|
||
g1: g1,
|
||
g2: g2,
|
||
g3: g3,
|
||
g4: g4,
|
||
g5: g5,
|
||
},
|
||
}
|
||
)
|
||
}
|
||
var recyclableRender = false
|
||
var staticRenderFns = []
|
||
render._withStripped = true
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 253:
|
||
/*!**********************************************************************************!*\
|
||
!*** D:/project/zhizhu/pkgUpload/isbn-upload/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 _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_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__(/*! -!../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=script&lang=js& */ 254);
|
||
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_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(_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_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 _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_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 _HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_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"] = (_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_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);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 254:
|
||
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
!*** ./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!D:/project/zhizhu/pkgUpload/isbn-upload/index.vue?vue&type=script&lang=js& ***!
|
||
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* WEBPACK VAR INJECTION */(function(uni) {
|
||
|
||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
||
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = void 0;
|
||
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 36));
|
||
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
|
||
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 38));
|
||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
||
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
|
||
var _vuex = __webpack_require__(/*! vuex */ 43);
|
||
var _cryptoJs = _interopRequireDefault(__webpack_require__(/*! crypto-js */ 167));
|
||
var selectBookImage = _interopRequireWildcard(__webpack_require__(/*! @/service/selectBookImage.js */ 255));
|
||
var bookRecords = _interopRequireWildcard(__webpack_require__(/*! @/service/bookRecords.js */ 246));
|
||
var _upload = __webpack_require__(/*! @/utils/upload.js */ 256);
|
||
var _MemberBookCheck = __webpack_require__(/*! @/components/MemberBookCheck.js */ 221);
|
||
var _methods, _name$options$watch$c;
|
||
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; }
|
||
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 CameraUpload = function CameraUpload() {
|
||
Promise.all(/*! require.ensure | components/CameraUpload */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/CameraUpload")]).then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/CameraUpload.vue */ 410));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var TabBar = function TabBar() {
|
||
__webpack_require__.e(/*! require.ensure | components/TabBar */ "components/TabBar").then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/TabBar.vue */ 417));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var bcodeCamera = function bcodeCamera() {
|
||
__webpack_require__.e(/*! require.ensure | uni_modules/bcode-camera/components/bcode-camera/bcode-camera */ "uni_modules/bcode-camera/components/bcode-camera/bcode-camera").then((function () {
|
||
return resolve(__webpack_require__(/*! @/uni_modules/bcode-camera/components/bcode-camera/bcode-camera.vue */ 424));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var PriceStockControl = function PriceStockControl() {
|
||
__webpack_require__.e(/*! require.ensure | components/PriceStockControl */ "components/PriceStockControl").then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/PriceStockControl.vue */ 431));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var BookConditionSelect = function BookConditionSelect() {
|
||
__webpack_require__.e(/*! require.ensure | components/BookConditionSelect */ "components/BookConditionSelect").then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/BookConditionSelect.vue */ 438));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var WarehouseSelector = function WarehouseSelector() {
|
||
__webpack_require__.e(/*! require.ensure | components/WarehouserSelector */ "components/WarehouserSelector").then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/WarehouserSelector.vue */ 445));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var BookProductList = function BookProductList() {
|
||
Promise.all(/*! require.ensure | components/BookProductList */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/BookProductList")]).then((function () {
|
||
return resolve(__webpack_require__(/*! @/components/BookProductList.vue */ 452));
|
||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||
};
|
||
var _default = (_name$options$watch$c = {
|
||
name: 'IsbnUpload',
|
||
// 添加页面配置
|
||
options: {
|
||
enablePullDownRefresh: true,
|
||
// 启用下拉刷新
|
||
backgroundTextStyle: 'dark'
|
||
},
|
||
watch: {
|
||
selectedWarehouse: {
|
||
handler: function handler(newVal) {
|
||
var _this = this;
|
||
if (newVal) {
|
||
// 重新拉取货架和货位数据
|
||
this.columns[0] = [newVal.name];
|
||
this.fetchShelves(newVal.id).then(function (shelves) {
|
||
if (shelves.length > 0) {
|
||
_this.columns[1] = shelves.map(function (item) {
|
||
return item.code;
|
||
});
|
||
_this.fetchLocations(shelves[0].id).then(function (locations) {
|
||
_this.columns[2] = locations.map(function (item) {
|
||
return item.code;
|
||
});
|
||
});
|
||
} else {
|
||
_this.columns[1] = [];
|
||
_this.columns[2] = [];
|
||
}
|
||
});
|
||
// 清空已选的货架、货位等
|
||
this.selectedStorage = '';
|
||
this.warehouse = '';
|
||
this.shelf = '';
|
||
this.location = '';
|
||
}
|
||
},
|
||
immediate: true
|
||
},
|
||
displayOnSaleProducts: {
|
||
handler: function handler(newProducts) {
|
||
if (newProducts && newProducts.length > 0) {
|
||
// 更新最低价格
|
||
this.lowestBookPrice = Math.min.apply(Math, (0, _toConsumableArray2.default)(newProducts.map(function (p) {
|
||
return parseFloat(p.bookPrice) || 0;
|
||
})));
|
||
this.lowestTotalPrice = Math.min.apply(Math, (0, _toConsumableArray2.default)(newProducts.map(function (p) {
|
||
return parseFloat(p.totalPrice) || 0;
|
||
})));
|
||
|
||
// 调用计算参考价格的方法
|
||
this.calculateReferencePrice();
|
||
}
|
||
},
|
||
immediate: true
|
||
}
|
||
},
|
||
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)('price', ['priceMode', 'priceType', 'averageRange', 'freight', 'minValue'])), (0, _vuex.mapState)('warehouse', ['selectedPosition'])),
|
||
components: {
|
||
"tab-bar": TabBar,
|
||
'bcode-camera': bcodeCamera,
|
||
"price-stock-control": PriceStockControl,
|
||
"camera-upload": CameraUpload,
|
||
"book-condition-select": BookConditionSelect,
|
||
"on-sale-products": BookProductList,
|
||
"warehouse-selector": WarehouseSelector
|
||
},
|
||
// 将selectBookImage挂载到组件实例上
|
||
created: function created() {
|
||
this.$selectBookImage = selectBookImage;
|
||
},
|
||
data: function data() {
|
||
var _ref;
|
||
return _ref = {
|
||
selectedWarehouse: null,
|
||
// 添加 selectedWarehouse
|
||
lowestBookPrice: 0,
|
||
lowestTotalPrice: 0,
|
||
currentTab: 'isbn',
|
||
// 默认显示ISBN上传
|
||
retype: false,
|
||
// 重输选项的状态
|
||
scanResult: null,
|
||
showSubmitButton: true,
|
||
// 控制提交按钮显示状态
|
||
isSaving: false,
|
||
saveSuccess: false,
|
||
saveError: null,
|
||
isScanning: false,
|
||
// 扫码状态变量
|
||
isSubmitting: false,
|
||
// 防止重复提交的状态变量
|
||
isUploading: false,
|
||
// 新增:用于跟踪图片是否正在上传
|
||
show: false,
|
||
popupShow: false,
|
||
isbn: '',
|
||
value4: 1.00,
|
||
value3: 1,
|
||
fileList1: [],
|
||
fileList: [],
|
||
uploadedImages: [],
|
||
// 存储上传成功的图片信息,用于提交表单时一并传递
|
||
selectedStorage: '',
|
||
warehouse: '',
|
||
shelf: '',
|
||
location: '',
|
||
bookPicPath: null,
|
||
// 新增变量用于存储图片路径
|
||
searchResults: [],
|
||
// 存储查询到的多条数据
|
||
showSearchDropdown: false,
|
||
// 控制下拉框显示
|
||
fixPrice: 1,
|
||
cameraRatio: '1:1',
|
||
// 默认相机比例为1:1
|
||
showCameraRatioPopup: false,
|
||
// 控制相机比例选择弹窗显示
|
||
compareType: 'isbn',
|
||
// 默认为ISBN比价
|
||
titleCompareResults: [],
|
||
// 存储书名比价结果示
|
||
showCamera: false,
|
||
// 控制bcode-camera组件的显示
|
||
searchBoxRef: null,
|
||
// 用于存储搜索框的引用
|
||
onSaleProducts: [],
|
||
// 存储所有在售商品信息用于筛选
|
||
displayOnSaleProducts: [],
|
||
// 存储按总价排序后的前十条在售商品信息用于展示
|
||
soldProducts: [],
|
||
// 存储已售商品信息
|
||
// 筛选相关变量
|
||
publisherOptions: [],
|
||
// 出版社选项
|
||
formattedData: [],
|
||
selectedCondition: '',
|
||
selectedConditionName: '',
|
||
authorOptions: [],
|
||
// 作者选项
|
||
press: '',
|
||
author: '',
|
||
// 书籍作者
|
||
pubDateText: '',
|
||
// 出版时间
|
||
filteredOnSaleProducts: [],
|
||
// 筛选后的在售商品
|
||
filteredSoldProducts: [],
|
||
// 筛选后的已售商品
|
||
isFiltered: false,
|
||
// 是否已应用筛选
|
||
publisherAuthorMap: new Map(),
|
||
// 出版社-作者关联映射
|
||
authorPublisherMap: new Map(),
|
||
// 作者-出版社关联映射
|
||
title: 'uni-fab',
|
||
directionStr: '水平',
|
||
horizontal: 'right',
|
||
vertical: 'bottom',
|
||
direction: 'horizontal',
|
||
pattern: {
|
||
color: '#7A7E83',
|
||
backgroundColor: '#fff',
|
||
selectedColor: '#007AFF',
|
||
buttonColor: '#007AFF',
|
||
iconColor: '#fff'
|
||
},
|
||
is_color_type: false
|
||
}, (0, _defineProperty2.default)(_ref, "selectedStorage", ''), (0, _defineProperty2.default)(_ref, "shelves", []), (0, _defineProperty2.default)(_ref, "locations", []), (0, _defineProperty2.default)(_ref, "LocalWarehouse", this.selectedWarehouse), (0, _defineProperty2.default)(_ref, "selectedSheId", null), (0, _defineProperty2.default)(_ref, "selectedFreId", null), (0, _defineProperty2.default)(_ref, "formData", {
|
||
isbn: '',
|
||
sku: '',
|
||
title: '',
|
||
art_no: '',
|
||
more: '',
|
||
bookName: ''
|
||
}), (0, _defineProperty2.default)(_ref, "columns", [[],
|
||
// 仓库列表
|
||
[],
|
||
// 货架列表
|
||
[] // 货位列表
|
||
]), (0, _defineProperty2.default)(_ref, "warehouseShelvesData", {}), (0, _defineProperty2.default)(_ref, "shelfLocationsData", {}), (0, _defineProperty2.default)(_ref, "marketTags", [{
|
||
label: '在售:',
|
||
value: 0
|
||
}, {
|
||
label: '旧:',
|
||
value: 0
|
||
}, {
|
||
label: '新:',
|
||
value: 0
|
||
}, {
|
||
label: '已售:',
|
||
value: 0
|
||
}]), (0, _defineProperty2.default)(_ref, "popupDialog", {
|
||
show: false,
|
||
title: '',
|
||
content: '',
|
||
confirmText: '',
|
||
cancelText: '',
|
||
imgSrc: '',
|
||
count: 0,
|
||
subFormData: null,
|
||
showPicker: false,
|
||
selectedSeries: '',
|
||
seriesOptions: ['B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N']
|
||
}), (0, _defineProperty2.default)(_ref, "hasShownUploadMessage", false), (0, _defineProperty2.default)(_ref, "categoryList", []), (0, _defineProperty2.default)(_ref, "categoryOptions2", []), (0, _defineProperty2.default)(_ref, "categoryOptions3", []), (0, _defineProperty2.default)(_ref, "categoryLevel1", null), (0, _defineProperty2.default)(_ref, "categoryLevel2", null), (0, _defineProperty2.default)(_ref, "categoryLevel3", null), (0, _defineProperty2.default)(_ref, "selectedCategoryId", ''), (0, _defineProperty2.default)(_ref, "categoryIndexes", []), (0, _defineProperty2.default)(_ref, "maxCategoryLevel", 6), (0, _defineProperty2.default)(_ref, "categoryPathText", ''), (0, _defineProperty2.default)(_ref, "categoryColumns", []), (0, _defineProperty2.default)(_ref, "categoryLevels", []), (0, _defineProperty2.default)(_ref, "kfzBookPic", ''), _ref;
|
||
}
|
||
}, (0, _defineProperty2.default)(_name$options$watch$c, "watch", {
|
||
displayOnSaleProducts: {
|
||
handler: function handler(newProducts) {
|
||
if (newProducts && newProducts.length > 0) {
|
||
// 更新最低价格
|
||
this.lowestBookPrice = Math.min.apply(Math, (0, _toConsumableArray2.default)(newProducts.map(function (p) {
|
||
return parseFloat(p.bookPrice) || 0;
|
||
})));
|
||
this.lowestTotalPrice = Math.min.apply(Math, (0, _toConsumableArray2.default)(newProducts.map(function (p) {
|
||
return parseFloat(p.totalPrice) || 0;
|
||
})));
|
||
|
||
// 调用计算参考价格的方法
|
||
this.calculateReferencePrice();
|
||
}
|
||
},
|
||
immediate: true
|
||
},
|
||
// 监听价格模式和类型变化,重新计算价格
|
||
priceMode: {
|
||
handler: function handler() {
|
||
this.calculateReferencePrice();
|
||
}
|
||
},
|
||
priceType: {
|
||
handler: function handler() {
|
||
this.calculateReferencePrice();
|
||
}
|
||
},
|
||
averageRange: {
|
||
handler: function handler() {
|
||
this.calculateReferencePrice();
|
||
}
|
||
},
|
||
freight: {
|
||
handler: function handler() {
|
||
this.calculateReferencePrice();
|
||
}
|
||
},
|
||
minValue: {
|
||
handler: function handler() {
|
||
this.calculateReferencePrice();
|
||
}
|
||
},
|
||
selectedPosition: {
|
||
handler: function handler() {
|
||
this.calculateReferencePrice();
|
||
}
|
||
}
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "onLoad", function onLoad() {
|
||
var _this2 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||
var phoneNumber, warehouse;
|
||
return _regenerator.default.wrap(function _callee$(_context) {
|
||
while (1) {
|
||
switch (_context.prev = _context.next) {
|
||
case 0:
|
||
console.log('=== onLoad 方法被调用 ===');
|
||
phoneNumber = uni.getStorageSync('phoneNumber');
|
||
warehouse = uni.getStorageSync("selectedWarehouse");
|
||
console.log('选择仓库11111:', warehouse);
|
||
|
||
// 先设置 selectedWarehouse,触发 warehouse-selector 组件渲染
|
||
if (warehouse) {
|
||
_this2.selectedWarehouse = warehouse;
|
||
_this2.columns[0] = [warehouse.name]; // 假设仓库对象有name字段
|
||
}
|
||
|
||
// 使用 setTimeout 等待 warehouse-selector 组件渲染完成后再加载货区选择状态
|
||
setTimeout(function () {
|
||
_this2.loadStorageSelection();
|
||
}, 100);
|
||
_context.next = 8;
|
||
return _this2.fetchCategoryData();
|
||
case 8:
|
||
console.log("分类数据获取成功:", _this2.categoryList);
|
||
case 9:
|
||
case "end":
|
||
return _context.stop();
|
||
}
|
||
}
|
||
}, _callee);
|
||
}))();
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "onShow", function onShow() {
|
||
var _this3 = this;
|
||
console.log('=== onShow 方法被调用 ===');
|
||
// 检查本地存储中是否有更新的仓库信息
|
||
var warehouse = uni.getStorageSync("selectedWarehouse");
|
||
console.log("warehouse", warehouse);
|
||
|
||
// 先设置 selectedWarehouse,再加载货区选择状态
|
||
if (warehouse) {
|
||
console.log('从存储获取仓库信息:', warehouse);
|
||
// 设置仓库对象以便传递给组件
|
||
this.selectedWarehouse = warehouse;
|
||
}
|
||
|
||
// 使用 setTimeout 等待组件渲染后再加载货区选择状态
|
||
setTimeout(function () {
|
||
_this3.loadStorageSelection();
|
||
}, 100);
|
||
|
||
// 新增:每次页面显示都拉取分类
|
||
console.log('onShow: 开始调用fetchCategoryData');
|
||
this.fetchCategoryData().then(function () {
|
||
console.log('onShow: fetchCategoryData执行完成');
|
||
}).catch(function (error) {
|
||
console.error('onShow: fetchCategoryData执行失败:', error);
|
||
});
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "mounted", function mounted() {
|
||
var _this4 = this;
|
||
// 不在这里调用 loadStorageSelection,因为 v-if 导致组件渲染延迟
|
||
// 使用 setTimeout 等待组件渲染完成后再调用
|
||
setTimeout(function () {
|
||
_this4.loadStorageSelection();
|
||
}, 100);
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "onReady", function onReady() {
|
||
// console.log('=== onReady 方法被调用 ===');
|
||
// 在uni-app中,我们可以使用页面级别的点击事件
|
||
// 这里不需要添加全局事件监听器,我们将在模板中使用@click事件
|
||
|
||
// 手动触发分类数据获取
|
||
// console.log('onReady: 手动触发fetchCategoryData');
|
||
this.fetchCategoryData().then(function () {
|
||
// console.log('onReady: fetchCategoryData执行完成');
|
||
}).catch(function (error) {
|
||
console.error('onReady: fetchCategoryData执行失败:', error);
|
||
});
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "onUnload", function onUnload() {
|
||
// 在uni-app中,我们不需要手动移除事件监听器
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "onBackPress", function onBackPress() {
|
||
if (this.$refs.fab.isShow) {
|
||
this.$refs.fab.close();
|
||
return true;
|
||
}
|
||
return false;
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "onPullDownRefresh", function onPullDownRefresh() {
|
||
console.log('触发下拉刷新');
|
||
try {
|
||
this.resetPageData();
|
||
uni.showToast({
|
||
title: '刷新成功',
|
||
icon: 'success',
|
||
duration: 1500
|
||
});
|
||
} catch (error) {
|
||
console.error('刷新失败:', error);
|
||
uni.showToast({
|
||
title: '刷新失败',
|
||
icon: 'none',
|
||
duration: 1500
|
||
});
|
||
} finally {
|
||
// 停止下拉刷新动画
|
||
setTimeout(function () {
|
||
uni.stopPullDownRefresh();
|
||
}, 500);
|
||
}
|
||
}), (0, _defineProperty2.default)(_name$options$watch$c, "methods", (_methods = {
|
||
// 停留在ISBN上传页面
|
||
stayOnIsbn: function stayOnIsbn() {
|
||
// 已在当前页面,不做任何操作
|
||
},
|
||
// 切换到无ISBN上传页面
|
||
switchToPhoto: function switchToPhoto() {
|
||
uni.redirectTo({
|
||
url: '/pkgUpload/photo-upload/index'
|
||
});
|
||
},
|
||
// 获取货架列表
|
||
fetchShelves: function fetchShelves(depotId) {
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
||
var _res$data, response, _ref2, _ref3, err, res;
|
||
return _regenerator.default.wrap(function _callee2$(_context2) {
|
||
while (1) {
|
||
switch (_context2.prev = _context2.next) {
|
||
case 0:
|
||
_context2.prev = 0;
|
||
_context2.next = 3;
|
||
return uni.request({
|
||
url: 'https://api.buzhiyushu.cn/shelves/shelves/sheNamelist',
|
||
data: {
|
||
depotId: depotId
|
||
}
|
||
});
|
||
case 3:
|
||
response = _context2.sent;
|
||
_ref2 = Array.isArray(response) ? response : [null, response], _ref3 = (0, _slicedToArray2.default)(_ref2, 2), err = _ref3[0], res = _ref3[1];
|
||
if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.rows) {
|
||
_context2.next = 8;
|
||
break;
|
||
}
|
||
console.error('获取货架数据失败,返回空数据');
|
||
return _context2.abrupt("return", []);
|
||
case 8:
|
||
return _context2.abrupt("return", res.data.rows);
|
||
case 11:
|
||
_context2.prev = 11;
|
||
_context2.t0 = _context2["catch"](0);
|
||
console.error('获取货架失败:', _context2.t0);
|
||
return _context2.abrupt("return", []);
|
||
case 15:
|
||
case "end":
|
||
return _context2.stop();
|
||
}
|
||
}
|
||
}, _callee2, null, [[0, 11]]);
|
||
}))();
|
||
},
|
||
// 获取货位列表
|
||
fetchLocations: function fetchLocations(sheId) {
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||
var response, _ref4, _ref5, err, res;
|
||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||
while (1) {
|
||
switch (_context3.prev = _context3.next) {
|
||
case 0:
|
||
if (sheId) {
|
||
_context3.next = 3;
|
||
break;
|
||
}
|
||
console.error('获取货位列表失败:未提供货架ID');
|
||
return _context3.abrupt("return", []);
|
||
case 3:
|
||
_context3.prev = 3;
|
||
_context3.next = 6;
|
||
return uni.request({
|
||
url: 'https://api.buzhiyushu.cn/shelves/shelves/freNamelist',
|
||
method: 'GET',
|
||
data: {
|
||
sheId: sheId
|
||
}
|
||
});
|
||
case 6:
|
||
response = _context3.sent;
|
||
_ref4 = Array.isArray(response) ? response : [null, response], _ref5 = (0, _slicedToArray2.default)(_ref4, 2), err = _ref5[0], res = _ref5[1];
|
||
if (!(!res || !res.data || !res.data.rows)) {
|
||
_context3.next = 11;
|
||
break;
|
||
}
|
||
console.error('货位响应数据格式不正确');
|
||
return _context3.abrupt("return", []);
|
||
case 11:
|
||
return _context3.abrupt("return", res.data.rows);
|
||
case 14:
|
||
_context3.prev = 14;
|
||
_context3.t0 = _context3["catch"](3);
|
||
console.error('获取货位失败:', _context3.t0);
|
||
return _context3.abrupt("return", []);
|
||
case 18:
|
||
case "end":
|
||
return _context3.stop();
|
||
}
|
||
}
|
||
}, _callee3, null, [[3, 14]]);
|
||
}))();
|
||
},
|
||
// 从本地存储加载货区选择状态
|
||
loadStorageSelection: function loadStorageSelection() {
|
||
var _this5 = this;
|
||
try {
|
||
// 只有在选择了仓库的情况下才加载货区状态
|
||
if (!this.selectedWarehouse || !this.selectedWarehouse.id) {
|
||
console.log('ISBN页面:未选择仓库,不加载货区状态');
|
||
return;
|
||
}
|
||
|
||
// 根据仓库ID加载对应的货区状态
|
||
var storageKey = "selectedStorageData_".concat(this.selectedWarehouse.id);
|
||
var storageData = uni.getStorageSync(storageKey);
|
||
if (storageData) {
|
||
console.log("ISBN\u9875\u9762\u52A0\u8F7D\u4ED3\u5E93".concat(this.selectedWarehouse.id, "\u7684\u8D27\u533A\u9009\u62E9\u72B6\u6001:"), storageData);
|
||
this.selectedStorage = storageData.selectedStorage || '';
|
||
this.warehouse = storageData.warehouse || '';
|
||
this.shelf = storageData.shelf || '';
|
||
this.location = storageData.location || '';
|
||
this.selectedSheId = storageData.selectedSheId || null;
|
||
this.selectedFreId = storageData.selectedFreId || null;
|
||
|
||
// 使用$nextTick确保组件已经渲染完成
|
||
this.$nextTick(function () {
|
||
// 如果有货区选择器组件的引用,也更新它的状态
|
||
if (_this5.$refs.warehouseSelector) {
|
||
// 转换数据格式以匹配updateSelectedStorage方法的期望格式
|
||
var formattedData = {
|
||
storage: storageData.selectedStorage,
|
||
warehouse: storageData.warehouse,
|
||
shelf: storageData.shelf,
|
||
location: storageData.location,
|
||
shelfId: storageData.selectedSheId,
|
||
locationId: storageData.selectedFreId
|
||
};
|
||
_this5.$refs.warehouseSelector.updateSelectedStorage(formattedData);
|
||
console.log('已更新WarehouserSelector组件状态:', formattedData);
|
||
} else {
|
||
console.warn('WarehouserSelector组件引用不存在');
|
||
}
|
||
});
|
||
} else {
|
||
console.log("ISBN\u9875\u9762\uFF1A\u4ED3\u5E93".concat(this.selectedWarehouse.id, "\u6CA1\u6709\u4FDD\u5B58\u7684\u8D27\u533A\u72B6\u6001"));
|
||
}
|
||
} catch (error) {
|
||
console.error('ISBN页面加载货区选择状态失败:', error);
|
||
}
|
||
},
|
||
// 添加重置数据的方法
|
||
resetPageData: function resetPageData() {
|
||
console.log('子组件resetPageData被调用');
|
||
|
||
// 保存当前的货区选择
|
||
var currentWarehouse = this.warehouse;
|
||
var currentShelf = this.shelf;
|
||
var currentLocation = this.location;
|
||
var currentSelectedStorage = this.selectedStorage;
|
||
|
||
// 清空所有数据
|
||
this.scanResult = ''; // 清空ISBN
|
||
this.kfzBookPic = ''; // 清空孔夫子图书官图
|
||
this.formData = {
|
||
isbn: '',
|
||
sku: '',
|
||
title: '',
|
||
art_no: '',
|
||
more: '',
|
||
bookName: ''
|
||
}; // 清空表单数据
|
||
this.value4 = 1.00; // 重置价格
|
||
this.value3 = 1; // 重置库存
|
||
this.fileList1 = []; // 清空文件列表
|
||
this.uploadedImages = []; // 清空上传图片数组
|
||
this.hasShownUploadMessage = false; // 重置上传消息标记
|
||
|
||
// 重置市场标签
|
||
this.marketTags = [{
|
||
label: '在售:',
|
||
value: 0
|
||
}, {
|
||
label: '旧:',
|
||
value: 0
|
||
}, {
|
||
label: '新:',
|
||
value: 0
|
||
}, {
|
||
label: '已售:',
|
||
value: 0
|
||
}];
|
||
|
||
// 恢复货区选择
|
||
this.warehouse = currentWarehouse;
|
||
this.shelf = currentShelf;
|
||
this.location = currentLocation;
|
||
this.selectedStorage = currentSelectedStorage;
|
||
|
||
// 重置在售商品列表
|
||
if (this.$refs.onSaleProductsComponent) {
|
||
this.$refs.onSaleProductsComponent.updateProducts([]);
|
||
this.$refs.onSaleProductsComponent.setCompareType('isbn');
|
||
}
|
||
|
||
// 重置品相选择
|
||
if (this.$refs.conditionSelect) {
|
||
// 尝试使用resetSelection方法
|
||
if (typeof this.$refs.conditionSelect.resetSelection === 'function') {
|
||
this.$refs.conditionSelect.resetSelection();
|
||
}
|
||
}
|
||
|
||
// 强制更新视图
|
||
this.$forceUpdate();
|
||
console.log('数据重置完成,当前状态:', {
|
||
scanResult: this.scanResult,
|
||
bookName: this.formData.bookName,
|
||
fileList1Length: this.fileList1.length
|
||
});
|
||
return Promise.resolve('重置完成');
|
||
},
|
||
// 获取图书分类数据
|
||
fetchCategoryData: function fetchCategoryData() {
|
||
var _this6 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
||
var cookies, res, responseData;
|
||
return _regenerator.default.wrap(function _callee4$(_context4) {
|
||
while (1) {
|
||
switch (_context4.prev = _context4.next) {
|
||
case 0:
|
||
_context4.prev = 0;
|
||
// console.log('开始获取分类数据...');
|
||
// 获取cookies作为token
|
||
cookies = uni.getStorageSync('cookies'); // console.log('获取到的cookies:', cookies);
|
||
if (cookies) {
|
||
_context4.next = 6;
|
||
break;
|
||
}
|
||
console.error('获取分类失败: 未找到cookies');
|
||
uni.showToast({
|
||
title: '请先登录孔网账号再进行操作',
|
||
icon: 'none',
|
||
duration: 3000
|
||
});
|
||
return _context4.abrupt("return");
|
||
case 6:
|
||
_context4.next = 8;
|
||
return uni.request({
|
||
url: 'https://api.buzhiyushu.cn/api/kongfz/getCategory',
|
||
method: 'GET',
|
||
data: {
|
||
token: cookies
|
||
},
|
||
header: {
|
||
'Content-Type': 'application/json'
|
||
}
|
||
});
|
||
case 8:
|
||
res = _context4.sent;
|
||
uni.hideLoading();
|
||
// console.log('分类数据API响应:', res);
|
||
// console.log('响应状态码:', res.statusCode);
|
||
|
||
// 处理返回的数据,兼容不同格式
|
||
responseData = Array.isArray(res) ? res[1].data : res.data; // console.log('处理后的responseData:', responseData);
|
||
if (responseData && responseData.successResponse) {
|
||
// 保存完整的分类数据
|
||
_this6.categoryList = responseData.successResponse;
|
||
// console.log('分类数据获取成功,开始初始化选择器');
|
||
_this6.initCategoryPicker();
|
||
// console.log('分类数据获取成功:', this.categoryList);
|
||
} else {
|
||
console.error('获取分类数据失败, 响应不符合预期:', responseData);
|
||
// console.log('responseData类型:', typeof responseData);
|
||
// console.log('responseData内容:', JSON.stringify(responseData));
|
||
uni.showToast({
|
||
title: '获取分类数据失败',
|
||
icon: 'none',
|
||
duration: 2000
|
||
});
|
||
}
|
||
_context4.next = 19;
|
||
break;
|
||
case 14:
|
||
_context4.prev = 14;
|
||
_context4.t0 = _context4["catch"](0);
|
||
uni.hideLoading();
|
||
// console.error('获取分类数据异常:', error);
|
||
console.error('错误详情:', _context4.t0.message);
|
||
uni.showToast({
|
||
title: '获取分类数据失败',
|
||
icon: 'none',
|
||
duration: 2000
|
||
});
|
||
case 19:
|
||
case "end":
|
||
return _context4.stop();
|
||
}
|
||
}
|
||
}, _callee4, null, [[0, 14]]);
|
||
}))();
|
||
},
|
||
handleCameraStatusChange: function handleCameraStatusChange(isCameraOpen) {
|
||
// 当相机打开时隐藏提交按钮,关闭时显示
|
||
this.showSubmitButton = !isCameraOpen;
|
||
},
|
||
// 切换比价按钮
|
||
handleCompareTypeChange: function handleCompareTypeChange(payload) {
|
||
var _this7 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
||
var keyword;
|
||
return _regenerator.default.wrap(function _callee5$(_context5) {
|
||
while (1) {
|
||
switch (_context5.prev = _context5.next) {
|
||
case 0:
|
||
// console.log("payload", payload)
|
||
_this7.compareType = payload.type;
|
||
if (payload.type === 'isbn') {
|
||
_this7.scanResult = payload.value;
|
||
} else {
|
||
_this7.formData.bookName = payload.value;
|
||
}
|
||
// console.log(`比较类型已切换为: ${payload.type}`);
|
||
// console.log(`当前搜索值: ${payload.value}`);
|
||
keyword = payload.type === 'isbn' ? _this7.scanResult : _this7.formData.bookName;
|
||
_context5.next = 5;
|
||
return _this7.fetchOnSaleProducts(keyword);
|
||
case 5:
|
||
_this7.isLoading = false;
|
||
case 6:
|
||
case "end":
|
||
return _context5.stop();
|
||
}
|
||
}
|
||
}, _callee5);
|
||
}))();
|
||
},
|
||
handleStorageSelected: function handleStorageSelected(data) {
|
||
// console.log('选择的货区数据:', data);
|
||
this.selectedStorage = data.storage;
|
||
this.warehouse = data.warehouse;
|
||
this.shelf = data.shelf;
|
||
this.location = data.location;
|
||
this.selectedSheId = data.shelfId;
|
||
this.selectedFreId = data.locationId;
|
||
|
||
// 将ID存储到本地
|
||
uni.setStorageSync('warehouseId', this.selectedWarehouse.id); // 仓库ID
|
||
uni.setStorageSync('shelfId', data.shelfId); // 货架ID
|
||
uni.setStorageSync('locationId', data.locationId); // 货位ID
|
||
},
|
||
// 处理筛选结果
|
||
handleFiltersApplied: function handleFiltersApplied(filteredProducts) {
|
||
this.filteredOnSaleProducts = filteredProducts;
|
||
this.isFiltered = true;
|
||
},
|
||
// 处理筛选重置
|
||
handleFiltersReset: function handleFiltersReset() {
|
||
this.isFiltered = false;
|
||
},
|
||
// 处理产品数据更新
|
||
handleProductsUpdated: function handleProductsUpdated(products) {
|
||
this.displayOnSaleProducts = products;
|
||
// 如果需要,可以在这里更新最低价格并重新计算参考价格
|
||
this.calculateReferencePrice();
|
||
},
|
||
// 获取在售商品信息
|
||
fetchOnSaleProducts: function fetchOnSaleProducts(keyword) {
|
||
var _this8 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
||
var conditionValue, sortType, cookies, mockData, blockedShopsStr, blockedShops, filteredData;
|
||
return _regenerator.default.wrap(function _callee6$(_context6) {
|
||
while (1) {
|
||
switch (_context6.prev = _context6.next) {
|
||
case 0:
|
||
_context6.prev = 0;
|
||
conditionValue = uni.getStorageSync("conditionValue");
|
||
sortType = 7;
|
||
console.log("sortType", sortType);
|
||
// 获取最新的cookies
|
||
cookies = uni.getStorageSync('UserInfoCookies'); // 如果cookies不存在,尝试从cookies字段获取
|
||
if (!cookies) {
|
||
cookies = uni.getStorageSync('cookies');
|
||
console.log('从cookies字段获取:', cookies);
|
||
}
|
||
|
||
// 如果仍然没有,显示提示
|
||
if (cookies) {
|
||
_context6.next = 9;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请先在设置页面登录孔网账号',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return _context6.abrupt("return");
|
||
case 9:
|
||
_context6.next = 11;
|
||
return _this8.$selectBookImage.fetchOnSaleProducts(keyword, sortType, conditionValue, cookies);
|
||
case 11:
|
||
mockData = _context6.sent;
|
||
// 获取屏蔽店铺列表
|
||
blockedShopsStr = uni.getStorageSync('blockedShops') || '';
|
||
blockedShops = blockedShopsStr.split(';').filter(function (shop) {
|
||
return shop.trim() !== '';
|
||
}); // 过滤掉屏蔽的店铺
|
||
filteredData = mockData.filter(function (product) {
|
||
return !blockedShops.some(function (shop) {
|
||
return product.shopName && product.shopName.includes(shop.trim());
|
||
});
|
||
}); // 保存所有数据用于筛选
|
||
_this8.onSaleProducts = (0, _toConsumableArray2.default)(filteredData);
|
||
|
||
// 通过组件引用更新数据
|
||
if (_this8.$refs.onSaleProductsComponent) {
|
||
_this8.$refs.onSaleProductsComponent.updateProducts(_this8.onSaleProducts);
|
||
}
|
||
|
||
// console.log('获取在售商品信息成功(已过滤屏蔽店铺)');
|
||
|
||
// 计算参考价格
|
||
_this8.calculateReferencePrice();
|
||
_context6.next = 24;
|
||
break;
|
||
case 20:
|
||
_context6.prev = 20;
|
||
_context6.t0 = _context6["catch"](0);
|
||
console.error('获取在售商品信息失败:', _context6.t0);
|
||
uni.showToast({
|
||
title: '获取在售商品信息失败',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
case 24:
|
||
case "end":
|
||
return _context6.stop();
|
||
}
|
||
}
|
||
}, _callee6, null, [[0, 20]]);
|
||
}))();
|
||
},
|
||
onConditionChange: function onConditionChange(index, conditionName) {
|
||
// console.log('品相已选择:', index);
|
||
// console.log('选中的品相名称:', conditionName);
|
||
|
||
// 保存选中的品相名称,用于表单提交
|
||
this.selectedConditionName = conditionName;
|
||
},
|
||
handleTabChange: function handleTabChange(tab) {
|
||
if (tab === this.currentTab) return;
|
||
if (tab === 'title') {
|
||
// 跳转到仅书名上传页面
|
||
uni.navigateTo({
|
||
url: '/pkgUpload/title-upload/index'
|
||
});
|
||
}
|
||
},
|
||
handleFileChange: function handleFileChange(newFileList) {
|
||
this.fileList1 = newFileList;
|
||
console.log("fileList1111111", this.fileList1);
|
||
|
||
// 当有图片上传时,添加提示
|
||
if (this.fileList1.length > 0 && !this.hasShownUploadMessage) {
|
||
uni.showToast({
|
||
title: '已上传图片,ISBN和书名不可修改',
|
||
icon: 'none',
|
||
duration: 2000
|
||
});
|
||
this.hasShownUploadMessage = true;
|
||
} else if (this.fileList1.length === 0) {
|
||
this.hasShownUploadMessage = false;
|
||
}
|
||
|
||
// 检查是否有文件正在上传
|
||
this.isUploading = newFileList.some(function (file) {
|
||
return file.status === 'uploading';
|
||
});
|
||
console.log('图片上传状态:', this.isUploading ? '上传中' : '未上传');
|
||
},
|
||
// 获取上书记录
|
||
getBookRecords: function getBookRecords() {
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
||
var phoneNumber, records;
|
||
return _regenerator.default.wrap(function _callee7$(_context7) {
|
||
while (1) {
|
||
switch (_context7.prev = _context7.next) {
|
||
case 0:
|
||
_context7.prev = 0;
|
||
// 从本地存储获取手机号
|
||
phoneNumber = uni.getStorageSync('phoneNumber');
|
||
if (phoneNumber) {
|
||
_context7.next = 5;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请先登录',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return _context7.abrupt("return");
|
||
case 5:
|
||
// 显示加载提示
|
||
uni.showLoading({
|
||
title: '加载中...'
|
||
});
|
||
_context7.prev = 6;
|
||
_context7.next = 9;
|
||
return bookRecords.fetchBookRecords(phoneNumber);
|
||
case 9:
|
||
records = _context7.sent;
|
||
console.log("1111", records);
|
||
if (!(!records || records.length === 0)) {
|
||
_context7.next = 14;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '暂无上书记录',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return _context7.abrupt("return");
|
||
case 14:
|
||
// 跳转到上书记录页面并传递数据
|
||
uni.navigateTo({
|
||
url: '/pkgUser/book-records',
|
||
success: function success(res) {
|
||
// 向打开的页面传递数据
|
||
res.eventChannel.emit('bookRecordsData', {
|
||
records: records
|
||
});
|
||
}
|
||
});
|
||
case 15:
|
||
_context7.prev = 15;
|
||
// 确保在任何情况下都隐藏加载提示
|
||
uni.hideLoading();
|
||
return _context7.finish(15);
|
||
case 18:
|
||
_context7.next = 24;
|
||
break;
|
||
case 20:
|
||
_context7.prev = 20;
|
||
_context7.t0 = _context7["catch"](0);
|
||
console.error('获取上书记录失败:', _context7.t0);
|
||
uni.showToast({
|
||
title: _context7.t0.message || '获取上书记录失败',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
case 24:
|
||
case "end":
|
||
return _context7.stop();
|
||
}
|
||
}
|
||
}, _callee7, null, [[0, 20], [6,, 15, 18]]);
|
||
}))();
|
||
},
|
||
cancel: function cancel() {
|
||
this.show = false;
|
||
},
|
||
// 添加open和close方法
|
||
open: function open() {
|
||
// 打开弹出层时的处理逻辑
|
||
console.log('弹出层打开');
|
||
this.popupShow = true;
|
||
},
|
||
close: function close() {
|
||
// 关闭弹出层时的处理逻辑
|
||
this.popupShow = false;
|
||
console.log('弹出层关闭');
|
||
},
|
||
// 处理字母选择确认事件
|
||
onSeriesConfirm: function onSeriesConfirm(e) {
|
||
this.popupDialog.selectedSeries = e.value[0];
|
||
this.popupDialog.showPicker = false;
|
||
},
|
||
submitForm: function submitForm() {
|
||
var _this9 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
||
var lastSubmitTime, currentTime, timeDiff, twoHours, canUpload, warehouse, shelf, location, userId, selectedCondition, temporaryImages, i, file, result, invalidImages, problemImageNumbers, errorMessage, sellCountTag, buyCountTag, sellCount, buyCount, formData;
|
||
return _regenerator.default.wrap(function _callee8$(_context8) {
|
||
while (1) {
|
||
switch (_context8.prev = _context8.next) {
|
||
case 0:
|
||
// 检查提交时间间隔
|
||
lastSubmitTime = uni.getStorageSync('lastSubmitTime');
|
||
currentTime = Date.now();
|
||
if (!lastSubmitTime) {
|
||
_context8.next = 9;
|
||
break;
|
||
}
|
||
timeDiff = currentTime - lastSubmitTime;
|
||
twoHours = 2 * 60 * 60 * 1000; // 2小时的毫秒数
|
||
if (!(timeDiff > twoHours)) {
|
||
_context8.next = 9;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '登录已过期,请重新登录',
|
||
icon: 'none',
|
||
duration: 2000
|
||
});
|
||
setTimeout(function () {
|
||
uni.navigateTo({
|
||
url: '/pages/login/index'
|
||
});
|
||
}, 2000);
|
||
return _context8.abrupt("return");
|
||
case 9:
|
||
// 更新最后提交时间
|
||
uni.setStorageSync('lastSubmitTime', currentTime);
|
||
|
||
// 检查用户是否可以上传书籍
|
||
_context8.next = 12;
|
||
return (0, _MemberBookCheck.checkMemberBooksCount)();
|
||
case 12:
|
||
canUpload = _context8.sent;
|
||
if (canUpload) {
|
||
_context8.next = 15;
|
||
break;
|
||
}
|
||
return _context8.abrupt("return");
|
||
case 15:
|
||
if (!_this9.isSubmitting) {
|
||
_context8.next = 17;
|
||
break;
|
||
}
|
||
return _context8.abrupt("return");
|
||
case 17:
|
||
// 设置提交状态为true
|
||
_this9.isSubmitting = true;
|
||
warehouse = _this9.warehouse; // console.log("warehouse", warehouse)
|
||
shelf = _this9.shelf; // console.log("shelf", shelf)
|
||
location = _this9.location; // console.log("location", location)
|
||
userId = uni.getStorageSync("userId"); // 根据当前选项卡进行表单验证
|
||
if (!(_this9.currentTab === 'isbn')) {
|
||
_context8.next = 37;
|
||
break;
|
||
}
|
||
if (_this9.scanResult) {
|
||
_context8.next = 27;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请扫码获取ISBN',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 27:
|
||
if (_this9.formData.bookName) {
|
||
_context8.next = 31;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请输入书名',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 31:
|
||
if (!(!warehouse && !shelf && !location)) {
|
||
_context8.next = 35;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请选择仓库/货架/货位',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 35:
|
||
_context8.next = 53;
|
||
break;
|
||
case 37:
|
||
if (_this9.formData2.bookName) {
|
||
_context8.next = 41;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请输入书名',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 41:
|
||
if (warehouse) {
|
||
_context8.next = 45;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请选择仓库/货架/货位',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 45:
|
||
if (shelf) {
|
||
_context8.next = 49;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请选择仓库/货架/货位',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 49:
|
||
if (location) {
|
||
_context8.next = 53;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请选择仓库/货架/货位',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 53:
|
||
// 检查是否选择了品相
|
||
selectedCondition = _this9.$refs.conditionSelect.getSelectedCondition();
|
||
if (selectedCondition) {
|
||
_context8.next = 58;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请选择品相',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 58:
|
||
if (!(_this9.fileList1.length > 0)) {
|
||
_context8.next = 107;
|
||
break;
|
||
}
|
||
if (!(_this9.fileList1.length > 0)) {
|
||
_context8.next = 67;
|
||
break;
|
||
}
|
||
// 检查是否有上传失败或者临时路径的图片
|
||
temporaryImages = [];
|
||
console.log("当前图片数据fileList1", _this9.fileList1);
|
||
_this9.fileList1.forEach(function (file, index) {
|
||
// 检查图片状态是否为error或者路径是临时路径
|
||
if (file.url && (file.url.startsWith('file://') || file.url.startsWith('blob:') || file.url.startsWith('wxfile://') || file.url.indexOf('tmp') !== -1)) {
|
||
temporaryImages.push(index + 1); // 索引从0开始,所以+1表示第几张
|
||
}
|
||
});
|
||
if (!(temporaryImages.length > 0)) {
|
||
_context8.next = 67;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: "\u7B2C".concat(temporaryImages.join('、'), "\u5F20\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u62CD\u7167,\u82E5\u4ECD\u7136\u5931\u8D25\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458!"),
|
||
icon: 'none',
|
||
duration: 4000
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
return _context8.abrupt("return");
|
||
case 67:
|
||
_context8.prev = 67;
|
||
// 显示上传中提示
|
||
uni.showLoading({
|
||
title: '正在上传图片...'
|
||
});
|
||
|
||
// 设置上传状态为true
|
||
_this9.isUploading = true;
|
||
|
||
// 上传所有图片
|
||
i = 0;
|
||
case 71:
|
||
if (!(i < _this9.fileList1.length)) {
|
||
_context8.next = 95;
|
||
break;
|
||
}
|
||
file = _this9.fileList1[i]; // 只上传状态为ready的图片
|
||
if (!(file.status === "ready")) {
|
||
_context8.next = 92;
|
||
break;
|
||
}
|
||
// 更新状态为上传中
|
||
_this9.fileList1.splice(i, 1, _objectSpread(_objectSpread({}, file), {}, {
|
||
status: "uploading",
|
||
message: "上传中"
|
||
}));
|
||
_context8.prev = 75;
|
||
_context8.next = 78;
|
||
return _this9.uploadFilePromise(file.url, i);
|
||
case 78:
|
||
result = _context8.sent;
|
||
console.log("图片上传result", result);
|
||
// 更新状态为上传成功
|
||
_this9.fileList1.splice(i, 1, _objectSpread(_objectSpread({}, file), {}, {
|
||
status: "success",
|
||
message: "",
|
||
url: result,
|
||
num: (i + 1).toString()
|
||
}));
|
||
_context8.next = 92;
|
||
break;
|
||
case 83:
|
||
_context8.prev = 83;
|
||
_context8.t0 = _context8["catch"](75);
|
||
console.error('图片上传失败:', _context8.t0);
|
||
// 更新状态为上传失败
|
||
_this9.fileList1.splice(i, 1, _objectSpread(_objectSpread({}, file), {}, {
|
||
status: "error",
|
||
message: "上传失败",
|
||
errorMessage: "\u7B2C".concat(i + 1, "\u5F20\u56FE\u7247\u4E0A\u4F20\u5931\u8D25")
|
||
}));
|
||
|
||
// 显示具体的错误提示
|
||
uni.showModal({
|
||
title: '图片上传失败',
|
||
content: "\u7B2C".concat(i + 1, "\u5F20\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u65B0\u4E0A\u4F20"),
|
||
showCancel: false,
|
||
confirmText: '我知道了'
|
||
});
|
||
|
||
// 重置提交状态
|
||
_this9.isSubmitting = false;
|
||
_this9.isUploading = false; // 重置上传状态
|
||
uni.hideLoading();
|
||
return _context8.abrupt("return");
|
||
case 92:
|
||
i++;
|
||
_context8.next = 71;
|
||
break;
|
||
case 95:
|
||
// 上传完成后,重置上传状态
|
||
_this9.isUploading = false;
|
||
uni.hideLoading();
|
||
_context8.next = 107;
|
||
break;
|
||
case 99:
|
||
_context8.prev = 99;
|
||
_context8.t1 = _context8["catch"](67);
|
||
console.error('图片上传过程出错:', _context8.t1);
|
||
uni.hideLoading();
|
||
uni.showToast({
|
||
title: '图片上传失败',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false;
|
||
_this9.isUploading = false; // 重置上传状态
|
||
return _context8.abrupt("return");
|
||
case 107:
|
||
// 最终验证:确保uploadedImages中没有临时路径
|
||
// console.log("uploadedImages",this.uploadedImages)
|
||
// console.log("fileList1",this.fileList1)
|
||
// const invalidImages = this.uploadedImages.filter(img => {
|
||
// return img.url && (
|
||
// img.url.startsWith('file://') ||
|
||
// img.url.startsWith('blob:') ||
|
||
// img.url.startsWith('wxfile://') ||
|
||
// img.url.indexOf('tmp') !== -1
|
||
// );
|
||
// });
|
||
invalidImages = [];
|
||
_this9.fileList1.forEach(function (img, index) {
|
||
if (img.url && (img.url.startsWith('file://') || img.url.startsWith('blob:') || img.url.startsWith('wxfile://') || img.url.indexOf('tmp') !== -1)) {
|
||
// 保存带索引的图片信息
|
||
invalidImages.push(_objectSpread(_objectSpread({}, img), {}, {
|
||
index: index
|
||
}));
|
||
}
|
||
});
|
||
if (!(invalidImages.length > 0)) {
|
||
_context8.next = 116;
|
||
break;
|
||
}
|
||
console.error('发现临时路径图片:', invalidImages);
|
||
|
||
// 构建详细的错误信息,告诉用户具体哪张图片有问题
|
||
problemImageNumbers = invalidImages.map(function (img) {
|
||
return img.index + 1;
|
||
}).join('、');
|
||
errorMessage = "\u7B2C".concat(problemImageNumbers, "\u5F20\u56FE\u7247\u4E0A\u4F20\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u8FD9\u4E9B\u56FE\u7247");
|
||
uni.showModal({
|
||
title: '图片上传异常',
|
||
content: errorMessage,
|
||
showCancel: false,
|
||
confirmText: '我知道了',
|
||
success: function success() {
|
||
// 可以在这里添加额外的处理逻辑,比如高亮显示有问题的图片
|
||
_this9.highlightProblemImages(invalidImages);
|
||
}
|
||
});
|
||
_this9.isSubmitting = false;
|
||
return _context8.abrupt("return");
|
||
case 116:
|
||
// 从marketTags中提取sellCount和buyCount
|
||
sellCountTag = _this9.marketTags.find(function (tag) {
|
||
return tag.label === '在售:';
|
||
});
|
||
buyCountTag = _this9.marketTags.find(function (tag) {
|
||
return tag.label === '已售:';
|
||
});
|
||
sellCount = sellCountTag ? sellCountTag.value : 0;
|
||
buyCount = buyCountTag ? buyCountTag.value : 0; // 收集ISBN上传数据
|
||
formData = {
|
||
barcode: _this9.scanResult,
|
||
// 正确绑定扫码结果
|
||
userId: userId,
|
||
name: _this9.formData.bookName,
|
||
// 书名
|
||
recommendation: _this9.formData.recommendation,
|
||
// 推荐语
|
||
conditionCode: selectedCondition.name,
|
||
price: _this9.value4 * 100,
|
||
// 商品售价
|
||
inventory: _this9.value3 || 1,
|
||
// 库存
|
||
files: _this9.fileList1,
|
||
// 只使用已成功上传的图片信息
|
||
marketTags: _this9.marketTags,
|
||
// 市场标签
|
||
sellCount: sellCount,
|
||
// 在售数量
|
||
buyCount: buyCount,
|
||
// 已售数量
|
||
author: _this9.author,
|
||
// 书籍作者
|
||
fixPrice: _this9.fixPrice * 100,
|
||
selectedStorage: _this9.selectedStorage,
|
||
// 仓库ID
|
||
depotName: _this9.warehouse,
|
||
// 仓库名称(需与后端字段名一致)
|
||
shelvesName: _this9.shelf,
|
||
// 货架名称
|
||
freightName: _this9.location,
|
||
// 自由区名称
|
||
phoneNumber: uni.getStorageSync('phoneNumber'),
|
||
// 从本地存储获取用户
|
||
passWord: uni.getStorageSync('password'),
|
||
// 从本地存储获取用户
|
||
tenantId: uni.getStorageSync('tenantId'),
|
||
// 从本地存储获取租户ID
|
||
userName: uni.getStorageSync('userName'),
|
||
// 从本地存储获取手机号
|
||
categoryId: _this9.selectedCategoryId || '' // 添加分类ID
|
||
}; // 根据当前选项卡打印对应数据
|
||
|
||
console.log('提交的表单数据:', formData);
|
||
// 先检查是否重复书籍
|
||
uni.request({
|
||
url: 'https://api.buzhiyushu.cn/zhishu/shopGoods/repeatBook',
|
||
method: 'POST',
|
||
data: formData,
|
||
header: {
|
||
'Content-Type': 'application/json'
|
||
},
|
||
success: function success(res) {
|
||
if (res.data.data && res.data.data.count != 0) {
|
||
// 如果是重复书籍,弹出确认框
|
||
var bookName = res.data.data && res.data.data.name ? res.data.data.name.trim() : ''; // 添加空值检查
|
||
// 1. MD5 32位加密(小写)
|
||
var md5Hash = _cryptoJs.default.MD5(bookName).toString(); // 输出 32 位小写十六进制字符串
|
||
// 2. 获取首字母并大写
|
||
var firstLetter = bookName ? md5Hash.charAt(0).toUpperCase() : '';
|
||
console.log('原始书名:', bookName);
|
||
console.log('MD5加密后(32位小写):', md5Hash);
|
||
console.log('加密后字符串的首字母大写:', firstLetter);
|
||
var imagePath = res.data.data && res.data.data.image ? res.data.data.image : '';
|
||
console.log("图片", imagePath);
|
||
// 拼接图片地址
|
||
var fullImageUrl = "https://img.buzhiyushu.cn/zhishu1/".concat(firstLetter, "/").concat(imagePath);
|
||
console.log("fullImageUrl", fullImageUrl);
|
||
// 根据count值动态设置下拉框的起始字母
|
||
var count = res.data.data && res.data.data.count ? res.data.data.count : 0;
|
||
var allLetters = ['B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N'];
|
||
// 如果count为1,从B开始;count为2,从C开始;以此类推
|
||
var startIndex = count > 0 ? count - 1 : 0;
|
||
if (startIndex >= 0 && startIndex < allLetters.length) {
|
||
// 从对应位置截取字母数组
|
||
_this9.popupDialog.seriesOptions = allLetters.slice(startIndex);
|
||
// 默认选中第一个字母(即对应count的字母)
|
||
_this9.popupDialog.selectedSeries = _this9.popupDialog.seriesOptions[0];
|
||
}
|
||
_this9.popupDialog.title = '提示';
|
||
_this9.popupDialog.content = '请仔细核对此书是否为套装书,一号多书等情况?请选择(否:增加库存 是:新增书籍)';
|
||
_this9.popupDialog.confirmText = '是';
|
||
_this9.popupDialog.cancelText = '否';
|
||
_this9.popupDialog.imgSrc = fullImageUrl;
|
||
_this9.popupDialog.show = true;
|
||
_this9.popupDialog.count = count || 0; // 添加默认值防止count为null
|
||
_this9.popupDialog.subFormData = formData;
|
||
} else {
|
||
// 不是重复书籍,直接提交
|
||
_this9.submitToServer(formData);
|
||
}
|
||
},
|
||
fail: function fail(err) {
|
||
console.error('检查重复书籍失败:', err);
|
||
uni.showToast({
|
||
title: '网络错误,请稍后重试',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_this9.isSubmitting = false; // 重置提交状态
|
||
}
|
||
});
|
||
case 123:
|
||
case "end":
|
||
return _context8.stop();
|
||
}
|
||
}
|
||
}, _callee8, null, [[67, 99], [75, 83]]);
|
||
}))();
|
||
},
|
||
onPopupConfirm: function onPopupConfirm() {
|
||
// 直接使用选择的字母作为series参数
|
||
this.popupDialog.subFormData.series = this.popupDialog.selectedSeries;
|
||
console.log("字母", this.popupDialog.subFormData.series);
|
||
// 继续提交流程
|
||
this.submitToServer(this.popupDialog.subFormData);
|
||
this.popupDialog.show = false;
|
||
},
|
||
onPopupCancel: function onPopupCancel() {
|
||
// 继续提交流程
|
||
this.submitToServer(this.popupDialog.subFormData);
|
||
this.popupDialog.show = false;
|
||
},
|
||
// 提交到服务器的方法
|
||
submitToServer: function submitToServer(formData) {
|
||
var _this10 = this;
|
||
uni.request({
|
||
url: 'https://api.buzhiyushu.cn/zhishu/shopGoods/submit',
|
||
// url: 'http://192.168.101.209:8080/zhishu/shopGoods/submit',
|
||
// url: 'http://192.168.101.127:8080/zhishu/shopGoods/submit',
|
||
method: 'POST',
|
||
data: formData,
|
||
header: {
|
||
'Content-Type': 'application/json'
|
||
},
|
||
complete: function complete() {
|
||
// 无论成功或失败,都重置提交状态
|
||
_this10.isSubmitting = false;
|
||
},
|
||
success: function success(res) {
|
||
console.log('请求成功1111:', res);
|
||
// 获取返回的id
|
||
var goosId = res.data.msg;
|
||
// console.log('返回的ID:', returnedId);
|
||
// 将id保存到本地存储
|
||
// uni.setStorageSync('lastSubmittedId', returnedId);
|
||
// 保存最后选择的位置信息
|
||
uni.setStorageSync('lastSelectedStorage', _this10.selectedStorage);
|
||
uni.setStorageSync('lastSelectedWarehouse', _this10.warehouse);
|
||
uni.setStorageSync('lastSelectedShelf', _this10.shelf);
|
||
uni.setStorageSync('lastSelectedLocation', _this10.location);
|
||
|
||
// 从第一个API响应中提取ID
|
||
var responseData = res.data.data;
|
||
var idsToPass = {
|
||
depotId: responseData.depotId,
|
||
freightId: responseData.freightId,
|
||
goodsId: responseData.goodsId,
|
||
shelvesId: responseData.shelvesId,
|
||
userId: responseData.userId,
|
||
artNo: responseData.artNo
|
||
};
|
||
_this10.syncBookToCenter(formData);
|
||
|
||
// 创建包含ID的新formData
|
||
var newFormData = _objectSpread(_objectSpread({}, formData), idsToPass);
|
||
console.log("newFormData", newFormData);
|
||
// 调用newadmin API
|
||
uni.request({
|
||
url: 'https://newadmin.buzhiyushu.cn/zhishu/shopGoods/submit',
|
||
// url: 'http://localhost:8089/zhishu/shopGoods/submit',
|
||
method: 'POST',
|
||
data: newFormData,
|
||
header: {
|
||
'Content-Type': 'application/json'
|
||
},
|
||
success: function success(newAdminRes) {
|
||
console.log('newadmin API请求成功:', newAdminRes);
|
||
},
|
||
fail: function fail(newAdminErr) {
|
||
console.error('newadmin API请求失败:', newAdminErr);
|
||
}
|
||
});
|
||
|
||
// 清空表单数据,但保留品相选择
|
||
if (_this10.currentTab === 'isbn') {
|
||
_this10.formData = {
|
||
bookName: '',
|
||
recommendation: ''
|
||
};
|
||
_this10.scanResult = '';
|
||
_this10.kfzBookPic = ''; // 清空孔夫子图书官图
|
||
} else {
|
||
_this10.formData2 = {
|
||
isbn: '',
|
||
bookName: '',
|
||
recommendation: ''
|
||
};
|
||
}
|
||
|
||
// 保持价格、库存和品相为用户选择的值
|
||
_this10.value4 = _this10.value4; // 保持价格
|
||
_this10.value3 = 1; // 重置库存为1
|
||
// 清空照片数据
|
||
_this10.fileList1 = []; // 清空文件列表
|
||
_this10.uploadedImages = []; // 清空上传图片数组
|
||
// this.marketTags = []; // 清空市场标签
|
||
// 不重置品相选择,保留conditions数组中的checked状态
|
||
|
||
// 显示提交成功提示
|
||
uni.showToast({
|
||
title: '提交成功',
|
||
icon: 'success',
|
||
duration: 2000
|
||
});
|
||
console.log('请求成功,表单已清空');
|
||
if (_this10.$refs.onSaleProductsComponent) {
|
||
_this10.$refs.onSaleProductsComponent.setCompareType('isbn');
|
||
}
|
||
// 如果当前是ISBN上传模式,自动触发扫码功能
|
||
if (_this10.currentTab === 'isbn') {
|
||
// 延迟一小段时间后触发扫码,确保表单清空和提示显示完成
|
||
setTimeout(function () {
|
||
_this10.startScanning();
|
||
}, 800);
|
||
}
|
||
},
|
||
fail: function fail(err) {
|
||
console.error('请求失败:', err);
|
||
uni.showToast({
|
||
title: '网络错误,请稍后重试',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
}
|
||
});
|
||
},
|
||
// 新增:异步调用选品中心接口的方法
|
||
syncBookToCenter: function syncBookToCenter(formData) {
|
||
// 后台接口地址(POST)
|
||
var centerUrl = 'https://api.buzhiyushu.cn/zhishu/baseInfo/getXcxData';
|
||
// const centerUrl = 'http://localhost:8080/zhishu/baseInfo/getXcxData';
|
||
|
||
// 仅提取所需参数
|
||
var centerData = {
|
||
barcode: formData.barcode,
|
||
name: formData.name,
|
||
price: formData.price,
|
||
author: formData.author,
|
||
publisher: this.press,
|
||
publishTime: this.pubDateText,
|
||
sellCount: formData.sellCount,
|
||
buyCount: formData.buyCount,
|
||
files: formData.files || [],
|
||
kfzBookPic: this.kfzBookPic
|
||
};
|
||
console.log("选品中心参数", centerData);
|
||
|
||
// 异步执行(不影响主提交流程)
|
||
setTimeout(function () {
|
||
uni.request({
|
||
url: centerUrl,
|
||
method: 'POST',
|
||
data: centerData,
|
||
header: {
|
||
'Content-Type': 'application/json'
|
||
},
|
||
success: function success(res) {
|
||
console.log('选品中心同步成功:', res);
|
||
},
|
||
fail: function fail(err) {
|
||
console.error('选品中心同步失败:', err);
|
||
}
|
||
});
|
||
}, 300); // 延迟300ms,避免主请求未完全结束
|
||
},
|
||
// 图片上传到服务器
|
||
uploadFilePromise: function uploadFilePromise(url, index) {
|
||
var _this11 = this;
|
||
return new Promise(function (resolve, reject) {
|
||
// 获取当前选项卡下的书名和ISBN
|
||
var bookName = _this11.currentTab === 'isbn' ? _this11.formData.bookName : _this11.formData2.bookName;
|
||
var isbn = _this11.currentTab === 'isbn' ? _this11.scanResult : _this11.formData2.isbn;
|
||
|
||
// 检查 isbn 是否为空
|
||
if (!isbn || isbn.trim() === '') {
|
||
isbn = '';
|
||
for (var i = 0; i < 13; i++) {
|
||
isbn += Math.floor(Math.random() * 10);
|
||
}
|
||
}
|
||
|
||
// 获取存储的仓库相关ID
|
||
var warehouseId = uni.getStorageSync('warehouseId');
|
||
var shelfId = uni.getStorageSync('shelfId');
|
||
var locationId = uni.getStorageSync('locationId');
|
||
|
||
// 图片编号,从1开始
|
||
var num = (index + 1).toString();
|
||
uni.uploadFile({
|
||
// url: "https://api.buzhiyushu.cn/zhishu/shopGoods/uploadImages",
|
||
url: "https://xcx.uploadfile.yushutx.com/uploadImages",
|
||
filePath: url,
|
||
name: "file",
|
||
success: function success(res) {
|
||
console.log('图片上传成功:', res);
|
||
// 解析返回结果
|
||
var data = JSON.parse(res.data);
|
||
console.log("data", data);
|
||
var urlData = JSON.parse(data.data);
|
||
var imageUrl = urlData.url || url;
|
||
console.log("url", imageUrl);
|
||
// 将上传成功的图片信息存储到数组中
|
||
_this11.uploadedImages.push({
|
||
url: imageUrl,
|
||
bookName: bookName,
|
||
isbn: isbn,
|
||
num: num,
|
||
warehouseId: warehouseId,
|
||
shelfId: shelfId,
|
||
locationId: locationId,
|
||
originalUrl: url
|
||
});
|
||
resolve(imageUrl);
|
||
},
|
||
fail: function fail(err) {
|
||
console.error('图片上传失败:', err);
|
||
reject(err);
|
||
}
|
||
});
|
||
});
|
||
},
|
||
valChange: function valChange(e) {
|
||
console.log('当前值为: ' + e.value);
|
||
},
|
||
valChange1: function valChange1(e) {
|
||
console.log('当前值为: ' + e.value);
|
||
},
|
||
radioClick: function radioClick(index) {
|
||
this.conditions = this.conditions.map(function (item, i) {
|
||
return _objectSpread(_objectSpread({}, item), {}, {
|
||
checked: i === index
|
||
});
|
||
});
|
||
},
|
||
// 高亮显示有问题的图片
|
||
highlightProblemImages: function highlightProblemImages(invalidImages) {
|
||
var _this12 = this;
|
||
// 根据invalidImages中的originalUrl找到fileList1中对应的图片并标记
|
||
invalidImages.forEach(function (invalidImg) {
|
||
var index = _this12.fileList1.findIndex(function (file) {
|
||
return file.url === invalidImg.originalUrl;
|
||
});
|
||
if (index !== -1) {
|
||
// 标记为错误状态,UI可以根据这个状态显示红色边框或错误图标
|
||
_this12.$set(_this12.fileList1[index], 'status', 'error');
|
||
_this12.$set(_this12.fileList1[index], 'errorMessage', '上传失败,请重新上传');
|
||
}
|
||
});
|
||
|
||
// 强制更新视图
|
||
this.$forceUpdate();
|
||
|
||
// 可选:滚动到第一个有问题的图片位置
|
||
this.$nextTick(function () {
|
||
var firstErrorIndex = _this12.fileList1.findIndex(function (file) {
|
||
return file.status === 'error';
|
||
});
|
||
if (firstErrorIndex !== -1) {
|
||
// 这里可以添加滚动到错误图片的逻辑
|
||
console.log("\u8BF7\u68C0\u67E5\u7B2C".concat(firstErrorIndex + 1, "\u5F20\u56FE\u7247"));
|
||
}
|
||
});
|
||
},
|
||
// 数据填充方法
|
||
populateForm: function populateForm(data) {
|
||
var _this13 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
||
var sellCount, buyCount, fileName, suffix;
|
||
return _regenerator.default.wrap(function _callee9$(_context9) {
|
||
while (1) {
|
||
switch (_context9.prev = _context9.next) {
|
||
case 0:
|
||
console.log("data2", data);
|
||
_this13.formData.bookName = data.bookName;
|
||
_this13.fixPrice = data.fixPrice;
|
||
_this13.formData.recommendation = "权威认证 立即购买";
|
||
_this13.value = data.price;
|
||
_this13.value1 = data.stock;
|
||
_this13.formData.isbn = data.isbn;
|
||
// 解析响应数据中的在售和已售数量
|
||
sellCount = data.sellCount;
|
||
buyCount = data.buyCount; // const buyCount = parseInt(data.buyCount.replace('人买过', ''), 10);
|
||
// 只有当没有选中任何品相时,才使用API返回的品相
|
||
// const hasSelectedCondition = this.conditions.some(item => item.checked);
|
||
// if (!hasSelectedCondition) {
|
||
// this.conditions = this.conditions.map(condition => ({
|
||
// ...condition,
|
||
// checked: condition.name === data.condition
|
||
// }));
|
||
// }
|
||
if (data.condition) {
|
||
// 使用组件方法设置品相
|
||
_this13.$refs.conditionSelect.setSelection(data.condition);
|
||
}
|
||
// 更新 marketTags 数组
|
||
_this13.marketTags = _this13.marketTags.map(function (item) {
|
||
if (item.label === '在售:') {
|
||
return _objectSpread(_objectSpread({}, item), {}, {
|
||
value: sellCount
|
||
});
|
||
} else if (item.label === '已售:') {
|
||
return _objectSpread(_objectSpread({}, item), {}, {
|
||
value: buyCount
|
||
});
|
||
}
|
||
return item;
|
||
});
|
||
// 获取图片路径
|
||
if (data.bookPic) {
|
||
fileName = data.bookPic.split('.')[0];
|
||
suffix = data.bookPic.split('.')[1]; // this.getBookPicPath(fileName, suffix);
|
||
}
|
||
case 12:
|
||
case "end":
|
||
return _context9.stop();
|
||
}
|
||
}
|
||
}, _callee9);
|
||
}))();
|
||
},
|
||
// 切换比价类型
|
||
switchCompareType: function switchCompareType(type) {
|
||
this.compareType = type;
|
||
if (type === 'title') {
|
||
if (!this.formData.bookName) {
|
||
console.log("比价书名", this.formData.bookName);
|
||
uni.showToast({
|
||
title: '请先输入书名',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return;
|
||
}
|
||
this.fetchOnSaleProducts(this.formData.bookName, 'title');
|
||
} else if (type === 'isbn') {
|
||
if (!this.scanResult) {
|
||
console.log("比价isbn", this.scanResult);
|
||
uni.showToast({
|
||
title: '请先扫码获取ISBN',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return;
|
||
}
|
||
console.log("比价isbn", this.scanResult);
|
||
this.fetchOnSaleProducts(this.scanResult);
|
||
}
|
||
},
|
||
// 计算参考价格
|
||
calculateReferencePrice: function calculateReferencePrice() {
|
||
if (!this.displayOnSaleProducts || this.displayOnSaleProducts.length === 0) {
|
||
this.value4 = 1.00;
|
||
return;
|
||
}
|
||
var products = (0, _toConsumableArray2.default)(this.displayOnSaleProducts);
|
||
// 永远使用总价
|
||
var priceField = 'totalPrice';
|
||
// 按总价排序
|
||
products.sort(function (a, b) {
|
||
return parseFloat(a[priceField]) - parseFloat(b[priceField]);
|
||
});
|
||
|
||
// 从Vuex store获取运费和最低值
|
||
var shippingFee = this.freight;
|
||
var minValue = this.minValue;
|
||
console.log("priceMode111", this.priceMode);
|
||
var priceMode = uni.getStorageSync("current1");
|
||
console.log("priceMode", priceMode);
|
||
var selectedPositionIndex = uni.getStorageSync("selectedPositionIndex");
|
||
console.log("selectedPositionIndex", selectedPositionIndex);
|
||
switch (priceMode) {
|
||
case 0:
|
||
// 最低价
|
||
// 获取选择的位置索引(从store中获取)
|
||
var positionIndex = this.selectedPosition || selectedPositionIndex || 0;
|
||
console.log("索引", positionIndex);
|
||
// 确保索引在有效范围内
|
||
var validIndex = Math.min(positionIndex, products.length - 1);
|
||
console.log("索引1", positionIndex);
|
||
console.log('使用第' + (validIndex + 1) + '条数据的价格');
|
||
|
||
// 获取选中位置的总价
|
||
var selectedTotal = parseFloat(products[validIndex].totalPrice);
|
||
this.lowestTotalPrice = parseFloat(products[0].totalPrice);
|
||
|
||
// 计算新价格:选中位置的总价 - 运费 - 最低值
|
||
var lowestPrice = selectedTotal - shippingFee - 0.01;
|
||
|
||
// 如果总价减去运费后的价格小于0,则使用最低值设置的值
|
||
if (lowestPrice <= minValue) {
|
||
this.value4 = minValue;
|
||
} else {
|
||
this.value4 = parseFloat(lowestPrice.toFixed(2));
|
||
}
|
||
break;
|
||
case 1:
|
||
// 均价
|
||
// 获取最低的N个价格并计算平均值
|
||
var count = Math.min(this.averageRange, products.length);
|
||
console.log("count", count);
|
||
var sum = 0;
|
||
for (var i = 0; i < count; i++) {
|
||
sum += parseFloat(products[i][priceField]);
|
||
console.log("sum+", sum);
|
||
}
|
||
|
||
// 计算平均总价后减去运费
|
||
var averagePrice = sum / count - shippingFee - 0.01;
|
||
console.log("averagePrice", averagePrice);
|
||
// 如果计算结果小于等于0,则使用最低值
|
||
if (averagePrice <= minValue) {
|
||
this.value4 = minValue;
|
||
} else {
|
||
this.value4 = parseFloat(averagePrice.toFixed(2));
|
||
}
|
||
break;
|
||
case 2:
|
||
// 最新已售价
|
||
// 使用最低总价
|
||
this.value4 = parseFloat(products[0].totalPrice);
|
||
break;
|
||
}
|
||
},
|
||
// 返回上一页并清除缓存
|
||
navigateBack: function navigateBack() {
|
||
// 清除相关缓存数据
|
||
uni.removeStorageSync('lastSelectedStorage');
|
||
uni.removeStorageSync('selectedWarehouse');
|
||
uni.removeStorageSync('lastSelectedShelf');
|
||
uni.removeStorageSync('lastSelectedLocation');
|
||
|
||
// 重置相关数据
|
||
this.selectedStorage = '';
|
||
this.warehouse = '';
|
||
this.shelf = '';
|
||
this.location = '';
|
||
uni.navigateTo({
|
||
url: '/pages/warehouse/warehouse-select'
|
||
});
|
||
},
|
||
// 关闭下拉框方法
|
||
closeDropdown: function closeDropdown() {
|
||
// 在uni-app中,我们可以直接设置状态来关闭下拉框
|
||
if (this.showSearchDropdown) {
|
||
this.showSearchDropdown = false;
|
||
}
|
||
if (this.popupShow) {
|
||
this.popupShow = false;
|
||
}
|
||
},
|
||
// 处理价格变化事件
|
||
onPriceChange: function onPriceChange(value) {
|
||
this.value4 = value;
|
||
},
|
||
// 处理库存变化事件
|
||
onStockChange: function onStockChange(value) {
|
||
this.value3 = value;
|
||
},
|
||
// 扫码成功回调
|
||
startScanning: function startScanning() {
|
||
var _this14 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
||
var canUpload, warehouse, shelf, location;
|
||
return _regenerator.default.wrap(function _callee10$(_context10) {
|
||
while (1) {
|
||
switch (_context10.prev = _context10.next) {
|
||
case 0:
|
||
_context10.next = 2;
|
||
return (0, _MemberBookCheck.checkMemberBooksCount)();
|
||
case 2:
|
||
canUpload = _context10.sent;
|
||
if (canUpload) {
|
||
_context10.next = 5;
|
||
break;
|
||
}
|
||
return _context10.abrupt("return");
|
||
case 5:
|
||
if (!(_this14.fileList1.length > 0)) {
|
||
_context10.next = 8;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '已上传图片,不可修改ISBN',
|
||
icon: 'none',
|
||
duration: 2000
|
||
});
|
||
return _context10.abrupt("return");
|
||
case 8:
|
||
if (!_this14.isScanning) {
|
||
_context10.next = 10;
|
||
break;
|
||
}
|
||
return _context10.abrupt("return");
|
||
case 10:
|
||
warehouse = _this14.warehouse;
|
||
console.log("warehouse", warehouse);
|
||
shelf = _this14.shelf;
|
||
console.log("shelf", shelf);
|
||
location = _this14.location;
|
||
console.log("location", location);
|
||
// 验证仓库/货架/货位 - 确保三个值都必须存在
|
||
if (!(!warehouse || !shelf || !location)) {
|
||
_context10.next = 19;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请完整选择仓库、货架和货位',
|
||
icon: 'none',
|
||
duration: 2500 // 延长到2.5秒
|
||
});
|
||
return _context10.abrupt("return");
|
||
case 19:
|
||
// 设置扫码状态为true,按钮变为灰色
|
||
_this14.isScanning = true;
|
||
_this14.selectedStorage = "".concat(warehouse, " / ").concat(shelf, " / ").concat(location);
|
||
console.log("selectedStorage", _this14.selectedStorage);
|
||
uni.scanCode({
|
||
onlyFromCamera: true,
|
||
scanType: ['barcode'],
|
||
success: function success(res) {
|
||
console.log("res111", res);
|
||
// 扫码完成,恢复按钮状态
|
||
_this14.isScanning = false;
|
||
if (_this14.$refs.onSaleProductsComponent) {
|
||
_this14.$refs.onSaleProductsComponent.setCompareType('isbn');
|
||
}
|
||
if (res.result.length != 13) {
|
||
console.error('扫码失败:');
|
||
uni.showToast({
|
||
title: '扫码失败,请重试',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
} else {
|
||
_this14.scanResult = res.result;
|
||
_this14.fetchBookInfo(res.result); // 调用获取书籍信息
|
||
}
|
||
},
|
||
|
||
fail: function fail(err) {
|
||
// 扫码失败,恢复按钮状态
|
||
_this14.isScanning = false;
|
||
// 清空表单内容
|
||
_this14.scanResult = '';
|
||
_this14.formData.bookName = '';
|
||
_this14.fileList1 = [];
|
||
// 清空市场标签数据
|
||
_this14.marketTags = [{
|
||
label: '在售:',
|
||
value: 0
|
||
}, {
|
||
label: '旧:',
|
||
value: 0
|
||
}, {
|
||
label: '新:',
|
||
value: 0
|
||
}, {
|
||
label: '已售:',
|
||
value: 0
|
||
}];
|
||
|
||
// 清空在售商品列表
|
||
if (_this14.$refs.onSaleProductsComponent) {
|
||
_this14.$refs.onSaleProductsComponent.updateProducts([]);
|
||
}
|
||
// 重置在售商品数据
|
||
_this14.onSaleProducts = [];
|
||
_this14.displayOnSaleProducts = [];
|
||
console.error('扫码失败:', err.errMsg);
|
||
uni.showToast({
|
||
title: '扫码失败,请重试',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
}
|
||
});
|
||
case 23:
|
||
case "end":
|
||
return _context10.stop();
|
||
}
|
||
}
|
||
}, _callee10);
|
||
}))();
|
||
},
|
||
// 根据输入的ISBN搜索书籍信息
|
||
searchByIsbn: function searchByIsbn() {
|
||
var _this15 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
||
var canUpload, warehouse, shelf, location;
|
||
return _regenerator.default.wrap(function _callee11$(_context11) {
|
||
while (1) {
|
||
switch (_context11.prev = _context11.next) {
|
||
case 0:
|
||
_context11.next = 2;
|
||
return (0, _MemberBookCheck.checkMemberBooksCount)();
|
||
case 2:
|
||
canUpload = _context11.sent;
|
||
if (canUpload) {
|
||
_context11.next = 5;
|
||
break;
|
||
}
|
||
return _context11.abrupt("return");
|
||
case 5:
|
||
if (!(_this15.fileList1.length > 0)) {
|
||
_context11.next = 8;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '已上传图片,不可修改ISBN',
|
||
icon: 'none',
|
||
duration: 2000
|
||
});
|
||
return _context11.abrupt("return");
|
||
case 8:
|
||
if (_this15.scanResult) {
|
||
_context11.next = 11;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请输入ISBN',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return _context11.abrupt("return");
|
||
case 11:
|
||
if (!(_this15.scanResult.length != 13)) {
|
||
_context11.next = 14;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: 'ISBN格式不正确,应为13位数字',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return _context11.abrupt("return");
|
||
case 14:
|
||
warehouse = _this15.warehouse;
|
||
shelf = _this15.shelf;
|
||
location = _this15.location; // 验证仓库/货架/货位 - 确保三个值都必须存在
|
||
if (!(!warehouse || !shelf || !location)) {
|
||
_context11.next = 20;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请完整选择仓库、货架和货位',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return _context11.abrupt("return");
|
||
case 20:
|
||
_this15.selectedStorage = "".concat(warehouse, " / ").concat(shelf, " / ").concat(location);
|
||
|
||
// 调用获取书籍信息的方法
|
||
_this15.fetchBookInfo(_this15.scanResult);
|
||
case 22:
|
||
case "end":
|
||
return _context11.stop();
|
||
}
|
||
}
|
||
}, _callee11);
|
||
}))();
|
||
},
|
||
//新增获取书籍信息方法
|
||
fetchBookInfo: function fetchBookInfo(isbn) {
|
||
var _this16 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
||
var cookie, newCookie, _bookPicRes$, _bookPicRes$$data, _bookPicRes$$data$dat, _bookPicRes$$data$dat2, _bookPicRes$$data$dat3, _bookPicRes$$data$dat4, _bookPicRes$$data$dat5, res, soldOutRes, bookPicRes, responseData, responseData1, buyCount, author, press, pubDateText, bookData, productList, data;
|
||
return _regenerator.default.wrap(function _callee12$(_context12) {
|
||
while (1) {
|
||
switch (_context12.prev = _context12.next) {
|
||
case 0:
|
||
console.log("扫描到ISBN:", isbn);
|
||
// 获取当前用户cookie
|
||
cookie = uni.getStorageSync('UserInfoCookies');
|
||
console.log("cookie1111", cookie);
|
||
newCookie = "PHPSESSID=".concat(cookie);
|
||
console.log("newCookie", newCookie);
|
||
// 确保扫码状态为false,以防万一
|
||
_this16.isScanning = false;
|
||
_context12.prev = 6;
|
||
_context12.next = 9;
|
||
return uni.request({
|
||
url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/product/keyword/list',
|
||
// url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/bookLib/keyword/list',
|
||
method: 'GET',
|
||
data: {
|
||
dataType: 0,
|
||
keyword: isbn,
|
||
page: 1,
|
||
userArea: '13003000000'
|
||
},
|
||
header: {
|
||
'Cookie': newCookie
|
||
}
|
||
});
|
||
case 9:
|
||
res = _context12.sent;
|
||
_context12.next = 12;
|
||
return uni.request({
|
||
url: 'https://api.buzhiyushu.cn/xcx/getOnSaleGoods',
|
||
method: 'GET',
|
||
data: {
|
||
dataType: 1,
|
||
// 1 = 已售
|
||
keyword: isbn,
|
||
// ISBN 或关键字
|
||
cookie: cookie // 你的 Cookie
|
||
},
|
||
|
||
header: {
|
||
'Content-Type': 'application/json'
|
||
}
|
||
});
|
||
case 12:
|
||
soldOutRes = _context12.sent;
|
||
// 调用孔网图书条目接口获取官图(失败不影响主流程)
|
||
bookPicRes = null;
|
||
_context12.prev = 14;
|
||
_context12.next = 17;
|
||
return uni.request({
|
||
url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/bookLib/keyword/list',
|
||
method: 'GET',
|
||
data: {
|
||
keyword: isbn
|
||
},
|
||
header: {
|
||
'Cookie': newCookie,
|
||
'Content-Type': 'application/json'
|
||
}
|
||
});
|
||
case 17:
|
||
bookPicRes = _context12.sent;
|
||
_context12.next = 24;
|
||
break;
|
||
case 20:
|
||
_context12.prev = 20;
|
||
_context12.t0 = _context12["catch"](14);
|
||
console.warn('获取孔网图书官图失败,不影响主流程:', _context12.t0);
|
||
bookPicRes = null;
|
||
case 24:
|
||
uni.hideLoading();
|
||
console.log("在售响应:", res);
|
||
responseData = Array.isArray(res) ? res[1].data : res.data;
|
||
console.log("已售响应", soldOutRes);
|
||
if (bookPicRes) {
|
||
console.log("图书条目响应:", bookPicRes);
|
||
}
|
||
responseData1 = Array.isArray(res) ? soldOutRes[1].data.data.data : soldOutRes.data.data.data; // 安全地获取图书官图,如果失败则为空字符串
|
||
_this16.kfzBookPic = '';
|
||
if (bookPicRes && Array.isArray(bookPicRes) && (_bookPicRes$ = bookPicRes[1]) !== null && _bookPicRes$ !== void 0 && (_bookPicRes$$data = _bookPicRes$.data) !== null && _bookPicRes$$data !== void 0 && (_bookPicRes$$data$dat = _bookPicRes$$data.data) !== null && _bookPicRes$$data$dat !== void 0 && (_bookPicRes$$data$dat2 = _bookPicRes$$data$dat.itemResponse) !== null && _bookPicRes$$data$dat2 !== void 0 && (_bookPicRes$$data$dat3 = _bookPicRes$$data$dat2.list) !== null && _bookPicRes$$data$dat3 !== void 0 && (_bookPicRes$$data$dat4 = _bookPicRes$$data$dat3[0]) !== null && _bookPicRes$$data$dat4 !== void 0 && (_bookPicRes$$data$dat5 = _bookPicRes$$data$dat4.imgUrlEntity) !== null && _bookPicRes$$data$dat5 !== void 0 && _bookPicRes$$data$dat5.bigImgUrl) {
|
||
_this16.kfzBookPic = bookPicRes[1].data.data.itemResponse.list[0].imgUrlEntity.bigImgUrl;
|
||
}
|
||
console.log("图书条目图片:", _this16.kfzBookPic || '未获取到');
|
||
if (!(responseData.errType === "102" || responseData1.errType === "102")) {
|
||
_context12.next = 36;
|
||
break;
|
||
}
|
||
uni.showToast({
|
||
title: '请登录或切换孔网账号后再进行扫码上书',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
return _context12.abrupt("return");
|
||
case 36:
|
||
if (!(res[1].data.data.itemResponse.total != 0 && responseData && responseData.status === 1 && responseData.data)) {
|
||
_context12.next = 55;
|
||
break;
|
||
}
|
||
buyCount = res[1].data.data.itemResponse.total;
|
||
author = res[1].data.data.itemResponse.list[0].author;
|
||
press = res[1].data.data.itemResponse.list[0].press;
|
||
pubDateText = res[1].data.data.itemResponse.list[0].pubDateText; // 保存作者信息到组件数据中
|
||
_this16.author = author || '';
|
||
_this16.press = press || '';
|
||
_this16.pubDateText = pubDateText || '';
|
||
bookData = null;
|
||
productList = []; // 检查不同的数据结构
|
||
if (responseData.data.itemResponse && responseData.data.itemResponse.list) {
|
||
// bookLib接口结构
|
||
productList = responseData.data.itemResponse.list;
|
||
} else if (responseData.data.productList) {
|
||
// product接口结构
|
||
productList = responseData.data.productList;
|
||
} else if (Array.isArray(responseData.data)) {
|
||
// 直接是数组
|
||
productList = responseData.data;
|
||
}
|
||
console.log("在售", responseData.data.itemResponse.pager.total);
|
||
if (!(productList && productList.length > 0)) {
|
||
_context12.next = 55;
|
||
break;
|
||
}
|
||
bookData = productList[0];
|
||
|
||
// 构造所需的书籍数据,兼容不同字段名
|
||
data = {
|
||
bookName: bookData.bookName || bookData.title || bookData.name || '',
|
||
fixPrice: bookData.newBookMinPrice || bookData.price || bookData.minPrice || 1.00,
|
||
sellCount: responseData.data.itemResponse.pager.total,
|
||
buyCount: responseData1.data.itemResponse.pager.total,
|
||
condition: '' // 孔夫子API没有提供品相信息
|
||
}; // 更新到表单
|
||
|
||
_this16.bookInfo = data;
|
||
_this16.populateForm(data);
|
||
|
||
// 获取在售商品信息
|
||
_this16.fetchOnSaleProducts(isbn);
|
||
return _context12.abrupt("return");
|
||
case 55:
|
||
// 如果没有查询到数据
|
||
// this.fetchOnSaleProducts(isbn);
|
||
_this16.isScanning = false;
|
||
// 清空表单内容
|
||
_this16.scanResult = '';
|
||
_this16.formData.bookName = '';
|
||
_this16.fileList1 = [];
|
||
// 清空市场标签数据
|
||
_this16.marketTags = [{
|
||
label: '在售:',
|
||
value: 0
|
||
}, {
|
||
label: '旧:',
|
||
value: 0
|
||
}, {
|
||
label: '新:',
|
||
value: 0
|
||
}, {
|
||
label: '已售:',
|
||
value: 0
|
||
}];
|
||
|
||
// 清空在售商品列表
|
||
if (_this16.$refs.onSaleProductsComponent) {
|
||
_this16.$refs.onSaleProductsComponent.updateProducts([]);
|
||
}
|
||
// 重置在售商品数据
|
||
_this16.onSaleProducts = [];
|
||
_this16.displayOnSaleProducts = [];
|
||
uni.showToast({
|
||
title: '暂无当前书籍信息,请使用(无ISBN-上传)上传该书籍',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
_context12.next = 71;
|
||
break;
|
||
case 66:
|
||
_context12.prev = 66;
|
||
_context12.t1 = _context12["catch"](6);
|
||
uni.hideLoading();
|
||
console.error('请求异常:', _context12.t1);
|
||
uni.showToast({
|
||
title: '网络请求失败',
|
||
icon: 'none',
|
||
duration: 2500
|
||
});
|
||
case 71:
|
||
case "end":
|
||
return _context12.stop();
|
||
}
|
||
}
|
||
}, _callee12, null, [[6, 66], [14, 20]]);
|
||
}))();
|
||
},
|
||
// 页面显示时触发
|
||
onShow: function onShow() {
|
||
var _this17 = this;
|
||
// 检查本地存储中是否有更新的仓库信息
|
||
var warehouse = uni.getStorageSync("selectedWarehouse");
|
||
if (warehouse) {
|
||
// 只更新仓库列表,不自动选择
|
||
this.selectedWarehouse = warehouse;
|
||
this.columns[0] = [warehouse.name]; // 更新仓库列
|
||
// 不再自动设置selectedStorage和warehouse
|
||
// 不再自动设置shelf和location
|
||
|
||
// 加载货架数据,但不自动选择
|
||
this.fetchShelves(warehouse.id).then(function (shelves) {
|
||
if (shelves.length > 0) {
|
||
_this17.columns[1] = shelves.map(function (item) {
|
||
return item.code;
|
||
});
|
||
// 加载货位数据,但不自动选择
|
||
var firstSheId = shelves[0].id;
|
||
_this17.fetchLocations(firstSheId).then(function (locations) {
|
||
_this17.columns[2] = locations.map(function (item) {
|
||
return item.code;
|
||
});
|
||
// 不再自动设置location
|
||
});
|
||
}
|
||
});
|
||
}
|
||
|
||
// 每次页面显示都拉取分类数据
|
||
console.log('onShow: 开始调用fetchCategoryData');
|
||
this.fetchCategoryData().then(function () {
|
||
console.log('onShow: fetchCategoryData执行完成');
|
||
}).catch(function (error) {
|
||
console.error('onShow: fetchCategoryData执行失败:', error);
|
||
});
|
||
}
|
||
}, (0, _defineProperty2.default)(_methods, "close", function close() {
|
||
// 在这里编写关闭弹窗时要执行的逻辑
|
||
this.show = false;
|
||
console.log('弹窗已关闭');
|
||
}), (0, _defineProperty2.default)(_methods, "open", function open() {
|
||
// 在这里编写打开弹窗时要执行的逻辑
|
||
this.show = true;
|
||
console.log('弹窗已打开');
|
||
}), (0, _defineProperty2.default)(_methods, "resetData", function resetData() {
|
||
var _this18 = this;
|
||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
|
||
var currentWarehouse, currentShelf, currentLocation, currentSelectedStorage;
|
||
return _regenerator.default.wrap(function _callee13$(_context13) {
|
||
while (1) {
|
||
switch (_context13.prev = _context13.next) {
|
||
case 0:
|
||
console.log('ISBN组件resetData方法开始执行');
|
||
_context13.prev = 1;
|
||
// 保存当前的货区选择
|
||
currentWarehouse = _this18.warehouse;
|
||
currentShelf = _this18.shelf;
|
||
currentLocation = _this18.location;
|
||
currentSelectedStorage = _this18.selectedStorage; // 清空所有数据
|
||
_this18.scanResult = ''; // 清空ISBN
|
||
_this18.kfzBookPic = ''; // 清空孔夫子图书官图
|
||
console.log('已清空scanResult:', _this18.scanResult);
|
||
|
||
// 重置表单数据
|
||
_this18.formData = {
|
||
isbn: '',
|
||
sku: '',
|
||
title: '',
|
||
art_no: '',
|
||
more: '',
|
||
bookName: '',
|
||
recommendation: ''
|
||
};
|
||
console.log('已重置formData:', _this18.formData);
|
||
|
||
// 重置价格和库存
|
||
_this18.value4 = 1.00;
|
||
_this18.value3 = 1;
|
||
console.log('已重置价格和库存:', {
|
||
price: _this18.value4,
|
||
stock: _this18.value3
|
||
});
|
||
|
||
// 清空文件列表和上传图片
|
||
_this18.fileList1 = [];
|
||
_this18.uploadedImages = [];
|
||
_this18.hasShownUploadMessage = false;
|
||
_this18.isUploading = false; // 重置上传状态
|
||
console.log('已清空图片相关数据');
|
||
|
||
// 重置市场标签
|
||
_this18.marketTags = [{
|
||
label: '在售:',
|
||
value: 0
|
||
}, {
|
||
label: '旧:',
|
||
value: 0
|
||
}, {
|
||
label: '新:',
|
||
value: 0
|
||
}, {
|
||
label: '已售:',
|
||
value: 0
|
||
}];
|
||
console.log('已重置市场标签');
|
||
|
||
// 恢复货区选择
|
||
_this18.warehouse = currentWarehouse;
|
||
_this18.shelf = currentShelf;
|
||
_this18.location = currentLocation;
|
||
_this18.selectedStorage = currentSelectedStorage;
|
||
console.log('已恢复货区选择:', {
|
||
warehouse: _this18.warehouse,
|
||
shelf: _this18.shelf,
|
||
location: _this18.location
|
||
});
|
||
|
||
// 重置在售商品列表
|
||
if (_this18.$refs.onSaleProductsComponent) {
|
||
_this18.$refs.onSaleProductsComponent.updateProducts([]);
|
||
_this18.$refs.onSaleProductsComponent.setCompareType('isbn');
|
||
console.log('已重置在售商品列表');
|
||
}
|
||
|
||
// 重置品相选择
|
||
if (_this18.$refs.conditionSelect) {
|
||
_this18.$refs.conditionSelect.resetSelection();
|
||
}
|
||
|
||
// 重置价格库存控制组件
|
||
if (_this18.$refs.priceStockControl) {
|
||
_this18.$refs.priceStockControl.reset();
|
||
}
|
||
|
||
// 添加分类重置操作
|
||
// 重置分类选择
|
||
_this18.categoryIndexes = [];
|
||
_this18.categoryPathText = '';
|
||
_this18.selectedCategoryId = '';
|
||
_this18.categoryLevels = [];
|
||
_this18.initCategoryPicker(); // 重新初始化选择器
|
||
|
||
console.log('ISBN组件resetData方法执行完成');
|
||
_context13.next = 41;
|
||
break;
|
||
case 37:
|
||
_context13.prev = 37;
|
||
_context13.t0 = _context13["catch"](1);
|
||
console.error('重置数据时发生错误:', _context13.t0);
|
||
return _context13.abrupt("return", Promise.reject(_context13.t0));
|
||
case 41:
|
||
case "end":
|
||
return _context13.stop();
|
||
}
|
||
}
|
||
}, _callee13, null, [[1, 37]]);
|
||
}))();
|
||
}), (0, _defineProperty2.default)(_methods, "onCategoryLevel1Change", function onCategoryLevel1Change(e) {
|
||
var idx = e.detail.value;
|
||
this.categoryLevel1 = this.categoryList[idx];
|
||
this.categoryOptions2 = this.categoryLevel1.children || [];
|
||
this.categoryLevel2 = null;
|
||
this.categoryOptions3 = [];
|
||
this.categoryLevel3 = null;
|
||
this.selectedCategoryId = '';
|
||
}), (0, _defineProperty2.default)(_methods, "onCategoryLevel2Change", function onCategoryLevel2Change(e) {
|
||
var idx = e.detail.value;
|
||
this.categoryLevel2 = this.categoryOptions2[idx];
|
||
this.categoryOptions3 = this.categoryLevel2.children || [];
|
||
this.categoryLevel3 = null;
|
||
this.selectedCategoryId = '';
|
||
}), (0, _defineProperty2.default)(_methods, "onCategoryLevel3Change", function onCategoryLevel3Change(e) {
|
||
var idx = e.detail.value;
|
||
this.categoryLevel3 = this.categoryOptions3[idx];
|
||
this.selectedCategoryId = this.categoryLevel3.id;
|
||
}), (0, _defineProperty2.default)(_methods, "initCategoryPicker", function initCategoryPicker() {
|
||
// console.log('initCategoryPicker开始执行');
|
||
// console.log('原始categoryList:', this.categoryList);
|
||
|
||
// 初始化分类选择器数据
|
||
this.categoryColumns = []; // 清空所有列
|
||
this.categoryLevels = []; // 清空选中的分类对象
|
||
this.categoryIndexes = []; // 清空索引
|
||
|
||
// 过滤出一级分类
|
||
var level1Categories = (this.categoryList || []).filter(function (item) {
|
||
return item.level === 1;
|
||
});
|
||
|
||
// 如果没有数据,提供默认值
|
||
if (level1Categories.length === 0) {
|
||
// 设置一个默认的空分类
|
||
this.categoryColumns = Array(this.maxCategoryLevel).fill([{
|
||
name: '暂无数据',
|
||
id: ''
|
||
}]);
|
||
this.categoryIndexes = Array(this.maxCategoryLevel).fill(0);
|
||
this.categoryPathText = '';
|
||
this.selectedCategoryId = '';
|
||
console.log('没有分类数据,使用默认空分类');
|
||
return;
|
||
}
|
||
|
||
// 设置第一列(一级分类)
|
||
this.categoryColumns[0] = level1Categories;
|
||
this.categoryIndexes[0] = 0;
|
||
|
||
// 递归初始化所有可能的列
|
||
var currentParent = level1Categories[0];
|
||
var currentLevel = 1;
|
||
this.categoryLevels[0] = currentParent; // 保存一级分类
|
||
|
||
while (currentLevel < this.maxCategoryLevel) {
|
||
// 检查当前选中分类是否有子分类
|
||
var children = currentParent.children || [];
|
||
|
||
// 如果没有子分类或者已经到达最大级别,就中断循环
|
||
if (children.length === 0) {
|
||
break;
|
||
}
|
||
|
||
// 设置下一列数据
|
||
this.categoryColumns[currentLevel] = children;
|
||
this.categoryIndexes[currentLevel] = 0;
|
||
this.categoryLevels[currentLevel] = children[0];
|
||
|
||
// 继续下一级
|
||
currentParent = children[0];
|
||
currentLevel++;
|
||
}
|
||
|
||
// 填充剩余的列(如果需要)
|
||
while (this.categoryColumns.length < this.maxCategoryLevel) {
|
||
this.categoryColumns.push([{
|
||
name: '暂无数据',
|
||
id: ''
|
||
}]);
|
||
this.categoryIndexes.push(0);
|
||
this.categoryLevels.push({
|
||
name: '暂无数据',
|
||
id: ''
|
||
});
|
||
}
|
||
|
||
// 设置分类路径文本
|
||
this.updateCategoryPathText();
|
||
|
||
// 设置选中的分类ID(叶子节点的ID)
|
||
this.updateSelectedCategoryId();
|
||
|
||
// console.log('初始化后的分类数据:', {
|
||
// categoryColumns: this.categoryColumns,
|
||
// categoryIndexes: this.categoryIndexes,
|
||
// categoryLevels: this.categoryLevels,
|
||
// categoryPathText: this.categoryPathText,
|
||
// selectedCategoryId: this.selectedCategoryId
|
||
// });
|
||
|
||
// console.log('initCategoryPicker执行完成');
|
||
}), (0, _defineProperty2.default)(_methods, "onCategoryColumnChange", function onCategoryColumnChange(e) {
|
||
// 获取当前变化的列和选中的值
|
||
var _e$detail = e.detail,
|
||
column = _e$detail.column,
|
||
value = _e$detail.value;
|
||
// console.log(`列变化: 第${column}列, 值=${value}`);
|
||
|
||
// 更新对应列的索引
|
||
this.categoryIndexes[column] = value;
|
||
|
||
// 更新选中的分类对象
|
||
this.categoryLevels[column] = this.categoryColumns[column][value];
|
||
|
||
// 如果不是最后一列,需要级联更新后续列
|
||
if (column < this.maxCategoryLevel - 1) {
|
||
// 从当前列的下一列开始,重置所有后续列
|
||
this.updateSubsequentColumns(column + 1);
|
||
}
|
||
|
||
// 更新分类路径和选中ID
|
||
this.updateCategoryPathText();
|
||
this.updateSelectedCategoryId();
|
||
console.log('列变化后的分类数据:', {
|
||
categoryColumns: this.categoryColumns,
|
||
categoryIndexes: this.categoryIndexes,
|
||
categoryLevels: this.categoryLevels
|
||
});
|
||
}), (0, _defineProperty2.default)(_methods, "updateSubsequentColumns", function updateSubsequentColumns(startColumn) {
|
||
// 获取前一列选中的分类对象
|
||
var parentCategory = this.categoryLevels[startColumn - 1];
|
||
|
||
// 如果父分类不存在或没有子分类,则清空后续所有列
|
||
if (!parentCategory || !parentCategory.children || parentCategory.children.length === 0) {
|
||
// 从startColumn开始,设置所有后续列为空数据
|
||
for (var i = startColumn; i < this.maxCategoryLevel; i++) {
|
||
this.categoryColumns[i] = [{
|
||
name: '暂无数据',
|
||
id: ''
|
||
}];
|
||
this.categoryIndexes[i] = 0;
|
||
this.categoryLevels[i] = {
|
||
name: '暂无数据',
|
||
id: ''
|
||
};
|
||
}
|
||
return;
|
||
}
|
||
|
||
// 设置当前列的数据为父分类的子分类
|
||
this.categoryColumns[startColumn] = parentCategory.children;
|
||
this.categoryIndexes[startColumn] = 0;
|
||
this.categoryLevels[startColumn] = parentCategory.children[0];
|
||
|
||
// 如果当前列不是最后一列,继续递归更新后续列
|
||
if (startColumn < this.maxCategoryLevel - 1) {
|
||
this.updateSubsequentColumns(startColumn + 1);
|
||
}
|
||
}), (0, _defineProperty2.default)(_methods, "onCategoryChange", function onCategoryChange(e) {
|
||
var values = e.detail.value;
|
||
console.log('分类选择确认:', values);
|
||
|
||
// 更新所有列的索引
|
||
this.categoryIndexes = (0, _toConsumableArray2.default)(values);
|
||
|
||
// 更新每个级别选中的分类对象
|
||
for (var i = 0; i < values.length; i++) {
|
||
// 确保该列存在数据
|
||
if (this.categoryColumns[i] && this.categoryColumns[i][values[i]]) {
|
||
this.categoryLevels[i] = this.categoryColumns[i][values[i]];
|
||
}
|
||
}
|
||
|
||
// 更新分类路径和选中ID
|
||
this.updateCategoryPathText();
|
||
this.updateSelectedCategoryId();
|
||
console.log('已选择分类路径:', this.categoryPathText);
|
||
console.log('已选择分类ID:', this.selectedCategoryId);
|
||
}), (0, _defineProperty2.default)(_methods, "updateCategoryPathText", function updateCategoryPathText() {
|
||
// 过滤出有效的分类名称(排除"暂无数据")
|
||
var validLevels = this.categoryLevels.filter(function (level) {
|
||
return level && level.name && level.name !== '暂无数据';
|
||
});
|
||
|
||
// 用斜杠连接所有级别的名称
|
||
this.categoryPathText = validLevels.map(function (level) {
|
||
return level.name;
|
||
}).join(' / ');
|
||
|
||
// console.log('更新分类路径文本:', this.categoryPathText);
|
||
}), (0, _defineProperty2.default)(_methods, "updateSelectedCategoryId", function updateSelectedCategoryId() {
|
||
// 获取有效的分类级别(排除"暂无数据")
|
||
var validLevels = this.categoryLevels.filter(function (level) {
|
||
return level && level.id && level.id !== '';
|
||
});
|
||
|
||
// 如果没有有效级别,则返回空字符串
|
||
if (validLevels.length === 0) {
|
||
this.selectedCategoryId = '';
|
||
return;
|
||
}
|
||
|
||
// 选择最后一个有效级别的ID作为选中的分类ID
|
||
this.selectedCategoryId = validLevels[validLevels.length - 1].id;
|
||
|
||
// console.log('更新选中的分类ID:', this.selectedCategoryId);
|
||
}), (0, _defineProperty2.default)(_methods, "handleUploadStatusChange", function handleUploadStatusChange(isUploading) {
|
||
console.log('文件上传状态变化:', isUploading ? '上传中' : '未上传');
|
||
this.isUploading = isUploading;
|
||
}), _methods)), _name$options$watch$c);
|
||
exports.default = _default;
|
||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
||
|
||
/***/ }),
|
||
|
||
/***/ 257:
|
||
/*!******************************************************************************************************************!*\
|
||
!*** D:/project/zhizhu/pkgUpload/isbn-upload/index.vue?vue&type=style&index=0&id=2afdfd7b&scoped=true&lang=css& ***!
|
||
\******************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_id_2afdfd7b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./index.vue?vue&type=style&index=0&id=2afdfd7b&scoped=true&lang=css& */ 258);
|
||
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_id_2afdfd7b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_id_2afdfd7b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_id_2afdfd7b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_id_2afdfd7b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||
/* harmony default export */ __webpack_exports__["default"] = (_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_index_vue_vue_type_style_index_0_id_2afdfd7b_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 258:
|
||
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/project/zhizhu/pkgUpload/isbn-upload/index.vue?vue&type=style&index=0&id=2afdfd7b&scoped=true&lang=css& ***!
|
||
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
if(false) { var cssReload; }
|
||
|
||
|
||
/***/ })
|
||
|
||
},[[249,"common/runtime","common/vendor","pkgUpload/common/vendor"]]]);
|
||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pkgUpload/isbn-upload/index.js.map
|