component-shipinlv 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,6 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import * as VipPowerController from "../service/api/VipPowerController";
4
4
  import { useRequest } from "@umijs/hooks";
5
- import { getApiEnv } from "../lib/getApiUrl";
6
5
  import React, { useState } from "react";
7
6
  import styles from "./index.css";
8
7
  import { Buy } from "./..";
@@ -98,7 +97,8 @@ var VipList = function VipList(_ref) {
98
97
  result.vipList.forEach(function (item) {
99
98
  buyList.push({
100
99
  id: item.id,
101
- price: item.price
100
+ price: item.price,
101
+ canBuy: item.canBuy
102
102
  });
103
103
  var dataIndex = "vipLevel".concat(item.vipLevel);
104
104
  var colorPrimary = ApplyColorDict[item.vipLevel].color || '#722ED1';
@@ -352,7 +352,7 @@ var VipList = function VipList(_ref) {
352
352
  index: i,
353
353
  children: /*#__PURE__*/_jsx("div", {
354
354
  className: "onBuy",
355
- children: /*#__PURE__*/_jsx(ConfigProvider, {
355
+ children: item.canBuy && /*#__PURE__*/_jsx(ConfigProvider, {
356
356
  theme: {
357
357
  components: {
358
358
  Button: {
@@ -361,7 +361,7 @@ var VipList = function VipList(_ref) {
361
361
  }
362
362
  },
363
363
  children: /*#__PURE__*/_jsx(Buy, {
364
- env: getApiEnv(),
364
+ env: env,
365
365
  disabled: userVip,
366
366
  productKind: "vip",
367
367
  vipId: (item === null || item === void 0 ? void 0 : item.id) || 0,
@@ -163,7 +163,7 @@ declare const Tool: {
163
163
  setTimeOffset(serverTime: number): void;
164
164
  getTime(): number;
165
165
  h5Pay(query: Pay.H5PayQuery): void;
166
- notification(type: "error" | "success" | "info" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
166
+ notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
167
167
  notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
168
168
  notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
169
169
  notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
@@ -4,5 +4,6 @@ declare namespace VipList {
4
4
  title: string;
5
5
  price: number;
6
6
  vipLevel: number;
7
+ canBuy: boolean;
7
8
  }
8
9
  }
@@ -45,5 +45,6 @@ declare namespace VipPower {
45
45
  interface BuyList {
46
46
  id: number;
47
47
  price: number;
48
+ canBuy: boolean;
48
49
  }
49
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",