(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["components/page-component/app-attr/app-attr"],{

/***/ 2048:
/*!*********************************************************************************!*\
  !*** C:/Users/Admin/Desktop/商城/components/page-component/app-attr/app-attr.vue ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app-attr.vue?vue&type=template&id=5e206576&scoped=true& */ 2049);
/* harmony import */ var _app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./app-attr.vue?vue&type=script&lang=js& */ 2051);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _app_attr_vue_vue_type_style_index_0_id_5e206576_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app-attr.vue?vue&type=style&index=0&id=5e206576&scoped=true&lang=scss& */ 2053);
/* harmony import */ var _D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 10);

var renderjs





/* normalize component */

var component = Object(_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
  _app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
  _app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  "5e206576",
  null,
  false,
  _app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
  renderjs
)

component.options.__file = "C:/Users/Admin/Desktop/商城/components/page-component/app-attr/app-attr.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 2049:
/*!****************************************************************************************************************************!*\
  !*** C:/Users/Admin/Desktop/商城/components/page-component/app-attr/app-attr.vue?vue&type=template&id=5e206576&scoped=true& ***!
  \****************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./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!./app-attr.vue?vue&type=template&id=5e206576&scoped=true& */ 2050);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_template_id_5e206576_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });



/***/ }),

/***/ 2050:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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/Admin/Desktop/商城/components/page-component/app-attr/app-attr.vue?vue&type=template&id=5e206576&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 recyclableRender = false
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ 2051:
/*!**********************************************************************************************************!*\
  !*** C:/Users/Admin/Desktop/商城/components/page-component/app-attr/app-attr.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 _D_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./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!./app-attr.vue?vue&type=script&lang=js& */ 2052);
/* harmony import */ var _D_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_D_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 2052:
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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/Admin/Desktop/商城/components/page-component/app-attr/app-attr.vue?vue&type=script&lang=js& ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;





































































var _vuex = __webpack_require__(/*! vuex */ 12);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}var appMemberMark = function appMemberMark() {__webpack_require__.e(/*! require.ensure | components/page-component/app-member-mark/app-member-mark */ "components/page-component/app-member-mark/app-member-mark").then((function () {return resolve(__webpack_require__(/*! ../../page-component/app-member-mark/app-member-mark.vue */ 3123));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var appPrice = function appPrice() {__webpack_require__.e(/*! require.ensure | components/page-component/goods/app-price */ "components/page-component/goods/app-price").then((function () {return resolve(__webpack_require__(/*! ../../page-component/goods/app-price.vue */ 3076));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var appInput = function appInput() {__webpack_require__.e(/*! require.ensure | components/basic-component/app-input/app-input */ "components/basic-component/app-input/app-input").then((function () {return resolve(__webpack_require__(/*! ../../basic-component/app-input/app-input.vue */ 1802));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var appImage = function appImage() {__webpack_require__.e(/*! require.ensure | components/basic-component/app-image/app-image */ "components/basic-component/app-image/app-image").then((function () {return resolve(__webpack_require__(/*! ../../basic-component/app-image/app-image.vue */ 1823));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var appIphoneX = function appIphoneX() {Promise.all(/*! require.ensure | components/basic-component/app-iphone-x/app-iphone-x */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/basic-component/app-iphone-x/app-iphone-x")]).then((function () {return resolve(__webpack_require__(/*! ../../basic-component/app-iphone-x/app-iphone-x.vue */ 1900));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var _default2 =






{
  name: "app-attr",
  components: {
    appMemberMark: appMemberMark,
    appPrice: appPrice,
    appInput: appInput,
    'app-image': appImage,
    'app-iphone-x': appIphoneX },

  props: {
    goods: Object,
    attrGroupList: Array,
    attrCart: {
      type: Array,
      default: function _default() {
        return [];
      } },

    cartShow: {
      type: Boolean,
      default: function _default() {
        return true;
      } },

    previewUrl: String,
    submitUrl: String,
    goodsId: {
      type: Number,
      default: function _default() {
        return 0;
      } },

    show: Number,
    buyText: {
      type: String,
      default: function _default() {
        return '立即购买';
      } },

    plugin: {
      default: '' },

    theme: {
      type: String,
      default: 'classic-red' },

    chooseNumber: {
      type: Boolean,
      default: true },

    noPay: {
      type: Boolean,
      default: false },

    buyClick: {
      type: Boolean,
      default: false },

    addText: {
      type: String,
      default: '加入购物车' },

    is_show_buy: {
      type: Boolean,
      default: true } },


  data: function data() {
    return {
      display: 'none',
      number: 1,
      selectAttr: null,
      newAttrGroupList: null,
      pic_url: null };

  },
  watch: {
    show: function show() {
      this.alert();
    },
    newData: {
      handler: function handler() {
        this.$emit('attr', this.newData);
      },
      immediate: true },

    attrGroupList: {
      handler: function handler() {
        this.newAttrGroupList = this.attrGroupList;
        if (this.display == 'block') {
          this.alert();
        }
      },
      immediate: true },

    goods: {
      handler: function handler() {
        if (this.display == 'block') {
          this.alert();
        }
      },
      immediate: true } },


  methods: {
    alert: function alert() {
      if (this.attrGroupList.length === 0) {
        return;
      }
      var attr_group_list = this.attrGroupList;
      var attrs = this.goods.attr;
      var select_attr = null;
      this.number = 1;
      if (attr_group_list.length === 1) {
        for (var i in attrs) {
          for (var j in attr_group_list[0].attr_list) {
            if (attr_group_list[0].attr_list[j].attr_id == attrs[i].attr_list[0].attr_id) {
              if (attrs[i].stock > 0) {
                if (attrs.length === 1) {
                  attr_group_list[0].attr_list[j].checked = true;
                }
                attr_group_list[0].attr_list[j].attr_num_0 = false;
                this.pic_url = attr_group_list[0].attr_list[j].pic_url;
              } else {
                this.number = 0;
                attr_group_list[0].attr_list[j].checked = false;
                attr_group_list[0].attr_list[j].attr_num_0 = true;
              }
            }
          }
        }
        if (attrs.length === 1) {
          select_attr = attrs[0];
          this.$emit('attrtap', select_attr);
        }
      }
      this.display = 'block';
      this.newAttrGroupList = attr_group_list;
      this.selectAttr = select_attr;
    },
    close: function close() {
      this.display = 'none';
    },
    preventD: function preventD() {
    },
    storeAttrClick: function storeAttrClick(attr_id, attr_group_id) {
      var attr_group_list = JSON.parse(JSON.stringify(this.newAttrGroupList));
      var attrs = this.goods.attr;
      var checkedAttr = [];
      var attr_cart = this.attrCart;
      for (var i in attr_group_list) {
        for (var j in attr_group_list[i].attr_list) {
          var temp = attr_group_list[i].attr_list[j];
          if (parseInt(attr_group_list[i].attr_group_id) == parseInt(attr_group_id)) {
            if (parseInt(temp.attr_id) === parseInt(attr_id)) {
              if (temp.checked) {
                temp.checked = false;
              } else {
                temp.checked = true;
              }
              if (temp.attr_num_0) {
                return;
              }
            } else {
              temp.checked = false;
            }
          }
          if (temp.checked) {
            if (i == 0) {
              this.pic_url = attr_group_list[0].attr_list[j].pic_url;
            }
            checkedAttr.push(attr_group_list[i].attr_group_id + '-' + temp.attr_id);
          }
        }
      }

      function inArray(val, arr) {
        return arr.some(function (v) {
          return val == v;
        });
      }

      var attrNum_0 = [];
      var select_attr = null;
      var number = 1;
      for (var _i in attrs) {
        var arr = [];
        var sign = 0;
        for (var _j in attrs[_i].attr_list) {
          var param = attrs[_i].attr_list[_j].attr_group_id + '-' + attrs[_i].attr_list[_j].attr_id;
          if (!inArray(param, checkedAttr)) {
            sign += 1;
            arr.push(param);
          }
        }
        if (attrs[_i].stock == 0 && sign <= 1) {
          attrNum_0 = attrNum_0.concat(arr);
        }
        if (sign == 0) {
          if (!select_attr) {
            select_attr = {};
          }
          select_attr = attrs[_i];
          attr_cart.forEach(function (item) {

            if (item.attr_id == select_attr.id) {
              number = item.num;
            }
          });
          if (select_attr.stock <= 0) {
            uni.showToast({
              title: '库存不足',
              icon: 'none' });

            return;
          }
          if (select_attr.stock <= number) {
            number = select_attr.stock;
          }
        }
      }
      if (checkedAttr.length == 0) {
        select_attr = null;
      }

      //库存为0的规格添加标识
      for (var _i2 in attr_group_list) {
        for (var _j2 in attr_group_list[_i2].attr_list) {
          var cAttr = attr_group_list[_i2].attr_list[_j2];
          var cParam = attr_group_list[_i2].attr_group_id + '-' + cAttr.attr_id;
          if (inArray(cParam, attrNum_0) && !inArray(cParam, checkedAttr)) {
            cAttr.attr_num_0 = true;
          } else {
            cAttr.attr_num_0 = false;
          }
        }
      }
      this.newAttrGroupList = attr_group_list;
      this.selectAttr = select_attr;
      this.number = number;
      this.$emit('attrtap', this.selectAttr);
    },
    numberBlur: function numberBlur(number) {
      number = parseInt(number.value);
      if (number > this.attrNum) {
        uni.showToast({
          title: '库存不足',
          icon: 'none' });

        number = this.attrNum;
      }
      this.$emit('attrtap', this.selectAttr);
      return this.number = number;
    },
    numberSub: function numberSub() {
      var number = this.number;
      if (number <= 1) {
        return true;
      }
      number--;
      this.number = number;
      this.$emit('attrtap', this.selectAttr);
    },
    numberAdd: function numberAdd() {
      var number = this.number;
      number++;
      if (number > this.attrNum) {
        uni.showToast({
          title: '库存不足',
          icon: 'none' });

        this.number = this.attrNum;
        return;
      }
      this.number = number;
      this.$emit('attrtap', this.selectAttr);
    },
    cart: function cart() {var _this = this;
      if (!this.submit()) {
        return false;
      }
      var select_attr = this.selectAttr;
      if (this.goods.sign === 'pick') {
        this.$emit('add', select_attr, this.number);
        return;
      }
      if (this.goods.sign === 'miaosha') {
        this.$request({
          url: this.$api.miaosha.add_cart,
          data: {
            miaosha_goods_id: select_attr.goods_id,
            attr_id: select_attr.id,
            num: this.number },

          method: 'post' }).
        then(function (e) {
          uni.showToast({
            title: e.msg,
            type: 'success' });

          _this.display = 'none';
          _this.selectAttr.number = _this.number;
          _this.$emit('selectNumber', _this.selectAttr);
        }).catch(function (e) {
          _this.display = 'none';
        });
      } else {
        this.$request({
          url: this.$api.cart.add,
          data: {
            goods_id: select_attr.goods_id,
            attr: select_attr.id,
            num: this.number },

          method: 'post' }).
        then(function (e) {
          uni.showToast({
            title: e.msg,
            type: 'success' });

          _this.display = 'none';
          _this.selectAttr.number = _this.number;
          _this.$emit('selectNumber', _this.selectAttr);
        }).catch(function (e) {
          _this.display = 'none';
        });
      }
    },
    buy: function buy() {
      if (!this.submit()) return false;

      if (this.noPay) {
        this.$emit('pay', this.number);
        return;
      }

      if (this.buyClick) {
        this.display = 'none';
        this.selectAttr.number = this.number;
        this.$emit('buyClick', this.selectAttr);
        return false;
      }

      var goods = this.goods;
      console.log('goods---', goods);
      var number = this.number;
      var select_attr = this.selectAttr;
      var goods_attr_id = select_attr.id;
      var attr = [];
      for (var i in select_attr.attr_list) {
        attr.push({
          attr_id: select_attr.attr_list[i].attr_id,
          attr_group_id: select_attr.attr_list[i].attr_group_id });

      }

      var mch_list = [{
        mch_id: goods.mch_id ? goods.mch_id : 0,
        goods_list: [{
          id: this.goodsId ? this.goodsId : goods.id,
          attr: attr,
          num: number,
          cat_id: 0,
          goods_attr_id: goods_attr_id }] }];



      var page_url = "/pages/order-submit/order-submit?mch_list=".concat(JSON.stringify(mch_list));
      if (this.submitUrl && this.previewUrl) {
        page_url += "&preview_url=".concat(encodeURIComponent(this.previewUrl), "&submit_url=").concat(encodeURIComponent(this.submitUrl), "&plugin=").concat(this.plugin);
      }
      uni.navigateTo({
        url: page_url });

    },
    submit: function submit() {
      var goods = this.goods;
      var number = this.number;
      var select_attr = this.selectAttr;
      if (!select_attr) {
        uni.showToast({
          title: '请先选规格',
          icon: 'none' });

        return false;
      }
      if (select_attr.stock <= 0) {
        uni.showToast({
          title: '库存不足',
          icon: 'none' });

        return false;
      }
      if (number <= 0) {
        uni.showToast({
          title: '数量不能为0',
          icon: 'none' });

        return false;
      }
      if (!goods) {
        return false;
      }

      return true;
    },
    clickImg: function clickImg(src) {
      uni.previewImage({
        current: 0,
        urls: [src] });

    } },

  computed: _objectSpread({},
  (0, _vuex.mapState)({
    gConfig: function gConfig(state) {return state.gConfig;} }), {

    attrPic: function attrPic() {
      if (this.pic_url) {
        return this.pic_url;
      } else {
        if (this.goods) {
          return this.goods.cover_pic;
        } else {
          return "";
        }
      }
    },
    priceColor: function priceColor() {
      if (this.goods && this.goods.level_show === 1) {
        return "member";
      } else {
        return this.theme + '-color';
      }
    },
    attrNum: function attrNum() {
      if (this.selectAttr) {
        return this.selectAttr.stock;
      } else {
        if (this.goods) {
          return this.goods.goods_num;
        } else {
          return 0;
        }
      }
    },
    attrPrice: function attrPrice() {
      if (this.selectAttr) {
        if (this.goods.level_show === 1) {
          return this.selectAttr.price_member;
        } else {
          return this.selectAttr.price;
        }
      } else {
        if (this.goods) {
          return this.goods.price;
        } else {
          return 0;
        }
      }
    },
    newData: function newData() {var
      number = this.number,display = this.display,selectAttr = this.selectAttr;
      return {
        number: number,
        display: display,
        selectAttr: selectAttr };

    } },
  (0, _vuex.mapGetters)('iPhoneX', {
    boolEmpty: 'getBoolEmpty' })) };exports.default = _default2;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))

/***/ }),

/***/ 2053:
/*!*******************************************************************************************************************************************!*\
  !*** C:/Users/Admin/Desktop/商城/components/page-component/app-attr/app-attr.vue?vue&type=style&index=0&id=5e206576&scoped=true&lang=scss& ***!
  \*******************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _D_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_style_index_0_id_5e206576_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-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--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-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!./app-attr.vue?vue&type=style&index=0&id=5e206576&scoped=true&lang=scss& */ 2054);
/* harmony import */ var _D_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_style_index_0_id_5e206576_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_style_index_0_id_5e206576_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_style_index_0_id_5e206576_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_style_index_0_id_5e206576_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_D_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_app_attr_vue_vue_type_style_index_0_id_5e206576_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 2054:
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-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--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-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/Admin/Desktop/商城/components/page-component/app-attr/app-attr.vue?vue&type=style&index=0&id=5e206576&scoped=true&lang=scss& ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin
    if(false) { var cssReload; }
  

/***/ })

}]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/components/page-component/app-attr/app-attr.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/page-component/app-attr/app-attr-create-component',
    {
        'components/page-component/app-attr/app-attr-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('1')['createComponent'](__webpack_require__(2048))
        })
    },
    [['components/page-component/app-attr/app-attr-create-component']]
]);
