Commit cc4d87fb authored by liwei's avatar liwei

liwei

parent f473fbc5
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
</p> </p>
<div class="invite-record-btn" @click="lookMyInviteRecords" v-if="earnings>0||userNum>0"> <div class="invite-record-btn" @click="lookMyInviteRecords" v-if="earnings>0||userNum>0">
<p>查看我的邀请记录</p> <p>查看我的邀请记录</p>
<div class="img-container">
<img src="../../assets/inviteFriends/icon_back.png" /> <img src="../../assets/inviteFriends/icon_back.png" />
</div> </div>
</div> </div>
</div>
<div class="invite-friends cell"> <div class="invite-friends cell">
<img src="../../assets/inviteFriends/img_title2.png" alt /> <img src="../../assets/inviteFriends/img_title2.png" alt />
</div> </div>
...@@ -43,14 +45,16 @@ ...@@ -43,14 +45,16 @@
<p>{{item.pay_at}}</p> <p>{{item.pay_at}}</p>
</li> </li>
</ul> </ul>
<div class="look-more-record" @click="lookMoreRecord" v-if="records.length > 6"> <div class="look-more-record" @click="lookMoreRecord" v-if="records.length > 0">
<p>查看更多</p> <p>查看更多</p>
<div class="img-container">
<img src="../../assets/inviteFriends/icon_back.png" /> <img src="../../assets/inviteFriends/icon_back.png" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="invite-friends cell"> <div class="invite-friends cell">
<img src="../../assets/inviteFriends/img_title6.png" alt /> <img src="../../assets/inviteFriends/img_title6.png" alt />
</div> </div>
...@@ -65,9 +69,11 @@ import { ...@@ -65,9 +69,11 @@ import {
getwechatParam, getwechatParam,
getInviteResultApi, getInviteResultApi,
getInviteListApi, getInviteListApi,
getGoodsDetailApi,getGroupDetailApi,getStatusWechatApi getGoodsDetailApi,
getGroupDetailApi,
getStatusWechatApi
} from "../../service/api"; } from "../../service/api";
import { Toast } from 'vant'; import { Toast } from "vant";
export default { export default {
name: "inviteFriends", name: "inviteFriends",
components: {}, components: {},
...@@ -75,27 +81,24 @@ export default { ...@@ -75,27 +81,24 @@ export default {
return { return {
earnings: 0, earnings: 0,
userNum: 0, userNum: 0,
records: [ records: [],
], shareTitle: "钜惠来袭!唱唱21天英语训练营,全勤学习返66元现金",
shareTitle: '钜惠来袭!唱唱21天英语训练营,全勤学习返66元现金', shareDesc: "21天让宝宝爱上说英语,报课即送教具礼盒,包邮送到家!",
shareDesc: '21天让宝宝爱上说英语,报课即送教具礼盒,包邮送到家!', invite_code: "",
invite_code:'', shopId: "",
shopId:'', groupId: null
groupId:null,
}; };
}, },
mounted() { mounted() {
if(this.$route.query.shopId){ if (this.$route.query.shopId) {
this.shopId = this.$route.query.shopId; this.shopId = this.$route.query.shopId;
}else{ } else {
this.shopId = 46 this.shopId = 46;
} }
this.getInviteResult(); this.getInviteResult();
this.getInviteList(); this.getInviteList();
this.onShare() this.onShare();
// this.getDetail() // this.getDetail()
}, },
methods: { methods: {
lookMyInviteRecords() { lookMyInviteRecords() {
...@@ -125,8 +128,8 @@ export default { ...@@ -125,8 +128,8 @@ export default {
let query = {}; let query = {};
if (window.location.href.indexOf("shopId") > -1) { if (window.location.href.indexOf("shopId") > -1) {
query.shopId = this.$route.query.shopId; query.shopId = this.$route.query.shopId;
}else{ } else {
query.shopId=46 query.shopId = 46;
} }
if (window.location.href.indexOf("groupId") > -1) { if (window.location.href.indexOf("groupId") > -1) {
query.groupId = this.$route.query.groupId; query.groupId = this.$route.query.groupId;
...@@ -140,8 +143,8 @@ export default { ...@@ -140,8 +143,8 @@ export default {
enableShare: function(opition) { enableShare: function(opition) {
let that = this; let that = this;
getwechatParam({ getwechatParam({
api_list: 'onMenuShareAppMessage,onMenuShareTimeline', api_list: "onMenuShareAppMessage,onMenuShareTimeline",
url:window.location.href.split('#')[0] url: window.location.href.split("#")[0]
}).then(wechatRes => { }).then(wechatRes => {
wx.config({ wx.config({
debug: false, debug: false,
...@@ -154,50 +157,63 @@ export default { ...@@ -154,50 +157,63 @@ export default {
wx.ready(function() { wx.ready(function() {
wx.onMenuShareTimeline({ wx.onMenuShareTimeline({
title: that.shareTitle, // 分享标题 title: that.shareTitle, // 分享标题
desc: that.shareDesc,// 分享描述 desc: that.shareDesc, // 分享描述
link: opition.shareUrl, // 分享链接 link: opition.shareUrl, // 分享链接
imgUrl: 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标 imgUrl:
"https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png", // 分享图标
success: function() { success: function() {
console.log('分享成功'); console.log("分享成功");
window._hmt.push(['_trackEvent', '分享', "商品页好友分享",`id${that.shopId}`,that.invite_code]);//百度统计 window._hmt.push([
"_trackEvent",
"分享",
"商品页好友分享",
`id${that.shopId}`,
that.invite_code
]); //百度统计
}, },
cancel: function() { cancel: function() {
// alert("失败") // alert("失败")
console.log('分享失败') console.log("分享失败");
} }
}); });
wx.onMenuShareAppMessage({ wx.onMenuShareAppMessage({
title: that.shareTitle, // 分享标题 title: that.shareTitle, // 分享标题
desc: that.shareDesc,// 分享描述 desc: that.shareDesc, // 分享描述
link: opition.shareUrl, // 分享链接 link: opition.shareUrl, // 分享链接
imgUrl: 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标 imgUrl:
"https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png", // 分享图标
success: function() { success: function() {
window._hmt.push(['_trackEvent', '分享', "商品页朋友圈分享",`id${that.shopId}`,that.invite_code]);//百度统计 window._hmt.push([
"_trackEvent",
"分享",
"商品页朋友圈分享",
`id${that.shopId}`,
that.invite_code
]); //百度统计
}, },
cancel: function() { cancel: function() {}
} });
});
}); });
})
})
}, },
onShare: function(type) { onShare: function(type) {
let ownDetail = JSON.parse(localStorage.getItem("userDesc")); let ownDetail = JSON.parse(localStorage.getItem("userDesc"));
let URL = `${process.env.BUY_URL}shopId=${this.shopId}&groupId=${this.groupId}&invite_code=${this.invite_code}&nickname=${ownDetail.nickname}`; let URL = `${process.env.BUY_URL}shopId=${this.shopId}&groupId=${this.groupId}&invite_code=${this.invite_code}&nickname=${ownDetail.nickname}`;
if(!this.invite_code){ if (!this.invite_code) {
// debugger // debugger
this.user_id=JSON.parse(localStorage.getItem('userDesc')).user_id; this.user_id = JSON.parse(localStorage.getItem("userDesc")).user_id;
this.invite_code = 'CC-USER-'+this.user_id this.invite_code = "CC-USER-" + this.user_id;
URL = `${process.env.BUY_URL}shopId=${this.shopId}&invite_code=${this.invite_code}&nickname=${ownDetail.nickname}` URL = `${process.env.BUY_URL}shopId=${this.shopId}&invite_code=${this.invite_code}&nickname=${ownDetail.nickname}`;
}else{ } else {
URL = `${process.env.BUY_URL}shopId=${this.shopId}&invite_code=${this.invite_code}&nickname=${ownDetail.nickname}` URL = `${process.env.BUY_URL}shopId=${this.shopId}&invite_code=${this.invite_code}&nickname=${ownDetail.nickname}`;
} }
// if(type === 1 ){ // if(type === 1 ){
// } // }
this.enableShare({ this.enableShare({
shareUrl:URL shareUrl: URL
}) });
}, }
} }
}; };
</script> </script>
...@@ -251,7 +267,7 @@ export default { ...@@ -251,7 +267,7 @@ export default {
} }
.cell-content.people { .cell-content.people {
top: 24vw; top: 24vw;
right: -1vw; right: 1vw;
} }
.invite-record-btn { .invite-record-btn {
position: absolute; position: absolute;
...@@ -261,16 +277,23 @@ export default { ...@@ -261,16 +277,23 @@ export default {
align-items: center; align-items: center;
font-size: 26 * @tocurrentvw; font-size: 26 * @tocurrentvw;
bottom: 26 * @tocurrentvh; bottom: 26 * @tocurrentvh;
display: flex;
p { p {
margin-left: 28%; margin-left: 30%;
display: flex;
justify-content: flex-end;
} }
.img-container {
flex: 1;
display: flex;
img { img {
margin-right: 35%; margin-left: 2%;
display: block; display: block;
width: 12 * @tocurrentvw; width: 12 * @tocurrentvw;
height: 20 * @tocurrentvh; height: 20 * @tocurrentvh;
} }
} }
}
.invite-record-list { .invite-record-list {
width: 676 * @tocurrentvw; width: 676 * @tocurrentvw;
// height: 592 * @tocurrentvh; // height: 592 * @tocurrentvh;
...@@ -285,7 +308,7 @@ export default { ...@@ -285,7 +308,7 @@ export default {
border-radius: 10 * @tocurrentvw; border-radius: 10 * @tocurrentvw;
.record-content { .record-content {
margin: 19 * @tocurrentvh 15 * @tocurrentvw; margin: 19 * @tocurrentvh 15 * @tocurrentvw;
margin-bottom: 0; margin-bottom: 19 * @tocurrentvh;
width: 626 * @tocurrentvw; width: 626 * @tocurrentvw;
.no-record { .no-record {
height: 76 * @tocurrentvh; height: 76 * @tocurrentvh;
...@@ -324,7 +347,7 @@ export default { ...@@ -324,7 +347,7 @@ export default {
} }
p { p {
text-align: center; text-align: center;
width: 40%; width: 50%;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -332,20 +355,28 @@ export default { ...@@ -332,20 +355,28 @@ export default {
} }
} }
.look-more-record { .look-more-record {
height: 65 * @tocurrentvh; // height: 65 * @tocurrentvh;
margin-top: 19 * @tocurrentvh;
width: 100%; width: 100%;
font-size: 26 * @tocurrentvw; font-size: 26 * @tocurrentvw;
color: #eb7162; color: #eb7162;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: relative; p {
margin-left: 40%;
display: flex;
justify-content: flex-end;
}
.img-container {
flex: 1;
display: flex;
img { img {
// display: none; margin-left: 2%;
position: absolute; display: block;
width: 12 * @tocurrentvw; width: 12 * @tocurrentvw;
height: 20 * @tocurrentvh; height: 20 * @tocurrentvh;
transform: translatex(80 * @tocurrentvw); }
} }
} }
} }
......
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