Commit 8908829a authored by wanghuan's avatar wanghuan

Merge branch 'c_client_taro-pack' of...

Merge branch 'c_client_taro-pack' of http://gitlab2.dui88.com/qinhaitao/taobao-mini-template into c_client_taro-pack
parents b3f52ed2 7c0fc16b
```
taobao-mini-template
├─ .git
│ ├─ HEAD
│ ├─ config
│ ├─ description
│ ├─ hooks
│ │ ├─ applypatch-msg.sample
│ │ ├─ commit-msg.sample
│ │ ├─ fsmonitor-watchman.sample
│ │ ├─ post-update.sample
│ │ ├─ pre-applypatch.sample
│ │ ├─ pre-commit.sample
│ │ ├─ pre-merge-commit.sample
│ │ ├─ pre-push.sample
│ │ ├─ pre-rebase.sample
│ │ ├─ pre-receive.sample
│ │ ├─ prepare-commit-msg.sample
│ │ └─ update.sample
│ ├─ index
│ ├─ info
│ │ └─ exclude
│ ├─ logs
│ │ ├─ HEAD
│ │ └─ refs
│ │ ├─ heads
│ │ │ ├─ c_client_taro
│ │ │ └─ c_client_taro-pack
│ │ └─ remotes
│ │ └─ origin
│ │ └─ HEAD
│ ├─ objects
│ │ ├─ 2f
│ │ │ └─ 487f1f6678c0c8bdff4a4ca7e6891b282eda72
│ │ ├─ 69
│ │ │ └─ 2acc5b9d5055c47f8001b5e83553250e9cc0e7
│ │ ├─ 7a
│ │ │ └─ 1b61452a5b4e4d862338bb0519f2bfe0cf87b5
│ │ ├─ dd
│ │ │ └─ 3c8846e63fc1b968d5bca773e602109867e68f
│ │ ├─ e7
│ │ │ └─ f2857af41856483bb0663296756783671ebfaa
│ │ ├─ f0
│ │ │ └─ bc0499211ef47d6fe7687fd7108696e0446b67
│ │ ├─ info
│ │ └─ pack
│ │ ├─ pack-dcbf00005b3c8d9f7cd0a2991c1c6ff5e61496b9.idx
│ │ └─ pack-dcbf00005b3c8d9f7cd0a2991c1c6ff5e61496b9.pack
│ ├─ packed-refs
│ └─ refs
│ ├─ heads
│ │ ├─ c_client_taro
│ │ └─ c_client_taro-pack
│ ├─ remotes
│ │ └─ origin
│ │ └─ HEAD
│ └─ tags
├─ .gitignore
├─ ask.js
└─ c_client
├─ .editorconfig
├─ .eslintrc.js
......@@ -76,8 +19,7 @@ taobao-mini-template
├─ package-lock.json
├─ package.json
├─ plugin
│ ├─ changeAppJsonPlugin.js
│ └─ changeCompRoot.js
│ └─ changeAppJsonPlugin.js
├─ project.config.json
├─ src
│ ├─ api.js
......@@ -123,25 +65,52 @@ taobao-mini-template
│ │ │ ├─ CountDown
│ │ │ │ ├─ CountDown.jsx
│ │ │ │ └─ CountDown.less
│ │ │ └─ Input
│ │ │ ├─ GoodsList
│ │ │ │ ├─ GoodsList.jsx
│ │ │ │ └─ GoodsList.module.less
│ │ │ ├─ GoodsTitle
│ │ │ │ ├─ GoodsTitle.jsx
│ │ │ │ └─ GoodsTitle.module.less
│ │ │ ├─ Input
│ │ │ ├─ Progress
│ │ │ │ ├─ Progress.jsx
│ │ │ │ └─ Progress.module.less
│ │ │ ├─ RankList
│ │ │ │ ├─ RankList.jsx
│ │ │ │ └─ RankList.module.less
│ │ │ ├─ RankTitle
│ │ │ │ ├─ RankTitle.jsx
│ │ │ │ └─ RankTitle.module.less
│ │ │ ├─ ScrollXView
│ │ │ │ ├─ ScrollXView.jsx
│ │ │ │ └─ ScrollXView.module.less
│ │ │ └─ Swiper
│ │ │ ├─ Swiper.jsx
│ │ │ └─ Swiper.module.less
│ │ ├─ _tb_custom
│ │ │ └─ Test
│ │ │ ├─ Test.jsx
│ │ │ └─ Test.module.less
│ │ └─ _tb_modal
│ │ ├─ DeliveryModal
│ │ │ ├─ DeliveryModal.jsx
│ │ │ └─ DeliveryModal.less
│ │ │ └─ DeliveryModal.module.less
│ │ ├─ DoHelpModal
│ │ │ ├─ DoHelpModal.jsx
│ │ │ └─ DoHelpModal.module.less
│ │ ├─ GoodsPage
│ │ │ ├─ GoodsPage.jsx
│ │ │ └─ GoodsPage.less
│ │ ├─ PrizeModal
│ │ │ ├─ PrizeModal.jsx
│ │ │ └─ PrizeModal.module.less
│ │ ├─ RuleModal
│ │ │ ├─ RuleModal.jsx
│ │ │ └─ RuleModal.module.less
│ │ └─ TasksModal
│ │ ├─ TasksModal.config.js
│ │ ├─ TasksModal.jsx
│ │ └─ TasksModal.less
│ │ ├─ TasksModal
│ │ │ ├─ TasksModal.config.js
│ │ │ ├─ TasksModal.jsx
│ │ │ └─ TasksModal.module.less
│ │ └─ ThanksModal
│ │ ├─ ThanksModal.jsx
│ │ └─ ThanksModal.module.less
│ ├─ config.js
│ ├─ const.js
│ ├─ hooks
......@@ -155,6 +124,7 @@ taobao-mini-template
│ ├─ lottie
│ │ ├─ index.js
│ │ └─ lottieData.json
│ ├─ mock.js
│ ├─ pages
│ │ ├─ index
│ │ │ ├─ index.config.js
......@@ -169,37 +139,29 @@ taobao-mini-template
│ │ │ ├─ browseGoods
│ │ │ │ ├─ browseGoods.config.js
│ │ │ │ ├─ browseGoods.jsx
│ │ │ │ └─ browseGoods.less
│ │ │ │ └─ browseGoods.module.less
│ │ │ ├─ cartGoods
│ │ │ │ ├─ cartGoods.config.js
│ │ │ │ ├─ cartGoods.jsx
│ │ │ │ └─ cartGoods.module.less
│ │ │ ├─ collectGoods
│ │ │ │ ├─ collectGoods.config.js
│ │ │ │ └─ collectGoods.jsx
│ │ │ │ ├─ collectGoods.jsx
│ │ │ │ └─ collectGoods.module.less
│ │ │ └─ orderGoods
│ │ │ ├─ orderGoods.config.js
│ │ │ └─ orderGoods.jsx
│ │ │ ├─ orderGoods.jsx
│ │ │ └─ orderGoods.module.less
│ │ └─ packagePrize
│ │ └─ myPrize
│ │ ├─ myPrize.config.js
│ │ ├─ myPrize.jsx
│ │ └─ myPrize.less
│ │ └─ myPrize.module.less
│ ├─ store
│ │ ├─ activityInfo.js
│ │ ├─ index.js
│ │ └─ loginInfo.js
│ ├─ styles
│ │ ├─ animate.less
│ │ ├─ border.less
│ │ ├─ flex.less
│ │ ├─ form.less
│ │ ├─ gap.less
│ │ ├─ image.less
│ │ ├─ index.less
│ │ ├─ layout.less
│ │ ├─ others.less
│ │ ├─ position.less
│ │ ├─ text.less
│ │ ├─ utils.less
│ │ └─ var.less
│ ├─ taro-ui.scss
│ └─ utils
│ ├─ date.js
│ ├─ mdProxy.js
......
......@@ -17,8 +17,8 @@ export default {
],// 引入cavas组件页面(更改canvas引用路径)
canvasComps: [// 拷贝相关页面和依赖到dist目录
{ from: 'minigame/node_modules', to: 'dist/node_modules'},
{ from: 'src/lottie', to: 'dist/lottie'},
{ from: 'src/components/_miniprogram/game', to: 'dist/components/_miniprogram/game'},
{ from: 'src/components/_miniprogram/lottieAnimation', to: 'dist/components/_miniprogram/lottieAnimation'}
{ from: 'src/components/_miniprogram/game', to: 'dist/components/_miniprogram/game'}, // 游戏组建引入
{ from: 'src/components/_miniprogram/lottieAnimation', to: 'dist/components/_miniprogram/lottieAnimation'}, // lottie 动画组件
{ from: 'src/lottie', to: 'dist/lottie'},// lottie json文件
]
}
\ No newline at end of file
import cloud from '@tbmp/mp-cloud-sdk'
import tbccTs from 'tbcc-sdk-ts'
import conifg from './config'
import conifg from './config/index'
const { utils: { generateAPI }, request: tbccRequest, capi, capiFn } = tbccTs
const { cloudName, requestType } = conifg
......
......@@ -4,7 +4,7 @@ import './app.less'
// 使用taro-ui 按需引入的组件样式
import './taro-ui.scss'
import config from './config'
import config from './config/index'
import './utils/mdProxy'
const { env, tornadoAPI, defaultActivityId } = config
......
import { View } from '@tarojs/components'
import classnames from 'classnames'
import React, { useState } from 'react'
import Overlay from '../Overlay/Overlay'
import styles from './modal.module.less'
export default function Modal(props) {
const { closePostion = 'top-right', onClose = () => { }, top = '40%', hideCloseButton = false, closeOnClickOverlay = false } = props
const { closePostion = 'top-right', onClose = () => { }, top = '40%', hideCloseButton = false, closeOnClickOverlay = false, closePos = { right: 0, top: -30 } } = props
const closeBtnClass = classnames(styles.closeButton, {
[`${styles.closeButton_bottom}`]: closePostion === 'bottom',
......@@ -32,11 +30,12 @@ export default function Modal(props) {
return (
<View className={modalClass}>
<Overlay onTap={onClickOverlay} />
<Overlay onClick={() => onClickOverlay()} />
<View className={`${styles.content} animate-zoom-in`} style={{ top }}>
{!hideCloseButton && <View className={closeBtnClass} onTap={onCloseModal} />}
{props.children}
{!hideCloseButton && <View className={closeBtnClass} onClick={() => onClose()} style={{ top: closePos.top / 100 + 'rem', right: closePos.right / 100 + 'rem' }} />}
</View>
</View>
)
}
import React, { useState } from 'react'
import { View, Image, ScrollView } from '@tarojs/components'
import { View, Image } from '@tarojs/components'
import classnames from 'classnames'
import styles from './Progress.module.less'
import { PROGRESS_LIST } from '@/mock'
const PRO_ICON = {
icon: '//yun.duiba.com.cn/taobaomini/provideBeauty/total/progress_icon.png'
}
function Progress(props) {
const { allHotValue = 0, level1 = 0, level2 = 0, level3 = 0, width = 576 } = props
const { data = {}, width = 692, type = 1, hasIcon = false, hasTxt = true } = props
const { allHotValue = 0, levleList = PROGRESS_LIST } = data
const maxLevel = levleList[levleList.length -1]
const getProItm = classnames(styles['progress-box-com'],{
[`${styles['progress-box-com-02']}`]: allHotValue === level3
[`${styles['progress-box-com-02']}`]: allHotValue === maxLevel
})
const tranHotValue = (value) => {
const _num = parseInt(value / 10000)
if(_num) return _num + '万'
return value
}
const getTextStyle = classnames(styles['progress-box__txt'],{
[`${styles['progress-box__txt-bottom']}`]: type === 2
})
const getDescStyle = (itm) => {
return classnames(styles['progress-box__txt-item'],{
[`${styles['progress-txt-active']}`]: itm <= allHotValue
})
}
return (
<View className={styles['progress-box']}>
<View className={getProItm} style={{width: allHotValue >= level3 ? '100%' : (allHotValue / level3) * 100 +'%'}}></View>
<View className={styles['progress-box__icon']}>
<Image className={styles['progress-box__icon-itm']} style={{left: (level1 / level3) * width / 100 + 'rem'}} src={PRO_ICON['icon']} />
<Image className={styles['progress-box__icon-itm']} style={{left: (level2 / level3) * width / 100 + 'rem'}} src={PRO_ICON['icon']} />
<Image className={styles['progress-box__icon-itm']} style={{right: -0.04 + 'rem'}} src={PRO_ICON['icon']} />
</View>
<View className={styles['progress-box__txt']}>
<View className={styles['progress-box__txt-item']} style={{left: (level1 / level3) * width / 100 + 'rem'}}>{tranHotValue(level1)}</View>
<View className={styles['progress-box__txt-item']} style={{left: (level2 / level3) * width / 100 + 'rem'}}>{tranHotValue(level2)}</View>
<View className={styles['progress-box__txt-item']} style={{left: width / 100 + 'rem'}}>{tranHotValue(level3)}</View>
</View>
<View className={styles['progress-box']} style={{ width: width / 100 + 'rem'}}>
<View className={getProItm} style={{width: allHotValue >= maxLevel ? '100%' : (allHotValue / maxLevel) * 100 +'%'}}></View>
{hasIcon && <View className={styles['progress-box__icon']}>
{ levleList.map((itm,i) => {
return(
<Image className={styles['progress-box__icon-itm']}
style={{left: (itm / maxLevel) * width / 100 + 'rem'}} src={PRO_ICON['icon']} />
)
})}
</View>}
{hasTxt && <View className={getTextStyle}>
{ levleList.map((itm,i) => {
return(
<View className={getDescStyle(itm)}
style={{left: (itm / maxLevel) * width / 100 + 'rem'}}>{tranHotValue(itm)}</View>
)
})}
</View>}
</View>
)
}
......
.progress-box {
width: 576px;
height: 24px;
border: 1px solid #EF9028;
border-radius: 12px;
width: 692px;
height: 20px;
background: #371B15;
border-radius: 4px;
position: relative;
}
.progress-box-com {
height: 24px;
background: linear-gradient(0deg, #FF8A00, #FFFAF4);
border-radius: 12px;
height: 20px;
background: linear-gradient(270deg, #FFDE8B 0%, #FFCE38 100%);
border-radius: 4px;
position: absolute;
top: 0;
left: 0;
transition: all 0.5s cubic-bezier(0, 0.64, 0.36, 1);
}
.progress-box__icon, .progress-box__txt {
.wh(100%,100%);
......@@ -28,17 +29,31 @@
.progress-box__icon-itm:last-child {
transform: none;
}
.progress-box__txt {
top: -8px;
}
.progress-box__txt-bottom {
top: 46px;
}
.progress-box__txt-item {
.wh(78px,36px);
font-size: 30px;
font-family: FZLTHProGlobal;
font-weight: 400;
color: #1C1C1C;
background-color: #3C1D17;
border-radius: 4px;
.flex-row-center();
font-size: 26px;
font-family: SourceHanSansCN;
font-weight: 500;
color: #FFF1CC;
position: absolute;
top: -46px;
text-align: center;
transform: translate(-50%,0);
top: 0;
white-space: nowrap;
}
.progress-box__txt-item:last-child {
transform: translate(-100%,0);
}
.progress-txt-active {
background-color: #FFD64D;
color: #302A28;
}
\ No newline at end of file
......@@ -5,12 +5,12 @@ import { RANK_LIST } from '@/mock'
import styles from './RankList.module.less'
const RANK_ICON = {
1: '',
2: '',
3: ''
1: '//yun.duiba.com.cn/taobaomini/pike_call/icon_06.png',
2: '//yun.duiba.com.cn/taobaomini/pike_call/icon_07.png',
3: '//yun.duiba.com.cn/taobaomini/pike_call/icon_08.png'
}
function RankList(props) {
const { rankList = RANK_LIST } = props
const { rankList = RANK_LIST, minNum = 2 } = props
return (
<ScrollView scrollY className={styles['scroll-container']}>
{
......@@ -18,13 +18,11 @@ function RankList(props) {
return(
<View className={`${styles['scroll-item']} ${styles['scroll-item'+(i+1)]}`}>
<View className={styles['scroll-item__rank']}>
{i <= 2 && <View className={styles['rank-icon']}>
<Image src={RANK_ICON[i+1]} />
</View>}
<View>{itm.rank}</View>
{i <= minNum && <Image className={styles['rank-icon']} src={RANK_ICON[i+1]} />}
<View className={styles['rank-num']}>{itm.rank}</View>
</View>
<View className={styles['scroll-item__user']}>{itm.userNick}</View>
<View className={styles['scroll-item__score']}>{itm.hotValue}</View>
<View className={styles['scroll-item__score']}>{itm.rankValue}</View>
</View>
)
})
......
.scroll-container {
.wh(100%,100%);
max-height: 700px;
}
.text-overflow-el() {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.scroll-item {
.flex-row-space();
.wh(100%,60px);
background-color: antiquewhite;
margin-bottom: 15px;
.wh(100%,66px);
background-color: #F7F0E6;
border: 1px solid #ECDBC0;
}
.scroll-item__rank {
width: 33%;
.flex-row-center();
.text-overflow-el();
position: relative;
}
.rank-icon {
position: absolute;
left: 50%;
top: 50%;
.wh(30px,30px);
background-color: aqua;
border-radius: 100%;
transform: translate(-50px,-50%);
}
.rank-num {
// transform: translate(-40px,0);
font-size: 30px;
font-family: YouSheBiaoTiHei;
font-weight: 400;
color: #2D2B28;
font-weight: 600;
}
.scroll-item__user {
width: 34%;
.flex-row-center();
.text-overflow-el();
font-size: 26px;
font-family: SourceHanSansCN;
font-weight: 400;
color: #666666;
}
.scroll-item__score {
width: 33%;
.flex-row-center();
.text-overflow-el();
font-size: 28px;
font-family: WorkSans;
font-weight: 600;
color: #2D2B28;
}
\ No newline at end of file
import React, { useState } from 'react'
import { View, Image, ScrollView } from '@tarojs/components'
import classnames from 'classnames'
import styles from './Test.module.less'
function Test(props) {
const { } = props
return (
<View className={styles['test-box']}>
</View>
)
}
export default Test
\ No newline at end of file
import { View } from '@tarojs/components'
import { View, Text, Image } from '@tarojs/components'
import React, { useState } from 'react'
import { useThrottle } from '@/hooks/useThrottle'
import Modal from '@/components/_base/Modal/Modal'
import styles from './DoHelpModal.module.less'
import API from '@/api'
import { showToast } from '@tarojs/taro'
import { useLoginInfoModel } from '@/store'
import { useLoginInfoModel, useActivityInfoModel } from '@/store'
import { checkIsMember } from 'tbcc-sdk-ts/lib/utils'
import { commonToast } from 'tbcc-sdk-ts/lib/core/tb'
import { HELP_MODAL_TYPE } from '@/const'
const helpConfig = {
1: {
width: 639,
height: 730,
bg: '//yun.dui88.com/taobaomini/pike_call/m_help_bg.png',
btnTxt: '//yun.dui88.com/taobaomini/pike_call/m_help_btn_01.png',
title: '您的好友正在参与XXXX\n快来一起参与吧~',
marginBottom: 80
},
2: {
width: 639,
height: 701,
bg: '//yun.dui88.com/taobaomini/pike_call/m_help_bg_02.png',
btnTxt: '//yun.dui88.com/taobaomini/pike_call/m_help_btn_02.png',
title: '您已是会员',
marginBottom: 80
},
3: {
width: 639,
height: 800,
bg: '//yun.dui88.com/taobaomini/pike_call/m_help_bg_03.png',
btnTxt: '//yun.dui88.com/taobaomini/pike_call/m_help_btn_02.png',
title: '',
marginBottom: 120
}
}
export default function RuleModal(props) {
const { bg = '', width = 300, height = 300, onClose = () => {}, closePostion, top = '40%', newVip = false } = props
const { activityInfo } = useActivityInfoModel()
const { type = HELP_MODAL_TYPE.HELP, onClose = () => {}, newVip = true, helpInfo = {} } = props
const [ memberModalVisible, setMemberModalVisible ] = useState(false)
const { loginInfo: { inviteId } } = useLoginInfoModel()
const onAuthSuccess = async() => {
const helpRes = await API.doHelp({ inviteId })
const onAuthSuccess = async () => {
const isVip = await checkIsMember()
const helpRes = await API.doHelp({ inviteId, isVip })
if (helpRes?.success) {
showToast({ title: '助力成功' })
commonToast('助力成功')
} else {
commonToast(helpRes?.message)
}
......@@ -30,23 +56,25 @@ export default function RuleModal(props) {
const onAuthFail = () => {
setMemberModalVisible(false)
}
const onDoHelp = useThrottle(async() => {
const closeMemberModal = () => {
setMemberModalVisible(false)
}
const onHandleHelp = useThrottle(async () => {
const helpFn = {
[HELP_MODAL_TYPE.HELP]: async () => {
// 条件不是需要新会员的情况下,直接助力
if (!newVip) {
const helpRes = await API.doHelp({ inviteId })
const helpRes = await API.doHelp({ inviteId, isVip })
if (helpRes?.success) {
showToast({ title: '助力成功' })
commonToast('助力成功')
} else {
commonToast(helpRes?.message)
}
onClose()
}
// 助力条件为新会员
const isVip = await checkIsMember()
// 已经是会员
if (isVip) {
commonToast('新会员才能助力哦~')
......@@ -54,22 +82,40 @@ export default function RuleModal(props) {
// 还不是会员,弹出会员弹窗
setMemberModalVisible(true)
}
}, 2000)
const closeMemberModal = () => {
setMemberModalVisible(false)
},
[HELP_MODAL_TYPE.FAIL]: async () => onClose(type),
[HELP_MODAL_TYPE.REWARDS]: async () => {
const { success, data } = await API.receiveTaskRewards({ taskType: 'invites' })
if(success && data) {
onClose(type)
}
}
}
helpFn[type]()
})
const onCloseModal = () => {
if(type === HELP_MODAL_TYPE.REWARDS) {
onHandleHelp()
return;
}
onClose && onClose()
}
return (
<View>
<Modal onClose={onClose} closePostion={closePostion} top={top}>
<View className={styles.content} style={{ width: `${width / 100}rem`, height: `${height / 100}rem`, backgroundImage: `url(${bg})` }}>
<View className={styles.title}>接受邀请</View>
<View className={styles.image} />
<View className={styles.desc}>是一段描述</View>
<View className={styles.help_button} onTap={onDoHelp}>助力按钮</View>
<Modal hideCloseButton={false} onClose={onCloseModal} top={'50%'} closePos={{ right: 0, top: 0 }}>
<View className={styles.container} style={
{ width: helpConfig[type].width / 100 + 'rem',
height: helpConfig[type].height / 100 + 'rem',
backgroundImage: `url(${helpConfig[type].bg})`
}}>
<Text className={styles['help-title']}>{
type !== HELP_MODAL_TYPE.REWARDS ? helpConfig[type].title :
`恭喜你成功邀请${helpInfo.inviteCount}名好友\n获得XXX奖励` }
</Text>
<Image src={helpConfig[type].btnTxt}
style={{ marginBottom: helpConfig[type].marginBottom / 100 + 'rem' }}
className={styles['help-btn']} onClick={() => onHandleHelp()} />
</View>
</Modal>
{
memberModalVisible &&
......
.content {
.container {
.wh(570px,398px);
position: relative;
.image-property();
background-color: #fff;
overflow: hidden;
padding: 30px;
display: flex;
flex-direction: column;
.flex-col-bottom();
align-items: center;
}
.title {
font-size: 40px;
text-align: center;
.image-property();
.pos-row-center() {
position: absolute;
left: 50%;
transform: translate(-50%,0);
}
.image {
.wh(200px, 200px);
.image("//yun.duiba.com.cn/taobaomini/template/250x250.png");
margin: 40px 0 0 0;
}
.desc {
font-size: 24px;
margin: 30px 0 0 0;
.help-title {
font-size: 38px;
font-family: SourceHanSansCN;
font-weight: 500;
color: #573F54;
line-height: 54px;
margin-bottom: 63px;
text-align: center;
}
.help_button {
text-align: center;
.wh(150px, 40px);
margin: 40px 0 0 0;
border: 1px solid #000;
.help-btn {
.wh(328px,76px);
margin-bottom: 121px;
}
......@@ -10,9 +10,9 @@ import { receiveEnamePrize, receiveObjectPrize, receiveMemberEname } from '@/uti
import config from '@/config'
export default function PrizeModal(props) {
const { prizeData = {}, onClose = () => {}, } = props
const { prize = {}, onClose = () => {}, } = props
const app = getApp()
const { image = '', name = '', id = '', type = 1, benefitType = 1, ename = '' } = prizeData
const { image = '', name = '', id = '', type = 1, benefitType = 1, ename = '' } = prize
const [ memberModalVisible, setMemberModalVisible ] = useState(false)
......@@ -57,23 +57,18 @@ export default function PrizeModal(props) {
const closeMemberModal = () => {
setMemberModalVisible(false)
}
const onCloseModal = () => {
onClose && onClose()
}
return (
<>
<Modal hideCloseButton={true} top={'50%'}>
<Modal hideCloseButton={false} onClose={onCloseModal} top={'50%'}>
<View className={styles['prize-container']}>
<Image className={styles['prize-title']} src={'//yun.duiba.com.cn/taobaomini/provideBeauty/prize/invite_title_01.png'} />
<View className={styles['prize-name']}>{'获得'+name+'奖品'}</View>
<View className={styles['prize-name_box']}>
<Image src={'//yun.duiba.com.cn/taobaomini/provideBeauty/prize/m_prize_bg_01.png'} className={styles['prize-name_box-top']} />
<View className={styles['prize-name_box-icon']}>
<Image src={image} className={styles['prize-name_box-icon-img']} />
</View>
<Image src={'//yun.duiba.com.cn/taobaomini/provideBeauty/prize/m_prize_bg_02.png'} className={styles['prize-name_box-bottom']} />
<View className={styles['prize-icon']}>
<Image src={image} className={styles['prize-icon-img']} />
</View>
<Image className={styles['prize-fenwei']} src={'//yun.duiba.com.cn/taobaomini/provideBeauty/prize/fenwei.png'} />
<Image src={'//yun.duiba.com.cn/taobaomini/provideBeauty/prize/btn_02.png'} onClick={() => onRecivePrize()} className={styles['prize-btn']} />
<Image src={'//yun.duiba.com.cn/taobaomini/pike_call/prize_btn.png'} onClick={() => onRecivePrize()} className={styles['prize-btn']} />
<View className={styles['prize-desc']}>奖品可在我的奖品中查看</View>
</View>
</Modal>
......
.prize-container {
.wh(500px,488px);
.wh(636px,890px);
.image('//yun.duiba.com.cn/taobaomini/pike_call/prize_bg.png');
position: relative;
}
.prize-fenwei {
.wh(500px,488px);
position: absolute;
top: 0;
left: 0;
.flex-col-bottom();
align-items: center;
}
.pos-row-center() {
position: absolute;
......@@ -14,58 +11,32 @@
left: 50%;
transform: translate(-50%,0);
}
.prize-title {
.wh(132px,43px);
.pos-row-center();
}
.prize-name_box {
.wh(426px,370px);
.pos-row-center();
top: 100px;
}
.prize-name_box-top {
.wh(426px,142px);
.pos-row-center();
}
.prize-name_box-bottom {
.wh(296px,170px);
.pos-row-center();
top: 200px;
}
.prize-name {
font-size: 40px;
font-family: FZLTHProGlobal;
font-weight: 400;
color: #FFBC6E;
.pos-row-center();
top: 54px;
white-space: nowrap
}
.prize-name_box-icon {
.wh(140px,140px);
.pos-row-center();
top: 150rpx;
}
.prize-name_box-icon-img {
.wh(120px,120px);
font-family: SourceHanSansSC;
font-weight: bold;
color: #473F39;
margin-bottom: 13px;
}
.prize-icon {
width: 287px;
height: 175px;
// background: #F2D6D3;
border-radius: 12px;
margin-bottom: 36px;
.flex-row-center();
}
.prize-icon-img {
.wh(175px,175px);
}
.prize-btn {
.wh(218px,54px);
position: absolute;
left: 50%;
transform: translate(-50%,0);
bottom: 40rpx;
.wh(437px,101px);
margin-bottom: 11px;
}
.prize-desc{
width: 500rpx;
position: absolute;
left: 50%;
transform: translate(-50%,0);
bottom: -40rpx;
font-size: 23px;
font-family: FZLTHProGlobal;
font-weight: 400;
// color: #8A3C00;
color: #FFBC6E;
text-align: center;
font-size: 20px;
font-family: SourceHanSansSC;
font-weight: bold;
color: #676E6E;
margin-bottom: 60px;
}
\ No newline at end of file
......@@ -3,10 +3,10 @@ import React, { useState, useEffect, useRef } from 'react'
import { noopFn } from '@/utils/util'
import tbccTs from 'tbcc-sdk-ts'
import API from '@/api'
import config from '@/config'
import config from '@/config/index'
import { useThrottle } from '@/hooks/useThrottle'
import Popup from '@/components/_base/Popup/Popup'
import { TASK_STATUS, TASK_CONFIG, SHOP_ID, BROSE_GOOD_TYPE } from '@/const'
import { TASK_STATUS, TASK_CONFIG, SHOP_ID, BROSE_GOOD_TYPE, ORDER_GOOD_TYPE } from '@/const'
import styles from './TasksModal.module.less'
import { useDidShow } from '@tarojs/taro'
import { TASK_DATA } from '@/mock'
......
......@@ -5,10 +5,11 @@ import { useThrottle } from '@/hooks/useThrottle'
import classnames from 'classnames'
import styles from './ThanksModal.module.less'
const thanksText = {
const thanksConfig = {
1: {
title: '很遗憾,未抽中奖品\n再接再厉',
btnTxt: '再抽一次',
btnImg: '//yun.duiba.com.cn/taobaomini/pike_call/thanks_btn.png',
icon: '//yun.duiba.com.cn/taobaomini/provideBeauty/close_btn.png',
desc: '奖品可在我的奖品中查看'
},
......@@ -20,7 +21,7 @@ const thanksText = {
}
}
export default function ThanksModal(props) {
const { onHandle = () => {}, type = 1, hasClose = false, hasDesc = false } = props
const { onHandle = () => {}, onClose, type = 1, hasClose = false, hasDesc = false } = props
const getContainerStyle = classnames(styles['thanks-container'],{
[`${styles['thanks-container-02']}`]: type === 2
......@@ -33,13 +34,15 @@ export default function ThanksModal(props) {
const getBtnStyle = classnames(styles['thanks-btn'],{
[`${styles['thanks-btn-02']}`]: type === 2
})
const onCloseModal = () => {
onClose && onClose()
}
return (
<Modal hideCloseButton={true} top={'50%'}>
<Modal hideCloseButton={false} onClose={onCloseModal} top={'50%'}>
<View className={getContainerStyle}>
<Text className={getTitleStyle}>{thanksText[type].title}</Text>
<View className={getBtnStyle} onClick={()=> onHandle(type)}>{thanksText[type].btnTxt}</View>
{hasClose && <Image className={styles['thanks-close']} onClick={()=> onHandle(2)} src={thanksText[type].icon} />}
{hasDesc && <View className={styles['thanks-desc']}>{thanksText[type].desc}</View>}
<Text className={getTitleStyle}>{thanksConfig[type].title}</Text>
<Image src={thanksConfig[type].btnImg} className={getBtnStyle} onClick={()=> onHandle(type)} />
{hasDesc && <View className={styles['thanks-desc']}>{thanksConfig[type].desc}</View>}
</View>
</Modal>
)
......
.thanks-container {
.wh(450px,305px);
.wh(636px,826px);
position: relative;
.image('//yun.dui88.com/taobaomini/provideBeauty/prize/prize_bg_02.png');
.flex-col-bottom();
align-items: center;
.image('//yun.duiba.com.cn/taobaomini/pike_call/thanks_bg.png');
}
.thanks-container-02 {
.wh(570px,398px);
position: relative;
.image('//yun.dui88.com/taobaomini/provideBeauty/prize/prize_bg_01.png');
.image('//yun.duiba.com.cn/taobaomini/provideBeauty/prize/prize_bg_01.png');
}
.pos-row-center() {
position: absolute;
......@@ -14,40 +15,24 @@
transform: translate(-50%,0);
}
.thanks-title {
width: 300px;
.pos-row-center();
bottom: 30px;
top: 110px;
font-size: 25px;
font-family: FZLTHProGlobal;
font-weight: 400;
color: #1C1C1C;
font-size: 40px;
font-family: SourceHanSansSC;
font-weight: bold;
color: #473F39;
line-height: 58px;
text-align: center;
margin-bottom: 46px;
}
.thanks-title-02 {
width: 442px;
position: absolute;
left: 41px;
bottom: 30px;
top: 87px;
font-size: 25px;
font-family: FZLTHProGlobal;
font-weight: 400;
line-height: 33px;
color: #1C1C1C;
text-align: center;
font-size: 40px;
font-family: SourceHanSansSC;
font-weight: bold;
color: #473F39;
line-height: 58px;
}
.thanks-btn {
.wh(162px,37px);
.pos-row-center();
bottom: 38px;
background: linear-gradient(0deg, #FFBC6E, #FFDFB4);
border-radius: 18px;
.flex-row-center();
font-size: 31px;
font-family: FZLTHProGlobal;
font-weight: 400;
color: #1C1C1C;
.wh(437px,101px);
margin-bottom: 133px;
}
.thanks-btn-02 {
width: 172px;
......
export default {
env: 'test', // 云函数环境 test 测试环境 online 线上环境
requestType: 'yapi', // cloud: 云函数, yapi: yapi 接口, ams: ams接口,tornadoAPI: 风驰台接口
cloudName: 'CommonToC', // 主云函数项目名 CommonToC
sellerId: '2207644377875',
tornadoAPI: 'https://tornado.duibadev.com.cn/tbServer/api?db=db3000000038851072&proxyIp=172.16.130.158', // 新增:当requestType: 'tornadoAPI'时,找服务端提供地址
defaultActivityId: '60642aafc752d118247c2a2d' // 默认活动id
}
export default {
env: 'test', // 云函数环境 test 测试环境 online 线上环境
requestType: 'yapi', // cloud: 云函数, yapi: yapi 接口, ams: ams接口,tornadoAPI: 风驰台接口
cloudName: 'CommonToC', // 主云函数项目名 CommonToC
sellerId: '2207644377875',
tornadoAPI: 'https://tornado.duibadev.com.cn/tbServer/api?db=db3000000038851072&proxyIp=172.16.130.158', // 新增:当requestType: 'tornadoAPI'时,找服务端提供地址
defaultActivityId: '60642aafc752d118247c2a2d' // 默认活动id
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
import { useRouter } from '@tarojs/taro'
import { useLoginInfoModel } from '../store/loginInfo'
import API from '../api'
import config from '../config'
import config from '@/config/index'
import { useAuth } from './useAuth'
import { noopFn } from '@/utils/util'
import { checkShopFavoredStatus } from 'tbcc-sdk-ts/lib/core/tb'
......
......@@ -121,3 +121,6 @@ export const RANK_LIST = [
hotValue: 98882892
}
]
// 档次
export const PROGRESS_LIST = [10000,30000,50000,100000]
\ No newline at end of file
......@@ -8,4 +8,3 @@ export default {
'canvas-comp': '../../../components/_miniprogram/lottieBlank/lottieBlank'
}
}
\ No newline at end of file
\ No newline at end of file
......@@ -10,7 +10,7 @@ import { dateFormatter } from '@/utils/date'
import styles from './myPrize.module.less'
import { getApp } from '@tarojs/taro'
import { receiveEnamePrize, receiveObjectPrize, receiveMemberEname } from '@/utils/util'
import config from '@/config'
import config from '@/config/index'
const { commonToast, getUserAddress, navigateToOutside, setClipboard } = tbccTs.tb
const { getMyPrizeList } = API
......
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