You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1635 lines
81 KiB
1635 lines
81 KiB
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/subPages/createCommodity/index"],{
|
|
|
|
/***/ 574:
|
|
/*!**********************************************************************************************************************************************************!*\
|
|
!*** C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/main.js?{"page":"pages%2FsubPages%2FcreateCommodity%2Findex"} ***!
|
|
\**********************************************************************************************************************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* WEBPACK VAR INJECTION */(function(wx, createPage) {
|
|
|
|
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
|
__webpack_require__(/*! uni-pages */ 26);
|
|
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
|
|
var _index = _interopRequireDefault(__webpack_require__(/*! ./pages/subPages/createCommodity/index.vue */ 575));
|
|
// @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"]))
|
|
|
|
/***/ }),
|
|
|
|
/***/ 575:
|
|
/*!*************************************************************************************************************************************!*\
|
|
!*** C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/pages/subPages/createCommodity/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_48e57aa2___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=48e57aa2& */ 576);
|
|
/* harmony import */ var _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js& */ 578);
|
|
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
/* harmony import */ var _index_vue_vue_type_style_index_0_lang_less___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.vue?vue&type=style&index=0&lang=less& */ 580);
|
|
/* 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 */ 40);
|
|
|
|
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_48e57aa2___WEBPACK_IMPORTED_MODULE_0__["render"],
|
|
_index_vue_vue_type_template_id_48e57aa2___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
|
|
false,
|
|
null,
|
|
null,
|
|
null,
|
|
false,
|
|
_index_vue_vue_type_template_id_48e57aa2___WEBPACK_IMPORTED_MODULE_0__["components"],
|
|
renderjs
|
|
)
|
|
|
|
component.options.__file = "pages/subPages/createCommodity/index.vue"
|
|
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 576:
|
|
/*!********************************************************************************************************************************************************************!*\
|
|
!*** C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/pages/subPages/createCommodity/index.vue?vue&type=template&id=48e57aa2& ***!
|
|
\********************************************************************************************************************************************************************/
|
|
/*! 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_16_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_48e57aa2___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--16-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=48e57aa2& */ 577);
|
|
/* 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_16_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_48e57aa2___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_16_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_48e57aa2___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_16_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_48e57aa2___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_16_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_48e57aa2___WEBPACK_IMPORTED_MODULE_0__["components"]; });
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 577:
|
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/pages/subPages/createCommodity/index.vue?vue&type=template&id=48e57aa2& ***!
|
|
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/*! 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 = {
|
|
wPicker: function () {
|
|
return __webpack_require__.e(/*! import() | components/w-picker/w-picker */ "components/w-picker/w-picker").then(__webpack_require__.bind(null, /*! @/components/w-picker/w-picker.vue */ 2180))
|
|
},
|
|
}
|
|
} 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.thumbs.length
|
|
var g1 = _vm.thumbs.length
|
|
var g2 = _vm.thumbs.length
|
|
var l0 = _vm.__map(_vm.presettagsList, function (item, index) {
|
|
var $orig = _vm.__get_orig(item)
|
|
var g3 = _vm.goodsInfo.goods.tag.indexOf(item.id)
|
|
return {
|
|
$orig: $orig,
|
|
g3: g3,
|
|
}
|
|
})
|
|
var g4 = _vm.specsShow ? _vm.specList.length : null
|
|
if (!_vm._isMounted) {
|
|
_vm.e0 = function ($event) {
|
|
_vm.richText = false
|
|
}
|
|
_vm.e1 = function ($event) {
|
|
_vm.noticeText = false
|
|
}
|
|
}
|
|
_vm.$mp.data = Object.assign(
|
|
{},
|
|
{
|
|
$root: {
|
|
g0: g0,
|
|
g1: g1,
|
|
g2: g2,
|
|
l0: l0,
|
|
g4: g4,
|
|
},
|
|
}
|
|
)
|
|
}
|
|
var recyclableRender = false
|
|
var staticRenderFns = []
|
|
render._withStripped = true
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 578:
|
|
/*!**************************************************************************************************************************************************************!*\
|
|
!*** C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/pages/subPages/createCommodity/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_12_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--12-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& */ 579);
|
|
/* 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_12_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_12_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_12_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_12_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_12_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);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 579:
|
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/pages/subPages/createCommodity/index.vue?vue&type=script&lang=js& ***!
|
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* WEBPACK VAR INJECTION */(function(uni, wx) {
|
|
|
|
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 114));
|
|
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 116));
|
|
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
|
var _app = _interopRequireDefault(__webpack_require__(/*! @/common/js/app.js */ 30));
|
|
var _methods;
|
|
var inputPop = function inputPop() {
|
|
__webpack_require__.e(/*! require.ensure | components/template/inputPop */ "components/template/inputPop").then((function () {
|
|
return resolve(__webpack_require__(/*! @/components/template/inputPop */ 2299));
|
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
|
};
|
|
var PopManager = function PopManager() {
|
|
__webpack_require__.e(/*! require.ensure | components/template/PopManager */ "components/template/PopManager").then((function () {
|
|
return resolve(__webpack_require__(/*! @/components/template/PopManager */ 2075));
|
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
|
};
|
|
var wPicker = function wPicker() {
|
|
__webpack_require__.e(/*! require.ensure | components/w-picker/w-picker */ "components/w-picker/w-picker").then((function () {
|
|
return resolve(__webpack_require__(/*! @/components/w-picker/w-picker.vue */ 2180));
|
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
|
};
|
|
var jinEdit = function jinEdit() {
|
|
__webpack_require__.e(/*! require.ensure | components/jin-edit/jin-edit */ "components/jin-edit/jin-edit").then((function () {
|
|
return resolve(__webpack_require__(/*! @/components/jin-edit/jin-edit.vue */ 2306));
|
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
|
};
|
|
var _default = {
|
|
components: {
|
|
inputPop: inputPop,
|
|
PopManager: PopManager,
|
|
wPicker: wPicker,
|
|
jinEdit: jinEdit
|
|
},
|
|
data: function data() {
|
|
return {
|
|
priceText: '抢购价',
|
|
closetimeText: '',
|
|
submitType: 0,
|
|
bengF: '0',
|
|
adopt: true,
|
|
publicList: ['name', 'price', 'oldprice', 'num'],
|
|
rushList: ['retainage', 'op_one_limit'],
|
|
fightgroupList: ['peoplenum', 'grouptime', 'op_one_limit', 'aloneprice'],
|
|
bargainList: ['helplimit', 'dayhelpcount', 'onlytimes', 'joinlimit'],
|
|
slectDis: null,
|
|
statusText: '',
|
|
startValue: [],
|
|
endValue: [],
|
|
endtimeText: '请选择结束时间',
|
|
starttimeText: '请选择开始时间',
|
|
optionsShow: false,
|
|
specList: [],
|
|
specsText: '单规格',
|
|
specsShow: false,
|
|
ruleShow: false,
|
|
cateLists: [],
|
|
status: 0,
|
|
statusList: [{
|
|
id: 0,
|
|
name: '下架'
|
|
}, {
|
|
id: 1,
|
|
name: '上架'
|
|
}],
|
|
cutoffstatusText: '请选择截止时间类型',
|
|
cutoffstatus: 0,
|
|
cutoffstatusList: [{
|
|
id: 0,
|
|
name: '固定时间'
|
|
}, {
|
|
id: 1,
|
|
name: '购买后有效期'
|
|
}],
|
|
expresseText: '请选择快递模板',
|
|
express: 0,
|
|
expressList: [],
|
|
usestatusText: '请选择消费方式',
|
|
usestatusList: [{
|
|
id: 0,
|
|
name: '到店消费'
|
|
}, {
|
|
id: 1,
|
|
name: '快递上门'
|
|
}, {
|
|
id: 2,
|
|
name: '同时支持快递与核销'
|
|
}],
|
|
presettagsText: '',
|
|
presettagsArrary: [],
|
|
presettagsList: [],
|
|
presettagsType: 'bottom',
|
|
presettagsShow: false,
|
|
thumb: '',
|
|
thumbs: [],
|
|
cateText: '请选择商品分类',
|
|
cateList: [],
|
|
goodsNameText: '请输入商品名称',
|
|
returnTexts: '',
|
|
showTitleText: '',
|
|
inputShow: false,
|
|
inputShowType: 'center',
|
|
typeList: [],
|
|
type: 0,
|
|
cate: [0],
|
|
isladderVel: [0],
|
|
isladder: ['关闭', '打开'],
|
|
isnotice: 0,
|
|
noticeList: ['关闭', '打开'],
|
|
cateTwo: [0, 0],
|
|
goodsInfo: {
|
|
type: '',
|
|
storeid: '',
|
|
id: '',
|
|
goods: {
|
|
lp_status: 0,
|
|
lp_set: [{
|
|
max: "",
|
|
price: "",
|
|
vip_price: ""
|
|
}]
|
|
}
|
|
},
|
|
phoneHight: null,
|
|
scrollHeight: null,
|
|
typeText: '抢购',
|
|
id: '',
|
|
startTime: '',
|
|
endTime: '',
|
|
graceEditorMenuShow1: false,
|
|
graceEditorTitle1: '',
|
|
graceEditorItems1: [],
|
|
graceEditorFoucsIndex1: 0,
|
|
graceEditorMenuShow: false,
|
|
graceEditorTitle: '',
|
|
graceEditorItems: [],
|
|
graceEditorFoucsIndex: 0,
|
|
isSpecBox: false,
|
|
placeholder: '开始输入...',
|
|
// editorCtx:''
|
|
richText: false,
|
|
noticeText: false,
|
|
richTextVter: '',
|
|
visible1: false,
|
|
visible2: false,
|
|
visible3: false,
|
|
flag: false,
|
|
ladderShow: false,
|
|
is_describe_tip: 0
|
|
};
|
|
},
|
|
onLoad: function onLoad(e) {
|
|
var _this = this;
|
|
if (uni.getSystemInfoSync().system.indexOf('Android') === -1) {
|
|
_this.flag = true;
|
|
} else {
|
|
_this.flag = false;
|
|
}
|
|
uni.getSystemInfo({
|
|
success: function success(res) {
|
|
_this.phoneHight = res.windowHeight + 'px';
|
|
_this.scrollHeight = res.windowHeight - 30 + 'px';
|
|
_this.secollSpecHeight = res.windowHeight - 180 + 'px';
|
|
}
|
|
});
|
|
if (!!e.type) {
|
|
_this.slectDis = true;
|
|
} else {
|
|
_this.slectDis = false;
|
|
}
|
|
_this.goodsInfo.type = e.type, _this.goodsInfo.storeid = uni.getStorageSync('checkStoreid');
|
|
_this.goodsInfo.id = e.id, _this.init(_this.goodsInfo.type, uni.getStorageSync('checkStoreid'), _this.goodsInfo.id);
|
|
},
|
|
computed: {},
|
|
methods: (_methods = {
|
|
changenotice: function changenotice(e) {
|
|
this.goodsInfo['goods'].is_describe_tip = e.detail.value;
|
|
this.is_describe_tip = Number(e.detail.value);
|
|
console.log(e, this.goodsInfo['goods'].is_describe_tip);
|
|
this.flag = !this.flag;
|
|
this.flag = !this.flag;
|
|
},
|
|
changeladder: function changeladder(e) {
|
|
console.log(e);
|
|
this.isladderVel = e.detail.value;
|
|
},
|
|
cleanladder: function cleanladder(index) {
|
|
this.goodsInfo.goods.lp_set.splice(index, 1);
|
|
},
|
|
addladder: function addladder() {
|
|
var ladder = {
|
|
max: '',
|
|
price: '',
|
|
vip_price: ''
|
|
};
|
|
if (this.goodsInfo.goods.lp_set.length == 5) {
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '最多设置5个阶梯价'
|
|
});
|
|
return;
|
|
}
|
|
this.goodsInfo.goods.lp_set.push(ladder);
|
|
},
|
|
closelist: function closelist() {
|
|
this.goodsInfo.goods.lp_set = [];
|
|
this.ladderShow = false;
|
|
},
|
|
closeladder: function closeladder() {
|
|
console.log(this.goodsInfo.goods.lp_set);
|
|
for (var i = 0; i < this.goodsInfo.goods.lp_set.length; i++) {
|
|
for (var key in this.goodsInfo.goods.lp_set[i]) {
|
|
if (!this.goodsInfo.goods.lp_set[i][key]) {
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '请完善阶梯信息'
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
if (i > 0) {
|
|
console.log(this.goodsInfo.goods.lp_set[i].max, '111111111111111111', this.goodsInfo.goods.lp_set[i - 1].max);
|
|
if (Number(this.goodsInfo.goods.lp_set[i].max) < Number(this.goodsInfo.goods.lp_set[i - 1].max) || this.goodsInfo.goods.lp_set[i].max == this.goodsInfo.goods.lp_set[i - 1].max) {
|
|
_app.default.showError("每一个阶梯销售量需大于上一个阶梯销售量");
|
|
return;
|
|
}
|
|
console.log(this.goodsInfo.goods.lp_set[i].vip_price, '111111111111111111', this.goodsInfo.goods.lp_set[i - 1].vip_price);
|
|
if (Number(this.goodsInfo.goods.lp_set[i].vip_price) < Number(this.goodsInfo.goods.lp_set[i - 1].vip_price) || this.goodsInfo.goods.lp_set[i].vip_price == this.goodsInfo.goods.lp_set[i - 1].vip_price) {
|
|
_app.default.showError("每一个阶会员价需大于上一个会员价");
|
|
return;
|
|
}
|
|
console.log(this.goodsInfo.goods.lp_set[i].price, '<<<<<', this.goodsInfo.goods.lp_set[i - 1].price);
|
|
if (Number(this.goodsInfo.goods.lp_set[i].price) < Number(this.goodsInfo.goods.lp_set[i - 1].price)) {
|
|
_app.default.showError("每一个价格需大于或等于上一个价格");
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
;
|
|
this.ladderShow = false;
|
|
},
|
|
ladderPopShow: function ladderPopShow() {
|
|
this.ladderShow = true;
|
|
},
|
|
onCancel: function onCancel() {},
|
|
noticeOk: function noticeOk(res) {
|
|
console.log('shabi', res.html);
|
|
this.goodsInfo.goods.describe = res.html;
|
|
this.noticeText = false;
|
|
},
|
|
editOk: function editOk(res) {
|
|
console.log('shabi', res.html);
|
|
this.richTextVter = res.html;
|
|
this.richText = false;
|
|
},
|
|
handlepeoplenum: function handlepeoplenum(e) {
|
|
var _this = this;
|
|
console.info('peoplenum', Number(_this.goodsInfo.goods.peoplenum));
|
|
if (Number(_this.goodsInfo.goods.peoplenum) < 2) {
|
|
uni.showToast({
|
|
icon: "none",
|
|
title: '拼团人数最小为2',
|
|
duration: 2000
|
|
});
|
|
_this.goodsInfo.goods.peoplenum = 2;
|
|
}
|
|
},
|
|
handleprice: function handleprice(e) {
|
|
var _this = this;
|
|
_this.goodsInfo.goods.price = _this.goodsInfo.goods.price.match(/^\d*(\.?\d{0,2})/g)[0] || null;
|
|
},
|
|
handlealoneprice: function handlealoneprice(e) {
|
|
var _this = this;
|
|
_this.goodsInfo.goods.aloneprice = _this.goodsInfo.goods.aloneprice.match(/^\d*(\.?\d{0,2})/g)[0] || null;
|
|
},
|
|
handleoldprice: function handleoldprice(e) {
|
|
var _this = this;
|
|
_this.goodsInfo.goods.oldprice = _this.goodsInfo.goods.oldprice.match(/^\d*(\.?\d{0,2})/g)[0] || null;
|
|
},
|
|
handleretainage: function handleretainage(e) {
|
|
var _this = this;
|
|
_this.goodsInfo.goods.retainage = _this.goodsInfo.goods.retainage.match(/^\d*(\.?\d{0,2})/g)[0] || null;
|
|
},
|
|
dataTimeShow1: function dataTimeShow1() {
|
|
var _this = this;
|
|
// _this.$refs.dateTime.show();
|
|
_this.visible1 = !_this.visible1;
|
|
},
|
|
dataTimeShow2: function dataTimeShow2() {
|
|
var _this = this;
|
|
_this.visible3 = !_this.visible3;
|
|
},
|
|
dataTimeShow3: function dataTimeShow3() {
|
|
var _this = this;
|
|
// _this.$refs.dateTime2.show();
|
|
_this.visible2 = !_this.visible2;
|
|
},
|
|
checkStar: function checkStar(e) {
|
|
console.log(e);
|
|
// uni.showToast({
|
|
// title:e.result
|
|
// })
|
|
// alert(e.result);
|
|
var _this = this;
|
|
_this.starttimeText = e.result;
|
|
var time = _this.getDataTime(e.result);
|
|
_this.$set(_this.goodsInfo.goods, 'starttime', _this.getDataTime(e.result));
|
|
// _this.goodsInfo.goods.starttime = _this.getDataTime(e.result);
|
|
},
|
|
checkEnd: function checkEnd(e) {
|
|
var _this = this;
|
|
_this.endtimeText = e.result;
|
|
_this.$set(_this.goodsInfo.goods, 'endtime', _this.getDataTime(e.result));
|
|
// _this.goodsInfo.goods.endtime = _this.getDataTime(e.result);
|
|
},
|
|
checkClose: function checkClose(e) {
|
|
var _this = this;
|
|
_this.closetimeText = e.result;
|
|
_this.$set(_this.goodsInfo.goods, 'cutofftime', _this.getDataTime(e.result));
|
|
// _this.goodsInfo.goods.cutofftime = _this.getDataTime(e.result);
|
|
},
|
|
// 时间转时间戳
|
|
getDataTime: function getDataTime(timeValue) {
|
|
var ontime;
|
|
if (this.flag) {
|
|
ontime = timeValue.replace(/-/g, '/');
|
|
} else {
|
|
ontime = timeValue;
|
|
}
|
|
var date = new Date(ontime);
|
|
var time = date.getTime();
|
|
return time;
|
|
},
|
|
// 时间戳转时间
|
|
getTimeData: function getTimeData(dataValue) {
|
|
var date = new Date(dataValue);
|
|
var Y = date.getFullYear().toString() + '-';
|
|
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1).toString() + '-';
|
|
var D = (date.getDate() + 1 < 10 ? '0' + date.getDate() : date.getDate()).toString() + ' ';
|
|
var h = (date.getHours() + 1 < 10 ? '0' + date.getHours() : date.getHours()).toString() + ':';
|
|
var m = (date.getMinutes() + 1 < 10 ? '0' + date.getMinutes() : date.getMinutes()).toString() + ':';
|
|
var s = (date.getSeconds() + 1 < 10 ? '0' + date.getSeconds() : date.getSeconds()).toString();
|
|
var year = date.getFullYear().toString();
|
|
var month = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1).toString();
|
|
var day = (date.getDate() + 1 < 10 ? '0' + date.getDate() : date.getDate()).toString();
|
|
var hour = (date.getHours() + 1 < 10 ? '0' + date.getHours() : date.getHours()).toString();
|
|
var min = (date.getMinutes() + 1 < 10 ? '0' + date.getMinutes() : date.getMinutes()).toString();
|
|
var second = (date.getSeconds() + 1 < 10 ? '0' + date.getSeconds() : date.getSeconds()).toString();
|
|
var valueArry = [];
|
|
valueArry.push(year);
|
|
valueArry.push(month);
|
|
valueArry.push(day);
|
|
valueArry.push(hour);
|
|
valueArry.push(min);
|
|
valueArry.push(second);
|
|
return {
|
|
label: Y + M + D + h + m + s,
|
|
value: valueArry
|
|
};
|
|
},
|
|
closeOptions: function closeOptions() {
|
|
var _this = this;
|
|
_this.optionsShow = false;
|
|
_this.isSpecBox = false;
|
|
},
|
|
optionsPopShow: function optionsPopShow() {
|
|
var _this = this;
|
|
_this.optionsShow = true;
|
|
_this.isSpecBox = true;
|
|
},
|
|
// 提交规格
|
|
submitSpecs: function submitSpecs() {
|
|
var _this = this;
|
|
var ok = false;
|
|
var ok2 = false;
|
|
console.log(_this.specList);
|
|
for (var i = 0; i < _this.specList.length; i++) {
|
|
if (_this.specList[i].title == '' || _this.specList[i].items.length == 0) {
|
|
ok = false;
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '请填写规格名称'
|
|
});
|
|
return;
|
|
} else if (_this.specList[i].title != '' || _this.specList[i].items.length != 0) {
|
|
for (var a = 0; a < _this.specList[i].items.length; a++) {
|
|
if (_this.specList[i].items[a].title != '') {
|
|
ok2 = true;
|
|
} else if (_this.specList[i].items[a].title == '') {
|
|
ok2 = false;
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '请填写规格名称'
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function encode(str) {
|
|
// 对字符串进行编码
|
|
var arry = JSON.stringify(str);
|
|
var base = new _this.$util.Base64();
|
|
var encode = base.encode(arry);
|
|
return encode;
|
|
}
|
|
var spec = encode(_this.specList);
|
|
var options = [];
|
|
if (!!_this.goodsInfo.goods.options && _this.goodsInfo.goods.options.length != 0) {
|
|
options = encode(_this.goodsInfo.goods.options);
|
|
} else {
|
|
options = [];
|
|
}
|
|
var data = {
|
|
spec: spec,
|
|
options: options
|
|
};
|
|
_app.default._post_form('&p=Store&do=specToOption', data, function (res) {
|
|
_this.goodsInfo.goods.options = res.data;
|
|
_this.goodsInfo.goods.spec = JSON.parse(JSON.stringify(_this.specList));
|
|
if (_this.goodsInfo.goods.spec.length != 0) {
|
|
_this.goodsInfo.goods.optionstatus = 1;
|
|
_this.specsText = '多规格';
|
|
} else if (_this.goodsInfo.goods.spec.length == 0) {
|
|
_this.goodsInfo.goods.optionstatus = 0;
|
|
_this.specsText = '单规格';
|
|
}
|
|
setTimeout(function () {
|
|
_this.specsShow = false;
|
|
_this.isSpecBox = false;
|
|
});
|
|
console.log();
|
|
});
|
|
},
|
|
// 添加子规格
|
|
addBranchSpecs: function addBranchSpecs(indexs) {
|
|
var _this = this;
|
|
console.info('specList', _this.specList);
|
|
var aa = {
|
|
id: 0,
|
|
title: ''
|
|
};
|
|
_this.specList[indexs].items.push(aa);
|
|
},
|
|
// 添加规格
|
|
addSpecs: function addSpecs() {
|
|
var _this = this;
|
|
var aa = {
|
|
id: 0,
|
|
title: '',
|
|
items: []
|
|
};
|
|
_this.specList.push(aa);
|
|
},
|
|
closeSpecs: function closeSpecs() {
|
|
var _this = this;
|
|
_this.specList = JSON.parse(JSON.stringify(_this.goodsInfo.goods.spec));
|
|
_this.specsShow = false;
|
|
_this.isSpecBox = false;
|
|
},
|
|
specsPopShow: function specsPopShow() {
|
|
var _this = this;
|
|
_this.specsShow = true;
|
|
_this.isSpecBox = true;
|
|
},
|
|
// 添加规则
|
|
pushRule: function pushRule() {
|
|
var _this = this;
|
|
var obj = {
|
|
rule_pice: '',
|
|
rule_start: '',
|
|
rule_end: ''
|
|
};
|
|
_this.goodsInfo.goods.rules.push(obj);
|
|
},
|
|
// 关闭砍价弹框接口
|
|
closeRule: function closeRule() {
|
|
var _this = this;
|
|
_this.ruleShow = false;
|
|
},
|
|
// 打开砍价规则弹框
|
|
rulePopShow: function rulePopShow() {
|
|
var _this = this;
|
|
_this.ruleShow = true;
|
|
},
|
|
// 表单验证
|
|
submitTest: function submitTest(strings) {
|
|
var _this = this;
|
|
console.log(strings, 'shabiacao');
|
|
var adopt = true;
|
|
if (strings == '' || strings == 'null') {
|
|
adopt = false;
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '请完善商品信息',
|
|
duration: 2000
|
|
});
|
|
}
|
|
return adopt;
|
|
},
|
|
// 提交
|
|
saveGoods: function saveGoods() {
|
|
var _data;
|
|
if ((this.goodsInfo.goods.grouptime == 0 || this.goodsInfo.goods.grouptime == '0:00') && this.goodsInfo.type == 'fightgroup') {
|
|
uni.showToast({
|
|
title: '组团时间不能小于0',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
;
|
|
// if(this.goodsInfo.goods.lp_status == 1 && )
|
|
var _this = this;
|
|
_this.bengF = 1;
|
|
setTimeout(function () {
|
|
_this.submitType = 0;
|
|
}, 3000);
|
|
if (_this.submitType === 1) return;
|
|
function encode(str) {
|
|
// 对字符串进行编码
|
|
var arry = JSON.stringify(str);
|
|
var base = new _this.$util.Base64();
|
|
var encode = base.encode(arry);
|
|
return encode;
|
|
}
|
|
var data = (_data = {
|
|
aloneprice: _this.goodsInfo.goods.aloneprice,
|
|
type: _this.goodsInfo.type,
|
|
storeid: _this.goodsInfo.storeid,
|
|
id: _this.goodsInfo.id || '',
|
|
name: _this.goodsInfo.goods.name,
|
|
unit: _this.goodsInfo.goods.unit,
|
|
cateid: _this.goodsInfo.goods.cateid,
|
|
starttime: _this.goodsInfo.goods.starttime,
|
|
endtime: _this.goodsInfo.goods.endtime,
|
|
thumb: _this.goodsInfo.goods.thumb,
|
|
thumbs: _this.goodsInfo.goods.thumbs,
|
|
optionstatus: _this.goodsInfo.goods.optionstatus,
|
|
price: _this.goodsInfo.goods.price,
|
|
oldprice: _this.goodsInfo.goods.oldprice,
|
|
retainage: _this.goodsInfo.goods.retainage,
|
|
appointment: _this.goodsInfo.goods.appointment,
|
|
tag: _this.goodsInfo.goods.tag,
|
|
op_one_limit: _this.goodsInfo.goods.op_one_limit,
|
|
num: _this.goodsInfo.goods.num,
|
|
usestatus: _this.goodsInfo.goods.usestatus,
|
|
expressid: _this.goodsInfo.goods.expressid,
|
|
cutoffstatus: _this.goodsInfo.goods.cutoffstatus,
|
|
cutofftime: _this.goodsInfo.goods.cutofftime,
|
|
cutoffday: _this.goodsInfo.goods.cutoffday,
|
|
describe: _this.goodsInfo.goods.describe,
|
|
detail: _this.goodsInfo.goods.detail,
|
|
status: _this.goodsInfo.goods.status,
|
|
spec: _this.goodsInfo.goods.spec,
|
|
options: _this.goodsInfo.goods.options,
|
|
rules: _this.goodsInfo.goods.rules,
|
|
helplimit: _this.goodsInfo.goods.helplimit,
|
|
dayhelpcount: _this.goodsInfo.goods.dayhelpcount,
|
|
joinlimit: _this.goodsInfo.goods.joinlimit,
|
|
onlytimes: _this.goodsInfo.goods.onlytimes,
|
|
grouptime: _this.goodsInfo.goods.grouptime,
|
|
peoplenum: _this.goodsInfo.goods.peoplenum
|
|
}, (0, _defineProperty2.default)(_data, "detail", _this.richTextVter), (0, _defineProperty2.default)(_data, "describe", _this.goodsInfo.goods.describe), (0, _defineProperty2.default)(_data, "lp_status", _this.isladderVel), (0, _defineProperty2.default)(_data, "is_describe_tip", _this.goodsInfo['goods'].is_describe_tip), _data);
|
|
if (data.optionstatus == '0') {} else if (data.optionstatus == '1') {
|
|
data.spec = encode(data.spec);
|
|
data.options = encode(data.options);
|
|
}
|
|
if (data.type == 'bargain' && data.rules.length != 0) {
|
|
data.rules = encode(data.rules);
|
|
}
|
|
if (_this.isladderVel == 1 && _this.goodsInfo.type == 'rush') {
|
|
// _this.goodsInfo.goods.lp_set
|
|
for (var i = 0; i < _this.goodsInfo.goods.lp_set.length; i++) {
|
|
for (var k in _this.goodsInfo.goods.lp_set[i]) {
|
|
if (!_this.goodsInfo.goods.lp_set[i][k]) {
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '请完善阶梯价信息'
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
;
|
|
data.lp_set = JSON.stringify(_this.goodsInfo.goods.lp_set);
|
|
}
|
|
console.log(_this.publicList);
|
|
// 公用验证
|
|
for (var _i = 0; _i < _this.publicList.length; _i++) {
|
|
_this.adopt = _this.submitTest(data[_this.publicList[_i]]);
|
|
if (_this.adopt == false) {
|
|
console.info('请求终止');
|
|
_this.bengF = 0;
|
|
return;
|
|
}
|
|
}
|
|
// if (data.type == 'rush' || data.type == 'groupon') {
|
|
// for (let i = 0; i < _this.rushList.length; i++) {
|
|
// _this.adopt = _this.submitTest(data[_this.rushList[i]]);
|
|
// if (_this.adopt == false) {
|
|
// console.info('请求终止');
|
|
// return;
|
|
// }
|
|
// }
|
|
// }
|
|
// if (data.type == 'fightgroup') {
|
|
// for (let i = 0; i < _this.fightgroupList.length; i++) {
|
|
// _this.adopt = _this.submitTest(data[_this.fightgroupList[i]]);
|
|
// if (_this.adopt == false) {
|
|
// console.info('请求终止');
|
|
// return;
|
|
// }
|
|
// }
|
|
// }
|
|
// if (data.type == 'bargain') {
|
|
// for (let i = 0; i < _this.bargainList.length; i++) {
|
|
// _this.adopt = _this.submitTest(data[_this.bargainList[i]]);
|
|
// if (_this.adopt == false) {
|
|
// console.info('请求终止');
|
|
// return;
|
|
// }
|
|
// }
|
|
// }
|
|
_this.submitType = 1;
|
|
_app.default._post_form('&p=Store&do=saveGoods', data, function (res) {
|
|
if (res.errno === 0) {
|
|
_app.default.showSuccess('保存成功', function () {
|
|
_this.submitType = 0;
|
|
_app.default.navigationTo({
|
|
url: 'pages/subPages/merchant/merchantOrder/merchantOrder'
|
|
});
|
|
});
|
|
}
|
|
});
|
|
setTimeout(function () {
|
|
_this.bengF = 0;
|
|
}, 1500);
|
|
},
|
|
// 选择二级分类
|
|
changeCateTwo: function changeCateTwo(e) {
|
|
var _this = this;
|
|
console.info('value', e.detail.value);
|
|
_this.goodsInfo.goods.cateid = _this.cateList[e.detail.value[0]].id;
|
|
var twoList = _this.cateLists[1];
|
|
_this.goodsInfo.goods.cateid = twoList[e.detail.value[1]].id;
|
|
if (twoList[e.detail.value[1]].name == '暂无分类') {
|
|
_this.cateText = _this.cateList[e.detail.value[0]].name;
|
|
} else {
|
|
_this.cateText = _this.cateList[e.detail.value[0]].name + '|' + twoList[e.detail.value[1]].name;
|
|
}
|
|
},
|
|
// 删除规格
|
|
cleanSpecs: function cleanSpecs(index, indexss, items, item) {
|
|
var _this = this;
|
|
if (indexss != undefined) {
|
|
_this.specList.map(function (itemss) {
|
|
if (itemss.title == item.title) {
|
|
itemss.items.map(function (nums, i) {
|
|
if (nums.title == items.title) {
|
|
itemss.items.splice(i, 1);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
} else {
|
|
console.info(2);
|
|
for (var i = 0; i < _this.specList.length; i++) {
|
|
if (i == index) {
|
|
_this.specList.splice(i, 1);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
// 二级分类联动
|
|
// watchCateTwo(e) {
|
|
// let _this = this;
|
|
// let bArr = [];
|
|
// if (e.detail.column == 0) {
|
|
// for (let i = 0; i < _this.cateList.length; i++) {
|
|
// if (e.detail.value == i) {
|
|
// if (_this.cateList[i].twolevel.length != 0) {
|
|
// for (let a = 0; a < _this.cateList[i].twolevel.length; a++) {
|
|
// let bObj = {
|
|
// name: '',
|
|
// id: ''
|
|
// };
|
|
// bObj.name = _this.cateList[i].twolevel[a].name;
|
|
// bObj.id = _this.cateList[i].twolevel[a].id;
|
|
// bArr.push(bObj);
|
|
// }
|
|
// } else {
|
|
// let bObj = {};
|
|
// bObj = {
|
|
// name: '暂无分类',
|
|
// id: ''
|
|
// };
|
|
// bArr.push(bObj);
|
|
// }
|
|
// _this.cateLists.splice(1, 1, bArr);
|
|
// console.info(_this.cateLists);
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
changeStatus: function changeStatus(e) {
|
|
var _this = this;
|
|
_this.status = e.detail.value;
|
|
_this.statusText = _this.statusList[e.detail.value].name;
|
|
_this.goodsInfo.goods.status = _this.statusList[e.detail.value].id;
|
|
console.info(_this.status);
|
|
console.info(_this.statusText);
|
|
console.info(_this.goodsInfo.goods.status);
|
|
},
|
|
changeCutoffstatus: function changeCutoffstatus(e) {
|
|
var _this = this;
|
|
_this.cutoffstatus = e.detail.value;
|
|
_this.cutoffstatusText = _this.cutoffstatusList[e.detail.value].name;
|
|
_this.goodsInfo.goods.cutoffstatus = _this.cutoffstatusList[e.detail.value].id;
|
|
},
|
|
// 选择快递模板
|
|
changeExpress: function changeExpress(e) {
|
|
var _this = this;
|
|
_this.expresse = e.detail.value;
|
|
_this.expresseText = _this.expressList[e.detail.value].name;
|
|
_this.goodsInfo.goods.expressid = _this.expressList[e.detail.value].id;
|
|
},
|
|
// 选择消费方式
|
|
changeUsestatus: function changeUsestatus(e) {
|
|
var _this = this;
|
|
_this.goodsInfo.goods.usestatus = _this.usestatusList[e.detail.value].id;
|
|
_this.usestatusText = _this.usestatusList[e.detail.value].name;
|
|
},
|
|
// 选择标签
|
|
checkPresettags: function checkPresettags(item) {
|
|
var _this = this;
|
|
_this.presettagsText = '';
|
|
if (_this.goodsInfo.goods.tag.indexOf(item.id) != -1) {
|
|
for (var i = 0; i < _this.goodsInfo.goods.tag.length; i++) {
|
|
if (_this.goodsInfo.goods.tag[i] == item.id) {
|
|
_this.goodsInfo.goods.tag.splice(i, 1);
|
|
_this.presettagsArrary.splice(i, 1);
|
|
}
|
|
}
|
|
} else {
|
|
_this.goodsInfo.goods.tag.push(item.id);
|
|
_this.presettagsArrary.push(item.title);
|
|
}
|
|
if (_this.presettagsArrary.length == 0) {
|
|
_this.presettagsText = '请选择标签';
|
|
} else if (_this.presettagsArrary.length != 0) {
|
|
for (var _i2 = 0; _i2 < _this.presettagsArrary.length; _i2++) {
|
|
if (_i2 != _this.presettagsArrary.length - 1) {
|
|
_this.presettagsText += _this.presettagsArrary[_i2] + '|';
|
|
} else if (_i2 == _this.presettagsArrary.length - 1) {
|
|
_this.presettagsText += _this.presettagsArrary[_i2];
|
|
}
|
|
}
|
|
}
|
|
},
|
|
// 关闭标签弹窗
|
|
closePresettags: function closePresettags() {
|
|
var _this = this;
|
|
_this.presettagsShow = false;
|
|
},
|
|
// 打开标签弹窗
|
|
showPresettagsPop: function showPresettagsPop() {
|
|
var _this = this;
|
|
_this.presettagsShow = true;
|
|
},
|
|
shownoticetext: function shownoticetext() {
|
|
this.noticeText = true;
|
|
},
|
|
showRichtext: function showRichtext() {
|
|
this.richText = true;
|
|
},
|
|
closeImg: function closeImg(type, index) {
|
|
var _this = this;
|
|
if (type == 1) {
|
|
_this.thumb = '';
|
|
_this.goodsInfo.goods.thumb = '';
|
|
} else if (type == 2) {
|
|
for (var i = 0; i < _this.thumbs.length; i++) {
|
|
if (i == index) {
|
|
_this.thumbs.splice(i, 1);
|
|
_this.goodsInfo.goods.thumbs.splice(i, 1);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
updataImg: function updataImg(type) {
|
|
var _this2 = this;
|
|
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
var _this;
|
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
while (1) {
|
|
switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_this = _this2;
|
|
wx.chooseImage({
|
|
count: 6,
|
|
sourceType: ['album', 'camera'],
|
|
success: function () {
|
|
var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(res) {
|
|
var i, aa;
|
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
console.info(res);
|
|
i = 0;
|
|
case 2:
|
|
if (!(i < res.tempFilePaths.length)) {
|
|
_context.next = 11;
|
|
break;
|
|
}
|
|
_context.next = 5;
|
|
return _app.default._upLoad(res.tempFilePaths[i]);
|
|
case 5:
|
|
aa = _context.sent;
|
|
if (type == 1) {
|
|
_this.thumb = aa.data.img;
|
|
_this.goodsInfo.goods.thumb = aa.data.img;
|
|
}
|
|
if (type == 2) {
|
|
_this.thumbs.push(aa.data.img);
|
|
_this.goodsInfo.goods.thumbs.push(aa.data.img);
|
|
}
|
|
case 8:
|
|
i++;
|
|
_context.next = 2;
|
|
break;
|
|
case 11:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee);
|
|
}));
|
|
function success(_x) {
|
|
return _success.apply(this, arguments);
|
|
}
|
|
return success;
|
|
}()
|
|
});
|
|
case 2:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}
|
|
}, _callee2);
|
|
}))();
|
|
},
|
|
changeCutofftime: function changeCutofftime(e) {
|
|
var _this = this;
|
|
_this.goodsInfo.goods.cutofftime = e.detail.value;
|
|
},
|
|
// 更改商品分类
|
|
changeCate: function changeCate(e) {
|
|
var _this = this;
|
|
_this.cate = e.detail.value;
|
|
_this.goodsInfo.goods.cateid = _this.cateList[e.detail.value].id;
|
|
_this.cateText = _this.cateList[e.detail.value].name;
|
|
},
|
|
// 获取输入弹框返回值
|
|
returnText: function returnText(e) {
|
|
var _this = this;
|
|
_this.goodsInfo.goods.name = e;
|
|
if (e != '') {
|
|
_this.goodsNameText = e;
|
|
} else if (e == '') {
|
|
_this.goodsNameText = '请输入商品名称';
|
|
}
|
|
_this.inputShow = false;
|
|
},
|
|
// 打开输入弹框
|
|
showInput: function showInput(titleText) {
|
|
var _this = this;
|
|
_this.showTitleText = titleText;
|
|
_this.inputShow = true;
|
|
},
|
|
// 关闭输入弹框
|
|
closeInputPop: function closeInputPop() {
|
|
var _this = this;
|
|
_this.inputShow = false;
|
|
},
|
|
// 更改商品类型
|
|
changeType: function changeType(e) {
|
|
var _this = this;
|
|
_this.cateLists = [];
|
|
_this.presettagsArrary = [];
|
|
_this.goodsInfo.cateid = '';
|
|
_this.type = e.detail.value;
|
|
_this.goodsInfo.type = _this.typeList[e.detail.value].value;
|
|
_this.cate = 0;
|
|
_this.cateTwo = [0, 0];
|
|
_this.cateText = '请选择商品分类';
|
|
_this.startValue = [];
|
|
_this.endValue = [];
|
|
_this.createGoods(_this.goodsInfo.type || '', _this.goodsInfo.storeid || '', _this.goodsInfo.id || '');
|
|
},
|
|
init: function init(type, storeid, id) {
|
|
var _this = this;
|
|
_this.createGoods(type, storeid, id);
|
|
},
|
|
// 获取商品以及设置信息
|
|
createGoods: function createGoods(type, storeid, id) {
|
|
var _this = this;
|
|
console.info('type', type);
|
|
var data = {
|
|
type: _this.goodsInfo.type || type || '',
|
|
storeid: _this.goodsInfo.storeid || storeid || '',
|
|
id: _this.goodsInfo.id || id || ''
|
|
};
|
|
_app.default._post_form('&p=Store&do=createGoods', data, function (res) {
|
|
_this.goodsInfo['goods'] = res.data.goods;
|
|
if (!_this.goodsInfo.goods.is_describe_tip) {
|
|
_this.goodsInfo.goods.is_describe_tip = 0;
|
|
} else {
|
|
_this.is_describe_tip = Number(_this.goodsInfo.goods.is_describe_tip);
|
|
}
|
|
// debugger
|
|
_this.isladderVel = res.data.goods.lp_status;
|
|
if (!_this.goodsInfo.goods.lp_status) {
|
|
_this.isladderVel = 0;
|
|
}
|
|
_this.richTextVter = res.data.goods.detail;
|
|
// _this.$set(_this.goodsInfo.goods,'detail',res.data.goods.detail);
|
|
if (res.data.goods.name) {
|
|
res.data.cate.map(function (item) {
|
|
if (item.id == res.data.goods.cateid) {
|
|
console.log(item.name);
|
|
_this.cateText = item.name;
|
|
}
|
|
});
|
|
}
|
|
// 处理类型列表
|
|
if (_this.typeList.length == 0) {
|
|
for (var i = 0; i < res.data.type.length; i++) {
|
|
var name = '';
|
|
if (res.data.type[i] == 'rush') {
|
|
name = '抢购';
|
|
} else if (res.data.type[i] == 'groupon') {
|
|
name = '团购';
|
|
} else if (res.data.type[i] == 'fightgroup') {
|
|
name = '拼团';
|
|
} else if (res.data.type[i] == 'bargain') {
|
|
name = '砍价';
|
|
}
|
|
var aa = {
|
|
name: name,
|
|
value: res.data.type[i]
|
|
};
|
|
_this.typeList.push(aa);
|
|
}
|
|
}
|
|
// 初始化商品类型
|
|
if (!!type) {
|
|
for (var _i3 = 0; _i3 < _this.typeList.length; _i3++) {
|
|
if (type == _this.typeList[_i3].value) {
|
|
_this.type = _i3;
|
|
_this.goodsInfo.type = _this.typeList[_i3].value;
|
|
}
|
|
}
|
|
} else if (type == undefined) {
|
|
console.info('type');
|
|
_this.type = 0;
|
|
console.info('typeList', _this.typeList);
|
|
_this.goodsInfo.type = _this.typeList[0].value;
|
|
_this.createGoods(_this.typeList[0].value, _this.storeid, _this.id);
|
|
return;
|
|
}
|
|
// 处理时间
|
|
_this.goodsInfo.goods.starttime = res.data.goods.starttime * 1000;
|
|
_this.goodsInfo.goods.endtime = res.data.goods.endtime * 1000;
|
|
_this.goodsInfo.goods.cutofftime = res.data.goods.cutofftime * 1000;
|
|
// 处理商品图片
|
|
_this.thumb = res.data.goods.thumb;
|
|
_this.thumbs = JSON.parse(JSON.stringify(res.data.goods.thumbs));
|
|
// 处理规格
|
|
var specArry = JSON.stringify(res.data.goods.spec);
|
|
_this.specList = JSON.parse(specArry);
|
|
//处理分类列表
|
|
_this.cateList = res.data.cate;
|
|
_this.isladder = [{
|
|
name: '关闭'
|
|
}, {
|
|
name: '打开'
|
|
}];
|
|
// 处理商品标签列表
|
|
_this.presettagsList = res.data.presettags;
|
|
// 处理快递模板列表
|
|
_this.expressList = res.data.express;
|
|
|
|
// 初始化商品名称
|
|
if (res.data.goods.name == '') {
|
|
_this.goodsNameText = '请输入商品名称';
|
|
} else if (res.data.goods.name != '') {
|
|
_this.goodsNameText = res.data.goods.name;
|
|
}
|
|
|
|
// 初始化商品分类
|
|
if (!res.data.goods.name) {
|
|
if (res.data.cate.length > 0) {
|
|
_this.cate = 0;
|
|
_this.goodsInfo.goods.cateid = res.data.cate[0].id;
|
|
_this.cateText = res.data.cate[0].name;
|
|
}
|
|
}
|
|
|
|
// 初始化活动开始结束时间
|
|
if (res.data.goods.starttime == '') {
|
|
_this.goodsInfo.goods.starttime = '';
|
|
_this.starttimeText = '请选择开始时间';
|
|
_this.startValue = [];
|
|
} else if (res.data.goods.starttime != '') {
|
|
_this.starttimeText = _this.getTimeData(res.data.goods.starttime).label;
|
|
var _aa = _this.getTimeData(res.data.goods.starttime).value;
|
|
for (var _i4 = 0; _i4 < _aa.length; _i4++) {
|
|
_this.startValue.push(_aa[_i4]);
|
|
}
|
|
console.info('startValue', _this.startValue);
|
|
}
|
|
if (res.data.goods.endtime == '') {
|
|
_this.goodsInfo.goods.endtime = '';
|
|
_this.endtimeText = '请选择结束时间';
|
|
_this.endValue = [];
|
|
} else if (res.data.goods.endtime != '') {
|
|
_this.endtimeText = _this.getTimeData(res.data.goods.endtime).label;
|
|
var _aa2 = _this.getTimeData(res.data.goods.endtime).value;
|
|
for (var _i5 = 0; _i5 < _aa2.length; _i5++) {
|
|
_this.endValue.push(_aa2[_i5]);
|
|
}
|
|
}
|
|
|
|
// 初始化截止时间
|
|
if (res.data.goods.cutofftime == '') {
|
|
_this.goodsInfo.goods.cutofftime = '';
|
|
_this.closetimeText = '请选择截止时间';
|
|
_this.endValue = [];
|
|
} else if (res.data.goods.endtime != '') {
|
|
_this.closetimeText = _this.getTimeData(res.data.goods.cutofftime).label;
|
|
}
|
|
|
|
//初始化商品规格
|
|
if (res.data.goods.optionstatus != '0') {
|
|
_this.specsText = '多规格';
|
|
} else if (res.data.goods.optionstatus == '0') {
|
|
_this.specsText = '单规格';
|
|
}
|
|
|
|
// 初始化商品标签
|
|
if (_this.goodsInfo.goods.tag.length == 0) {
|
|
_this.presettagsText = '请选择标签';
|
|
} else if (_this.goodsInfo.goods.tag.length != 0) {
|
|
for (var _i6 = 0; _i6 < res.data.goods.tag.length; _i6++) {
|
|
for (var a = 0; a < _this.presettagsList.length; a++) {
|
|
if (res.data.goods.tag[_i6] == _this.presettagsList[a].id) {
|
|
_this.presettagsArrary.push(_this.presettagsList[a].title);
|
|
}
|
|
}
|
|
}
|
|
for (var _a = 0; _a < _this.presettagsArrary.length; _a++) {
|
|
if (_a != _this.presettagsArrary.length - 1) {
|
|
_this.presettagsText += _this.presettagsArrary[_a] + '|';
|
|
} else if (_a == _this.presettagsArrary.length - 1) {
|
|
_this.presettagsText += _this.presettagsArrary[_a];
|
|
}
|
|
}
|
|
}
|
|
|
|
// 初始化消费方式
|
|
if (res.data.goods.usestatus == '') {
|
|
_this.goodsInfo.goods.usestatus = _this.usestatusList[0].id;
|
|
_this.usestatusText = _this.usestatusList[0].name;
|
|
console.info('usestatus', _this.goodsInfo.goods.usestatus);
|
|
console.info('usestatusText', _this.usestatusText);
|
|
} else if (res.data.goods.usestatus != '') {
|
|
_this.goodsInfo.goods.usestatus = res.data.goods.usestatus;
|
|
_this.usestatusText = _this.usestatusList[res.data.goods.usestatus].name;
|
|
}
|
|
|
|
// 初始化截止时间类型
|
|
if (res.data.goods.cutoffstatus == 0) {
|
|
_this.goodsInfo.goods.cutoffstatus = 0;
|
|
_this.cutoffstatus = 0;
|
|
_this.cutoffstatusText = _this.cutoffstatusList[_this.cutoffstatus].name;
|
|
} else if (res.data.goods.cutoffstatus == 1) {
|
|
_this.goodsInfo.goods.cutoffstatus = 1;
|
|
_this.cutoffstatus = 1;
|
|
_this.cutoffstatusText = _this.cutoffstatusList[_this.cutoffstatus].name;
|
|
}
|
|
|
|
// 初始化快递模板
|
|
// expressid
|
|
if (res.data.goods.expressid == '') {
|
|
_this.express = 0;
|
|
_this.goodsInfo.goods.expressid = _this.expressList[0].id;
|
|
_this.expresseText = _this.expressList[0].name;
|
|
} else if (res.data.goods.expressid != '' && res.data.goods.expressid.length !== 0) {
|
|
for (var _i7 = 0; _i7 < _this.expressList.length; _i7++) {
|
|
if (res.data.goods.expressid == _this.expressList[_i7].id) {
|
|
_this.express = _i7;
|
|
_this.goodsInfo.goods.expressid = _this.expressList[_i7].id;
|
|
_this.expresseText = _this.expressList[_i7].name;
|
|
}
|
|
}
|
|
}
|
|
console.info('statusList', _this.statusList);
|
|
// 初始化商品状态
|
|
if (res.data.goods.status == '') {
|
|
_this.goodsInfo.goods.status = _this.statusList[0].id;
|
|
_this.statusText = _this.statusList[0].name;
|
|
_this.status = 0;
|
|
} else if (res.data.goods.status != '') {
|
|
var _aa3 = Number(res.data.goods.status);
|
|
_this.goodsInfo.goods.status = _this.statusList[_aa3].id;
|
|
_this.statusText = _this.statusList[_aa3].name;
|
|
_this.status = _aa3;
|
|
}
|
|
console.log(res.data.goods.type, _this.goodsInfo.type);
|
|
if (res.data.goods.type == 'rush' || _this.goodsInfo.type == 'rush') {
|
|
_this.priceText = '抢购价';
|
|
}
|
|
if (res.data.goods.type == 'groupon' || _this.goodsInfo.type == 'groupon') {
|
|
_this.priceText = '团购价';
|
|
}
|
|
if (res.data.goods.type == 'fightgroup' || _this.goodsInfo.type == 'fightgroup') {
|
|
_this.priceText = '组团价';
|
|
}
|
|
if (res.data.goods.type == 'bargain' || _this.goodsInfo.type == 'bargain') {
|
|
_this.priceText = '底价';
|
|
}
|
|
if (!_this.goodsInfo.goods.lp_set) {
|
|
_this.goodsInfo.goods.lp_set = [{
|
|
max: '',
|
|
price: '',
|
|
vip_price: ''
|
|
}];
|
|
}
|
|
// debugger
|
|
console.log(_this.goodsInfo.goods.detail, '老子');
|
|
});
|
|
},
|
|
// 购买须知
|
|
showGraceEditorMenu1: function showGraceEditorMenu1() {
|
|
this.graceEditorMenuShow1 = true;
|
|
},
|
|
graceEditorAddItem1: function graceEditorAddItem1(e) {
|
|
var _self = this;
|
|
this.graceEditorMenuShow1 = false;
|
|
var type = e.currentTarget.dataset.type;
|
|
if (type == 'img') {
|
|
uni.chooseImage({
|
|
success: function success(e) {
|
|
var imgs = e.tempFilePaths;
|
|
for (var i = 0; i < imgs.length; i++) {
|
|
_self.graceEditorItems1.push({
|
|
type: type,
|
|
content: imgs[i],
|
|
status: 'needUpload'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
} else if (type == 'link') {
|
|
this.graceEditorItems1.push({
|
|
type: type,
|
|
content: 'http://'
|
|
});
|
|
} else {
|
|
this.graceEditorItems1.push({
|
|
type: type,
|
|
content: ''
|
|
});
|
|
}
|
|
},
|
|
graceEditorInput1: function graceEditorInput1(e) {
|
|
var index = e.currentTarget.dataset.index;
|
|
var val = e.detail.value;
|
|
if (val == '') {
|
|
this.graceEditorItems1.splice(index, 1);
|
|
return;
|
|
} else {
|
|
this.graceEditorItems1[index].content = val;
|
|
}
|
|
},
|
|
deleteItem1: function deleteItem1(e) {
|
|
var _self = this;
|
|
var index = e.currentTarget.dataset.index;
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '确定要删除项目吗?',
|
|
success: function success(e) {
|
|
if (e.confirm) {
|
|
_self.graceEditorItems1.splice(index, 1);
|
|
}
|
|
}
|
|
});
|
|
},
|
|
// 收集数据并提交 包含图片上传
|
|
submit: function submit() {
|
|
// 分析临时图片然后上传
|
|
var tmpImgs = [];
|
|
for (var i = 0; i < this.graceEditorItems1.length; i++) {
|
|
if (this.graceEditorItems1[i].type == 'img' && this.graceEditorItems1[i].status == 'needUpload') {
|
|
tmpImgs.push(i);
|
|
}
|
|
}
|
|
if (tmpImgs.length > 0) {
|
|
this.upLoadImg1(0, tmpImgs);
|
|
}
|
|
// 没有图片项目直接提交
|
|
else {
|
|
this.getDataAndSubmit1();
|
|
}
|
|
},
|
|
// 收集数据提交
|
|
getDataAndSubmit1: function getDataAndSubmit1() {
|
|
if (this.graceEditorTitle1 == '') {
|
|
uni.showToast({
|
|
title: '请填写标题',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
if (this.graceEditorItems1.length < 1) {
|
|
uni.showToast({
|
|
title: '请填写内容',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
// 标题数据保存在 graceEditorTitle1 内
|
|
console.log('标题 : ' + this.graceEditorTitle1);
|
|
// 内容数据保存在 graceEditorItems1 内,可以将其序列化后发送给后端api
|
|
console.log('内容 : ' + this.graceEditorItems1);
|
|
//
|
|
console.log('内容 : ' + JSON.stringify(this.graceEditorItems1));
|
|
},
|
|
// 上传图片
|
|
upLoadImg1: function upLoadImg1(step, tmpImgs) {
|
|
var _self = this;
|
|
uni.showLoading({
|
|
title: '图片上传中'
|
|
});
|
|
var uploadTask = uni.uploadFile({
|
|
url: 'https://unidemo.dcloud.net.cn/upload',
|
|
filePath: _self.graceEditorItems1[tmpImgs[step]].content,
|
|
fileType: 'image',
|
|
name: 'data',
|
|
success: function success(uploadFileRes) {
|
|
console.log(uploadFileRes);
|
|
uploadFileRes = JSON.parse(uploadFileRes.data);
|
|
//图片上传成功后返回服务器端路径,记录这个路径
|
|
_self.graceEditorItems1[tmpImgs[step]].content = '上传成功服务器返回的图片地址,根据api情况自己写';
|
|
step++;
|
|
// 继续上传
|
|
if (step < tmpImgs.length) {
|
|
_self.upLoadImg1(step, tmpImgs);
|
|
}
|
|
// 图片上传成功,收集数据提交给 api后端
|
|
else {
|
|
_self.getDataAndSubmit1();
|
|
}
|
|
},
|
|
complete: function complete() {
|
|
uni.hideLoading();
|
|
}
|
|
});
|
|
},
|
|
gotoInfo: function gotoInfo() {
|
|
uni.navigateTo({
|
|
url: './editerInfo'
|
|
});
|
|
},
|
|
// 商品详情
|
|
showGraceEditorMenu: function showGraceEditorMenu() {
|
|
this.graceEditorMenuShow = true;
|
|
},
|
|
graceEditorAddItem: function graceEditorAddItem(e) {
|
|
var _self = this;
|
|
this.graceEditorMenuShow = false;
|
|
var type = e.currentTarget.dataset.type;
|
|
if (type == 'img') {
|
|
uni.chooseImage({
|
|
success: function success(e) {
|
|
var imgs = e.tempFilePaths;
|
|
for (var i = 0; i < imgs.length; i++) {
|
|
_self.graceEditorItems.push({
|
|
type: type,
|
|
content: imgs[i],
|
|
status: 'needUpload'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
} else if (type == 'link') {
|
|
this.graceEditorItems.push({
|
|
type: type,
|
|
content: 'http://'
|
|
});
|
|
} else {
|
|
this.graceEditorItems.push({
|
|
type: type,
|
|
content: ''
|
|
});
|
|
}
|
|
},
|
|
graceEditorInput: function graceEditorInput(e) {
|
|
var index = e.currentTarget.dataset.index;
|
|
var val = e.detail.value;
|
|
if (val == '') {
|
|
this.graceEditorItems.splice(index, 1);
|
|
return;
|
|
} else {
|
|
this.graceEditorItems[index].content = val;
|
|
}
|
|
},
|
|
deleteItem: function deleteItem(e) {
|
|
var _self = this;
|
|
var index = e.currentTarget.dataset.index;
|
|
uni.showModal({
|
|
title: '提示',
|
|
content: '确定要删除项目吗?',
|
|
success: function success(e) {
|
|
if (e.confirm) {
|
|
_self.graceEditorItems.splice(index, 1);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}, (0, _defineProperty2.default)(_methods, "submit", function submit() {
|
|
// 分析临时图片然后上传
|
|
var tmpImgs = [];
|
|
for (var i = 0; i < this.graceEditorItems.length; i++) {
|
|
if (this.graceEditorItems[i].type == 'img' && this.graceEditorItems[i].status == 'needUpload') {
|
|
tmpImgs.push(i);
|
|
}
|
|
}
|
|
if (tmpImgs.length > 0) {
|
|
this.upLoadImg(0, tmpImgs);
|
|
}
|
|
// 没有图片项目直接提交
|
|
else {
|
|
this.getDataAndSubmit();
|
|
}
|
|
}), (0, _defineProperty2.default)(_methods, "getDataAndSubmit", function getDataAndSubmit() {
|
|
if (this.graceEditorTitle == '') {
|
|
uni.showToast({
|
|
title: '请填写标题',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
if (this.graceEditorItems.length < 1) {
|
|
uni.showToast({
|
|
title: '请填写内容',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
// 标题数据保存在 graceEditorTitle1 内
|
|
console.log('标题 : ' + this.graceEditorTitle);
|
|
// 内容数据保存在 graceEditorItems1 内,可以将其序列化后发送给后端api
|
|
console.log('内容 : ' + this.graceEditorItems);
|
|
//
|
|
console.log('内容 : ' + JSON.stringify(this.graceEditorItems));
|
|
}), (0, _defineProperty2.default)(_methods, "upLoadImg", function upLoadImg(step, tmpImgs) {
|
|
var _self = this;
|
|
uni.showLoading({
|
|
title: '图片上传中'
|
|
});
|
|
var uploadTask = uni.uploadFile({
|
|
url: 'https://unidemo.dcloud.net.cn/upload',
|
|
filePath: _self.graceEditorItems[tmpImgs[step]].content,
|
|
fileType: 'image',
|
|
name: 'data',
|
|
success: function success(uploadFileRes) {
|
|
console.log(uploadFileRes);
|
|
uploadFileRes = JSON.parse(uploadFileRes.data);
|
|
//图片上传成功后返回服务器端路径,记录这个路径
|
|
_self.graceEditorItems[tmpImgs[step]].content = '上传成功服务器返回的图片地址,根据api情况自己写';
|
|
step++;
|
|
// 继续上传
|
|
if (step < tmpImgs.length) {
|
|
_self.upLoadImg(step, tmpImgs);
|
|
}
|
|
// 图片上传成功,收集数据提交给 api后端
|
|
else {
|
|
_self.getDataAndSubmit();
|
|
}
|
|
},
|
|
complete: function complete() {
|
|
uni.hideLoading();
|
|
}
|
|
});
|
|
}), (0, _defineProperty2.default)(_methods, "gotoInfo", function gotoInfo() {
|
|
uni.navigateTo({
|
|
url: './editerInfo'
|
|
});
|
|
}), _methods)
|
|
};
|
|
exports.default = _default;
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
|
|
|
|
/***/ }),
|
|
|
|
/***/ 580:
|
|
/*!***********************************************************************************************************************************************************************!*\
|
|
!*** C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/pages/subPages/createCommodity/index.vue?vue&type=style&index=0&lang=less& ***!
|
|
\***********************************************************************************************************************************************************************/
|
|
/*! 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_10_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_10_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_10_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_10_oneOf_1_5_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_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../../../../../HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--10-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--10-oneOf-1-2!../../../../../../HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--10-oneOf-1-3!../../../../../../HBuilderX/plugins/uniapp-cli/node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--10-oneOf-1-5!../../../../../../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&lang=less& */ 581);
|
|
/* harmony import */ var _HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_10_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_10_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_10_oneOf_1_5_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_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_10_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_10_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_10_oneOf_1_5_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_lang_less___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_10_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_10_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_10_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_10_oneOf_1_5_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_lang_less___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_10_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_10_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_10_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_10_oneOf_1_5_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_lang_less___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_10_oneOf_1_0_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_10_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_10_oneOf_1_2_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_3_HBuilderX_plugins_uniapp_cli_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_4_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_10_oneOf_1_5_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_lang_less___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 581:
|
|
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--10-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--10-oneOf-1-2!./node_modules/postcss-loader/src??ref--10-oneOf-1-3!./node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--10-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Desktop/uniapp/uniapp前端/weliam-smartcity-smartcity-app-master/pages/subPages/createCommodity/index.vue?vue&type=style&index=0&lang=less& ***!
|
|
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
/*! no static exports found */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
if(false) { var cssReload; }
|
|
|
|
|
|
/***/ })
|
|
|
|
},[[574,"common/runtime","common/vendor"]]]);
|
|
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/subPages/createCommodity/index.js.map
|