Commit 3dcf043b by caixinyu

更新老用户开团提示

parent d15d440e
...@@ -22,6 +22,7 @@ class ToGroup extends Component { ...@@ -22,6 +22,7 @@ class ToGroup extends Component {
isBuy: false, isBuy: false,
modal: false, modal: false,
pddOrderId: "", pddOrderId: "",
is_new_user:false
} }
} }
...@@ -97,6 +98,17 @@ class ToGroup extends Component { ...@@ -97,6 +98,17 @@ class ToGroup extends Component {
}, 1000) }, 1000)
} }
}) })
http.get(`${API.home}/m/user_info_sample/0`).then((res) => {
if (res.code === 200) {
console.log('已经登录');
this.setState({is_new_user:res.data.is_new_user})
} else {
//为登录,去登录
console.log('去登录');
this.props.history.push("/passport", { from: this.props.location })
}
})
} }
toCourseDetail = (id) => { toCourseDetail = (id) => {
...@@ -146,6 +158,7 @@ class ToGroup extends Component { ...@@ -146,6 +158,7 @@ class ToGroup extends Component {
data: { course_id, course_title, simpledescription, price0, price1 }, data: { course_id, course_title, simpledescription, price0, price1 },
is_success, is_success,
course_list, course_list,
is_new_user
} = this.state } = this.state
const Info = ( const Info = (
<div className="info"> <div className="info">
...@@ -259,6 +272,7 @@ function GorupContent(props) { ...@@ -259,6 +272,7 @@ function GorupContent(props) {
share, share,
number, number,
countdown, countdown,
is_new_user
} = props.data } = props.data
const { userInfo } = props const { userInfo } = props
let ary = [], let ary = [],
...@@ -305,11 +319,13 @@ function GorupContent(props) { ...@@ -305,11 +319,13 @@ function GorupContent(props) {
} }
}) })
if (flag) { if (flag) {
tip = ( tip = (
<p className="tip">{`拼团省¥${Math.round( is_new_user?<p className="tip">{`拼团省¥${Math.round(
data.price1 - pdd_price, data.price1 - pdd_price,
2 2
)}元`}</p> )}元`}</p>:
<p>您已是七月的老朋友,快开团邀请好友加入吧</p>
) )
btn = ( btn = (
<span className="group-btn" onClick={props.invitedFriends}> <span className="group-btn" onClick={props.invitedFriends}>
...@@ -320,10 +336,11 @@ function GorupContent(props) { ...@@ -320,10 +336,11 @@ function GorupContent(props) {
} else { } else {
if (getParam("is_originator") == 1) { if (getParam("is_originator") == 1) {
tip = ( tip = (
<p className="tip">{`拼团省¥${Math.round( is_new_user?<p className="tip">{`拼团省¥${Math.round(
data.price1 - pdd_price, data.price1 - pdd_price,
2 2
)}元`}</p> )}元`}</p>:
<p>您已是七月的老朋友,快开团邀请好友加入吧</p>
) )
btn = ( btn = (
<a <a
...@@ -331,15 +348,16 @@ function GorupContent(props) { ...@@ -331,15 +348,16 @@ function GorupContent(props) {
className="group-btn" className="group-btn"
onClick={props.handleToGroup} onClick={props.handleToGroup}
> >
一键 一键
</a> </a>
) )
} else { } else {
tip = ( tip = (
<p className="tip">{`拼团省¥${Math.round( is_new_user?<p className="tip">{`拼团省¥${Math.round(
data.price1 - pdd_price, data.price1 - pdd_price,
2 2
)}元`}</p> )}元`}</p>:
<p>您已是七月的老朋友,快开团邀请好友加入吧</p>
) )
btn = ( btn = (
<span className="group-btn" onClick={props.invitedFriends}> <span className="group-btn" onClick={props.invitedFriends}>
......
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