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
2dc09458
Commit
2dc09458
authored
Sep 06, 2021
by
mqf_0707
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wnf
parent
1663c492
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
249 additions
and
431 deletions
+249
-431
package-lock.json
c_client/package-lock.json
+0
-83
api.js
c_client/src/api.js
+14
-22
ContainerFit.md
c_client/src/components/_base/ContainerFit/ContainerFit.md
+18
-0
Modal.jsx
c_client/src/components/_base/Modal/Modal.jsx
+2
-0
SwiperView.jsx
c_client/src/components/_tb_comps/SwiperView/SwiperView.jsx
+44
-17
SwiperView.less
c_client/src/components/_tb_comps/SwiperView/SwiperView.less
+123
-119
DoHelpModal.jsx
...ient/src/components/_tb_modal/DoHelpModal/DoHelpModal.jsx
+9
-9
DoHelpModal.module.less
.../components/_tb_modal/DoHelpModal/DoHelpModal.module.less
+3
-1
browse.config.js
c_client/src/config/browse.config.js
+2
-1
help.config.js
c_client/src/config/help.config.js
+7
-6
useAuth.js
c_client/src/hooks/useAuth.js
+2
-0
index.jsx
c_client/src/pages/index/index.jsx
+4
-54
browseGoods.jsx
c_client/src/pages/packageGood/browseGoods/browseGoods.jsx
+7
-5
cartGoods.jsx
c_client/src/pages/packageGood/cartGoods/cartGoods.jsx
+1
-1
collectGoods.jsx
c_client/src/pages/packageGood/collectGoods/collectGoods.jsx
+1
-1
orderGoods.jsx
c_client/src/pages/packageGood/orderGoods/orderGoods.jsx
+1
-1
myPrize.jsx
c_client/src/pages/packagePrize/myPrize/myPrize.jsx
+6
-7
preComp.jsx
c_client/src/pages/preComp/preComp.jsx
+4
-4
audio.js
c_client/src/utils/audio.js
+0
-2
date.js
c_client/src/utils/date.js
+0
-1
util.js
c_client/src/utils/util.js
+1
-97
No files found.
c_client/package-lock.json
View file @
2dc09458
...
@@ -20735,89 +20735,6 @@
...
@@ -20735,89 +20735,6 @@
"prop-types"
:
"^15.7.2"
"prop-types"
:
"^15.7.2"
}
}
},
},
"tbcc-sdk-ts"
:
{
"version"
:
"1.0.6"
,
"resolved"
:
"https://registry.npmjs.org/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.6.tgz"
,
"integrity"
:
"sha512-CR4XHPHIof6krOBS2BKWpfQUUWIIuPVqMQ1cisllz4rkOSYYzwllbCY/MoPpRiPvMFRu4UdnxAIEGp7TJeDN2Q=="
,
"requires"
:
{
"@types/lodash"
:
"^4.14.160"
,
"@types/node"
:
"^14.6.0"
,
"@typescript-eslint/eslint-plugin"
:
"^3.9.1"
,
"@typescript-eslint/parser"
:
"^3.9.1"
,
"eslint"
:
"^7.7.0"
,
"eslint-config-prettier"
:
"^6.11.0"
,
"eslint-plugin-prettier"
:
"^3.1.4"
,
"prettier"
:
"^2.0.5"
},
"dependencies"
:
{
"@typescript-eslint/experimental-utils"
:
{
"version"
:
"3.10.1"
,
"resolved"
:
"https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz"
,
"integrity"
:
"sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw=="
,
"optional"
:
true
,
"requires"
:
{
"@types/json-schema"
:
"^7.0.3"
,
"@typescript-eslint/types"
:
"3.10.1"
,
"@typescript-eslint/typescript-estree"
:
"3.10.1"
,
"eslint-scope"
:
"^5.0.0"
,
"eslint-utils"
:
"^2.0.0"
}
},
"@typescript-eslint/parser"
:
{
"version"
:
"3.10.1"
,
"resolved"
:
"https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz"
,
"integrity"
:
"sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw=="
,
"optional"
:
true
,
"requires"
:
{
"@types/eslint-visitor-keys"
:
"^1.0.0"
,
"@typescript-eslint/experimental-utils"
:
"3.10.1"
,
"@typescript-eslint/types"
:
"3.10.1"
,
"@typescript-eslint/typescript-estree"
:
"3.10.1"
,
"eslint-visitor-keys"
:
"^1.1.0"
}
},
"@typescript-eslint/typescript-estree"
:
{
"version"
:
"3.10.1"
,
"resolved"
:
"https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz"
,
"integrity"
:
"sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w=="
,
"optional"
:
true
,
"requires"
:
{
"@typescript-eslint/types"
:
"3.10.1"
,
"@typescript-eslint/visitor-keys"
:
"3.10.1"
,
"debug"
:
"^4.1.1"
,
"glob"
:
"^7.1.6"
,
"is-glob"
:
"^4.0.1"
,
"lodash"
:
"^4.17.15"
,
"semver"
:
"^7.3.2"
,
"tsutils"
:
"^3.17.1"
}
},
"lru-cache"
:
{
"version"
:
"6.0.0"
,
"resolved"
:
"https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz"
,
"integrity"
:
"sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="
,
"optional"
:
true
,
"requires"
:
{
"yallist"
:
"^4.0.0"
}
},
"prettier"
:
{
"version"
:
"2.3.2"
,
"resolved"
:
"https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz"
,
"integrity"
:
"sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ=="
,
"optional"
:
true
},
"semver"
:
{
"version"
:
"7.3.5"
,
"resolved"
:
"https://registry.npmjs.org/semver/-/semver-7.3.5.tgz"
,
"integrity"
:
"sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ=="
,
"optional"
:
true
,
"requires"
:
{
"lru-cache"
:
"^6.0.0"
}
}
}
},
"term-size"
:
{
"term-size"
:
{
"version"
:
"1.2.0"
,
"version"
:
"1.2.0"
,
"resolved"
:
"https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz"
,
...
...
c_client/src/api.js
View file @
2dc09458
...
@@ -20,40 +20,32 @@ const request = tbccRequest({
...
@@ -20,40 +20,32 @@ const request = tbccRequest({
// api handle 列表
// api handle 列表
const
apiList
=
{
const
apiList
=
{
...
capi
,
...
capi
,
getActivityBaseInfoById
:
{
handle
:
'getActivityBaseInfoById'
,
method
:
'GET'
,
isShowLoading
:
false
},
login
:
'login'
,
getTaskList
:
'getTaskList'
,
completeTask
:
'completeTask'
,
receiveTask
:
'receiveTask'
,
addStat
:
'addStat'
,
doHelp
:
'doHelp'
,
drawLotteryPrize
:
'drawLotteryPrize'
,
resetTest
:
'resetTest'
,
getShareInfo
:
'getShareInfo'
,
getVipInfo
:
'getVipInfo'
,
getCollectGoodsList
:
'getCollectGoodsList'
,
getItemListByItemIds
:
'getItemListByItemIds'
,
updateEnamePrizeReceived
:
'updateEnamePrizeReceived'
,
// 会员权益领取
getMyPrizeList
:
'getMyAwardsList'
,
receiveObjectPrize
:
{
receiveObjectPrize
:
{
handle
:
'rec
ie
veObjectPrize'
,
handle
:
'rec
ei
veObjectPrize'
,
method
:
'GET'
,
method
:
'GET'
,
isShowLoading
:
false
,
isShowLoading
:
false
,
toastError
:
false
toastError
:
false
},
},
receiveEnamePrize
:
{
receiveEnamePrize
:
{
handle
:
'rec
ie
veEnamePrize'
,
handle
:
'rec
ei
veEnamePrize'
,
method
:
'GET'
,
method
:
'GET'
,
isShowLoading
:
false
,
isShowLoading
:
false
,
toastError
:
false
toastError
:
false
},
},
getActivityBaseInfoById
:
{
handle
:
'getActivityBaseInfoById'
,
method
:
'GET'
,
isShowLoading
:
false
},
login
:
'login'
,
addStat
:
'addStat'
,
drawLottery
:
'drawLottery'
,
getShareInfo
:
'getShareInfo'
,
getCollectGoods
:
'getCollectGoods'
,
updateEnamePrizeReceived
:
'updateEnamePrizeReceived'
,
// 会员权益领取
getRotatePrizeListInfo
:
'getRotatePrizeListInfo'
,
//获取奖品列表接口,暂未实现
getRotatePrizeListInfo
:
'getRotatePrizeListInfo'
,
//获取奖品列表接口,暂未实现
drawRotatePrize
:
'drawRotatePrize'
,
//大转盘抽奖接口,暂未实现
drawRotatePrize
:
'drawRotatePrize'
,
//大转盘抽奖接口,暂未实现
exchangePrize
:
'exchangePrize'
// 兑换奖品
}
}
// 生成API
// 生成API
...
...
c_client/src/components/_base/ContainerFit/ContainerFit.md
0 → 100644
View file @
2dc09458
### 设计稿适配方案
#### 入参
| 参数 | 描述 |
| --- | --- | --- |
|bg|背景图(1624px),非必填|
|hasFitPsd|内容块是否对标设计稿(750px
*
1624px),非必填|
#### 使用
```
jsx
import
ContainerFit
from
'@/components/_base/ContainerFit/ContainerFit'
<
ContainerFit
hasFitPsd
=
{
true
}
bg
=
{
''
}
>
<
/
ContainerFit
>
```
\ No newline at end of file
c_client/src/components/_base/Modal/Modal.jsx
View file @
2dc09458
import
{
View
}
from
'@tarojs/components'
import
React
,
{
useState
}
from
'react'
import
React
,
{
useState
}
from
'react'
import
Overlay
from
'../Overlay/Overlay'
import
Overlay
from
'../Overlay/Overlay'
import
styles
from
'./modal.module.less'
import
styles
from
'./modal.module.less'
import
classnames
from
'classnames'
export
default
function
Modal
(
props
)
{
export
default
function
Modal
(
props
)
{
const
{
closePostion
=
'top-right'
,
onClose
=
()
=>
{
},
top
=
'40%'
,
hideCloseButton
=
false
,
closeOnClickOverlay
=
false
,
closePos
=
{
right
:
0
,
top
:
-
30
}
}
=
props
const
{
closePostion
=
'top-right'
,
onClose
=
()
=>
{
},
top
=
'40%'
,
hideCloseButton
=
false
,
closeOnClickOverlay
=
false
,
closePos
=
{
right
:
0
,
top
:
-
30
}
}
=
props
...
...
c_client/src/components/_tb_comps/SwiperView/SwiperView.jsx
View file @
2dc09458
import
React
,
{
useState
,
useEffect
,
useRef
}
from
"react"
;
import
React
,
{
useState
,
useEffect
,
useRef
,
useMemo
,
useCallback
}
from
"react"
;
import
{
View
,
Image
,
Text
,
Swiper
,
SwiperItem
}
from
"@tarojs/components"
;
import
{
View
,
Image
,
Text
,
Swiper
,
SwiperItem
}
from
"@tarojs/components"
;
import
'./SwiperView.less'
import
'./SwiperView.less'
import
Taro
,{
showToast
,
redirectTo
,
navigateTo
}
from
'@tarojs/taro'
import
Taro
,{
showToast
,
redirectTo
,
navigateTo
}
from
'@tarojs/taro'
// import {useCallbackState} from '@/hooks/useSyncState'
export
const
EASING_WAYS
=
{
export
const
EASING_WAYS
=
{
'DEFAULT'
:
'default'
,
'DEFAULT'
:
'default'
,
'LINEAR'
:
'linear'
,
'LINEAR'
:
'linear'
,
...
@@ -17,15 +19,14 @@ const SwiperView = (props) => {
...
@@ -17,15 +19,14 @@ const SwiperView = (props) => {
*/
*/
const
{
const
{
swiperList
=
[],
swiperList
=
[],
isSpecial
=
true
,
easingFunction
=
`
${
EASING_WAYS
.
LINEAR
}
`
,
easingFunction
=
`
${
EASING_WAYS
.
LINEAR
}
`
,
circular
=
true
,
circular
=
true
,
autoplay
=
tru
e
,
autoplay
=
fals
e
,
vertical
=
false
,
vertical
=
false
,
duration
=
1000
,
duration
=
1000
,
interval
=
1500
,
interval
=
1500
,
disableTouch
=
false
,
disableTouch
=
false
,
swiperGroup
=
{
width
:
300
,
height
:
300
,
overflow
:
''
},
swiperGroup
=
{
width
:
300
,
height
:
300
,
overflow
:
'
visible
'
},
swiperContent
=
{
width
:
250
,
height
:
300
,
backgroundColor
:
'#fff'
,
backgroundImage
:
''
,
borderRadius
:
25
},
swiperContent
=
{
width
:
250
,
height
:
300
,
backgroundColor
:
'#fff'
,
backgroundImage
:
''
,
borderRadius
:
25
},
imgContent
=
{
width
:
200
,
height
:
200
},
imgContent
=
{
width
:
200
,
height
:
200
},
textContent
=
{
width
:
200
,
height
:
60
},
textContent
=
{
width
:
200
,
height
:
60
},
...
@@ -34,27 +35,40 @@ const SwiperView = (props) => {
...
@@ -34,27 +35,40 @@ const SwiperView = (props) => {
}
=
props
;
}
=
props
;
const
[
currentIndex
,
setCurrentIndex
]
=
useState
(
0
);
const
[
currentIndex
,
setCurrentIndex
]
=
useState
(
0
);
const
indexref
=
useRef
(
0
)
// const index = useMemo(()=>{
// return currentIndex;
// },currentIndex)
/**
/**
* @description onchange事件
* @description onchange事件
* @param {*} e
* @param {*} e
*/
*/
const
swiperChange
=
e
=>
{
const
swiperChange
=
e
=>
{
// console.log("e", e);
console
.
log
(
"e"
,
e
);
console
.
log
(
'swiperChange-----currentindex'
,
currentIndex
,
indexref
.
current
,
e
.
detail
.
current
);
setCurrentIndex
(
e
.
detail
.
current
);
setCurrentIndex
(
e
.
detail
.
current
);
};
};
const
onTransition
=
(
e
)
=>
{
// console.warn(e)
// setCurrentIndex(indexref.current);
}
/**
/**
* @description 入场/出场动画
* @description 入场/出场动画
* @param {*} index 数组索引值
* @param {*} index 数组索引值
* @returns 返回类名
* @returns 返回类名
*/
*/
const
useCustomAni
=
(
i
)
=>
{
const
useCustomAni
=
(
(
i
)
=>
{
return
`
${((
currentIndex
<
i
&&
((
i
!==
swiperList
.
length
-
1
)
||
currentIndex
!==
0
))
||
((
currentIndex
===
swiperList
.
length
-
1
)
&&
i
==
0
))
return
`
${((
currentIndex
<
i
&&
((
i
!==
swiperList
.
length
-
1
)
||
currentIndex
!==
0
))
||
((
currentIndex
===
swiperList
.
length
-
1
)
&&
i
==
0
))
?
'item_right'
?
'item_right'
:
:
(((
currentIndex
>
i
&&
(
i
!==
0
||
currentIndex
!==
swiperList
.
length
-
1
))
||
(
currentIndex
!==
0
&&
i
!==
swiperList
.
length
-
1
))
?
'item_left'
:
'item_middle'
)
(((
currentIndex
>
i
&&
(
i
!==
0
||
currentIndex
!==
swiperList
.
length
-
1
))
||
(
currentIndex
!==
0
&&
i
!==
swiperList
.
length
-
1
))
?
'item_left'
:
'item_middle'
)
}
`
}
`
}
}
)
/**
/**
* @description 获取当前卡片详情之类
* @description 获取当前卡片详情之类
...
@@ -74,19 +88,31 @@ const SwiperView = (props) => {
...
@@ -74,19 +88,31 @@ const SwiperView = (props) => {
* @description
* @description
*/
*/
const
turnRound
=
(
type
)
=>
{
const
turnRound
=
((
type
)
=>
{
const
motion
=
{
const
motion
=
{
[
motionType
.
LEFT
]:()
=>
{
[
motionType
.
LEFT
]:()
=>
{
setCurrentIndex
(
currentIndex
==
0
?
swiperList
.
length
-
1
:
(
currentIndex
-
1
))
if
(
indexref
.
current
===
0
)
{
setCurrentIndex
(
swiperList
.
length
-
1
)
indexref
.
current
=
swiperList
.
length
-
1
return
;
}
setCurrentIndex
(
indexref
.
current
-
1
)
indexref
.
current
=
indexref
.
current
-
1
console
.
log
(
'left----'
,
currentIndex
,
indexref
.
current
);
},
},
[
motionType
.
RIGHT
]:()
=>
{
[
motionType
.
RIGHT
]:()
=>
{
setCurrentIndex
(
currentIndex
==
swiperList
.
length
-
1
?
0
:
(
currentIndex
+
1
))
setTimeout
(()
=>
{
setCurrentIndex
((
indexref
.
current
==
(
swiperList
.
length
-
1
))
?
0
:
(
indexref
.
current
+
1
))
indexref
.
current
=
(
indexref
.
current
==
(
swiperList
.
length
-
1
))
?
0
:
(
indexref
.
current
+
1
)
console
.
log
(
'right----'
,
currentIndex
,
indexref
.
current
);
},
0
);
}
}
}
}
motion
[
type
]();
motion
[
type
]();
}
}
)
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
'cur----'
,
currentIndex
);
console
.
log
(
'cur----'
,
currentIndex
);
...
@@ -100,12 +126,13 @@ const SwiperView = (props) => {
...
@@ -100,12 +126,13 @@ const SwiperView = (props) => {
overflow
:
'hidden'
overflow
:
'hidden'
}
}
}
}
>
>
{
/* <View className='left_btn' onTap={()=>turnRound('LEFT')}><<</View> */
}
<
View
className=
'left_btn'
onTap=
{
()
=>
turnRound
(
'LEFT'
)
}
>
<<
</
View
>
<
Swiper
<
Swiper
className=
"swiper_group"
className=
"swiper_group"
current=
{
currentIndex
}
current=
{
currentIndex
}
easingFunction=
{
easingFunction
}
easingFunction=
{
easingFunction
}
onChange=
{
swiperChange
}
onChange=
{
swiperChange
}
onTransition=
{
(
e
)
=>
onTransition
(
e
)
}
circular=
{
circular
}
circular=
{
circular
}
vertical=
{
vertical
}
vertical=
{
vertical
}
autoplay=
{
autoplay
}
autoplay=
{
autoplay
}
...
@@ -122,7 +149,7 @@ const SwiperView = (props) => {
...
@@ -122,7 +149,7 @@ const SwiperView = (props) => {
swiperList
.
map
((
item
,
i
)
=>
(
swiperList
.
map
((
item
,
i
)
=>
(
<
SwiperItem
>
<
SwiperItem
>
<
View
<
View
className=
{
`scroll_item ${i === currentIndex
&& isSpecial
? "current_item" : ""} ${useCustomAni(i)}`
}
className=
{
`scroll_item ${i === currentIndex ? "current_item" : ""} ${useCustomAni(i)}`
}
style=
{
{
style=
{
{
width
:
`${swiperContent.width/100}rem`
,
width
:
`${swiperContent.width/100}rem`
,
height
:
`${swiperContent.height/100}rem`
,
height
:
`${swiperContent.height/100}rem`
,
...
@@ -167,7 +194,7 @@ const SwiperView = (props) => {
...
@@ -167,7 +194,7 @@ const SwiperView = (props) => {
))
}
))
}
</
Swiper
>
</
Swiper
>
{
/* <View className='right_btn' onTap={()=>turnRound('RIGHT')}>>></View> */
}
<
View
className=
'right_btn'
onTap=
{
()
=>
turnRound
(
'RIGHT'
)
}
>
>>
</
View
>
</
View
>
</
View
>
);
);
};
};
...
...
c_client/src/components/_tb_comps/SwiperView/SwiperView.less
View file @
2dc09458
.scroll_container{
.scroll_container{
// width: 450px;
// width: 450px;
// overflow: hidden;
// overflow: hidden;
margin: 0 auto;
margin: 0 auto;
// display: flex;
// display: flex;
// justify-content: space-around;
// justify-content: space-around;
// align-items: center;
// align-items: center;
.swiper_group {
.swiper_group {
margin: 0 auto;
margin: 0 auto;
position: relative;
position: relative;
swiper-item {
swiper-item {
width: 300px;
width: 300px;
height: 300px;
height: 300px;
display: flex;
display: flex;
justify-content: center;
justify-content: center;
align-items: center;
align-items: center;
.image-property(cover, center center);
.image-property(cover, center center);
border: 1px solid cyan;
box-sizing: border-box;
}
.scroll_item {
// width: 300px;
margin: 0 auto;
position: relative;
border-radius: 20px;
.image-property(cover, top center);
.checkPic {
width: 60px;
height: 60px;
border-radius: 50%;
position: absolute;
right: 40px;
top: 40px;
}
}
.scroll_item {
.item_img_content {
// width: 300px;
width: 100%;
margin: 0 auto;
.img {
position: relative;
margin: 20px auto 10px;
border-radius: 20px;
display: block;
.image-property(cover, top center);
border-radius: 20px;
.checkPic {
background-repeat: no-repeat;
width: 60px;
background-position: top center;
height: 60px;
border-radius: 50%;
position: absolute;
right: 40px;
top: 40px;
}
}
.item_img_content {
.text_content{
width: 100%;
margin: 0 auto;
.img {
box-sizing: border-box;
margin: 20px auto 10px;
display: block;
border-radius: 20px;
background-repeat: no-repeat;
background-position: top center;
}
.text_content{
margin: 0 auto;
box-sizing: border-box;
display: -webkit-box;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
overflow: hidden;
.text{
.text{
color: #232323;
color: #232323;
text-align: center;
text-align: center;
line-height: 30px;
line-height: 30px;
font-size: 24px;
font-size: 24px;
}
}
}
}
}
&.current_item {
}
.item_img_content {
&.current_item {
.img{}
.text_content{
.item_img_content {
.text{}
.img{}
}
.text_content{
}
.text{}
}
}
}
}
// &.item_left{
// &.item_left{
// transform: translateX(-300px);
// transform: translateX(-300px);
// transition: all 1s ease;
// transition: all 1s ease;
// }
// }
// &.move_right{
// &.move_right{
// transform: translateX(300px);
// transform: translateX(300px);
// transition: all 1s ease;
// transition: all 1s ease;
// }
// }
// &.item_middle{
// &.item_middle{
// transform: translateX(0px);
// transform: translateX(0px);
// transition: all 1s ease;
// transition: all 1s ease;
// }
// }
}
}
}
}
}
}
@keyframes movein {
@keyframes movein {
from {
from {
transform: perspective(1000px) translate3d(0,0,0) rotate3d(0, 1, 0, 25deg) scale(0.85);
transform: perspective(1000px) translate3d(0,0,0) rotate3d(0, 1, 0, 25deg) scale(0.85);
transform-style: preserve-3d;
transform-style: preserve-3d;
transform-origin: 45% center;
transform-origin: 45% center;
}
}
50%{
50%{
transform: perspective(1000px) translate3d(0,20px,0) rotate3d(0, 1, 0, 25deg) scale(0.85);
transform: perspective(1000px) translate3d(0,20px,0) rotate3d(0, 1, 0, 25deg) scale(0.85);
transform-style: preserve-3d;
transform-style: preserve-3d;
transform-origin: 45% center;
transform-origin: 45% center;
}
}
to {
to {
transform: perspective(1100px) translate3d(0,0,0) rotate3d(0, 1, 0, 0deg) scale(1);
transform: perspective(1100px) translate3d(0,0,0) rotate3d(0, 1, 0, 0deg) scale(1);
transform-origin: 45% center;
transform-origin: 45% center;
transform-style: preserve-3d;
transform-style: preserve-3d;
}
}
}
}
@keyframes moveout{
@keyframes moveout{
from {
from {
transform: perspective(1000px) rotate3d(0, 1, 0, 0deg) scale(1);
transform: perspective(1000px) rotate3d(0, 1, 0, 0deg) scale(1);
transform-style: preserve-3d;
transform-style: preserve-3d;
transform-origin: 45% center;
transform-origin: 45% center;
}
}
50%{
50%{
transform: perspective(1000px) rotate3d(0, 1, 0, 25deg) scale(1);
transform: perspective(1000px) rotate3d(0, 1, 0, 25deg) scale(1);
transform-style: preserve-3d;
transform-style: preserve-3d;
transform-origin: 45% center;
transform-origin: 45% center;
}
}
to {
to {
transform: perspective(1200px) rotate3d(0, 1, 0, 25deg) scale(0.85);
transform: perspective(1200px) rotate3d(0, 1, 0, 25deg) scale(0.85);
transform-origin: 45% center;
transform-origin: 45% center;
transform-style: preserve-3d;
transform-style: preserve-3d;
}
}
}
}
@keyframes scales {
@keyframes scales {
from{
from{
transform: scale(1,1);
transform: scale(1,1);
transform-origin: center;
transform-origin: center;
}
}
50%{
50%{
transform: scale(1.1,1.1);
transform: scale(1.1,1.1);
transform-origin: center;
transform-origin: center;
}
}
to{
to{
transform: scale(1,1);
transform: scale(1,1);
transform-origin: center;
transform-origin: center;
}
}
}
}
\ No newline at end of file
c_client/src/components/_tb_modal/DoHelpModal/DoHelpModal.jsx
View file @
2dc09458
...
@@ -18,7 +18,7 @@ export default function DoHelpModal(props) {
...
@@ -18,7 +18,7 @@ export default function DoHelpModal(props) {
const
onAuthSuccess
=
async
()
=>
{
const
onAuthSuccess
=
async
()
=>
{
const
isVip
=
await
checkIsMember
()
const
isVip
=
await
checkIsMember
()
const
helpRes
=
await
API
.
doHelp
({
inviteId
,
isVip
})
const
helpRes
=
await
API
.
completeTask
({
key
:
HELP_CONFIG
.
KEY
,
inviteId
,
isVip
})
if
(
helpRes
?.
success
)
{
if
(
helpRes
?.
success
)
{
commonToast
(
'助力成功'
)
commonToast
(
'助力成功'
)
}
else
{
}
else
{
...
@@ -38,7 +38,7 @@ export default function DoHelpModal(props) {
...
@@ -38,7 +38,7 @@ export default function DoHelpModal(props) {
[
HELP_MODAL_TYPE
.
HELP
]:
async
()
=>
{
[
HELP_MODAL_TYPE
.
HELP
]:
async
()
=>
{
// 条件不是需要新会员的情况下,直接助力
// 条件不是需要新会员的情况下,直接助力
if
(
!
newVip
)
{
if
(
!
newVip
)
{
const
helpRes
=
await
API
.
doHelp
({
inviteId
,
isVip
})
const
helpRes
=
await
API
.
completeTask
({
key
:
HELP_CONFIG
.
KEY
,
inviteId
,
isVip
})
if
(
helpRes
?.
success
)
{
if
(
helpRes
?.
success
)
{
commonToast
(
'助力成功'
)
commonToast
(
'助力成功'
)
...
@@ -59,7 +59,7 @@ export default function DoHelpModal(props) {
...
@@ -59,7 +59,7 @@ export default function DoHelpModal(props) {
},
},
[
HELP_MODAL_TYPE
.
FAIL
]:
async
()
=>
onClose
(
type
),
[
HELP_MODAL_TYPE
.
FAIL
]:
async
()
=>
onClose
(
type
),
[
HELP_MODAL_TYPE
.
REWARDS
]:
async
()
=>
{
[
HELP_MODAL_TYPE
.
REWARDS
]:
async
()
=>
{
const
{
success
,
data
}
=
await
API
.
receiveTask
({
taskType
:
'invites'
})
const
{
success
,
data
}
=
await
API
.
receiveTask
({
key
:
HELP_CONFIG
.
KEY
})
if
(
success
&&
data
)
{
if
(
success
&&
data
)
{
onClose
(
type
)
onClose
(
type
)
}
}
...
@@ -92,12 +92,12 @@ export default function DoHelpModal(props) {
...
@@ -92,12 +92,12 @@ export default function DoHelpModal(props) {
</
View
>
</
View
>
</
Modal
>
</
Modal
>
{
{
memberModalVisible
&&
<
member
-
modal
<
member
-
modal
expend=
{
memberModalVisible
}
onClose=
{
()
=>
closeMemberModal
()
}
onClose=
{
()
=>
closeMemberModal
()
}
onAuthFail=
{
onAuthFail
}
onAuthFail=
{
onAuthFail
}
onAuthSuccess=
{
onAuthSuccess
}
onAuthSuccess=
{
onAuthSuccess
}
/>
/>
}
}
</
View
>
</
View
>
)
)
...
...
c_client/src/components/_tb_modal/DoHelpModal/DoHelpModal.module.less
View file @
2dc09458
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
.wh(570px,398px);
.wh(570px,398px);
position: relative;
position: relative;
.image-property();
.image-property();
.flex-col-bottom();
display: flex;
justify-content: flex-end;
flex-direction: column;
align-items: center;
align-items: center;
}
}
.pos-row-center() {
.pos-row-center() {
...
...
c_client/src/config/browse.config.js
View file @
2dc09458
...
@@ -11,7 +11,8 @@ export const BROWSE_CONFIG = {
...
@@ -11,7 +11,8 @@ export const BROWSE_CONFIG = {
img
:
'//yun.duiba.com.cn/taobaomini/clientCTest/goods_img@2x.png'
img
:
'//yun.duiba.com.cn/taobaomini/clientCTest/goods_img@2x.png'
},
},
color
:
'#181818'
,
color
:
'#181818'
,
countDown
:
''
countDown
:
''
,
isMock
:
false
,
// 是否使用mock数据
}
}
/*
/*
浏览页倒计时标识
浏览页倒计时标识
...
...
c_client/src/config/help.config.js
View file @
2dc09458
// 助力弹窗类型
// 助力弹窗类型
export
const
HELP_MODAL_TYPE
=
{
export
const
HELP_MODAL_TYPE
=
{
HELP
:
1
,
// 邀请助力
HELP
:
'HELP'
,
// 邀请助力
FAIL
:
2
,
// 助力失败
FAIL
:
'FAIL'
,
// 助力失败
REWARDS
:
3
,
// 助力信息展示
REWARDS
:
'REWARDS'
,
// 助力信息展示
}
}
// 助力弹窗是否已弹
// 助力弹窗是否已弹
export
const
HELP_MODAL_SHOW
=
{
export
const
HELP_MODAL_SHOW
=
{
...
@@ -11,7 +11,8 @@ export const HELP_MODAL_SHOW = {
...
@@ -11,7 +11,8 @@ export const HELP_MODAL_SHOW = {
}
}
// 助力配置
// 助力配置
export
const
HELP_CONFIG
=
{
export
const
HELP_CONFIG
=
{
1
:
{
KEY
:
'invites'
,
HELP
:
{
width
:
639
,
width
:
639
,
height
:
730
,
height
:
730
,
bg
:
'//yun.dui88.com/taobaomini/pike_call/m_help_bg.png'
,
bg
:
'//yun.dui88.com/taobaomini/pike_call/m_help_bg.png'
,
...
@@ -19,7 +20,7 @@ export const HELP_CONFIG = {
...
@@ -19,7 +20,7 @@ export const HELP_CONFIG = {
title
:
'您的好友正在参与XXXX
\
n快来一起参与吧~'
,
title
:
'您的好友正在参与XXXX
\
n快来一起参与吧~'
,
marginBottom
:
80
marginBottom
:
80
},
},
2
:
{
FAIL
:
{
width
:
639
,
width
:
639
,
height
:
701
,
height
:
701
,
bg
:
'//yun.dui88.com/taobaomini/pike_call/m_help_bg_02.png'
,
bg
:
'//yun.dui88.com/taobaomini/pike_call/m_help_bg_02.png'
,
...
@@ -27,7 +28,7 @@ export const HELP_CONFIG = {
...
@@ -27,7 +28,7 @@ export const HELP_CONFIG = {
title
:
'您已是会员'
,
title
:
'您已是会员'
,
marginBottom
:
80
marginBottom
:
80
},
},
3
:
{
REWARDS
:
{
width
:
639
,
width
:
639
,
height
:
800
,
height
:
800
,
bg
:
'//yun.dui88.com/taobaomini/pike_call/m_help_bg_03.png'
,
bg
:
'//yun.dui88.com/taobaomini/pike_call/m_help_bg_03.png'
,
...
...
c_client/src/hooks/useAuth.js
View file @
2dc09458
import
{
getAuthUserInfo
}
from
'tbcc-sdk-ts/lib/core/tbFn'
import
{
getAuthUserInfo
}
from
'tbcc-sdk-ts/lib/core/tbFn'
import
{
useEffect
}
from
'react'
import
{
useEffect
}
from
'react'
import
{
commonToast
}
from
'tbcc-sdk-ts/lib/core/tb'
// 授权
// 授权
export
function
useAuth
(
callback
=
noopFn
)
{
export
function
useAuth
(
callback
=
noopFn
)
{
const
authUserInfo
=
async
()
=>
{
const
authUserInfo
=
async
()
=>
{
const
info
=
await
getAuthUserInfo
().
catch
(
err
=>
{
const
info
=
await
getAuthUserInfo
().
catch
(
err
=>
{
console
.
log
(
'未授权成功'
,
err
)
console
.
log
(
'未授权成功'
,
err
)
commonToast
(
'点击右上角,打开授权开关,重进活动即可参与'
)
})
})
if
(
info
)
{
if
(
info
)
{
callback
(
info
)
callback
(
info
)
...
...
c_client/src/pages/index/index.jsx
View file @
2dc09458
...
@@ -20,13 +20,7 @@ const { getImgShareUrl, checkIsMember, validateActivityStatus } = tbcc.utils
...
@@ -20,13 +20,7 @@ const { getImgShareUrl, checkIsMember, validateActivityStatus } = tbcc.utils
import
{
useAudio
}
from
'@/hooks/useAudio'
import
{
useAudio
}
from
'@/hooks/useAudio'
import
{
CLOUD_OBJ
,
BGMUSIC_URL
}
from
'@/const'
import
{
CLOUD_OBJ
,
BGMUSIC_URL
}
from
'@/const'
import
ScrollXView
from
'@/components/_tb_comps/ScrollXView/ScrollXView'
import
{
commonToast
}
from
'tbcc-sdk-ts/lib/core/tb'
import
SwiperView
from
'@/components/_tb_comps/SwiperView/SwiperView'
import
RotateWheel
from
'@/components/_tb_comps/RotateWheel/RotateWheel'
import
{
prizeList
}
from
'@/const'
const
INDEX_CONFIG
=
{
const
INDEX_CONFIG
=
{
bg
:
''
,
// 背景 cloud://C4015B7CEC23CF013A78247E2852524F//火箭待机小球抖动.json
bg
:
''
,
// 背景 cloud://C4015B7CEC23CF013A78247E2852524F//火箭待机小球抖动.json
...
@@ -36,51 +30,6 @@ const INDEX_CONFIG = {
...
@@ -36,51 +30,6 @@ const INDEX_CONFIG = {
taskButton
:
''
// 任务按钮
taskButton
:
''
// 任务按钮
}
}
const
rotateConfig
=
{
bg
:
'https://yun.duiba.com.cn/spark/assets/8b6e920ffd09fab8f9ac2de09f9154879f4d0607.png'
,
ratio
:
0.65
,
radius
:
300
,
circles
:
4
,
divideNum
:
8
,
duration
:
5000
,
timeFunction
:
'ease-in-out'
,
nodeInfo
:{
width
:
100
,
height
:
100
},
imgInfo
:{
width
:
80
,
height
:
80
},
showWay
:
'negative'
,
//positive/negative
isShowPrizeName
:
true
,
prizeNameWidthRatio
:
1.2
}
const
SCROLLXVIEW_CONFIG
=
{
prizeList
:
[],
containerWidth
:
200
,
containerHeight
:
200
,
imgWidth
:
120
,
imgHeight
:
120
,
isShowPrizeName
:
true
,
prizeInCenterNum
:
3
,
marginRight
:
26
,
backgroundColor
:
'#E7E7EF'
,
backgroundImage
:
''
}
const
swiper_config
=
{
easingFunction
:
`linear`
,
circular
:
true
,
autoplay
:
false
,
vertical
:
false
,
duration
:
1000
,
interval
:
1500
,
disableTouch
:
false
,
swiperGroup
:{
width
:
300
,
height
:
300
,
overflow
:
''
},
swiperContent
:{
width
:
250
,
height
:
300
,
backgroundColor
:
'#fff'
,
backgroundImage
:
''
,
borderRadius
:
25
},
imgContent
:{
width
:
200
,
height
:
200
},
textContent
:{
width
:
240
,
height
:
60
}
}
function
Index
()
{
function
Index
()
{
const
app
=
getApp
()
const
app
=
getApp
()
const
{
activityInfo
,
setActivityInfoAndStatus
}
=
useActivityInfoModel
()
const
{
activityInfo
,
setActivityInfoAndStatus
}
=
useActivityInfoModel
()
...
@@ -155,9 +104,10 @@ function Index() {
...
@@ -155,9 +104,10 @@ function Index() {
})
})
// 助力弹窗 -> 其他弹窗
// 助力弹窗 -> 其他弹窗
const
handleVisibleModal
=
async
(
info
)
=>
{
const
handleVisibleModal
=
async
(
info
)
=>
{
const
{
inviteId
}
=
info
const
isVip
=
await
checkIsMember
()
const
isVip
=
await
checkIsMember
()
// 是否为助力弹窗
// 是否为助力弹窗
if
(
app
.
inviteId
&&
!
showHelp
.
current
)
{
if
(
inviteId
&&
!
showHelp
.
current
)
{
setDoHelpModalVisible
(
true
)
setDoHelpModalVisible
(
true
)
setHelpType
(
isVip
?
HELP_MODAL_TYPE
.
FAIL
:
HELP_MODAL_TYPE
.
HELP
)
setHelpType
(
isVip
?
HELP_MODAL_TYPE
.
FAIL
:
HELP_MODAL_TYPE
.
HELP
)
showHelp
.
current
=
true
showHelp
.
current
=
true
...
@@ -246,7 +196,7 @@ function Index() {
...
@@ -246,7 +196,7 @@ function Index() {
width=
'500'
width=
'500'
height=
'500'
height=
'500'
top=
'45%'
top=
'45%'
newVip
newVip
=
{
false
}
onClose=
{
()
=>
setDoHelpModalVisible
(
false
)
}
onClose=
{
()
=>
setDoHelpModalVisible
(
false
)
}
/>
/>
}
}
...
...
c_client/src/pages/packageGood/browseGoods/browseGoods.jsx
View file @
2dc09458
...
@@ -23,7 +23,7 @@ function BrowseGoodsPage() {
...
@@ -23,7 +23,7 @@ function BrowseGoodsPage() {
const
[
accumulateTime
,
setAccumulateTime
]
=
useState
(
+
keepTime
||
15
)
const
[
accumulateTime
,
setAccumulateTime
]
=
useState
(
+
keepTime
||
15
)
const
browserTimer
=
useRef
(
null
)
const
browserTimer
=
useRef
(
null
)
const
[
goodsList
,
setGoodsList
]
=
useState
(
GOOD_LIST
)
const
[
goodsList
,
setGoodsList
]
=
useState
(
BROWSE_CONFIG
.
isMock
?
GOOD_LIST
:[]
)
useEffect
(()
=>
{
useEffect
(()
=>
{
getGoodsList
()
getGoodsList
()
...
@@ -35,12 +35,14 @@ function BrowseGoodsPage() {
...
@@ -35,12 +35,14 @@ function BrowseGoodsPage() {
return
()
=>
browserTimer
.
current
&&
clearInterval
(
browserTimer
.
current
)
return
()
=>
browserTimer
.
current
&&
clearInterval
(
browserTimer
.
current
)
}
}
},[
goodsList
])
},[
goodsList
])
// 获取商品列表
const
getGoodsList
=
async
()
=>
{
const
getGoodsList
=
async
()
=>
{
const
{
data
}
=
await
API
.
getItemListByItemIds
({
itemIds
})
const
{
success
,
data
}
=
await
API
.
getCollectGoods
({
key
:
BROWSE_CONFIG
.
taskType
,
itemIds
})
setGoodsList
(
data
?.
list
||
[])
if
(
success
&&
!
BROWSE_CONFIG
.
isMock
)
{
setGoodsList
(
data
?.
list
||
[])
}
}
}
// 页面显示
useDidShow
(()
=>
{
useDidShow
(()
=>
{
// 重新回到页面开启倒计时
// 重新回到页面开启倒计时
if
(
browseType
===
BROSE_GOOD_TYPE
.
PAGE
&&
startTimer
&&
usePercent
.
current
<
+
browseTime
)
{
if
(
browseType
===
BROSE_GOOD_TYPE
.
PAGE
&&
startTimer
&&
usePercent
.
current
<
+
browseTime
)
{
...
...
c_client/src/pages/packageGood/cartGoods/cartGoods.jsx
View file @
2dc09458
...
@@ -24,7 +24,7 @@ function CartGoodsPage() {
...
@@ -24,7 +24,7 @@ function CartGoodsPage() {
},
[])
},
[])
const
getGoodsList
=
async
()
=>
{
const
getGoodsList
=
async
()
=>
{
const
{
data
}
=
await
API
.
getCollectGoods
List
({
itemIds
})
const
{
data
}
=
await
API
.
getCollectGoods
({
key
:
CART_CONFIG
.
taskType
,
itemIds
})
setGoodsList
(
data
?.
list
||
[])
setGoodsList
(
data
?.
list
||
[])
}
}
// 加入购物车 // 对应itemId为 574141925233 skuId为4018047819826 数量为4
// 加入购物车 // 对应itemId为 574141925233 skuId为4018047819826 数量为4
...
...
c_client/src/pages/packageGood/collectGoods/collectGoods.jsx
View file @
2dc09458
...
@@ -23,7 +23,7 @@ function CollectGoodsPage() {
...
@@ -23,7 +23,7 @@ function CollectGoodsPage() {
},
[])
},
[])
const
getGoodsList
=
async
()
=>
{
const
getGoodsList
=
async
()
=>
{
const
{
data
}
=
await
API
.
getCollectGoods
List
({
itemIds
})
const
{
data
}
=
await
API
.
getCollectGoods
({
key
:
COLLECT_CONFIG
.
taskType
,
itemIds
})
setGoodsList
(
data
?.
list
||
[])
setGoodsList
(
data
?.
list
||
[])
}
}
...
...
c_client/src/pages/packageGood/orderGoods/orderGoods.jsx
View file @
2dc09458
...
@@ -12,7 +12,7 @@ import ORDER_CONFIG from '@/config/order.config'
...
@@ -12,7 +12,7 @@ import ORDER_CONFIG from '@/config/order.config'
function
OrderGoodsPage
()
{
function
OrderGoodsPage
()
{
const
router
=
useRouter
()
const
router
=
useRouter
()
const
{
itemIds
}
=
router
?.
params
const
{
itemIds
}
=
router
?.
params
const
{
data
}
=
useRequest
(
API
.
get
ItemListByItemIds
,
{
itemIds
})
const
{
data
}
=
useRequest
(
API
.
get
CollectGoods
,
{
key
:
ORDER_CONFIG
.
taskType
,
itemIds
})
return
(
return
(
<
ContainerFit
bg=
{
ORDER_CONFIG
.
bg
}
>
<
ContainerFit
bg=
{
ORDER_CONFIG
.
bg
}
>
...
...
c_client/src/pages/packagePrize/myPrize/myPrize.jsx
View file @
2dc09458
...
@@ -10,7 +10,7 @@ import { checkIsMember } from 'tbcc-sdk-ts/lib/utils'
...
@@ -10,7 +10,7 @@ import { checkIsMember } from 'tbcc-sdk-ts/lib/utils'
import
{
dateFormatter
}
from
'@/utils/date'
import
{
dateFormatter
}
from
'@/utils/date'
import
styles
from
'./myPrize.module.less'
import
styles
from
'./myPrize.module.less'
import
{
useDidHide
,
getApp
}
from
'@tarojs/taro'
import
{
useDidHide
,
getApp
}
from
'@tarojs/taro'
import
{
receiveEnamePrize
,
receiveObjectPrize
,
receiveMemberEname
}
from
'
@/utils/util
'
import
{
receiveEnamePrize
,
receiveObjectPrize
,
receiveMemberEname
}
from
'
tbcc-sdk-ts/lib/request/capiFn
'
import
config
from
'@/config/config'
import
config
from
'@/config/config'
import
{
PRIZE_CONFIG
,
DRAW_STATUS
,
PRIZE_TYPE
,
BENEFIT_TYPE
}
from
'@/config/myPrize.config'
import
{
PRIZE_CONFIG
,
DRAW_STATUS
,
PRIZE_TYPE
,
BENEFIT_TYPE
}
from
'@/config/myPrize.config'
...
@@ -19,7 +19,6 @@ const objectStatus = { ..._objectStatus, ...commonStatus }
...
@@ -19,7 +19,6 @@ const objectStatus = { ..._objectStatus, ...commonStatus }
const
enameStatus
=
{
...
_enameStatus
,
...
commonStatus
}
const
enameStatus
=
{
...
_enameStatus
,
...
commonStatus
}
const
{
commonToast
,
navigateToOutside
,
setClipboard
}
=
tbccTs
.
tb
const
{
commonToast
,
navigateToOutside
,
setClipboard
}
=
tbccTs
.
tb
const
{
getMyPrizeList
}
=
API
import
{
useAudio
}
from
'@/hooks/useAudio'
import
{
useAudio
}
from
'@/hooks/useAudio'
function
Empty
(
blankTxt
)
{
function
Empty
(
blankTxt
)
{
...
@@ -41,7 +40,7 @@ function MyPrizeList() {
...
@@ -41,7 +40,7 @@ function MyPrizeList() {
},
[])
},
[])
async
function
fetchMyPriceList
()
{
async
function
fetchMyPriceList
()
{
const
res
=
await
getMyPrize
List
()
const
res
=
await
API
.
getMyAwards
List
()
if
(
res
.
success
&&
res
?.
data
?.
list
?.
length
)
{
if
(
res
.
success
&&
res
?.
data
?.
list
?.
length
)
{
setMyPrizeList
(
res
?.
data
?.
list
)
setMyPrizeList
(
res
?.
data
?.
list
)
}
}
...
@@ -86,16 +85,16 @@ function MyPrizeList() {
...
@@ -86,16 +85,16 @@ function MyPrizeList() {
'update'
:
async
()
=>
fetchMyPriceList
(),
'update'
:
async
()
=>
fetchMyPriceList
(),
[
PRIZE_TYPE
.
ENAME
]:
async
()
=>
{
[
PRIZE_TYPE
.
ENAME
]:
async
()
=>
{
if
(
benefitType
===
BENEFIT_TYPE
.
MEMBER
)
{
if
(
benefitType
===
BENEFIT_TYPE
.
MEMBER
)
{
await
receiveMemberEname
({
params
:
{
sellerId
:
config
.
sellerId
,
ename
,
id
},
successMsg
})
await
receiveMemberEname
(
API
.
updateEnamePrizeReceived
,
{
params
:
{
sellerId
:
config
.
sellerId
,
ename
,
id
},
successMsg
})
}
else
{
}
else
{
await
receiveEnamePrize
({
params
:
{
activityId
,
id
},
successMsg
})
await
receiveEnamePrize
(
API
.
receiveEnamePrize
,
{
params
:
{
activityId
,
id
},
successMsg
})
}
}
},
},
[
PRIZE_TYPE
.
OBJECT
]:
async
()
=>
{
[
PRIZE_TYPE
.
OBJECT
]:
async
()
=>
{
await
receiveObjectPrize
({
params
:
{
activityId
,
id
},
successMsg
})
await
receiveObjectPrize
(
API
.
receiveObjectPrize
,
{
params
:
{
activityId
,
id
},
successMsg
})
},
},
[
PRIZE_TYPE
.
CREDITS
]:
async
()
=>
{
[
PRIZE_TYPE
.
CREDITS
]:
async
()
=>
{
await
receiveEnamePrize
({
params
:
{
activityId
,
id
},
successMsg
})
await
receiveEnamePrize
(
API
.
receiveEnamePrize
,
{
params
:
{
activityId
,
id
},
successMsg
})
}
}
}
}
await
receiveFn
[
type
]()
await
receiveFn
[
type
]()
...
...
c_client/src/pages/preComp/preComp.jsx
View file @
2dc09458
...
@@ -75,14 +75,14 @@ export default function PreComp(props) {
...
@@ -75,14 +75,14 @@ export default function PreComp(props) {
<
View
className=
{
styles
[
'scroll-view'
]
}
>
<
View
className=
{
styles
[
'scroll-view'
]
}
>
<
ScrollXView
prizeList=
{
prizeList
}
/>
<
ScrollXView
prizeList=
{
prizeList
}
/>
</
View
>
</
View
>
<
View
className=
{
styles
[
'comp-view'
]
}
>
{
/* 大转盘 */
}
<
RotateWheel
/>
</
View
>
<
View
className=
{
styles
[
'comp-view'
]
}
>
<
View
className=
{
styles
[
'comp-view'
]
}
>
{
/* swiper左右滑动 */
}
{
/* swiper左右滑动 */
}
<
SwiperView
swiperList=
{
prizeList
}
/>
<
SwiperView
swiperList=
{
prizeList
}
/>
</
View
>
</
View
>
<
View
className=
{
styles
[
'comp-view'
]
}
>
{
/* 大转盘 */
}
<
RotateWheel
/>
</
View
>
</
ContainerFit
>
</
ContainerFit
>
)
)
}
}
\ No newline at end of file
c_client/src/utils/audio.js
View file @
2dc09458
...
@@ -48,14 +48,12 @@ export const getSystemInfo = () => {
...
@@ -48,14 +48,12 @@ export const getSystemInfo = () => {
let
bgs
=
{
let
bgs
=
{
}
}
export
const
playBgMusic1
=
async
(
isOn
,
src
,
callbackFn
=
()
=>
{},
loop
=
false
)
=>
{
//待测试
export
const
playBgMusic1
=
async
(
isOn
,
src
,
callbackFn
=
()
=>
{},
loop
=
false
)
=>
{
//待测试
for
(
let
k
in
bgs
)
{
for
(
let
k
in
bgs
)
{
if
(
bgs
[
k
].
isOn
)
{
if
(
bgs
[
k
].
isOn
)
{
bgs
[
k
].
stop
();
bgs
[
k
].
stop
();
}
}
// bgs[k].isOn = false; /// TODO 自己记一个开关,因为淘宝的玩意stop之后虽然听不到,但还是在播放,会触发loop播放和onEnded事件
// bgs[k].isOn = false; /// TODO 自己记一个开关,因为淘宝的玩意stop之后虽然听不到,但还是在播放,会触发loop播放和onEnded事件
}
}
const
key
=
src
;
const
key
=
src
;
console
.
log
(
'---------->>>>>>>>>>>>>ison'
,
isOn
);
console
.
log
(
'---------->>>>>>>>>>>>>ison'
,
isOn
);
if
(
isOn
)
{
if
(
isOn
)
{
...
...
c_client/src/utils/date.js
View file @
2dc09458
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
*/
*/
export
const
dateFormatter
=
(
date
,
format
=
'yyyy/MM/dd'
)
=>
{
export
const
dateFormatter
=
(
date
,
format
=
'yyyy/MM/dd'
)
=>
{
if
(
!
date
)
return
'-'
if
(
!
date
)
return
'-'
date
=
new
Date
(
date
=
new
Date
(
// eslint-disable-next-line no-restricted-globals
// eslint-disable-next-line no-restricted-globals
typeof
date
===
'string'
&&
isNaN
(
date
)
?
date
.
replace
(
/-/g
,
'/'
)
:
date
typeof
date
===
'string'
&&
isNaN
(
date
)
?
date
.
replace
(
/-/g
,
'/'
)
:
date
...
...
c_client/src/utils/util.js
View file @
2dc09458
...
@@ -136,100 +136,4 @@ export const addStat = async(activityId, type)=> {
...
@@ -136,100 +136,4 @@ export const addStat = async(activityId, type)=> {
}
}
resolve
(
false
)
resolve
(
false
)
})
})
}
}
export
const
createCanvas
=
async
(
canvasId
)
=>
{
\ No newline at end of file
return
new
Promise
((
resolve
,
reject
)
=>
{
my
.
createCanvas
({
id
:
canvasId
,
success
:
(
ccc
)
=>
{
resolve
(
ccc
)
}
})
})
}
// 查询商家权益活动
export
const
getActivity
=
(
sellerId
)
=>
{
const
memberBenefitPlugin
=
requirePlugin
(
"memberBenefit"
)
if
(
!
memberBenefitPlugin
)
return
[]
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
memberBenefitPlugin
.
getActivity
({
data
:
{
sellerId
,
},
success
:
(
result
)
=>
{
resolve
(
result
)
},
fail
:
(
error
)
=>
{
console
.
log
(
'获取失败'
+
JSON
.
stringify
(
error
))
resolve
(
error
)
}
});
})
}
/**
* 获取系统信息
* @returns {object} 小程序系统信息
*/
export
const
getSystemInfo
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
my
.
getSystemInfo
({
success
:
res
=>
{
resolve
(
res
);
},
fail
:
err
=>
{
reject
(
err
);
}
});
});
};
// 查询商家会员等级
export
const
getGrade
=
(
sellerId
)
=>
{
const
memberBenefitPlugin
=
requirePlugin
(
"memberBenefit"
)
if
(
!
memberBenefitPlugin
)
return
[]
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
memberBenefitPlugin
.
getGrade
({
data
:
{
sellerId
},
success
:
(
result
)
=>
{
resolve
(
result
)
},
fail
:
(
error
)
=>
{
console
.
log
(
'查询商家会员等级失败'
+
JSON
.
stringify
(
error
))
resolve
(
error
)
}
});
})
}
// 查询商家会员等级
export
const
checkShopFavoredStatus
=
(
sellerId
)
=>
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
my
.
tb
.
checkShopFavoredStatus
({
id
:
sellerId
,
success
:
(
res
)
=>
{
console
.
warn
(
res
)
my
.
alert
({
content
:
JSON
.
stringify
(
res
)
})
resolve
(
res
.
isFavor
)
},
fail
:
(
res
)
=>
{
my
.
alert
({
content
:
JSON
.
stringify
(
res
)
})
}
})
})
}
// 查询商家会员等级
export
const
favorShop
=
(
sellerId
)
=>
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
my
.
tb
.
favorShop
({
id
:
+
sellerId
,
success
:
(
res
)
=>
{
console
.
warn
(
res
)
my
.
alert
({
content
:
JSON
.
stringify
(
res
)
})
resolve
(
res
)
},
fail
:
(
res
)
=>
{
my
.
alert
({
content
:
JSON
.
stringify
(
res
)
})
}
})
})
}
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