Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinhaitao
taobao-mini-template
Commits
5acdca3f
Commit
5acdca3f
authored
Mar 09, 2021
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:
💡
perf
parent
008ddcc0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
31 deletions
+6
-31
DoHelpModal.jsx
c_client/src/components/DoHelpModal/DoHelpModal.jsx
+2
-1
GoodsPage.jsx
c_client/src/components/GoodsPage/GoodsPage.jsx
+1
-2
RuleModal.jsx
c_client/src/components/RuleModal/RuleModal.jsx
+0
-1
myPrize.jsx
c_client/src/pages/myPrize/myPrize.jsx
+3
-2
util.js
c_client/src/utils/util.js
+0
-25
No files found.
c_client/src/components/DoHelpModal/DoHelpModal.jsx
View file @
5acdca3f
...
@@ -4,9 +4,10 @@ import { useThrottle } from '@/hooks/useThrottle'
...
@@ -4,9 +4,10 @@ import { useThrottle } from '@/hooks/useThrottle'
import
Modal
from
'@/components/_base/Modal/Modal'
import
Modal
from
'@/components/_base/Modal/Modal'
import
styles
from
'./DoHelpModal.module.less'
import
styles
from
'./DoHelpModal.module.less'
import
API
from
'@/api'
import
API
from
'@/api'
import
{
checkIsMember
}
from
'@/utils/util'
import
{
showToast
}
from
'@tarojs/taro'
import
{
showToast
}
from
'@tarojs/taro'
import
{
useLoginInfoModel
}
from
'@/store'
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
)
{
export
default
function
RuleModal
(
props
)
{
const
{
bg
=
''
,
width
=
300
,
height
=
300
,
onClose
=
()
=>
{},
closePostion
,
top
=
'40%'
,
newVip
=
false
}
=
props
const
{
bg
=
''
,
width
=
300
,
height
=
300
,
onClose
=
()
=>
{},
closePostion
,
top
=
'40%'
,
newVip
=
false
}
=
props
...
...
c_client/src/components/GoodsPage/GoodsPage.jsx
View file @
5acdca3f
import
{
View
,
ScrollView
,
Image
}
from
'@tarojs/components'
import
{
View
,
ScrollView
,
Image
}
from
'@tarojs/components'
import
classnames
from
'classnames'
import
React
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
tbccTs
from
'tbcc-sdk-ts'
import
tbccTs
from
'tbcc-sdk-ts'
const
{
openDetail
,
collectGoods
,
checkGoodsCollectedStatus
,
commonToast
}
=
tbccTs
.
tb
const
{
openDetail
,
collectGoods
,
checkGoodsCollectedStatus
,
commonToast
}
=
tbccTs
.
tb
...
...
c_client/src/components/RuleModal/RuleModal.jsx
View file @
5acdca3f
import
{
View
,
ScrollView
,
Text
}
from
'@tarojs/components'
import
{
View
,
ScrollView
,
Text
}
from
'@tarojs/components'
import
React
from
'react'
import
React
from
'react'
import
classnames
from
'classnames'
import
Modal
from
'@/components/_base/Modal/Modal'
import
Modal
from
'@/components/_base/Modal/Modal'
import
styles
from
'./RuleModal.module.less'
import
styles
from
'./RuleModal.module.less'
...
...
c_client/src/pages/myPrize/myPrize.jsx
View file @
5acdca3f
import
React
,
{
use
Effect
,
use
State
}
from
'react'
import
React
,
{
useState
}
from
'react'
import
{
Image
,
ScrollView
,
View
}
from
'@tarojs/components'
import
{
Image
,
ScrollView
,
View
}
from
'@tarojs/components'
import
API
from
'@/api'
import
API
from
'@/api'
import
{
DRAW_STATUS
,
PRIZE_TYPE
}
from
'@/const'
import
{
DRAW_STATUS
,
PRIZE_TYPE
}
from
'@/const'
import
DeliveryModal
from
'@/components/DeliveryModal/DeliveryModal'
import
DeliveryModal
from
'@/components/DeliveryModal/DeliveryModal'
import
tbccTs
from
'tbcc-sdk-ts'
import
tbccTs
from
'tbcc-sdk-ts'
import
{
useThrottle
}
from
'@/hooks/useThrottle'
import
{
useThrottle
}
from
'@/hooks/useThrottle'
import
{
checkIsMember
}
from
'tbcc-sdk-ts/lib/utils'
import
{
useDidShow
}
from
'@tarojs/taro'
import
{
useDidShow
}
from
'@tarojs/taro'
import
{
dateFormatter
}
from
'@/utils/date'
import
'./myPrize.less'
import
'./myPrize.less'
const
{
checkIsMember
,
dateFormatter
}
=
tbccTs
.
utils
const
{
commonToast
,
getUserAddress
,
navigateToOutside
,
setClipboard
}
=
tbccTs
.
tb
const
{
commonToast
,
getUserAddress
,
navigateToOutside
,
setClipboard
}
=
tbccTs
.
tb
const
{
getMyPrizeList
,
receiveEnamePrize
,
receiveObjectPrize
}
=
API
const
{
getMyPrizeList
,
receiveEnamePrize
,
receiveObjectPrize
}
=
API
...
...
c_client/src/utils/util.js
View file @
5acdca3f
// eslint-disable-next-line no-undef
const
memberPlugin
=
requirePlugin
(
'cemMember'
)
export
const
noopFn
=
()
=>
{
}
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)
// })
}
})
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment