(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/user/memberSelect"],{

/***/ 262:
/*!***************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/main.js?{"page":"pages%2Fuser%2FmemberSelect"} ***!
  \***************************************************************************************************************/
/*! 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 _memberSelect = _interopRequireDefault(__webpack_require__(/*! ./pages/user/memberSelect.vue */ 263));
// @ts-ignore
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_memberSelect.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"]))

/***/ }),

/***/ 263:
/*!********************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/user/memberSelect.vue ***!
  \********************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _memberSelect_vue_vue_type_template_id_2d61efd1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./memberSelect.vue?vue&type=template&id=2d61efd1&scoped=true& */ 264);
/* harmony import */ var _memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./memberSelect.vue?vue&type=script&lang=js& */ 266);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _memberSelect_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 _memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _memberSelect_vue_vue_type_style_index_0_id_2d61efd1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./memberSelect.vue?vue&type=style&index=0&id=2d61efd1&lang=scss&scoped=true& */ 268);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 37);

var renderjs





/* normalize component */

var component = Object(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
  _memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _memberSelect_vue_vue_type_template_id_2d61efd1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
  _memberSelect_vue_vue_type_template_id_2d61efd1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  "2d61efd1",
  null,
  false,
  _memberSelect_vue_vue_type_template_id_2d61efd1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
  renderjs
)

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

/***/ }),

/***/ 264:
/*!***************************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/user/memberSelect.vue?vue&type=template&id=2d61efd1&scoped=true& ***!
  \***************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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

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

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

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



/***/ }),

/***/ 265:
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/user/memberSelect.vue?vue&type=template&id=2d61efd1&scoped=true& ***!
  \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  var m0 = _vm.showTabs ? _vm.getCurrentTabMemberStatus() : null
  var m1 = _vm.showTabs && m0.isVip ? _vm.getCurrentTabName() : null
  var m2 = _vm.showTabs && m0.isVip ? _vm.getCurrentTabType() : null
  var m3 =
    _vm.showTabs && m0.isVip && m2 === "xcx"
      ? _vm.getCurrentTabMemberStatus()
      : null
  var m4 = _vm.showTabs && m0.isVip ? _vm.getCurrentTabMemberStatus() : null
  var m5 =
    _vm.showTabs && m0.isVip && m4.expirationDateStr
      ? _vm.getCurrentTabMemberStatus()
      : null
  var m6 = _vm.showTabs && m0.isVip ? _vm.getCurrentTabMemberStatus() : null
  var m7 =
    _vm.showTabs && m0.isVip && m6.daysRemaining > 0
      ? _vm.getCurrentTabMemberStatus()
      : null
  var m8 =
    _vm.showTabs && m0.isVip && !(m6.daysRemaining > 0)
      ? _vm.getCurrentTabMemberStatus()
      : null
  var m9 = _vm.showTabs
    ? !_vm.getCurrentTabMemberStatus().isVip &&
      _vm.getCurrentTabMemberStatus().isExpired
    : null
  var m10 = _vm.showTabs && m9 ? _vm.getCurrentTabName() : null
  var m11 = _vm.showTabs && m9 ? _vm.getCurrentTabType() : null
  var m12 =
    _vm.showTabs && m9 && m11 === "xcx" ? _vm.getCurrentTabMemberStatus() : null
  var m13 = _vm.showTabs && m9 ? _vm.getCurrentTabMemberStatus() : null
  var m14 =
    _vm.showTabs && m9 && m13.expirationDateStr
      ? _vm.getCurrentTabMemberStatus()
      : null
  var m15 = _vm.showTabs
    ? !_vm.getCurrentTabMemberStatus().isVip &&
      !_vm.getCurrentTabMemberStatus().isExpired
    : null
  var m16 = _vm.showTabs && m15 ? _vm.getCurrentTabName() : null
  _vm.$mp.data = Object.assign(
    {},
    {
      $root: {
        m0: m0,
        m1: m1,
        m2: m2,
        m3: m3,
        m4: m4,
        m5: m5,
        m6: m6,
        m7: m7,
        m8: m8,
        m9: m9,
        m10: m10,
        m11: m11,
        m12: m12,
        m13: m13,
        m14: m14,
        m15: m15,
        m16: m16,
      },
    }
  )
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ 266:
/*!*********************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/user/memberSelect.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 _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./memberSelect.vue?vue&type=script&lang=js& */ 267);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_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 _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 267:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/user/memberSelect.vue?vue&type=script&lang=js& ***!
  \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {

var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 32));
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 34));
var _MemberBookCheck = __webpack_require__(/*! @/components/MemberBookCheck.js */ 218);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = {
  data: function data() {
    return {
      memberLevels: [],
      selectedIndex: -1,
      isLoading: false,
      defaultBenefits: ['上传书籍数量增加', '优先展示您的商品', '专属客服服务', '更多增值服务'],
      // 会员等级颜色配置
      levelColors: ['#4A5CFF',
      // 蓝色
      '#FF7D3C',
      // 橙色
      '#8A2BE2',
      // 紫色
      '#FF4757',
      // 红色
      '#2ED573' // 绿色
      ],

      // Tab相关数据
      showTabs: false,
      // 是否显示tab切换
      activeTabIndex: 0,
      // 当前激活的tab索引
      tabs: [{
        name: '小程序上书会员',
        type: 'xcx'
      }, {
        name: '孔网翻新会员',
        type: 'kwfw'
      }],
      // 存储所有会员数据
      allMemberData: {
        xcx: [],
        // 小程序上书会员数据
        kwfw: [] // 孔网翻新会员数据
      },

      // 用户会员状态信息
      userMemberStatus: {
        xcx: {
          isVip: false,
          isExpired: false,
          count: 0,
          expirationDate: null,
          expirationDateStr: '',
          daysRemaining: 0
        },
        kwfw: {
          isVip: false,
          isExpired: false,
          expirationDate: null,
          expirationDateStr: '',
          daysRemaining: 0
        }
      }
    };
  },
  onLoad: function onLoad(options) {
    var _this = this;
    return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
      return _regenerator.default.wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              // 获取来源页面传递的参数
              _this.fromPage = options.from || '';
              _this.callback = options.callback || '';
              _this.memberType = options.type || ''; // 新增会员类型参数

              // 加载会员等级数据和用户会员状态
              _context.next = 5;
              return Promise.all([_this.loadMemberLevels(), _this.loadUserMemberStatus()]);
            case 5:
            case "end":
              return _context.stop();
          }
        }
      }, _callee);
    }))();
  },
  onShow: function onShow() {
    var _this2 = this;
    return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
      return _regenerator.default.wrap(function _callee2$(_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return _this2.loadUserMemberStatus();
            case 2:
              console.log('页面显示，会员状态已刷新:', _this2.userMemberStatus);
            case 3:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }))();
  },
  methods: {
    // 加载会员等级数据
    loadMemberLevels: function loadMemberLevels() {
      var _this3 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
        return _regenerator.default.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                _context3.prev = 0;
                uni.showLoading({
                  title: '加载中...'
                });
                console.log('加载会员等级数据，来源:', _this3.fromPage, '类型:', _this3.memberType);

                // 根据不同的入口来源展示不同的会员卡片
                if (!(_this3.fromPage === 'memberCheck' && _this3.memberType === 'xcx')) {
                  _context3.next = 9;
                  break;
                }
                // 从checkMemberBooksCount进入，只显示小程序上书会员
                _this3.showTabs = false;
                _context3.next = 7;
                return _this3.loadXcxMemberLevels();
              case 7:
                _context3.next = 18;
                break;
              case 9:
                if (!(_this3.fromPage === 'kwfw' && _this3.memberType === 'kwfw')) {
                  _context3.next = 14;
                  break;
                }
                // 从checkKwfwMember进入，只显示翻新会员
                _this3.showTabs = false;
                _this3.setKwfwMemberLevels();
                _context3.next = 18;
                break;
              case 14:
                // 从toMemberSelect进入或其他情况，显示所有会员卡片
                _this3.showTabs = true;
                _context3.next = 17;
                return _this3.loadAllMemberLevels();
              case 17:
                // 默认显示第一个tab的内容
                _this3.switchTab(0);
              case 18:
                _context3.next = 25;
                break;
              case 20:
                _context3.prev = 20;
                _context3.t0 = _context3["catch"](0);
                console.error('加载会员等级数据失败:', _context3.t0);
                uni.showToast({
                  title: '加载会员价格失败',
                  icon: 'none'
                });

                // 加载失败时使用默认数据
                _this3.setDefaultMemberLevels();
              case 25:
                _context3.prev = 25;
                uni.hideLoading();
                return _context3.finish(25);
              case 28:
              case "end":
                return _context3.stop();
            }
          }
        }, _callee3, null, [[0, 20, 25, 28]]);
      }))();
    },
    // 加载小程序上书会员等级数据
    loadXcxMemberLevels: function loadXcxMemberLevels() {
      var _this4 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
        var levelList, memberTypeConfig, settledId, parsedConfig, miniapp, monthFee, yearFee;
        return _regenerator.default.wrap(function _callee4$(_context4) {
          while (1) {
            switch (_context4.prev = _context4.next) {
              case 0:
                _context4.prev = 0;
                _context4.next = 3;
                return (0, _MemberBookCheck.getMemberLevelList)();
              case 3:
                levelList = _context4.sent;
                console.log('获取到的会员等级列表:', levelList);
                if (levelList && levelList.length > 0) {
                  // 清空原有的会员等级数据
                  _this4.memberLevels = [];

                  // 查找memberType为1的配置
                  memberTypeConfig = levelList.find(function (item) {
                    return item.memberType === 1;
                  });
                  settledId = memberTypeConfig.id;
                  console.log('找到的memberType为1的配置:', memberTypeConfig);
                  if (memberTypeConfig && memberTypeConfig.constraintJson) {
                    // 解析constraintJson数据
                    if (typeof memberTypeConfig.constraintJson === 'string') {
                      parsedConfig = JSON.parse(memberTypeConfig.constraintJson);
                    } else {
                      parsedConfig = memberTypeConfig.constraintJson;
                    }
                    console.log('解析后的配置:', parsedConfig);

                    // 确认数据中有miniapp字段
                    if (parsedConfig.miniapp) {
                      miniapp = parsedConfig.miniapp;
                      console.log('miniapp数据:', miniapp);

                      // 创建月付会员卡
                      if (miniapp.month_fee) {
                        monthFee = Number(miniapp.month_fee);
                        console.log("月费:", monthFee);
                        _this4.memberLevels.push({
                          id: settledId,
                          name: '月付会员     (点击开通)',
                          price: monthFee.toFixed(2),
                          originalPrice: monthFee * 100,
                          // 转换为分
                          // price: '0.01',
                          // originalPrice: 1, // 以分为单位
                          color: _this4.levelColors[0],
                          unit: '月',
                          length: 1,
                          serviceName: 'xcx上书会员',
                          benefits: ['每月上传书籍数量增加',
                          // '优先展示您的商品',
                          // '专属客服服务',
                          '月度VIP标识']
                        });
                      }

                      // 创建年付会员卡
                      if (miniapp.year_fee) {
                        yearFee = Number(miniapp.year_fee);
                        console.log("年费:", yearFee);
                        _this4.memberLevels.push({
                          id: settledId,
                          name: '年度会员     (点击开通)',
                          price: yearFee.toFixed(2),
                          originalPrice: yearFee * 100,
                          // 转换为分
                          color: _this4.levelColors[1],
                          unit: '月',
                          length: 12,
                          serviceName: 'xcx上书会员',
                          benefits: ['无限制上传书籍数量',
                          // '优先展示您的商品',
                          // '24小时专属客服服务',
                          // '年度VIP专属标识',
                          '更多增值服务特权']
                        });
                      }
                    }
                  }
                }

                // 如果没有获取到会员等级数据，显示默认的小程序上书会员数据
                if (_this4.memberLevels.length === 0) {
                  _this4.setDefaultXcxMemberLevels();
                }
                _context4.next = 13;
                break;
              case 9:
                _context4.prev = 9;
                _context4.t0 = _context4["catch"](0);
                console.error('加载小程序上书会员数据失败:', _context4.t0);
                _this4.setDefaultXcxMemberLevels();
              case 13:
              case "end":
                return _context4.stop();
            }
          }
        }, _callee4, null, [[0, 9]]);
      }))();
    },
    // 加载所有会员等级数据（小程序上书会员 + 翻新会员）
    loadAllMemberLevels: function loadAllMemberLevels() {
      var _this5 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
        return _regenerator.default.wrap(function _callee5$(_context5) {
          while (1) {
            switch (_context5.prev = _context5.next) {
              case 0:
                _context5.prev = 0;
                // 清空之前的数据
                _this5.allMemberData.xcx = [];
                _this5.allMemberData.kwfw = [];

                // 加载小程序上书会员数据
                _context5.next = 5;
                return _this5.loadXcxMemberLevels();
              case 5:
                // 将当前的memberLevels保存到xcx数据中
                _this5.allMemberData.xcx = (0, _toConsumableArray2.default)(_this5.memberLevels);

                // 加载翻新会员数据
                _this5.setKwfwMemberLevels();
                // 将当前的memberLevels保存到kwfw数据中
                _this5.allMemberData.kwfw = (0, _toConsumableArray2.default)(_this5.memberLevels);
                _context5.next = 14;
                break;
              case 10:
                _context5.prev = 10;
                _context5.t0 = _context5["catch"](0);
                console.error('加载所有会员数据失败:', _context5.t0);
                _this5.setDefaultAllMemberLevels();
              case 14:
              case "end":
                return _context5.stop();
            }
          }
        }, _callee5, null, [[0, 10]]);
      }))();
    },
    // 设置默认小程序上书会员等级数据
    setDefaultXcxMemberLevels: function setDefaultXcxMemberLevels() {
      this.memberLevels = [{
        id: 1,
        name: '月付会员     (点击开通)',
        price: '39.90',
        originalPrice: 3990,
        // 以分为单位
        color: this.levelColors[0],
        unit: '月',
        length: 1,
        sort: 1,
        serviceName: 'xcx上书会员',
        benefits: ['每月上传书籍数量增加', '优先展示您的商品', '专属客服服务', '月度VIP标识']
      }, {
        id: 2,
        name: '年度会员     (点击开通)',
        price: '399.00',
        originalPrice: 39900,
        // 以分为单位
        color: this.levelColors[1],
        unit: '月',
        length: 12,
        sort: 2,
        serviceName: 'xcx上书会员',
        benefits: ['无限制上传书籍数量', '优先展示您的商品', '24小时专属客服服务', '年度VIP专属标识', '更多增值服务特权']
      }];
    },
    // 设置默认会员等级数据（兼容旧版本）
    setDefaultMemberLevels: function setDefaultMemberLevels() {
      this.setDefaultXcxMemberLevels();
    },
    // 设置默认所有会员等级数据（小程序上书会员 + 翻新会员）
    setDefaultAllMemberLevels: function setDefaultAllMemberLevels() {
      this.setDefaultXcxMemberLevels();

      // 添加翻新会员
      this.memberLevels.push({
        id: 'kwfw',
        name: '孔网翻新会员/月   (点击开通)',
        price: '98.00',
        originalPrice: 9800,
        // 以分为单位
        color: this.levelColors[2],
        // 使用紫色
        unit: '月',
        length: 1,
        sort: 1,
        serviceName: 'xcx翻新会员',
        benefits: ['无限制使用孔网商品翻新功能', '批量处理商品信息', '优先获得新功能体验'],
        type: 'kwfw' // 标识为孔网翻新会员
      });
    },
    // 设置孔网翻新会员等级数据
    setKwfwMemberLevels: function setKwfwMemberLevels() {
      this.memberLevels = [{
        id: 'kwfw',
        name: '孔网翻新会员/月',
        price: '98.00',
        originalPrice: 9800,
        // 以分为单位
        // price: '0.01',
        // originalPrice: 1, // 以分为单位
        color: this.levelColors[2],
        // 使用紫色
        unit: '月',
        length: 1,
        sort: 1,
        serviceName: 'xcx翻新会员',
        benefits: ['无限制使用孔网商品翻新功能', '批量处理商品信息', '优先获得新功能体验'],
        type: 'kwfw' // 标识为孔网翻新会员
      }];
    },
    // 选择会员等级
    selectMember: function selectMember(index) {
      this.selectedIndex = index;
    },
    // 处理支付
    handlePay: function handlePay() {
      var _this6 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
        var selectedLevel;
        return _regenerator.default.wrap(function _callee7$(_context7) {
          while (1) {
            switch (_context7.prev = _context7.next) {
              case 0:
                if (!(_this6.selectedIndex === -1 || _this6.isLoading)) {
                  _context7.next = 2;
                  break;
                }
                return _context7.abrupt("return");
              case 2:
                selectedLevel = _this6.memberLevels[_this6.selectedIndex];
                console.log('selectedLevel:', selectedLevel);
                uni.showModal({
                  title: '确认支付',
                  content: "\u60A8\u9009\u62E9\u4E86".concat(selectedLevel.name, "\uFF0C\u9700\u652F\u4ED8\xA5").concat(selectedLevel.price, "\uFF0C\u786E\u8BA4\u7EE7\u7EED\u5417\uFF1F"),
                  success: function () {
                    var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(res) {
                      return _regenerator.default.wrap(function _callee6$(_context6) {
                        while (1) {
                          switch (_context6.prev = _context6.next) {
                            case 0:
                              if (!res.confirm) {
                                _context6.next = 21;
                                break;
                              }
                              _this6.isLoading = true;
                              uni.showLoading({
                                title: '发起支付...'
                              });
                              _context6.prev = 3;
                              if (!(selectedLevel.type === 'kwfw')) {
                                _context6.next = 9;
                                break;
                              }
                              _context6.next = 7;
                              return _this6.handleKwfwMemberPay(selectedLevel);
                            case 7:
                              _context6.next = 11;
                              break;
                            case 9:
                              _context6.next = 11;
                              return _this6.handleNormalMemberPay(selectedLevel);
                            case 11:
                              _context6.next = 17;
                              break;
                            case 13:
                              _context6.prev = 13;
                              _context6.t0 = _context6["catch"](3);
                              console.error('支付过程出错:', _context6.t0);
                              uni.showToast({
                                title: '支付过程出错，请重试',
                                icon: 'none'
                              });
                            case 17:
                              _context6.prev = 17;
                              uni.hideLoading();
                              _this6.isLoading = false;
                              return _context6.finish(17);
                            case 21:
                            case "end":
                              return _context6.stop();
                          }
                        }
                      }, _callee6, null, [[3, 13, 17, 21]]);
                    }));
                    function success(_x) {
                      return _success.apply(this, arguments);
                    }
                    return success;
                  }()
                });
              case 5:
              case "end":
                return _context7.stop();
            }
          }
        }, _callee7);
      }))();
    },
    // 处理普通会员支付
    handleNormalMemberPay: function handleNormalMemberPay(selectedLevel) {
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
        var userId, orderData, createResult, originalPrice, settledId, payResult, updateResult;
        return _regenerator.default.wrap(function _callee8$(_context8) {
          while (1) {
            switch (_context8.prev = _context8.next) {
              case 0:
                _context8.prev = 0;
                userId = uni.getStorageSync('userId'); // 第一步：支付前创建订单记录
                orderData = {
                  userId: userId,
                  memberType: 'normal',
                  amount: selectedLevel.price,
                  originalPrice: selectedLevel.originalPrice,
                  createTime: new Date().toISOString(),
                  unit: selectedLevel.unit,
                  length: selectedLevel.length,
                  serviceName: selectedLevel.serviceName
                };
                console.log('支付前创建普通会员订单:', orderData);
                _context8.next = 6;
                return (0, _MemberBookCheck.createKwfwMemberOrder)(orderData);
              case 6:
                createResult = _context8.sent;
                console.log('创建普通会员订单:', createResult);
                if (createResult.success) {
                  _context8.next = 10;
                  break;
                }
                throw new Error('创建订单失败: ' + createResult.error);
              case 10:
                // const orderId = createResult.orderId;
                // console.log('普通会员订单创建成功，订单ID:', orderId);
                // 第二步：发起支付
                // 使用原始价格（分）进行支付
                originalPrice = selectedLevel.originalPrice; // 获取会员等级ID
                settledId = selectedLevel.id; // console.log('支付会员等级ID:', settledId);
                console.log('订单id:', createResult.orderId.orderId);
                _context8.next = 15;
                return (0, _MemberBookCheck.callWxPay)(originalPrice, settledId, 'normal', createResult.orderId.orderId);
              case 15:
                payResult = _context8.sent;
                if (!payResult.success) {
                  _context8.next = 24;
                  break;
                }
                _context8.next = 19;
                return (0, _MemberBookCheck.updateKwfwMemberOrder)(createResult.orderId.orderId, payResult, userId);
              case 19:
                updateResult = _context8.sent;
                uni.showToast({
                  title: '支付成功',
                  icon: 'success'
                });

                // 支付成功后的处理
                setTimeout(function () {
                  // 如果有回调函数，调用它
                  var app = getApp();
                  if (app.memberSelectCallback) {
                    app.memberSelectCallback(true);
                  }

                  // 返回上一页
                  // uni.navigateBack();
                  uni.navigateTo({
                    url: '/pages/user/index'
                  });
                }, 1500);
                _context8.next = 25;
                break;
              case 24:
                uni.showToast({
                  title: '支付未完成',
                  icon: 'none'
                });
              case 25:
                _context8.next = 31;
                break;
              case 27:
                _context8.prev = 27;
                _context8.t0 = _context8["catch"](0);
                console.error('普通会员支付过程出错:', _context8.t0);
                uni.showToast({
                  title: '支付过程出错: ' + _context8.t0.message,
                  icon: 'none',
                  duration: 3000
                });
              case 31:
              case "end":
                return _context8.stop();
            }
          }
        }, _callee8, null, [[0, 27]]);
      }))();
    },
    // 处理孔网翻新会员支付
    handleKwfwMemberPay: function handleKwfwMemberPay(selectedLevel) {
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
        var userId, orderData, createResult, originalPrice, settledId, payResult;
        return _regenerator.default.wrap(function _callee9$(_context9) {
          while (1) {
            switch (_context9.prev = _context9.next) {
              case 0:
                _context9.prev = 0;
                userId = uni.getStorageSync('userId'); // 第一步：支付前创建订单记录
                orderData = {
                  userId: userId,
                  memberType: 'kwfw',
                  amount: selectedLevel.price,
                  originalPrice: selectedLevel.originalPrice,
                  createTime: new Date().toISOString(),
                  unit: selectedLevel.unit,
                  length: selectedLevel.length,
                  serviceName: selectedLevel.serviceName,
                  sort: selectedLevel.sort
                };
                console.log('支付前创建订单:', orderData);
                _context9.next = 6;
                return (0, _MemberBookCheck.createKwfwMemberOrder)(orderData);
              case 6:
                createResult = _context9.sent;
                console.log('createResult:', createResult);
                if (createResult.success) {
                  _context9.next = 10;
                  break;
                }
                throw new Error('创建订单失败: ' + createResult.error);
              case 10:
                // orderId = createResult.orderId;
                // console.log('订单创建成功，订单ID:', orderId);
                // 第二步：发起支付
                // 使用原始价格（分）进行支付
                originalPrice = selectedLevel.originalPrice; // 孔网翻新会员使用特殊的ID标识
                settledId = 'kwfw_member';
                console.log('支付孔网翻新会员ID:', settledId);
                console.log('订单id:', createResult.orderId.orderId);
                _context9.next = 16;
                return (0, _MemberBookCheck.callWxPay)(originalPrice, settledId, 'kwfw', createResult.orderId.orderId);
              case 16:
                payResult = _context9.sent;
                console.log('支付结果:', payResult);

                // 孔网翻新会员的订单状态更新在 memberSelect.vue 中通过 updateKwfwMemberOrder 处理
                if (!payResult.success) {
                  _context9.next = 25;
                  break;
                }
                _context9.next = 21;
                return (0, _MemberBookCheck.updateKwfwMemberOrder)(createResult.orderId.orderId, payResult, userId);
              case 21:
                uni.showToast({
                  title: '支付成功',
                  icon: 'success'
                });
                // 支付成功后的处理
                setTimeout(function () {
                  // 如果有孔网翻新会员回调函数，调用它
                  var app = getApp();
                  if (app.kwfwMemberCallback) {
                    app.kwfwMemberCallback(true);
                  }

                  // 返回上一页
                  // uni.navigateBack();
                  uni.navigateTo({
                    url: '/pages/user/index'
                  });
                }, 1500);
                _context9.next = 26;
                break;
              case 25:
                uni.showToast({
                  title: '支付未完成',
                  icon: 'none'
                });
              case 26:
                _context9.next = 32;
                break;
              case 28:
                _context9.prev = 28;
                _context9.t0 = _context9["catch"](0);
                console.error('孔网翻新会员支付过程出错:', _context9.t0);
                uni.showToast({
                  title: '支付过程出错: ' + _context9.t0.message,
                  icon: 'none',
                  duration: 3000
                });
              case 32:
              case "end":
                return _context9.stop();
            }
          }
        }, _callee9, null, [[0, 28]]);
      }))();
    },
    // Tab切换方法
    switchTab: function switchTab(index) {
      this.activeTabIndex = index;
      this.selectedIndex = -1; // 重置选择状态

      var tabType = this.tabs[index].type;
      if (tabType === 'xcx') {
        // 显示小程序上书会员
        this.memberLevels = (0, _toConsumableArray2.default)(this.allMemberData.xcx);
      } else if (tabType === 'kwfw') {
        // 显示孔网翻新会员
        this.memberLevels = (0, _toConsumableArray2.default)(this.allMemberData.kwfw);
      }
    },
    // 时间戳转换为北京时间字符串
    formatTimestamp: function formatTimestamp(timestamp) {
      if (!timestamp) return '';
      var date = new Date(timestamp);
      var year = date.getFullYear();
      var month = String(date.getMonth() + 1).padStart(2, '0');
      var day = String(date.getDate()).padStart(2, '0');
      var hours = String(date.getHours()).padStart(2, '0');
      var minutes = String(date.getMinutes()).padStart(2, '0');
      var seconds = String(date.getSeconds()).padStart(2, '0');
      return "".concat(year, "\u5E74").concat(month, "\u6708").concat(day, "\u65E5 ").concat(hours, ":").concat(minutes, ":").concat(seconds);
    },
    // 计算距离到期还有多少天
    calculateDaysRemaining: function calculateDaysRemaining(timestamp) {
      if (!timestamp) return 0;
      var now = new Date().getTime();
      var expiration = new Date(timestamp).getTime();
      var diffTime = expiration - now;
      if (diffTime <= 0) return 0;
      return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
    },
    // 获取用户小程序上书会员状态
    getUserXcxMemberStatus: function getUserXcxMemberStatus() {
      var _this7 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
        var userId, response, data, isExpired;
        return _regenerator.default.wrap(function _callee10$(_context10) {
          while (1) {
            switch (_context10.prev = _context10.next) {
              case 0:
                _context10.prev = 0;
                userId = uni.getStorageSync('userId');
                if (userId) {
                  _context10.next = 5;
                  break;
                }
                console.log('用户未登录');
                return _context10.abrupt("return");
              case 5:
                _context10.next = 7;
                return (0, _MemberBookCheck.getUserRecbusiness)(userId);
              case 7:
                response = _context10.sent;
                console.log('小程序上书会员状态响应:', response);
                if (response && response.data) {
                  if (response.data.code === 200 && response.data.data) {
                    // 成功获取用户会员状态
                    data = response.data.data; // 判断是否过期：有expirationDate但isVip为false
                    isExpired = !data.isVip && data.expirationDate;
                    _this7.userMemberStatus.xcx = {
                      isVip: data.isVip,
                      isExpired: isExpired,
                      count: data.count || 0,
                      expirationDate: data.expirationDate,
                      expirationDateStr: data.expirationDate ? _this7.formatTimestamp(data.expirationDate) : '',
                      daysRemaining: data.expirationDate ? _this7.calculateDaysRemaining(data.expirationDate) : 0
                    };
                    console.log('小程序上书会员状态更新成功:', _this7.userMemberStatus.xcx);
                  } else {
                    // 其他错误情况，设置为未开通状态
                    console.log('小程序上书会员：获取状态失败，设置为未开通状态', response);
                    _this7.userMemberStatus.xcx = {
                      isVip: false,
                      isExpired: false,
                      count: 0,
                      expirationDate: null,
                      expirationDateStr: '',
                      daysRemaining: 0
                    };
                  }
                } else {
                  // 响应为空，设置为未开通状态
                  console.log('小程序上书会员：响应为空，设置为未开通状态');
                  _this7.userMemberStatus.xcx = {
                    isVip: false,
                    isExpired: false,
                    count: 0,
                    expirationDate: null,
                    expirationDateStr: '',
                    daysRemaining: 0
                  };
                }
                _context10.next = 16;
                break;
              case 12:
                _context10.prev = 12;
                _context10.t0 = _context10["catch"](0);
                console.error('获取小程序上书会员状态失败:', _context10.t0);
                // 发生异常时也设置为未开通状态
                _this7.userMemberStatus.xcx = {
                  isVip: false,
                  isExpired: false,
                  count: 0,
                  expirationDate: null,
                  expirationDateStr: '',
                  daysRemaining: 0
                };
              case 16:
              case "end":
                return _context10.stop();
            }
          }
        }, _callee10, null, [[0, 12]]);
      }))();
    },
    // 获取用户孔网翻新会员状态
    getUserKwfwMemberStatus: function getUserKwfwMemberStatus() {
      var _this8 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
        var userId, response, data, isExpired;
        return _regenerator.default.wrap(function _callee11$(_context11) {
          while (1) {
            switch (_context11.prev = _context11.next) {
              case 0:
                _context11.prev = 0;
                userId = uni.getStorageSync('userId');
                if (userId) {
                  _context11.next = 5;
                  break;
                }
                console.log('用户未登录');
                return _context11.abrupt("return");
              case 5:
                _context11.next = 7;
                return (0, _MemberBookCheck.checkKwfwMemberStatus)(userId);
              case 7:
                response = _context11.sent;
                console.log('孔网翻新会员状态响应:', response);
                if (response) {
                  if (response.data.code === 200 && response.data.data) {
                    // 用户存在，处理会员状态
                    data = response.data.data; // 判断是否过期：有expirationDate但isVip为false
                    isExpired = !data.isVip && data.expirationDate;
                    _this8.userMemberStatus.kwfw = {
                      isVip: data.isVip || false,
                      isExpired: isExpired,
                      expirationDate: data.expirationDate,
                      expirationDateStr: data.expirationDate ? _this8.formatTimestamp(data.expirationDate) : '',
                      daysRemaining: data.expirationDate ? _this8.calculateDaysRemaining(data.expirationDate) : 0
                    };
                  } else if (response.data.code === 40001) {
                    // 用户未找到，设置为未开通状态
                    console.log('孔网翻新会员：用户未找到，设置为未开通状态');
                    _this8.userMemberStatus.kwfw = {
                      isVip: false,
                      isExpired: false,
                      expirationDate: null,
                      expirationDateStr: '',
                      daysRemaining: 0
                    };
                  } else {
                    // 其他错误情况，也设置为未开通状态
                    console.log('孔网翻新会员：其他错误，设置为未开通状态', response);
                    _this8.userMemberStatus.kwfw = {
                      isVip: false,
                      isExpired: false,
                      expirationDate: null,
                      expirationDateStr: '',
                      daysRemaining: 0
                    };
                  }
                }
                _context11.next = 16;
                break;
              case 12:
                _context11.prev = 12;
                _context11.t0 = _context11["catch"](0);
                console.error('获取孔网翻新会员状态失败:', _context11.t0);
                // 发生异常时也设置为未开通状态
                _this8.userMemberStatus.kwfw = {
                  isVip: false,
                  isExpired: false,
                  expirationDate: null,
                  expirationDateStr: '',
                  daysRemaining: 0
                };
              case 16:
              case "end":
                return _context11.stop();
            }
          }
        }, _callee11, null, [[0, 12]]);
      }))();
    },
    // 获取所有用户会员状态
    loadUserMemberStatus: function loadUserMemberStatus() {
      var _this9 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
        return _regenerator.default.wrap(function _callee12$(_context12) {
          while (1) {
            switch (_context12.prev = _context12.next) {
              case 0:
                _context12.next = 2;
                return Promise.all([_this9.getUserXcxMemberStatus(), _this9.getUserKwfwMemberStatus()]);
              case 2:
              case "end":
                return _context12.stop();
            }
          }
        }, _callee12);
      }))();
    },
    // 根据会员卡片类型获取对应的用户会员状态
    // 获取当前Tab的会员状态
    getCurrentTabMemberStatus: function getCurrentTabMemberStatus() {
      var currentTabType = this.getCurrentTabType();
      if (currentTabType === 'xcx' && this.userMemberStatus.xcx) {
        return this.userMemberStatus.xcx;
      } else if (currentTabType === 'kwfw' && this.userMemberStatus.kwfw) {
        return this.userMemberStatus.kwfw;
      }
      return {
        isVip: false,
        isExpired: false,
        count: 0,
        expirationDate: null,
        expirationDateStr: '',
        daysRemaining: 0
      };
    },
    // 获取当前Tab的类型
    getCurrentTabType: function getCurrentTabType() {
      if (this.showTabs && this.tabs && this.tabs[this.activeTabIndex] && this.tabs[this.activeTabIndex].type) {
        return this.tabs[this.activeTabIndex].type;
      }
      return '';
    },
    // 获取当前Tab的名称
    getCurrentTabName: function getCurrentTabName() {
      if (this.showTabs && this.tabs && this.tabs[this.activeTabIndex] && this.tabs[this.activeTabIndex].name) {
        return this.tabs[this.activeTabIndex].name;
      }
      return '会员';
    }
  }
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

/***/ }),

/***/ 268:
/*!******************************************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/user/memberSelect.vue?vue&type=style&index=0&id=2d61efd1&lang=scss&scoped=true& ***!
  \******************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_style_index_0_id_2d61efd1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--8-oneOf-1-3!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./memberSelect.vue?vue&type=style&index=0&id=2d61efd1&lang=scss&scoped=true& */ 269);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_style_index_0_id_2d61efd1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_style_index_0_id_2d61efd1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_style_index_0_id_2d61efd1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_style_index_0_id_2d61efd1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_memberSelect_vue_vue_type_style_index_0_id_2d61efd1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 269:
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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/@dcloudio/vue-cli-plugin-uni/packages/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/Administrator/Documents/HBuilderProjects/zhizhu/pages/user/memberSelect.vue?vue&type=style&index=0&id=2d61efd1&lang=scss&scoped=true& ***!
  \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

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

/***/ })

},[[262,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/user/memberSelect.js.map