(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/tabbar/shoppingCart/shoppingCart"],{

/***/ 36:
/*!**********************************************************************************************************!*\
  !*** D:/chenq/chen/uniapp(兼小程序)/dengrui/main.js?{"page":"pages%2Ftabbar%2FshoppingCart%2FshoppingCart"} ***!
  \**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 4);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
var _shoppingCart = _interopRequireDefault(__webpack_require__(/*! ./pages/tabbar/shoppingCart/shoppingCart.vue */ 37));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
createPage(_shoppingCart.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))

/***/ }),

/***/ 37:
/*!*************************************************************************************!*\
  !*** D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/shoppingCart/shoppingCart.vue ***!
  \*************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _shoppingCart_vue_vue_type_template_id_0d064fb7___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./shoppingCart.vue?vue&type=template&id=0d064fb7& */ 38);
/* harmony import */ var _shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shoppingCart.vue?vue&type=script&lang=js& */ 40);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _shoppingCart_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 _shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 11);

var renderjs




/* normalize component */

var component = Object(_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
  _shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _shoppingCart_vue_vue_type_template_id_0d064fb7___WEBPACK_IMPORTED_MODULE_0__["render"],
  _shoppingCart_vue_vue_type_template_id_0d064fb7___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  null,
  null,
  false,
  _shoppingCart_vue_vue_type_template_id_0d064fb7___WEBPACK_IMPORTED_MODULE_0__["components"],
  renderjs
)

component.options.__file = "pages/tabbar/shoppingCart/shoppingCart.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 38:
/*!********************************************************************************************************************!*\
  !*** D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/shoppingCart/shoppingCart.vue?vue&type=template&id=0d064fb7& ***!
  \********************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_template_id_0d064fb7___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./shoppingCart.vue?vue&type=template&id=0d064fb7& */ 39);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_template_id_0d064fb7___WEBPACK_IMPORTED_MODULE_0__["render"]; });

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

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

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



/***/ }),

/***/ 39:
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/shoppingCart/shoppingCart.vue?vue&type=template&id=0d064fb7& ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! 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



/***/ }),

/***/ 40:
/*!**************************************************************************************************************!*\
  !*** D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/shoppingCart/shoppingCart.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_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./shoppingCart.vue?vue&type=script&lang=js& */ 41);
/* harmony import */ var _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_HbuilderX_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_shoppingCart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 41:
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/chenq/chen/uniapp(兼小程序)/dengrui/pages/tabbar/shoppingCart/shoppingCart.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 twocoluList = function twocoluList() {__webpack_require__.e(/*! require.ensure | components/twocoluList */ "components/twocoluList").then((function () {return resolve(__webpack_require__(/*! @/components/twocoluList.vue */ 208));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var _default =














































































{
  components: {
    twocoluList: twocoluList },

  data: function data() {
    return {
      current: '-1',
      delCur: '-1',
      gouwList: [],
      dataList: [],
      disb: false,
      allcheck: false,
      cunIdArr: [],
      newId: '',
      newNum: 1,
      newType: '',
      inputNum: '',
      dangVal: '',
      orderList: [], //暂存准备下单的订单的coding、num
      statusHNH: uni.getStorageSync('statusHNH'),
      pageShow: true,
      page: 1,
      size: 10,
      total: '',
      isZanw: true,
      user_type: uni.getStorageSync('user_type') //权限
    };
  },
  onShow: function onShow() {
    this.$toolAll.tools.guoq();
    uni.hideTabBar();
    this.checkGouCList();
    this.allcheck = false;
    uni.removeStorageSync('orderInfo');
  },
  onReachBottom: function onReachBottom() {
    // console.log(this.total,this.productList.length);
    if (this.total != this.dataList.length) {
      this.page++;
      this.like(); //调用自主预约列表事件
    } else {
      if (this.isZanw) this.$toolAll.tools.showToast('暂无更多商品列表', 'none', 1000);
      this.isZanw = false;
    }
  },
  onLoad: function onLoad() {
    this.like();
  },
  computed: {
    allPrice: function allPrice() {
      var sum = 0;
      this.gouwList.forEach(function (item) {
        if (item.status) sum += item.price * 1 * item.num;
      });
      return sum;
    },
    allNum: function allNum() {
      var num = 0;
      this.gouwList.forEach(function (item) {
        if (item.status) num += item.num * 1;
      });
      return num;
    },
    zhunOrder: function zhunOrder() {
      var arr = [];
      // console.log('数据：',this.gouwList);
      this.gouwList.forEach(function (item) {
        var buyObj = {
          sku_coding: item.coding,
          num: item.num };

        if (item.status) arr.push(buyObj);
      });
      return arr;
    } },

  methods: {
    like: function like() {var _this = this; //查询猜你喜欢列表
      this.$requst.post('product/spu/guess', { page: 1, size: 50 }).then(function (res) {
        // console.log('猜你喜欢',res);
        if (res.code == 0) {
          _this.pageShow = true;
          _this.total = res.data.total;
          if (res.data.list.length != 0) {
            res.data.list.forEach(function (item) {
              var likeObj = {
                id: item.main_sku.id,
                spu_id: item.id,
                src: _this.$http + item.main_sku.main_image,
                title: item.name,
                price: item.main_sku.cur_price / 100,
                tags: item.tags };

              _this.dataList.push(likeObj);
            });
          }
        }
      }, function (error) {});
    },
    checkGouCList: function checkGouCList() {var _this2 = this; //购物车商品查询事件
      this.gouwList = [];
      var gouParma = {
        page: 1,
        size: 50 //后台默认20
      };
      this.$requst.post('order/shopping-cart', gouParma).then(function (res) {
        // console.log('购物车',res);
        if (res.data.length != 0) {
          res.data.forEach(function (item) {
            if (item.sku != null) {
              var gouObj = {
                id: item.id,
                spu_id: item.spu_id,
                coding: item.sku.coding,
                src: _this2.$http + item.sku.sku_cover,
                status: false,
                title: item.spu_name,
                price: parseInt(item.price) / 100,
                num: item.num,
                cateArr: item.skus };

              _this2.gouwList.push(gouObj);
            } else {
              // console.log('id:',item.id);
              _this2.$requst.post('order/shopping-cart-del', { id: item.id }).then(function (res) {}, function (error) {});
            }
            // console.log('数据：',this.gouwList);
          });
        }
        // console.log(res);
      }, function (error) {});
    },
    cateChoose: function cateChoose(index, index1) {//类型选择
      var dang = this.gouwList[index].cateArr[index1];
      var num = this.gouwList[index].cateArr.indexOf(dang);
      if (num != -1) {
        this.gouwList[index].cateArr.splice(num, 1);
        this.gouwList[index].cateArr.unshift(dang);
      }

      this.gouwList[index].src = this.$http + this.gouwList[index].cateArr[0].sku_cover;
      this.gouwList[index].coding = this.gouwList[index].cateArr[0].coding;
      this.gouwList[index].price = this.gouwList[index].cateArr[0].sku_price / 100;
    },
    chooseCate: function chooseCate(index) {//类型选择调起
      // console.log('下拉选择：'+index);
      this.current == index ? this.current = '-1' : this.current = index;
    },
    gopay: function gopay() {//去结算事件
      var ya = this;
      var storageAddress = uni.getStorageSync('storageAddress');
      var buyParma = {
        sku_list: this.zhunOrder,
        address_id: storageAddress || '' };

      // console.log('参数',buyParma);
      this.$requst.post('order/prepare-info', buyParma).then(function (res) {
        // console.log(res);
        if (res.code == 0) {
          ya.disb = true;
          uni.setStorageSync('orderInfo', res.data);
          setTimeout(function () {
            ya.disb = false;
          }, 2000);
          uni.navigateTo({
            url: '/pagesA/confirmOrder/confirmOrder' });

        }
      }, function (error) {ya.disb = false;});
    },
    choose: function choose(index) {//单选
      this.gouwList[index].status = !this.gouwList[index].status;
      var one = this.gouwList.filter(function (item) {
        return item.status == false;
      });
      one.length == 0 ? this.allcheck = true : this.allcheck = false;
    },
    allchoose: function allchoose() {var _this3 = this; //全选
      this.allcheck = !this.allcheck;
      this.gouwList.forEach(function (item, index) {
        _this3.allcheck ? item.status = true : item.status = false;
      });
    },
    deladdEvent: function deladdEvent(id, cur, index) {//数量加减事件
      if (index == 0) {//减少数量
        this.gouwList[cur].num--;
        this.newType = 'down';
      } else {//增加数量
        this.gouwList[cur].num++;
        this.newType = 'up';
      }
      this.newId = id;
      this.changeNum(); //调用数量变更事件
    },
    changeNum: function changeNum() {//执行数量变更事件
      var bparma = {
        id: this.newId,
        num: this.newNum,
        type: this.newType };

      this.$requst.post('order/shopping-cart-change-num', bparma).then(function (res) {}, function (error) {});
    },
    // changeInput(index,id,e){//数量输入框事件
    // 	// console.log(index,id);
    // 	this.newId = id
    // 	this.inputNum = e.target.value
    // 	this.dangVal = this.gouwList[index].num
    // 	if(this.inputNum>this.dangVal){
    // 		this.newType = 'up'
    // 	} else if(this.inputNum<this.dangVal){
    // 		this.newType = 'down'
    // 	}
    // 	this.newNum = this.gouwList[index].num = this.inputNum
    // },
    // blurEv(index){
    // 	if(this.inputNum==''){
    // 		this.gouwList[index].num = this.dangVal
    // 		this.$toolAll.tools.showToast('请输入正确的产品数量')
    // 	} else {
    // 		this.changeNum()//调用数量变更事件
    // 	}
    // },
    goGouw: function goGouw() {//去购物按钮事件
      // console.log('去购物');
      uni.setStorageSync('whereCome', 0);
      uni.switchTab({
        url: '/pages/tabbar/product/product' });

    },
    clear: function clear(id, index) {var _this4 = this; //删除商品
      // console.log('删除商品：'+id);
      uni.showModal({
        content: '确定要删除该商品吗？',
        cancelText: '取消',
        cancelColor: '#999999',
        confirmText: '确定',
        confirmColor: '#FF7800',
        success: function success(res) {
          if (res.confirm) {
            _this4.$requst.post('order/shopping-cart-del', { id: id }).then(function (res) {
              if (res.code == 0) {
                _this4.delCur = index;
                setTimeout(function () {
                  _this4.delCur = '-1';
                  _this4.gouwList.splice(index, 1);
                }, 500);
                // this.checkGouCList()
                _this4.$toolAll.tools.showToast('删除商品成功');
              }
            }, function (error) {});
          }
        } });

    },
    checkDetail: function checkDetail(id) {//查看商品详情
      // console.log('查看详情：'+id);
      uni.navigateTo({
        url: '/pagesA/productDetail/productDetail?index=0&id=' + id });

    },
    addChe: function addChe() {//加入购物车事件
      var ya = this;
      setTimeout(function () {
        ya.checkGouCList();
      }, 500);
    } } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))

/***/ })

},[[36,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/tabbar/shoppingCart/shoppingCart.js.map