Commit 5acdca3f authored by qinhaitao's avatar qinhaitao

refactor: 💡 perf

parent 008ddcc0
......@@ -4,9 +4,10 @@ import { useThrottle } from '@/hooks/useThrottle'
import Modal from '@/components/_base/Modal/Modal'
import styles from './DoHelpModal.module.less'
import API from '@/api'
import { checkIsMember } from '@/utils/util'
import { showToast } from '@tarojs/taro'
import { useLoginInfoModel } from '@/store'
import { checkIsMember } from 'tbcc-sdk-ts/lib/utils'
import { commonToast } from 'tbcc-sdk-ts/lib/core/tb'
export default function RuleModal(props) {
const { bg = '', width = 300, height = 300, onClose = () => {}, closePostion, top = '40%', newVip = false } = props
......
import { View, ScrollView, Image } from '@tarojs/components'
import classnames from 'classnames'
import React, { useEffect, useState } from 'react'
import React from 'react'
import tbccTs from 'tbcc-sdk-ts'
const { openDetail, collectGoods, checkGoodsCollectedStatus, commonToast } = tbccTs.tb
......
import { View, ScrollView, Text } from '@tarojs/components'
import React from 'react'
import classnames from 'classnames'
import Modal from '@/components/_base/Modal/Modal'
import styles from './RuleModal.module.less'
......
import React, { useEffect, useState } from 'react'
import React, { useState } from 'react'
import { Image, ScrollView, View } from '@tarojs/components'
import API from '@/api'
import { DRAW_STATUS, PRIZE_TYPE } from '@/const'
import DeliveryModal from '@/components/DeliveryModal/DeliveryModal'
import tbccTs from 'tbcc-sdk-ts'
import { useThrottle } from '@/hooks/useThrottle'
import { checkIsMember } from 'tbcc-sdk-ts/lib/utils'
import { useDidShow } from '@tarojs/taro'
import { dateFormatter } from '@/utils/date'
import './myPrize.less'
const { checkIsMember, dateFormatter } = tbccTs.utils
const { commonToast, getUserAddress, navigateToOutside, setClipboard } = tbccTs.tb
const { getMyPrizeList, receiveEnamePrize, receiveObjectPrize } = API
......
// eslint-disable-next-line no-undef
const memberPlugin = requirePlugin('cemMember')
export const noopFn = () => { }
export const checkIsMember = (sellerId = '') => {
return new Promise((resolve, reject) => {
memberPlugin.checkMember({
// sellerId为可选参数,不填则为当前小程序Owner用户ID
sellerId,
success(res) {
console.log('会员检查成功 :>> ', res)
resolve(res)
},
fail(v) {
console.log('会员检查失败 :>> ', v)
console.warn('checkMember 需在真机上调试')
reject(v)
// my.alert({
// title: '会员检查失败',
// content: JSON.stringify(v)
// })
}
})
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment