Commit 3dcf043b by caixinyu

更新老用户开团提示

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