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