Commit 7cac30cd by FE

share modify

parent d2f86890
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -457,14 +457,14 @@ class YearCourse extends Component {
}
toInviteFriends = (oid) => {
toInviteFriends = (oid, params = {}) => {
const { history } = this.props
if (getParam('version')) {
let data = {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: `https://m.julyedu.com/togroup?id=${oid}`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
title: `【仅剩2个名额】我${params.price}元拼了《${params.course_title}》`,
desc: params.course_title,
link: `${API.m}/togroup?id=${oid}`,
imgUrl: params.image_name,
}
SendMessageToApp("toShare", data)
} else {
......@@ -557,14 +557,14 @@ class YearCourse extends Component {
})
};
toContinueBargain = (id, code) => {
toContinueBargain = (id, price, code, image) => {
const { history } = this.props;
if(getParam('version')) {
let data = {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: `https://m.julyedu.com/bargain-middle-page?id=${id}&bargaincode=${code}&is_originator=1`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
title: '我发现一门好课,快来帮我砍价吧!',
desc: `我已经砍了${price}元,看看你能砍多少`,
link: `${API.m}/bargain-middle-page?id=${id}&bargaincode=${code}&is_originator=1`,
imgUrl: image,
}
SendMessageToApp("toShare", data)
}else {
......@@ -797,7 +797,11 @@ class YearCourse extends Component {
{
item.is_assemble == 1 &&
<a
onClick={() => this.toInviteFriends(item.order_id)}
onClick={() => this.toInviteFriends(item.order_id, {
course_title: item.course_title,
image_name: item.image_name,
price: 0.01
})}
className="status-btn to-group"
data-status="done"
>已参团,邀请好友参团</a>
......@@ -923,7 +927,11 @@ class YearCourse extends Component {
{
val.type === 2 &&
<a
onClick={() => this.toInviteFriends(val.order_id)}
onClick={() => this.toInviteFriends(val.order_id, {
course_title: val.course_title,
image_name: val.image_name,
price: val.pdd_price
})}
className="status-btn to-group"
data-status="done"
>已参团,邀请好友参团</a>
......@@ -939,7 +947,7 @@ class YearCourse extends Component {
val.type === 4 &&
<>
<a
onClick={() => this.toContinueBargain(val.bargain_code)}
onClick={() => this.toContinueBargain(val.course_id, val.already_bargain, val.bargain_code, val.image_name)}
className="status-btn to-group"
>继续砍价</a>
<a
......
......@@ -64,14 +64,15 @@ class YarnWish extends Component {
}
}
toInviteFriends = (oid) => {
toInviteFriends = (oid, params = {}) => {
const { history } = this.props
if (getParam('version')) {
let data = {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: `https://m.julyedu.com/togroup?id=${oid}`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
// TODO, 剩余名额临时用假数据
title: `【仅剩2个名额】我${params.price}元拼了《${params.course_title}》`,
desc: params.course_title,
link: `${API.m}/togroup?id=${oid}`,
imgUrl: params.image_name,
}
SendMessageToApp("toShare", data)
} else {
......@@ -79,14 +80,14 @@ class YarnWish extends Component {
}
}
toContinueBargain = (id, code) => {
toContinueBargain = (id, price, code, image) => {
const { history } = this.props;
if(getParam('version')) {
let data = {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: `https://m.julyedu.com/bargain-middle-page?id=${id}&bargaincode=${code}&is_originator=1`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
title: '我发现一门好课,快来帮我砍价吧!',
desc: `我已经砍了${price}元,看看你能砍多少`,
link: `${API.m}/bargain-middle-page?id=${id}&bargaincode=${code}&is_originator=1`,
imgUrl: image,
}
SendMessageToApp("toShare", data)
}else {
......@@ -261,7 +262,11 @@ class YarnWish extends Component {
{
(item.type === 2 || item.type === 7) &&
<a
onClick={() => this.toInviteFriends(item.order_id)}
onClick={() => this.toInviteFriends(item.order_id, {
course_title: item.course_title,
image_name: item.image_name,
price: item.type === 2? item.pdd_price : 0.01
})}
className="status-btn to-group"
data-status="done"
>已参团,邀请好友参团</a>
......@@ -277,7 +282,7 @@ class YarnWish extends Component {
item.type === 4 &&
<>
<a
onClick={() => this.toContinueBargain(item.course_id, item.bargain_code)}
onClick={() => this.toContinueBargain(item.course_id, item.already_bargain, item.bargain_code, item.image_name)}
className="status-btn to-group"
>继续砍价</a>
<a
......
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