
let apiMaps

apiMaps = {
  user_base_info: '***',
  user_asset_info: '***',
  user_card_info: '***',
  user_guider_info: '***',
  user_coupon_list: '***',
  user_coupon_detail: '***',
  user_coupon_packagelist: '***',
  user_coupon_get: '***',
  user_sdp_info: '***',
  user_purchase_list: '****',
  user_purchase_receive: '****',
  wm_app_session: '***'
}

const mockdata = {}
mockdata.user_base_info = {
  headurl:
    'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83epfglCQ1t6rNl6QykTf5nYHQYMcHichHDDxPKhzNrtKIdfEicGbia2h9mRoXKNVNIHb9sHwx1wUicqI7g/132',
  homeStoreId: null,
  homeStoreName: null,
  isMember: false,
  nickname: '微大盟',
  wid: 10896867013,
  appId: 'wxea5b8710073235fd',
  openId: 'ok3hN5av9sf97Rb-fIJ5e0t0X_jw'
}
mockdata.user_base_info.sourceObjectList = [{ source: 2, sourceAppId: 'wxea5b8710073235fd', sourceOpenId: 'user-unionId' }, { source: 4, sourceAppId: 'wxea5b8710073235fd', sourceOpenId: '17766778877' }]
mockdata.user_asset_info = {
  availableAmount: 100,
  availablePoint: 10,
  currentAmount: 100,
  currentPoint: 10
}
mockdata.user_card_info = {}
mockdata.user_guider_info = {}
mockdata.user_coupon_list = {}
mockdata.user_coupon_detail = {}
mockdata.user_coupon_packagelist = {
  pageList: [
    {
      couponOrigin: 1,
      couponPackageId: 1012606,
      couponPackageName: '福袋2号',
      description: '描述',
      sendType: 1,
      status: 1,
      statusDesc: null,
      stock: 0,
      useNotice: '嘤嘤嘤',
      couponList: [
        {
          acceptGoodsType: 1,
          adaptCurrentStore: true,
          alipayCouponTemplateId: null,
          alipayMerchantCouponRecommendStatus: null,
          applyTradeScene: null,
          authWechatMerchant: null,
          availableTimeEnd: null,
          availableTimeStart: null,
          canCashTicket: null,
          canGiveFriend: null,
          canGoodsNumber: null,
          canReceive: null,
          canShare: null,
          canUseDeductions: null,
          canUseDiscounts: null,
          canWeimobEdit: null,
          cardTemplateId: 1016685,
          cashTicketAmt: 11.0,
          cashTicketCondition: 1.0,
          codeGenerateType: 0,
          colorType: null,
          condition: null,
          couponChannel: null,
          couponCost: null,
          couponCostType: null,
          couponDesc: '',
          couponExtraInfo: null,
          couponOrigin: 1,
          couponScopeList: null,
          couponTagList: null,
          createAreaCode: null,
          createAreaId: null,
          createDate: null,
          createStoreId: null,
          createType: null,
          customCodeSetting: null,
          detail: '价值11元代金券，满足门槛即可使用',
          discount: null,
          excludeGoodsIds: null,
          existExcludeGoods: false,
          expDayCount: null,
          expireDate: 1617206399000,
          expireDateType: 1,
          fromPaas: false,
          iconUrl: null,
          importGoodsFileName: null,
          importGoodsFlag: null,
          isAvailable: null,
          isEnable: null,
          isExpired: null,
          isFocusFollow: null,
          isSyncWechat: null,
          issueChannel: null,
          left: 1000,
          limitedType: null,
          logoUrl: null,
          maxCashTicketAmt: null,
          maxDiscount: null,
          maxDiscountAmount: null,
          maxGoodsAmount: null,
          maxGoodsNumber: null,
          memberTagList: null,
          merchantIssueChannels: null,
          merchantIssueFlag: null,
          merchantName: null,
          minCashTicketAmt: null,
          minDiscount: null,
          minGoodsNumber: null,
          name: 'C型1区域',
          number: 4,
          operatorId: null,
          pid: null,
          pricingType: null,
          publishChannelType: null,
          publishChannels: null,
          publishCount: 0,
          receiveDesc: '每人限领11张',
          recommendEndTime: null,
          recommendStartTime: null,
          redirectType: 0,
          scanBuyIssueFlag: null,
          sceneList: null,
          selectAreaIds: null,
          selectStoreIdList: null,
          selectStoreRangeType: null,
          selectStoreType: 1,
          servicePhone: null,
          settingVersion: null,
          share: null,
          sourceMerchantName: null,
          startDate: 1616515200000,
          startDayCount: null,
          status: 6,
          stockId: null,
          storeId: null,
          storeLaunchFlag: null,
          storeLimitNum: null,
          subCouponType: 1,
          subName: null,
          syncStatus: null,
          textImageList: null,
          thirdId: null,
          totalCount: 1000,
          type: 0,
          useChannels: null,
          useNotice: '满1元且仅1件可用，'
        }
      ]
    }
  ],
  pageNum: 1,
  pageSize: 20,
  totalCount: 3
}
mockdata.user_coupon_get = {
  canReceive: 1, // 用户能否领取 1可领取 2已领取 3已领完)
  code: '91904041586615409', // 优惠券券码
  state: 1 // 是否领取成功
}
mockdata.user_sdp_info = {}
mockdata.user_purchase_list = {
  status: 0, //  0 未领取; 1 已领取; 2 已使用
  memberUsedCount: 0, // 会员使用总数
  activityId: 12,
  purchaseUpper: 2,
  purchaseCodeGoodsDTOList: [{
    goodsId: 22,
    goodsTitle: '商品标题',
    defaultImageUrl: 'https://image-c-dev.weimobwmc.com/dev-Omr9/68a90ddf57dd410582a9acca889bcea5.png'
  }]
}
mockdata.user_purchase_receive = {
  codeValues: ['hN5av3bV97Rb', 'bV97RbhN5av3']
}
mockdata.wm_app_session = {
  pid: '3400',
  wid: 6353261854,
  appid: 'wxea5b8710079835fd',
  openid: 'ok3hN5av3bV97Rb-fF9SC7t0X_jw'
}

const init = function (dataflag, option = {}) {
  if (!apiMaps[dataflag]) {
    console.error('您所查询的接口不存在，请核对后再调用！')
  }
  return Promise.resolve(mockdata[dataflag])
}

module.exports = init
// export default init;
