mrr.sj.front/unpackage/dist/dev/mp-weixin/pages/ruzhu/qualification_syr.js

1297 lines
76 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/ruzhu/qualification_syr"],{
/***/ 1466:
/*!***************************************************************************************!*\
!*** /Users/danji/Desktop/mrr/mrr-sj/mrr.app.front/pages/ruzhu/qualification_syr.vue ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./qualification_syr.vue?vue&type=template&id=67489628&scoped=true& */ 1467);
/* harmony import */ var _qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./qualification_syr.vue?vue&type=script&lang=js& */ 1469);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _qualification_syr_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 _qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _qualification_syr_vue_vue_type_style_index_0_id_67489628_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./qualification_syr.vue?vue&type=style&index=0&id=67489628&scoped=true&lang=css& */ 1471);
/* harmony import */ var _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 42);
var renderjs
/* normalize component */
var component = Object(_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
"67489628",
null,
false,
_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
renderjs
)
component.options.__file = "pages/ruzhu/qualification_syr.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 1467:
/*!**********************************************************************************************************************************!*\
!*** /Users/danji/Desktop/mrr/mrr-sj/mrr.app.front/pages/ruzhu/qualification_syr.vue?vue&type=template&id=67489628&scoped=true& ***!
\**********************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./qualification_syr.vue?vue&type=template&id=67489628&scoped=true& */ 1468);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_template_id_67489628_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/***/ }),
/***/ 1468:
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./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!/Users/danji/Desktop/mrr/mrr-sj/mrr.app.front/pages/ruzhu/qualification_syr.vue?vue&type=template&id=67489628&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
var render = function () {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var m0 =
_vm.formatDateForDisplay(_vm.formData.health_card_start_date) || "选择日期"
var m1 =
_vm.formatDateForDisplay(_vm.formData.health_card_end_date) || "选择日期"
var g0 = _vm.formData.qualifications.length
if (!_vm._isMounted) {
_vm.e0 = function ($event) {
_vm.formData.health_card_expiry_type !== 1 &&
_vm.openDatePicker("health_card_end_date")
}
}
_vm.$mp.data = Object.assign(
{},
{
$root: {
m0: m0,
m1: m1,
g0: g0,
},
}
)
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ 1469:
/*!****************************************************************************************************************!*\
!*** /Users/danji/Desktop/mrr/mrr-sj/mrr.app.front/pages/ruzhu/qualification_syr.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 _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./qualification_syr.vue?vue&type=script&lang=js& */ 1470);
/* harmony import */ var _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_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 _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 1470:
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./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!/Users/danji/Desktop/mrr/mrr-sj/mrr.app.front/pages/ruzhu/qualification_syr.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);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 34));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 36));
var _request = _interopRequireDefault(__webpack_require__(/*! ../../utils/request */ 37));
var _uploadImage = _interopRequireDefault(__webpack_require__(/*! ../../utils/uploadImage */ 278));
var _per = _interopRequireDefault(__webpack_require__(/*! ../../utils/per */ 191));
var _debounce = __webpack_require__(/*! @/utils/debounce.js */ 190);
var _orc = __webpack_require__(/*! ../../utils/orc */ 335);
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var _default = {
data: function data() {
var currentDate = new Date();
var currentYear = new Date().getFullYear();
var years = Array.from({
length: 130
}, function (_, i) {
return 1970 + i;
});
var months = Array.from({
length: 12
}, function (_, i) {
return i + 1;
});
var days = Array.from({
length: 31
}, function (_, i) {
return i + 1;
});
var loadedData = this.loadFormDataFromLocal();
return {
formData: loadedData || {
// 健康证
health_card: '',
health_card_expiry_type: '',
health_card_start_date: '',
health_card_end_date: '',
// 资质照片
qualifications: [],
// 所属门店
uscc_type: '',
uscc_photo: '',
// 营业执照和门头照
shop_photo: '',
// 证照信息
uscc_num: '',
uscc_name: '',
for_shop: '',
uscc_expiry_type: '',
license_start_date: '',
license_end_date: ''
},
showStoreTypePickerFlag: false,
showDatePickerFlag: false,
showTipPopupFlag: false,
tipTitle: '',
tipImage: '',
currentDateField: '',
currentTipField: '',
storeTypeList: [{
label: '个体工商户营业执照',
value: '个体工商户营业执照'
}, {
label: '企业法人营业执照',
value: '企业法人营业执照'
}],
years: years,
months: months,
days: days,
dateValue: [currentYear - 1970, currentDate.getMonth(), currentDate.getDate() - 1],
indicatorStyle: 'height: 68rpx;',
userId: null,
identity: null,
// 表示是否需要从全局恢复数据
needRefreshFromGlobal: false,
// 添加营业执照识别相关状态(复用商家代码)
isRecognizing: false,
recognizeType: '' // 'uscc_photo', 'health_card'
};
},
computed: {
storeTypeText: function storeTypeText() {
var _this = this;
var type = this.storeTypeList.find(function (item) {
return item.value === _this.formData.uscc_type;
});
return type ? type.label : '';
}
},
// 页面生命周期
onLoad: function onLoad(options) {
console.log('资质页面 onLoad参数:', options);
// 同步获取用户信息,不等待异步
this.getUserInfoSync();
this.identity = getApp().globalData.artisanType;
// 立即从本地存储加载数据
this.loadFormData();
// 检查全局状态中是否有数据(从前一页面带过来的)
this.checkGlobalData();
// 预加载提示弹窗图片
this.preloadTipImages();
},
onShow: function onShow() {
// 从本地存储重新加载数据(确保最新)
this.loadFormDataFromLocalAndUpdate();
// 页面显示时重新检查并加载数据
this.loadFormData();
// 检查全局状态
this.checkGlobalData();
// 如果需要从全局刷新,执行刷新
if (this.needRefreshFromGlobal) {
this.loadFormDataFromLocalAndUpdate();
this.needRefreshFromGlobal = false;
}
},
mounted: function mounted() {
console.log('资质页面 mounted');
console.log('当前表单数据:', this.formData);
// 调试:检查本地存储是否有数据
try {
var stored = uni.getStorageSync('artisan_qualification_form_data');
console.log('本地存储中的资质数据:', stored);
} catch (e) {
console.log('检查本地存储失败:', e);
}
},
onHide: function onHide() {
// 页面隐藏时保存数据
this.saveFormDataToLocal();
},
onUnload: function onUnload() {
// 页面卸载时保存数据
this.saveFormDataToLocal();
},
methods: {
// 同步获取用户信息
getUserInfoSync: function getUserInfoSync() {
try {
var userInfo = uni.getStorageSync('userInfo');
if (userInfo && userInfo.id) {
this.userId = userInfo.id;
console.log('从缓存获取用户ID:', this.userId);
}
} catch (e) {
console.log('获取用户信息失败:', e);
}
},
// 获取用户信息(异步,只在需要时调用)
getUserInfo: function getUserInfo() {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", new Promise(function (resolve, reject) {
// 如果已经有用户ID直接返回
if (_this2.userId) {
resolve(_this2.userId);
return;
}
_request.default.post('/user/getuser', {
type: 1
}).then(function (result) {
if (result.state === 1) {
_this2.userId = result.data.id;
console.log('用户ID获取成功:', _this2.userId);
// 保存到缓存
try {
uni.setStorageSync('userInfo', {
id: _this2.userId
});
} catch (e) {
console.log('保存用户信息失败:', e);
}
resolve(_this2.userId);
} else {
console.error('获取用户信息失败:', result.msg);
reject(result.msg);
}
}).catch(function (error) {
console.error('获取用户信息接口错误:', error);
reject(error);
});
}));
case 1:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
},
// 从本地存储加载数据
loadFormDataFromLocal: function loadFormDataFromLocal() {
try {
var stored = uni.getStorageSync('artisan_qualification_form_data');
if (stored) {
console.log('从本地存储加载资质数据:', stored);
return stored;
}
} catch (e) {
console.log('读取资质数据失败:', e);
}
return null;
},
// 检查全局数据
checkGlobalData: function checkGlobalData() {
// 检查全局状态中是否有数据(从前一页面带过来的)
if (getApp().globalData.qualificationData) {
console.log('发现全局资质数据,进行合并:', getApp().globalData.qualificationData);
// 将全局数据合并到当前表单
Object.assign(this.formData, getApp().globalData.qualificationData);
// 保存到本地存储
this.saveFormDataToLocal();
// 清空全局数据,避免重复使用
// delete getApp().globalData.qualificationData;
getApp().globalData.qualificationData = null;
// 设置需要刷新标记
this.needRefreshFromGlobal = true;
}
},
// 从本地存储加载数据
loadFormData: function loadFormData() {
var _this3 = this;
try {
// 先尝试用通用的key不依赖用户ID
var stored = uni.getStorageSync('artisan_qualification_form_data');
// 如果没有数据再尝试用带用户ID的key
if (!stored && this.userId) {
stored = uni.getStorageSync("artisan_qualification_form_data_".concat(this.userId));
}
if (stored) {
console.log('从本地存储加载数据:', stored);
// 直接替换formData对象保持响应式
Object.keys(stored).forEach(function (key) {
if (_this3.formData.hasOwnProperty(key)) {
// 如果是数组,确保复制一份新数组
if (key === 'qualifications' && Array.isArray(stored[key])) {
_this3.formData[key] = (0, _toConsumableArray2.default)(stored[key]);
} else {
_this3.formData[key] = stored[key];
}
}
});
}
} catch (e) {
console.log('读取本地存储失败:', e);
}
},
// 从本地存储加载并更新表单数据
loadFormDataFromLocalAndUpdate: function loadFormDataFromLocalAndUpdate() {
var _this4 = this;
var localData = this.loadFormDataFromLocal();
if (localData) {
console.log('从本地存储更新表单数据:', localData);
// 如果 uscc_type 是数字,转换为对应的中文字符串
if (localData.uscc_type === 1 || localData.uscc_type === 'individual') {
localData.uscc_type = '个体工商户营业执照';
} else if (localData.uscc_type === 2 || localData.uscc_type === 'corporate') {
localData.uscc_type = '企业法人营业执照';
}
// 更新表单数据
Object.keys(localData).forEach(function (key) {
if (_this4.formData.hasOwnProperty(key)) {
_this4.formData[key] = localData[key];
}
});
}
},
// 保存数据到本地存储(带防抖)
saveFormDataToLocalDebounce: (0, _debounce.debounce)(function () {
this.saveFormDataToLocal();
}, 500),
// 保存数据到本地存储
saveFormDataToLocal: function saveFormDataToLocal() {
try {
uni.setStorageSync('artisan_qualification_form_data', this.formData);
console.log('资质数据已保存到本地存储');
} catch (e) {
console.log('保存资质数据失败:', e);
}
},
// 清空本地存储(只在审核成功时调用)
clearFormDataLocal: function clearFormDataLocal() {
try {
uni.removeStorageSync('artisan_qualification_form_data');
console.log('已清空资质数据');
} catch (e) {
console.log('清空资质数据失败:', e);
}
},
getFormData: function getFormData() {
return {
health_card: this.formData.health_card,
health_expiry_type: this.formData.health_card_expiry_type,
health_expiry: this.formatHealthCardExpiry(),
qualifications: this.formData.qualifications,
uscc_type: this.formData.uscc_type,
uscc_photo: this.formData.uscc_photo,
shop_photo: this.formData.shop_photo,
uscc_num: this.formData.uscc_num,
uscc_name: this.formData.uscc_name,
for_shop: this.formData.for_shop,
uscc_expiry_type: this.formData.uscc_expiry_type,
uscc_expiry: this.formatLicenseExpiry()
};
},
// 格式化健康证有效期
formatHealthCardExpiry: function formatHealthCardExpiry() {
if (!this.formData.health_card_start_date) return '';
var startDate = this.formatDateForBackend(this.formData.health_card_start_date);
if (this.formData.health_card_expiry_type === 1) {
return "".concat(startDate, " \u2014\u2014 ");
} else if (this.formData.health_card_end_date) {
var endDate = this.formatDateForBackend(this.formData.health_card_end_date);
return "".concat(startDate, " \u2014\u2014 ").concat(endDate);
}
return '';
},
// 格式化营业执照有效期
formatLicenseExpiry: function formatLicenseExpiry() {
if (!this.formData.license_start_date) return '';
var startDate = this.formatDateForBackend(this.formData.license_start_date);
if (this.formData.uscc_expiry_type === 1) {
return "".concat(startDate, " \u2014\u2014 ");
} else if (this.formData.license_end_date) {
var endDate = this.formatDateForBackend(this.formData.license_end_date);
return "".concat(startDate, " \u2014\u2014 ").concat(endDate);
}
return '';
},
// 预加载提示弹窗图片
preloadTipImages: function preloadTipImages() {
var images = ['https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ab410a5d-5819-47f2-a0fc-3fd6b90d6770',
// 弹窗背景
'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/72856aac-f0ac-49a1-a7f1-be3220ecb314',
// 证件号码
'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4fb3e0a2-4c1a-4433-a181-b7a1dfefd030',
// 企业名称
'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/151b2238-099a-4b94-9376-03197d994101' // 店铺名称
];
console.log('开始预加载提示弹窗图片...');
// 预加载所有图片
images.forEach(function (src) {
var img = new Image();
img.src = src;
});
console.log('提示弹窗图片预加载完成');
},
// 显示提示弹窗
showTipPopup: function showTipPopup(field) {
var _this5 = this;
var tipConfig = {
'uscc_num': {
title: '如何找到证件号码',
image: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/72856aac-f0ac-49a1-a7f1-be3220ecb314'
},
'uscc_name': {
title: '如何找到企业名称',
image: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4fb3e0a2-4c1a-4433-a181-b7a1dfefd030'
},
'for_shop': {
title: '如何找到店铺名称',
image: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/151b2238-099a-4b94-9376-03197d994101'
}
};
if (tipConfig[field]) {
this.tipTitle = tipConfig[field].title;
this.tipImage = tipConfig[field].image;
this.currentTipField = field;
// 使用异步显示,确保图片加载
setTimeout(function () {
_this5.showTipPopupFlag = true;
}, 50);
}
},
hideTipPopup: function hideTipPopup() {
var _this6 = this;
this.showTipPopupFlag = false;
setTimeout(function () {
_this6.currentTipField = '';
}, 300);
},
// 日期显示格式化
formatDateForDisplay: function formatDateForDisplay(dateStr) {
if (!dateStr) return '';
if (dateStr === '长久有效') return '长久有效';
if (dateStr.includes('-')) {
var _dateStr$split = dateStr.split('-'),
_dateStr$split2 = (0, _slicedToArray2.default)(_dateStr$split, 3),
year = _dateStr$split2[0],
month = _dateStr$split2[1],
day = _dateStr$split2[2];
return "".concat(year, "\u5E74").concat(parseInt(month), "\u6708").concat(parseInt(day), "\u65E5");
}
return dateStr;
},
// 日期后端格式化
formatDateForBackend: function formatDateForBackend(dateStr) {
if (!dateStr) return '';
if (dateStr === '长久有效') return 'permanent';
var match = dateStr.match(/(\d+)年(\d+)月(\d+)日/);
if (match) {
var year = match[1];
var month = match[2].padStart(2, '0');
var day = match[3].padStart(2, '0');
return "".concat(year, "-").concat(month, "-").concat(day);
}
return dateStr;
},
// 设置健康证有效期类型
setHealthCardValidType: function setHealthCardValidType(type) {
this.formData.health_card_expiry_type = type === 'permanent' ? 1 : 2;
if (type === 'permanent') {
this.formData.health_card_end_date = '长久有效';
} else {
if (this.formData.health_card_end_date === '长久有效') {
this.formData.health_card_end_date = '';
}
}
// 保存到本地存储
this.saveFormDataToLocalDebounce();
},
// 设置营业执照有效期类型
setLicenseValidType: function setLicenseValidType(type) {
this.formData.uscc_expiry_type = type === 'permanent' ? 1 : 2;
if (type === 'permanent') {
this.formData.license_end_date = '长久有效';
} else {
if (this.formData.license_end_date === '长久有效') {
this.formData.license_end_date = '';
}
}
// 保存到本地存储
this.saveFormDataToLocalDebounce();
},
// 门店类型选择
showStoreTypePicker: function showStoreTypePicker() {
this.showStoreTypePickerFlag = true;
},
hideStoreTypePicker: function hideStoreTypePicker() {
this.showStoreTypePickerFlag = false;
},
selectStoreType: function selectStoreType(item) {
this.formData.uscc_type = item.value;
// 保存到本地存储
this.saveFormDataToLocalDebounce();
},
confirmStoreType: function confirmStoreType() {
this.hideStoreTypePicker();
},
// 日期选择
openDatePicker: function openDatePicker(field) {
this.currentDateField = field;
var currentDate = new Date();
var initialDate = currentDate;
if (this.formData[field]) {
var dateStr = this.formData[field];
var match = dateStr.match(/(\d+)年(\d+)月(\d+)日/);
if (match) {
initialDate = new Date(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]));
}
}
var yearIndex = this.years.indexOf(initialDate.getFullYear());
var monthIndex = initialDate.getMonth();
var dayIndex = initialDate.getDate() - 1;
this.dateValue = [yearIndex >= 0 ? yearIndex : 0, monthIndex, dayIndex];
this.showDatePickerFlag = true;
},
hideDatePicker: function hideDatePicker() {
this.showDatePickerFlag = false;
},
bindDateChange: function bindDateChange(e) {
this.dateValue = e.detail.value;
},
confirmDate: function confirmDate() {
var _this$dateValue = (0, _slicedToArray2.default)(this.dateValue, 3),
yearIndex = _this$dateValue[0],
monthIndex = _this$dateValue[1],
dayIndex = _this$dateValue[2];
var year = this.years[yearIndex];
var month = this.months[monthIndex];
var day = this.days[dayIndex];
var dateStr = "".concat(year, "\u5E74").concat(month, "\u6708").concat(day, "\u65E5");
// 验证日期逻辑
var selectedDate = new Date(year, month - 1, day);
var today = new Date();
today.setHours(0, 0, 0, 0);
// 开始日期验证:不能选择今天之后的日期
if (this.currentDateField.endsWith('_start_date') && selectedDate > today) {
uni.showToast({
title: '开始日期不能晚于今天',
icon: 'none'
});
return;
}
// 根据字段类型进行不同的验证
if (this.currentDateField.includes('health_card')) {
// 健康证日期验证
if (this.currentDateField === 'health_card_start_date') {
// 开始日期不能晚于结束日期
if (this.formData.health_card_end_date && this.formData.health_card_end_date !== '长久有效') {
var endDateStr = this.formData.health_card_end_date;
var match = endDateStr.match(/(\d+)年(\d+)月(\d+)日/);
if (match) {
var endDate = new Date(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]));
if (selectedDate > endDate) {
uni.showToast({
title: '开始日期不能晚于结束日期',
icon: 'none'
});
return;
}
}
}
this.formData[this.currentDateField] = dateStr;
// 如果结束日期为空或早于新的开始日期,重置结束日期
if (this.formData.health_card_end_date && this.formData.health_card_end_date !== '长久有效') {
var _endDateStr = this.formData.health_card_end_date;
var _match = _endDateStr.match(/(\d+)年(\d+)月(\d+)日/);
if (_match) {
var _endDate = new Date(parseInt(_match[1]), parseInt(_match[2]) - 1, parseInt(_match[3]));
if (selectedDate > _endDate) {
this.formData.health_card_end_date = '';
}
}
}
} else if (this.currentDateField === 'health_card_end_date') {
// 结束日期必须晚于开始日期
if (this.formData.health_card_start_date) {
var startDateStr = this.formData.health_card_start_date;
var _match2 = startDateStr.match(/(\d+)年(\d+)月(\d+)日/);
if (_match2) {
var startDate = new Date(parseInt(_match2[1]), parseInt(_match2[2]) - 1, parseInt(_match2[3]));
if (selectedDate <= startDate) {
uni.showToast({
title: '结束日期必须晚于开始日期',
icon: 'none'
});
return;
}
}
} else {
uni.showToast({
title: '请先选择开始日期',
icon: 'none'
});
return;
}
this.formData[this.currentDateField] = dateStr;
}
} else if (this.currentDateField.includes('license')) {
// 营业执照日期验证
if (this.currentDateField === 'license_start_date') {
// 开始日期不能晚于结束日期
if (this.formData.license_end_date && this.formData.license_end_date !== '长久有效') {
var _endDateStr2 = this.formData.license_end_date;
var _match3 = _endDateStr2.match(/(\d+)年(\d+)月(\d+)日/);
if (_match3) {
var _endDate2 = new Date(parseInt(_match3[1]), parseInt(_match3[2]) - 1, parseInt(_match3[3]));
if (selectedDate > _endDate2) {
uni.showToast({
title: '开始日期不能晚于结束日期',
icon: 'none'
});
return;
}
}
}
this.formData[this.currentDateField] = dateStr;
// 如果结束日期为空或早于新的开始日期,重置结束日期
if (this.formData.license_end_date && this.formData.license_end_date !== '长久有效') {
var _endDateStr3 = this.formData.license_end_date;
var _match4 = _endDateStr3.match(/(\d+)年(\d+)月(\d+)日/);
if (_match4) {
var _endDate3 = new Date(parseInt(_match4[1]), parseInt(_match4[2]) - 1, parseInt(_match4[3]));
if (selectedDate > _endDate3) {
this.formData.license_end_date = '';
}
}
}
} else if (this.currentDateField === 'license_end_date') {
// 结束日期必须晚于开始日期
if (this.formData.license_start_date) {
var _startDateStr = this.formData.license_start_date;
var _match5 = _startDateStr.match(/(\d+)年(\d+)月(\d+)日/);
if (_match5) {
var _startDate = new Date(parseInt(_match5[1]), parseInt(_match5[2]) - 1, parseInt(_match5[3]));
if (selectedDate <= _startDate) {
uni.showToast({
title: '结束日期必须晚于开始日期',
icon: 'none'
});
return;
}
}
} else {
uni.showToast({
title: '请先选择开始日期',
icon: 'none'
});
return;
}
this.formData[this.currentDateField] = dateStr;
}
}
// 保存到本地存储
this.saveFormDataToLocalDebounce();
// this.saveFormDataToLocal();
this.hideDatePicker();
},
// 图片上传 - 与商家端统一
chooseImage: function chooseImage(type) {
var _this7 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
var chooseResult, tempFilePath, file, result;
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.prev = 0;
if (_this7.userId) {
_context2.next = 4;
break;
}
_context2.next = 4;
return _this7.getUserInfo();
case 4:
_context2.next = 6;
return new Promise(function (resolve, reject) {
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: resolve,
fail: reject
});
});
case 6:
chooseResult = _context2.sent;
if (!(!chooseResult.tempFilePaths || chooseResult.tempFilePaths.length === 0)) {
_context2.next = 9;
break;
}
return _context2.abrupt("return");
case 9:
tempFilePath = chooseResult.tempFilePaths[0];
file = {
path: tempFilePath,
size: 0
};
_context2.next = 13;
return _this7.directUpload(file, _this7.userId, _this7.identity + 1);
case 13:
result = _context2.sent;
if (!result) {
_context2.next = 20;
break;
}
_this7.formData[type] = result;
// 上传成功后自动识别营业执照
if (!(type === 'uscc_photo')) {
_context2.next = 19;
break;
}
_context2.next = 19;
return _this7.recognizeBusinessLicense(result);
case 19:
// 保存到本地存储
_this7.saveFormDataToLocalDebounce();
case 20:
_context2.next = 25;
break;
case 22:
_context2.prev = 22;
_context2.t0 = _context2["catch"](0);
console.log('上传图片错误:', _context2.t0);
case 25:
case "end":
return _context2.stop();
}
}
}, _callee2, null, [[0, 22]]);
}))();
},
// 直接上传方法 - 与商家端统一
directUpload: function directUpload(file, userId, type) {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
var date, artisan, fileExtension, parts, ext, name, ossConfig;
return _regenerator.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.prev = 0;
date = new Date().getTime();
artisan = type == 1 ? 'yh' : type == 2 ? 'syr' : type == 3 ? 'sj' : '';
fileExtension = 'jpg';
if (file.path.includes('.')) {
parts = file.path.split('.');
ext = parts[parts.length - 1].toLowerCase();
if (ext && ext.length <= 4) {
fileExtension = ext;
}
}
name = "".concat(userId, "_").concat(artisan, "_").concat(date, ".").concat(fileExtension);
_context3.next = 8;
return _request.default.post('/user/getalioss', {
type: type,
kind: 1
});
case 8:
ossConfig = _context3.sent;
_context3.next = 11;
return new Promise(function (resolve, reject) {
uni.uploadFile({
url: ossConfig.host,
filePath: file.path,
name: 'file',
formData: {
key: ossConfig.dir + name,
policy: ossConfig.policy,
OSSAccessKeyId: ossConfig.ossAccessKeyId,
success_action_status: '200',
signature: ossConfig.signature
},
success: function success(res) {
if (res.statusCode === 200) {
var fileUrl = "".concat(ossConfig.host, "/").concat(ossConfig.dir).concat(name);
resolve(fileUrl);
} else {
reject(new Error('上传失败'));
}
},
fail: reject
});
});
case 11:
return _context3.abrupt("return", _context3.sent);
case 14:
_context3.prev = 14;
_context3.t0 = _context3["catch"](0);
console.error('直接上传失败:', _context3.t0);
throw _context3.t0;
case 18:
case "end":
return _context3.stop();
}
}
}, _callee3, null, [[0, 14]]);
}))();
},
/**
* 识别营业执照
*/
recognizeBusinessLicense: function recognizeBusinessLicense(imageUrl) {
var _this8 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
var result, hasRecognizedData, recognizedFields;
return _regenerator.default.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
_context4.prev = 0;
_this8.isRecognizing = true;
_this8.recognizeType = 'uscc_photo';
uni.showLoading({
title: '正在识别营业执照...',
mask: true
});
// 调用OCR接口
_context4.next = 6;
return (0, _orc.recognizeBusinessLicense)(imageUrl);
case 6:
result = _context4.sent;
console.log('营业执照识别结果:', result);
hasRecognizedData = _this8.checkBusinessLicenseRecognition(result);
if (hasRecognizedData) {
_context4.next = 14;
break;
}
uni.hideLoading();
uni.showToast({
title: '未识别到营业执照信息,请手动填写或重新拍摄',
icon: 'none',
duration: 3000
});
_this8.isRecognizing = false;
return _context4.abrupt("return");
case 14:
// 填充营业执照信息
recognizedFields = 0; // 直接使用OCR返回的 uscc_type
if (result.uscc_type && result.uscc_type.trim()) {
_this8.formData.uscc_type = result.uscc_type;
recognizedFields++;
}
// 企业名称:如果识别结果为"无",就设置为空字符串
if (result.uscc_name && result.uscc_name.trim() && result.uscc_name !== '无') {
_this8.formData.uscc_name = result.uscc_name;
recognizedFields++;
} else {
// 如果是"无"或空值,设置为空字符串
_this8.formData.uscc_name = '';
}
if (result.uscc_num && result.uscc_num.trim()) {
_this8.formData.uscc_num = result.uscc_num;
recognizedFields++;
}
// 如果店铺名称为空,使用企业名称填充
if (result.uscc_name && result.uscc_name.trim() && result.uscc_name !== '无') {
_this8.formData.for_shop = result.uscc_name;
} else {
// 如果是"无"或空值,设置为空字符串
_this8.formData.uscc_name = '';
}
uni.hideLoading();
// 根据识别的字段数量给出不同的提示
if (recognizedFields > 0) {
uni.showToast({
title: '营业执照识别成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: '识别完成,但未获取到有效信息',
icon: 'none',
duration: 3000
});
}
_context4.next = 28;
break;
case 23:
_context4.prev = 23;
_context4.t0 = _context4["catch"](0);
console.error('营业执照识别失败:', _context4.t0);
uni.hideLoading();
uni.showToast({
title: _context4.t0.message || '识别失败,请手动填写',
icon: 'none',
duration: 3000
});
case 28:
_context4.prev = 28;
_this8.isRecognizing = false;
return _context4.finish(28);
case 31:
case "end":
return _context4.stop();
}
}
}, _callee4, null, [[0, 23, 28, 31]]);
}))();
},
// 检查营业执照识别结果是否有效(复用商家代码逻辑)
checkBusinessLicenseRecognition: function checkBusinessLicenseRecognition(result) {
var requiredFields = ['uscc_num', 'uscc_name', 'uscc_type'];
for (var _i = 0, _requiredFields = requiredFields; _i < _requiredFields.length; _i++) {
var field = _requiredFields[_i];
if (result[field] && result[field].trim()) {
return true;
}
}
return false;
},
// 添加技师资质照片方法
addQualification: function addQualification() {
if (this.formData.qualifications.length >= 9) {
uni.showToast({
title: '最多只能上传9张资质照片',
icon: 'none'
});
return;
}
this.chooseImageForQualifications();
},
chooseImageForQualifications: function chooseImageForQualifications() {
var _this9 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
var remainingCount, chooseResult, totalAfterUpload, _iterator, _step, tempFilePath, file, result;
return _regenerator.default.wrap(function _callee5$(_context5) {
while (1) {
switch (_context5.prev = _context5.next) {
case 0:
_context5.prev = 0;
if (_this9.userId) {
_context5.next = 4;
break;
}
_context5.next = 4;
return _this9.getUserInfo();
case 4:
remainingCount = 9 - _this9.formData.qualifications.length;
_context5.next = 7;
return new Promise(function (resolve, reject) {
uni.chooseImage({
count: remainingCount,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: resolve,
fail: reject
});
});
case 7:
chooseResult = _context5.sent;
if (!(!chooseResult.tempFilePaths || chooseResult.tempFilePaths.length === 0)) {
_context5.next = 10;
break;
}
return _context5.abrupt("return");
case 10:
totalAfterUpload = _this9.formData.qualifications.length + chooseResult.tempFilePaths.length;
if (!(totalAfterUpload > 9)) {
_context5.next = 14;
break;
}
uni.showToast({
title: '最多只能上传9张资质照片',
icon: 'none'
});
return _context5.abrupt("return");
case 14:
_iterator = _createForOfIteratorHelper(chooseResult.tempFilePaths);
_context5.prev = 15;
_iterator.s();
case 17:
if ((_step = _iterator.n()).done) {
_context5.next = 26;
break;
}
tempFilePath = _step.value;
file = {
path: tempFilePath,
size: 0
};
_context5.next = 22;
return _this9.directUpload(file, _this9.userId, _this9.identity + 1);
case 22:
result = _context5.sent;
if (result) {
_this9.formData.qualifications.push(result);
}
case 24:
_context5.next = 17;
break;
case 26:
_context5.next = 31;
break;
case 28:
_context5.prev = 28;
_context5.t0 = _context5["catch"](15);
_iterator.e(_context5.t0);
case 31:
_context5.prev = 31;
_iterator.f();
return _context5.finish(31);
case 34:
// 保存到本地存储
_this9.saveFormDataToLocalDebounce();
_context5.next = 40;
break;
case 37:
_context5.prev = 37;
_context5.t1 = _context5["catch"](0);
console.log('上传资质照片错误:', _context5.t1);
case 40:
case "end":
return _context5.stop();
}
}
}, _callee5, null, [[0, 37], [15, 28, 31, 34]]);
}))();
},
// 删除资质照片
deleteQualification: function deleteQualification(index) {
this.formData.qualifications.splice(index, 1);
// 保存到本地存储
this.saveFormDataToLocalDebounce();
},
// 表单验证
validateForm: function validateForm() {
if (!this.formData.health_card) {
uni.showToast({
title: '请上传健康证',
icon: 'none'
});
return false;
}
if (!this.formData.health_card_expiry_type) {
uni.showToast({
title: '请选择健康证有效期类型',
icon: 'none'
});
return false;
}
if (!this.formData.health_card_start_date) {
uni.showToast({
title: '请选择健康证开始日期',
icon: 'none'
});
return false;
}
if (this.formData.health_card_expiry_type === 2 && !this.formData.health_card_end_date) {
uni.showToast({
title: '请选择健康证结束日期',
icon: 'none'
});
return false;
}
if (this.formData.qualifications.length === 0) {
uni.showToast({
title: '请上传至少一张技师资质照片',
icon: 'none'
});
return false;
}
if (!this.formData.uscc_photo) {
uni.showToast({
title: '请上传营业执照原件',
icon: 'none'
});
return false;
}
if (!this.formData.shop_photo) {
uni.showToast({
title: '请上传门头照',
icon: 'none'
});
return false;
}
if (!this.formData.uscc_type) {
uni.showToast({
title: '请输入门店类型',
icon: 'none'
});
return false;
}
if (!this.formData.uscc_num) {
uni.showToast({
title: '请输入营业执照的证件号码',
icon: 'none'
});
return false;
}
if (!this.formData.uscc_name) {
uni.showToast({
title: '请输入营业执照的企业名称',
icon: 'none'
});
return false;
}
if (!this.formData.for_shop) {
uni.showToast({
title: '请输入营业执照的店铺名称',
icon: 'none'
});
return false;
}
return true;
},
// 保存表单数据
saveFormData: function saveFormData() {
if (this.validateForm()) {
// 将表单数据保存到全局
getApp().globalData.qualificationData = this.getFormData();
// 同时保存到本地(双重保险)
this.saveFormDataToLocal();
console.log('资质信息保存成功:', getApp().globalData.qualificationData);
return true;
}
return false;
}
}
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }),
/***/ 1471:
/*!************************************************************************************************************************************************!*\
!*** /Users/danji/Desktop/mrr/mrr-sj/mrr.app.front/pages/ruzhu/qualification_syr.vue?vue&type=style&index=0&id=67489628&scoped=true&lang=css& ***!
\************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_style_index_0_id_67489628_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./qualification_syr.vue?vue&type=style&index=0&id=67489628&scoped=true&lang=css& */ 1472);
/* harmony import */ var _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_style_index_0_id_67489628_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_style_index_0_id_67489628_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_style_index_0_id_67489628_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 _Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_style_index_0_id_67489628_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_Applications_HBuilderX_Alpha_app_Contents_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_qualification_syr_vue_vue_type_style_index_0_id_67489628_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 1472:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./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!/Users/danji/Desktop/mrr/mrr-sj/mrr.app.front/pages/ruzhu/qualification_syr.vue?vue&type=style&index=0&id=67489628&scoped=true&lang=css& ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
if(false) { var cssReload; }
/***/ })
}]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/ruzhu/qualification_syr.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'pages/ruzhu/qualification_syr-create-component',
{
'pages/ruzhu/qualification_syr-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('2')['createComponent'](__webpack_require__(1466))
})
},
[['pages/ruzhu/qualification_syr-create-component']]
]);