Commit 3cabee0f by xuzhenghua

砍价bug

parent adaa85fa
......@@ -144,6 +144,7 @@ class Landing extends Component {
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/treasure-box.png"
alt=""
onClick={() => {
this.joinSuccessPopup && this.joinSuccessPopup.remove()
history.push(`/year/yearTreasure?id=${id}`)
}}
/>
......@@ -158,7 +159,7 @@ class Landing extends Component {
this.fetchPageData()
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('join', getParam('treasure_code'))
!isFollow && this.remind('join', this.state.treasure_code, 2)
})
}
})
......@@ -191,7 +192,7 @@ class Landing extends Component {
return code === 200 && data['is_follow']
})
createTeamSuccess = (member, team_num, lack_member, treasure_code) => {
createTeamSuccess = ({member, team_num, lack_member, treasure_code}) => {
this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null)
this.getFollowStatus()
.then(isFollow => {
......@@ -233,7 +234,7 @@ class Landing extends Component {
})
}
remind = (type = 'create', treasure_code) => {
remind = (type = 'create', treasure_code, origin = 1) => {
const {match, history, user} = this.props
http.get(`${API["base-api"]}/wx/user_temporary_qrcode/${user.data.uid}`)
.then(res => {
......@@ -255,7 +256,7 @@ class Landing extends Component {
// history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`)
this.fetchPageData({
treasure_code,
origin: '1'
origin
})
}
})
......@@ -290,7 +291,7 @@ class Landing extends Component {
sessionStorage.removeItem('showShareTip')
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('create', getParam('treasure_code'))
!isFollow && this.remind('create', getParam('treasure_code'), 1)
})
}
})
......
......@@ -77,7 +77,7 @@ class MyTreasure extends Component {
// 获取当前需要绑定手机的队伍id,当拆到需要绑定手机号/地址的宝箱时,如果不进行绑定则无法拆下一个
fetchCurrentTeamId = (data = []) => {
const arr = data.filter(item => item.is_open && (item.bind_address || item.bind_address));
const arr = data.filter(item => item.is_open && (item.bind_phone || item.bind_address));
if(arr.length > 0) {
return arr[0]['id'];
}else {
......
......@@ -82,6 +82,12 @@ export default (props) => {
(!bind_phone && !bind_address && prize_type === 2) &&
<a className="team-result">已发放至您的账户</a>
}
{/* 第三:奖品,任意线上课程兑换券 */}
{
(!bind_phone && !bind_address && prize_type === 5) &&
<a className="team-result">文案待定</a>
}
</>
)
}
\ No newline at end of file
......@@ -33,7 +33,7 @@ class TreasureNav extends Component {
},
{
id: 'year-discount',
name: '抄专区'
name: '抄专区'
},
]
};
......
......@@ -634,7 +634,7 @@ function CourseDes(props) {
<span className={'discount-price'}>{course.course_price}</span>
{/* is_originator 是否发起人 0-否 1-是 */}
{
(is_originator == 1 && bargain_status == 0 || bargain_status == 1) &&
(is_originator == 1 && bargain_status != 3) &&
<button className={'purchase-btn'} onClick={toCart}>
¥{course.pay_price}去支付
</button>
......
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