var webpackRequire = require("./../../../../webpack-require");
webpackRequire(
"./src/packages/wm-cloud-db_index/component/assistModal/index.js",
Object.assign({}, require("./../../../../weimob-cloud-commons.js").modules, {

/***/ "./src/packages/wm-cloud-db_index/component/assistModal/index.js":
/*!***********************************************************************!*\
  !*** ./src/packages/wm-cloud-db_index/component/assistModal/index.js ***!
  \***********************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_db_api_globalData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/db_api/globalData */ "./src/packages/wm-cloud-db_index/utils/db_api/globalData.js");
/* harmony import */ var _utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/db_api/index */ "./src/packages/wm-cloud-db_index/utils/db_api/index.js");


const app = getApp();
Component({
  data: {
    isloading: false,
    nickname: "",
    avatar: ""
  },
  properties: {
    isBindPhone: Boolean,
    shareCode: String,
    isAuthUserInfo: Boolean
  },
  async attached() {
    console.log(this);
    console.error("看看文案", this.data, this.data.isBindPhone);
    const getShareUserInfoResp = await Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiGetShareUserInfo"])({
      inviteCode: this.data.shareCode
    });
    if (getShareUserInfoResp.success) {
      this.setData({
        nickname: getShareUserInfoResp.data.nickname,
        avatar: getShareUserInfoResp.data.avatar
      });
    }
  },
  methods: {
    onModalClose() {
      this.triggerEvent("onModalClose", 'assist');
    },
    assistFunc() {
      wx.showLoading();
      console.warn("助力");
      Object(_utils_db_api_index__WEBPACK_IMPORTED_MODULE_1__["apiDoAssist"])({
        inviteCode: this.data.shareCode
      }).then(res => {
        wx.hideLoading();
        this.triggerEvent("onAssistResult", res);
      });
    },
    checkAuthPhone(e) {
      wx.showLoading();
      this.triggerEvent("onAuthPhone", e);
    },
    checkAuthUser(e) {
      // wx.showLoading()
      this.triggerEvent("onAuthUser", e);
    }
  }
});

/***/ })

/******/ }));