Commit 3765f84b authored by liwei's avatar liwei

liwei

parent a166e3b4
...@@ -238,6 +238,7 @@ ...@@ -238,6 +238,7 @@
}, },
// 分享 // 分享
enableShare: function() { enableShare: function() {
debugger;
let that = this; let that = this;
getwechatParam({ getwechatParam({
api_list: 'onMenuShareAppMessage,onMenuShareTimeline', api_list: 'onMenuShareAppMessage,onMenuShareTimeline',
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
v-for="(data,index) in groupDetail.goods_desc.img" v-for="(data,index) in groupDetail.goods_desc.img"
:key="index" :key="index"
> >
<img :src="data.url"> <img :src="data.url" />
</swiper-slide> </swiper-slide>
<div class="swiper-pagination" slot="pagination"></div> <div class="swiper-pagination" slot="pagination"></div>
</swiper> </swiper>
...@@ -16,12 +16,13 @@ ...@@ -16,12 +16,13 @@
:src="refIcon" :src="refIcon"
class="ref-icon shake" class="ref-icon shake"
@click="goToActivity();buttonClick('功能','生成海报')" @click="goToActivity();buttonClick('功能','生成海报')"
v-if="groupDetail.is_auth_user === 1&&!closeStatus"> --> v-if="groupDetail.is_auth_user === 1&&!closeStatus">-->
<img <img
:src="couponTipImg" :src="couponTipImg"
class="ref-icon shake" class="ref-icon shake"
@click="couponPopup=true" @click="couponPopup=true"
v-if="closeStatus"> v-if="closeStatus"
/>
<div class="head"> <div class="head">
<div class="title">{{groupDetail.name}}</div> <div class="title">{{groupDetail.name}}</div>
<span class="detail">{{groupDetail.goods_desc.desc}}</span> <span class="detail">{{groupDetail.goods_desc.desc}}</span>
...@@ -40,8 +41,8 @@ ...@@ -40,8 +41,8 @@
v-if="index<5" v-if="index<5"
:src="data" :src="data"
:key="data" :key="data"
> />
<img class="more" :src="moreUrl"> <img class="more" :src="moreUrl" />
<span class="has">已售{{groupDetail.has_group_num}}</span> <span class="has">已售{{groupDetail.has_group_num}}</span>
</div> </div>
<div <div
...@@ -69,13 +70,13 @@ ...@@ -69,13 +70,13 @@
<div v-if="groupDetail.desc.customer_service[0]"> <div v-if="groupDetail.desc.customer_service[0]">
<mt-popup v-model="popupVisible"> <mt-popup v-model="popupVisible">
<div class="pop-block"> <div class="pop-block">
<img v-if="popType" :src="qrCode"> <img v-if="popType" :src="qrCode" />
<img v-if="!popType" :src="groupDetail.desc.customer_service[0].url"> <img v-if="!popType" :src="groupDetail.desc.customer_service[0].url" />
<div> <div>
<span v-if="popType" v-html="popcontentW"></span> <span v-if="popType" v-html="popcontentW"></span>
<span v-if="!popType" v-html="popcontentT"></span> <span v-if="!popType" v-html="popcontentT"></span>
</div> </div>
<img class="close" :src="closeUrl" @click="popupVisible = false"> <img class="close" :src="closeUrl" @click="popupVisible = false" />
</div> </div>
</mt-popup> </mt-popup>
</div> </div>
...@@ -87,19 +88,25 @@ ...@@ -87,19 +88,25 @@
</div> </div>
</div> </div>
</mt-popup> </mt-popup>
<mt-popup class="couponPop" popup-transition="popup-fade" v-model="couponPopup" :closeOnClickModal="false"> <mt-popup
class="couponPop"
popup-transition="popup-fade"
v-model="couponPopup"
:closeOnClickModal="false"
>
<div class="box"> <div class="box">
<img class="bg" :src="couponBg" alt=""> <img class="bg" :src="couponBg" alt />
<img class="closeImg" @click="closeCouponPop" :src="closeImg" alt=""> <img class="closeImg" @click="closeCouponPop" :src="closeImg" alt />
<div class="content"> <div class="content">
<p>您的好友{{shareName}}赠您</p> <p>您的好友{{shareName}}赠您</p>
<img class="btn" @click="getCoupon" :src="couponBtn" alt=""> <img class="btn" @click="getCoupon" :src="couponBtn" alt />
</div> </div>
</div> </div>
</mt-popup> </mt-popup>
<mt-popup <mt-popup
v-model="refVisible" v-model="refVisible"
style="background-color: transparent;margin-top: -80vw;margin-left: -40vw;transform: none"> style="background-color: transparent;margin-top: -80vw;margin-left: -40vw;transform: none"
>
<div <div
:style="{backgroundImage:`url(${refBg})`}" :style="{backgroundImage:`url(${refBg})`}"
class="ref-content" class="ref-content"
...@@ -113,10 +120,10 @@ ...@@ -113,10 +120,10 @@
ref="imageWrapper" ref="imageWrapper"
v-if="groupDetail.share_desc.refImg && groupDetail.share_desc.refImg.length > 0" v-if="groupDetail.share_desc.refImg && groupDetail.share_desc.refImg.length > 0"
> >
<img :src="groupDetail.share_desc.refImg[0].url"> <img :src="groupDetail.share_desc.refImg[0].url" />
<div id="qrcode" class="qrcode"></div> <div id="qrcode" class="qrcode"></div>
</div> </div>
<img :src="dataURL" class="cvs-img"> <img :src="dataURL" class="cvs-img" />
</mt-popup> </mt-popup>
<div v-if="groupDetail.status === 1 && invite_code_f"> <div v-if="groupDetail.status === 1 && invite_code_f">
<div v-if="couponShadow" class="couponBox">您有{{couponInfo.money/100}}元优惠券可使用</div> <div v-if="couponShadow" class="couponBox">您有{{couponInfo.money/100}}元优惠券可使用</div>
...@@ -126,7 +133,7 @@ ...@@ -126,7 +133,7 @@
@click="showTeacher();buttonClick('老师','客服')" @click="showTeacher();buttonClick('老师','客服')"
v-if="groupDetail.desc.customer_service[0]" v-if="groupDetail.desc.customer_service[0]"
> >
<img :src="weChatIcon"> <img :src="weChatIcon" />
</div> </div>
<div class="btn big price full" v-if="groupData && groupData.status !== 0"> <div class="btn big price full" v-if="groupData && groupData.status !== 0">
<div v-if="groupId">该团已满</div> <div v-if="groupId">该团已满</div>
...@@ -158,7 +165,7 @@ ...@@ -158,7 +165,7 @@
@click="showTeacher();buttonClick('功能','客服')" @click="showTeacher();buttonClick('功能','客服')"
v-if="groupDetail.desc.customer_service[0]" v-if="groupDetail.desc.customer_service[0]"
> >
<img :src="weChatIcon"> <img :src="weChatIcon" />
</div> </div>
<div <div
class="btn big price" class="btn big price"
...@@ -171,7 +178,8 @@ ...@@ -171,7 +178,8 @@
<div <div
class="btn big price" class="btn big price"
v-if="groupDetail.current_price==0" v-if="groupDetail.current_price==0"
@click="groupPay(1);buttonClick('购买按钮','直购购买')"> @click="groupPay(1);buttonClick('购买按钮','直购购买')"
>
<!-- <span>{{groupDetail.current_price/100}}</span> --> <!-- <span>{{groupDetail.current_price/100}}</span> -->
<div class="free">免费领</div> <div class="free">免费领</div>
</div> </div>
...@@ -188,17 +196,17 @@ ...@@ -188,17 +196,17 @@
:bind-mobile="bindMobile" :bind-mobile="bindMobile"
v-if="groupDetail" v-if="groupDetail"
:groupDetail="groupDetail" :groupDetail="groupDetail"
@goToBuyPage="goToBuyPage"> @goToBuyPage="goToBuyPage"
</login-page> ></login-page>
</div> </div>
</template> </template>
<script> <script>
import "swiper/dist/css/swiper.css"; import "swiper/dist/css/swiper.css";
import { swiper, swiperSlide } from "vue-awesome-swiper"; import { swiper, swiperSlide } from "vue-awesome-swiper";
import {Popup} from 'mint-ui' import { Popup } from "mint-ui";
import comment from "../../util/common"; import comment from "../../util/common";
import { Toast } from 'vant'; import { Toast } from "vant";
import { import {
getwechatParam, getwechatParam,
getGoodsDetailApi, getGoodsDetailApi,
...@@ -230,7 +238,7 @@ export default { ...@@ -230,7 +238,7 @@ export default {
swiper, swiper,
swiperSlide, swiperSlide,
loginPage, loginPage,
[Popup.name]:Popup [Popup.name]: Popup
}, },
data() { data() {
return { return {
...@@ -274,14 +282,14 @@ export default { ...@@ -274,14 +282,14 @@ export default {
groupData: null, groupData: null,
couponInfo: {}, couponInfo: {},
couponShadow: false, couponShadow: false,
groupSuc:'', groupSuc: "",
couponBg:couponBg, couponBg: couponBg,
couponBtn:couponBtn, couponBtn: couponBtn,
couponPopup:false, couponPopup: false,
shareName:this.$route.query.nickname, shareName: this.$route.query.nickname,
closeImg:closeImg, closeImg: closeImg,
couponTipImg:couponTip, couponTipImg: couponTip,
closeStatus:false closeStatus: false
}; };
}, },
mounted() { mounted() {
...@@ -289,22 +297,22 @@ export default { ...@@ -289,22 +297,22 @@ export default {
// document.body.addEventListener('focusout', () => { //软键盘关闭事件 // document.body.addEventListener('focusout', () => { //软键盘关闭事件
// document.documentElement.scrollTop = 0 // document.documentElement.scrollTop = 0
// document.body.scrollTop = 0 // document.body.scrollTop = 0
// console.log("键盘收起") // console.log("键盘收起")
// }) // })
}, },
methods: { methods: {
getCoupon(){ getCoupon() {
getReceiveCouponApi(this.$route.query.shopId).then(res=>{ getReceiveCouponApi(this.$route.query.shopId).then(res => {
this.couponShadow = true; this.couponShadow = true;
this.couponPopup=false; this.couponPopup = false;
this.closeStatus = false this.closeStatus = false;
Toast('领取成功') Toast("领取成功");
}) });
}, },
closeCouponPop(){ closeCouponPop() {
this.couponPopup = false this.couponPopup = false;
this.closeStatus = true this.closeStatus = true;
// this.refIcon = // this.refIcon =
// this. // this.
}, },
goToBuyPage() { goToBuyPage() {
...@@ -326,22 +334,20 @@ export default { ...@@ -326,22 +334,20 @@ export default {
if (this.buyType === 0 && !this.groupId) { if (this.buyType === 0 && !this.groupId) {
query.type = "single"; query.type = "single";
this.buyType = "single"; this.buyType = "single";
} } else if (this.buyType === 0 && this.groupId) {
else if (this.buyType === 0 && this.groupId) {
// 已购买生成团 // 已购买生成团
this.$router.push({ this.$router.push({
name: "buy", name: "buy",
query: { query: {
shopId: this.shopId, shopId: this.shopId,
invite_code: this.invite_code, invite_code: this.invite_code,
type:"" type: ""
} }
}); });
// debugger // debugger
// window.location.reload(); // window.location.reload();
return false; return false;
} } else {
else {
query.type = ""; query.type = "";
} }
if (localStorage.getItem("gdt_vid")) { if (localStorage.getItem("gdt_vid")) {
...@@ -352,7 +358,7 @@ export default { ...@@ -352,7 +358,7 @@ export default {
if (window.location.href.indexOf("cct_user_id") > -1) { if (window.location.href.indexOf("cct_user_id") > -1) {
query.cct_user_id = comment.getUrlParam().cct_user_id; query.cct_user_id = comment.getUrlParam().cct_user_id;
} }
console.log(query) console.log(query);
// debugger // debugger
this.$router.push({ this.$router.push({
name: "buy", name: "buy",
...@@ -436,9 +442,7 @@ export default { ...@@ -436,9 +442,7 @@ export default {
}, },
onShare: function(type) { onShare: function(type) {
this.handleInviteCode(); this.handleInviteCode();
let URL = `${process.env.BUY_URL}shopId=${this.shopId}&invite_code=${ let URL = `${process.env.BUY_URL}shopId=${this.shopId}&invite_code=${this.this_code}`;
this.this_code
}`;
this.enableShare({ this.enableShare({
product_title: this.groupDetail.share_desc.title, product_title: this.groupDetail.share_desc.title,
desc: this.groupDetail.share_desc.content, desc: this.groupDetail.share_desc.content,
...@@ -573,32 +577,31 @@ export default { ...@@ -573,32 +577,31 @@ export default {
} }
let userCourse = JSON.parse(localStorage.getItem("userCourse")); let userCourse = JSON.parse(localStorage.getItem("userCourse"));
if (userCourse&&!userCourse.periods_list) { if (userCourse && !userCourse.periods_list) {
// 优惠券 // 优惠券
getCouponListApi(this.$route.query.shopId).then(res => { getCouponListApi(this.$route.query.shopId).then(res => {
if(res.length){ if (res.length) {
this.couponInfo = res[0] this.couponInfo = res[0];
this.couponShadow = true; this.couponShadow = true;
} }
console.log(this.couponInfo); console.log(this.couponInfo);
}); });
} }
getInvitedCouponApi(this.$route.query.shopId).then(res =>{ getInvitedCouponApi(this.$route.query.shopId).then(res => {
console.log(res) console.log(res);
if(res.code&&res.code==100){ if (res.code && res.code == 100) {
if(res.data.flag==0){ if (res.data.flag == 0) {
this.couponShadow = true; this.couponShadow = true;
this.couponInfo.money = res.data.original_price this.couponInfo.money = res.data.original_price;
console.log( this.couponInfo) console.log(this.couponInfo);
} }
} else if (this.$route.query.invite_code) {
}else if(this.$route.query.invite_code){ this.couponInfo = res;
this.couponInfo = res this.couponInfo.money = res.original_price;
this.couponInfo.money = res.original_price this.couponPopup = true;
this.couponPopup = true
// res.original_price // res.original_price
} }
}) });
}, },
showTeacher() { showTeacher() {
this.popType = false; this.popType = false;
...@@ -612,10 +615,10 @@ export default { ...@@ -612,10 +615,10 @@ export default {
buttonName: buttonName buttonName: buttonName
}); });
}, },
groupPay(type,status) { groupPay(type, status) {
this.buyType = type; this.buyType = type;
if(status){ if (status) {
this.groupSuc = status this.groupSuc = status;
// console.log(status) // console.log(status)
} }
if ( if (
...@@ -667,28 +670,36 @@ video { ...@@ -667,28 +670,36 @@ video {
</style> </style>
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.child-view{ .child-view {
// position: relative; // position: relative;
} }
.couponPop{ .couponPop {
background: transparent; background: transparent;
.box{ .box {
width: 319 * @toVw; width: 319 * @toVw;
.bg{width: 100%;} .bg {
.content{ width: 100%;
}
.content {
position: absolute; position: absolute;
top: 170 * @toVw; top: 170 * @toVw;
padding: 0 40 * @toVw; padding: 0 40 * @toVw;
p{ p {
color: #FFEFA8; color: #ffefa8;
font-size: 22 * @toVw; font-size: 22 * @toVw;
} }
.btn{margin-top: 150 * @toVw;} .btn {
margin-top: 150 * @toVw;
}
}
.closeImg {
position: absolute;
top: -26 * @toVw;
right: 10 * @toVw;
width: 27 * @toVw;
} }
.closeImg{position: absolute;top: -26 * @toVw;right: 10 * @toVw;width: 27 * @toVw;}
}
} }
}
.img-cvs { .img-cvs {
position: absolute; position: absolute;
width: 233 * @toVw; width: 233 * @toVw;
...@@ -852,10 +863,10 @@ video { ...@@ -852,10 +863,10 @@ video {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 25 * @toVw; height: 25 * @toVw;
background: #FFE83C; background: #ffe83c;
bottom: 70 * @toVw; bottom: 70 * @toVw;
text-align: center; text-align: center;
color: #FF4D4F; color: #ff4d4f;
line-height: 25 * @toVw; line-height: 25 * @toVw;
font-size: 12px; font-size: 12px;
} }
......
...@@ -81,7 +81,36 @@ export default { ...@@ -81,7 +81,36 @@ export default {
return { return {
earnings: 0, earnings: 0,
userNum: 0, userNum: 0,
records: [], records: [
{
nickname: "test1111111111",
pay_at: "2019.07.08 14:28:50"
},
{
nickname: "test1111111111",
pay_at: "2019.07.08 14:28:50"
},
{
nickname: "test1111111111",
pay_at: "2019.07.08 14:28:50"
},
{
nickname: "test1111111111",
pay_at: "2019.07.08 14:28:50"
},
{
nickname: "test1111111111",
pay_at: "2019.07.08 14:28:50"
},
{
nickname: "test1111111111",
pay_at: "2019.07.08 14:28:50"
},
{
nickname: "test1111111111",
pay_at: "2019.07.08 14:28:50"
}
],
shareTitle: "钜惠来袭!唱唱21天英语训练营,全勤学习返66元现金", shareTitle: "钜惠来袭!唱唱21天英语训练营,全勤学习返66元现金",
shareDesc: "21天让宝宝爱上说英语,报课即送教具礼盒,包邮送到家!", shareDesc: "21天让宝宝爱上说英语,报课即送教具礼盒,包邮送到家!",
invite_code: "", invite_code: "",
...@@ -104,7 +133,10 @@ export default { ...@@ -104,7 +133,10 @@ export default {
lookMyInviteRecords() { lookMyInviteRecords() {
this.$refs.inviteRecord.scrollIntoView(); this.$refs.inviteRecord.scrollIntoView();
}, },
lookMoreRecord() {}, lookMoreRecord() {
let query = { shopId: this.shopId };
this.$router.push({ name: "inviteRecordList", query: query });
},
getInviteResult() { getInviteResult() {
getInviteResultApi({}, this.shopId).then(res => { getInviteResultApi({}, this.shopId).then(res => {
this.earnings = res.earnings; this.earnings = res.earnings;
...@@ -200,43 +232,24 @@ export default { ...@@ -200,43 +232,24 @@ export default {
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
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}`;
this.enableShare({
shareUrl: URL
});
console.log(194);
} else { } else {
console.log(196);
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}`;
this.enableShare({
shareUrl: URL
});
} }
// if(type === 1 ){ // if(type === 1 ){
// } // }
this.enableShare({
shareUrl: URL
});
} }
},
onShare: function(type) {
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}`;
if (!this.invite_code) {
// debugger
this.user_id = JSON.parse(localStorage.getItem("userDesc")).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}`;
this.enableShare({
shareUrl: URL
});
console.log(194);
} else {
console.log(196);
URL = `${process.env.BUY_URL}shopId=${this.shopId}&invite_code=${this.invite_code}&nickname=${ownDetail.nickname}`;
this.enableShare({
shareUrl: URL
});
}
// if(type === 1 ){
// }
} }
}; };
</script> </script>
......
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