814

parent b2d59fb4
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
position: fixed; position: fixed;
background: #f4f4f4; background: #f4f4f4;
} }
/* html{font-size: 1px;} */</style><link href=static/css/app.f983055a19b69eb54137ee36031e8a72.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script></script><script type=text/javascript src=static/js/manifest.8f6010e151eb6cf98ab8.js></script><script type=text/javascript src=static/js/vendor.9045e57ab7f23772e80d.js></script><script type=text/javascript src=static/js/app.abbc6c1bb83f3677e439.js></script></body></html> /* html{font-size: 1px;} */</style><link href=static/css/app.f983055a19b69eb54137ee36031e8a72.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script></script><script type=text/javascript src=static/js/manifest.d107220a347232b3f51e.js></script><script type=text/javascript src=static/js/vendor.27f02851ee69967777eb.js></script><script type=text/javascript src=static/js/app.fd3d7791e0c701d35a4c.js></script></body></html>
\ No newline at end of file \ No newline at end of file
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.
webpackJsonp([55],{"+N17":function(e,n,t){(e.exports=t("FZ+f")(!0)).push([e.i,"","",{version:3,sources:[],names:[],mappings:"",file:"navShare.vue",sourceRoot:""}])},oB2U:function(e,n,t){var o=t("+N17");"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);t("rjj0")("c0a18e0e",o,!1,{})},w9jd:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("CCn6"),r={name:"navShare",mounted:function(){var e=this;Object(o.H)().then(function(n){e.shopId=n.id,e.$router.push({name:"buyDetail",query:{invite_code:e.$route.query.invite_code,shopId:e.shopId}})})},data:function(){return{}}},s=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"nofinish-block"})};s._withStripped=!0;var a={render:s,staticRenderFns:[]},i=a;var u=!1;var c=t("VU/8")(r,i,!1,function(e){u||t("oB2U")},"data-v-18aa337a",null);c.options.__file="src/components/newLesson/navShare.vue";n.default=c.exports}});
\ No newline at end of file
webpackJsonp([55],{"0RaN":function(e,n,t){var a=t("iOgL");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);t("rjj0")("0022f600",a,!1,{})},SnBc:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={name:"ybNav",data:function(){return{noUrl:noUrl}},mounted:function(){window.location.href="https://ebiz.aia.com.cn/salesplus/goodstart/singing-English-Index.action?parentId="+this.$route.query.parentId+"&agentId="+this.$route.query.agentId}},o=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"noWechat-page"})};o._withStripped=!0;var r={render:o,staticRenderFns:[]},s=r;var i=!1;var c=t("VU/8")(a,s,!1,function(e){i||t("0RaN")},"data-v-0ca00e8b",null);c.options.__file="src/components/youbang/nav.vue";n.default=c.exports},iOgL:function(e,n,t){(e.exports=t("FZ+f")(!0)).push([e.i,"","",{version:3,sources:[],names:[],mappings:"",file:"nav.vue",sourceRoot:""}])}}); webpackJsonp([56],{"0RaN":function(e,n,t){var a=t("iOgL");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);t("rjj0")("0022f600",a,!1,{})},SnBc:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={name:"ybNav",data:function(){return{noUrl:noUrl}},mounted:function(){window.location.href="https://ebiz.aia.com.cn/salesplus/goodstart/singing-English-Index.action?parentId="+this.$route.query.parentId+"&agentId="+this.$route.query.agentId}},o=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"noWechat-page"})};o._withStripped=!0;var r={render:o,staticRenderFns:[]},s=r;var i=!1;var c=t("VU/8")(a,s,!1,function(e){i||t("0RaN")},"data-v-0ca00e8b",null);c.options.__file="src/components/youbang/nav.vue";n.default=c.exports},iOgL:function(e,n,t){(e.exports=t("FZ+f")(!0)).push([e.i,"","",{version:3,sources:[],names:[],mappings:"",file:"nav.vue",sourceRoot:""}])}});
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var d=window.webpackJsonp;window.webpackJsonp=function(a,b,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],c[t]&&u.push(c[t][0]),c[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(d&&d(a,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},c={58:0};function f(d){if(a[d])return a[d].exports;var c=a[d]={i:d,l:!1,exports:{}};return e[d].call(c.exports,c,c.exports,f),c.l=!0,c.exports}f.e=function(e){var d=c[e];if(0===d)return new Promise(function(e){e()});if(d)return d[2];var a=new Promise(function(a,f){d=c[e]=[a,f]});d[2]=a;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+({0:"vendor-async"}[e]||e)+"."+{0:"450b115d3c329aa2c0d1",1:"8312a853e67d5d95e132",2:"066d6174c3c9a691eaa9",3:"46e4130e2d19316f59fb",4:"e7472ee3fdd30df5c4ab",5:"b6df00df4dcb9e2ec9be",6:"61700a27ce5813cf15df",7:"e693574a01be2e2c06d9",8:"42f80e729b6010e2e9b3",9:"08ee562f51a489d20519",10:"71f6e9a0f2df08b0c272",11:"9aea05a9b3666afbf568",12:"d57e82b1592dec4c9382",13:"34cae2d1adf30c2035de",14:"0dbc59c71380b7cbd527",15:"24137f33ac09917e16b7",16:"fc5a441530f8dbcc2641",17:"240e81ae1a7a304eba76",18:"d4b50a6780356ce0bd5a",19:"d25201144269c66aea78",20:"d03f48a9610b137b4e0f",21:"39e2276099413d90e461",22:"982c17d60fc9e4ef1e06",23:"5b5c94111e2f5948175f",24:"62f0cd5963b95494b554",25:"d39dc4835d15b0cbccbe",26:"8824fe67fb3cfc7ce862",27:"c5de7c036edbe4171e44",28:"7b7736a6c2ac9d5b0532",29:"065ac0eb9f1c5854d593",30:"536e00702218e6b382d4",31:"07f3edec3d8d9b94909b",32:"94ddd814e9b03e928a6d",33:"90d93b69c2146ab91efa",34:"d8b20acde13b9343b4b4",35:"e687ce5aa45e5398b2a2",36:"d50f044e40cd82b84381",37:"b4162ff2e52bf265d69d",38:"5f8113bd2d6a3d98d119",39:"d8a581861c65a73f7806",40:"29e1a633f13f512f41bb",41:"f577377fa26565b6e497",42:"458aea196a564b934cf0",43:"d8594ec21c4db71e2f2d",44:"14f4da810aceafa9112d",45:"88830d27a04d9cbc5a5a",46:"bf13cdf26d1a09c99b8f",47:"2f3f73870935b573d252",48:"d7b5c61b8025fa7b0f32",49:"8b1e708c45fd912337d1",50:"355843aa8c0752f8e8af",51:"72b25239de77d37de87b",52:"40a1f33a814d036e7df7",53:"bfb7dc072560eeb3dda3",54:"d800c5652be3fc4d9bda",55:"e3d5130186da9d19e000"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var d=c[e];0!==d&&(d&&d[1](new Error("Loading chunk "+e+" failed.")),c[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,d,a){f.o(e,d)||Object.defineProperty(e,d,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var d=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(d,"a",d),d},f.o=function(e,d){return Object.prototype.hasOwnProperty.call(e,d)},f.p="",f.oe=function(e){throw console.error(e),e}}([]); !function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,b,n){for(var r,t,o,i=0,u=[];i<c.length;i++)t=c[i],d[t]&&u.push(d[t][0]),d[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(a&&a(c,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var c={},d={59:0};function f(a){if(c[a])return c[a].exports;var d=c[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var a=d[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,f){a=d[e]=[c,f]});a[2]=c;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+({0:"vendor-async"}[e]||e)+"."+{0:"450b115d3c329aa2c0d1",1:"707ffa87fee4254150da",2:"066d6174c3c9a691eaa9",3:"46e4130e2d19316f59fb",4:"e7472ee3fdd30df5c4ab",5:"b6df00df4dcb9e2ec9be",6:"61700a27ce5813cf15df",7:"e693574a01be2e2c06d9",8:"42f80e729b6010e2e9b3",9:"08ee562f51a489d20519",10:"71f6e9a0f2df08b0c272",11:"9aea05a9b3666afbf568",12:"d57e82b1592dec4c9382",13:"34cae2d1adf30c2035de",14:"0dbc59c71380b7cbd527",15:"24137f33ac09917e16b7",16:"fc5a441530f8dbcc2641",17:"240e81ae1a7a304eba76",18:"d4b50a6780356ce0bd5a",19:"d25201144269c66aea78",20:"d03f48a9610b137b4e0f",21:"39e2276099413d90e461",22:"982c17d60fc9e4ef1e06",23:"5b5c94111e2f5948175f",24:"62f0cd5963b95494b554",25:"d39dc4835d15b0cbccbe",26:"8824fe67fb3cfc7ce862",27:"c5de7c036edbe4171e44",28:"7b7736a6c2ac9d5b0532",29:"065ac0eb9f1c5854d593",30:"536e00702218e6b382d4",31:"07f3edec3d8d9b94909b",32:"94ddd814e9b03e928a6d",33:"90d93b69c2146ab91efa",34:"d8b20acde13b9343b4b4",35:"e687ce5aa45e5398b2a2",36:"d50f044e40cd82b84381",37:"b4162ff2e52bf265d69d",38:"5f8113bd2d6a3d98d119",39:"d8a581861c65a73f7806",40:"29e1a633f13f512f41bb",41:"f577377fa26565b6e497",42:"458aea196a564b934cf0",43:"d8594ec21c4db71e2f2d",44:"14f4da810aceafa9112d",45:"88830d27a04d9cbc5a5a",46:"bf13cdf26d1a09c99b8f",47:"2f3f73870935b573d252",48:"d7b5c61b8025fa7b0f32",49:"8b1e708c45fd912337d1",50:"355843aa8c0752f8e8af",51:"72b25239de77d37de87b",52:"40a1f33a814d036e7df7",53:"bfb7dc072560eeb3dda3",54:"d800c5652be3fc4d9bda",55:"ac7b0db38926a5dbe1a4",56:"ca2e696f111a5fec1012"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=d[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),c},f.m=e,f.c=c,f.d=function(e,a,c){f.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},f.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(a,"a",a),a},f.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},f.p="",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ No newline at end of file
<template>
<div class="nofinish-block" >
</div>
</template>
<script>
import {getShareGoodsApi } from "../../service/api";
export default {
name: "navShare",
mounted() {
getShareGoodsApi().then(res => {
this.shopId = res.id;
this.$router.push({
name: "buyDetail",
query: { invite_code: this.$route.query.invite_code,shopId:this.shopId }
});
});
},
data(){
return{
}
}
}
</script>
<style scoped lang="less">
</style>
<template> <template>
<div > <div>
<div class="share-page" id="capture"> <div class="share-page" id="capture">
<div class="share-block"> <div class="share-block">
<div class="content" v-if="userDetail" ref="imageWrapper" > <div class="content" v-if="userDetail" ref="imageWrapper">
<!-- <img :src="shareConBg" class="content-black"/> --> <!-- <img :src="shareConBg" class="content-black"/> -->
<div class="main-content"> <div class="main-content">
<div class="topBox"> <div class="topBox">
...@@ -10,7 +10,10 @@ ...@@ -10,7 +10,10 @@
<div class="head-block"> <div class="head-block">
<img :src="userDetail.avatar" /> <img :src="userDetail.avatar" />
</div> </div>
<div class="content-title"> <span class="ellipsisCss">{{userDetail.nickname}}</span> <span>家宝宝</span> </div> <div class="content-title">
<span class="ellipsisCss">{{userDetail.nickname}}</span>
<span>家宝宝</span>
</div>
</div> </div>
<div class="main-text"> <div class="main-text">
<div v-if="watchDetail" class="item"> <div v-if="watchDetail" class="item">
...@@ -53,19 +56,20 @@ ...@@ -53,19 +56,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class='qrbox'> <div class="qrbox">
<div class="left"> <div class="left">
<p>唱唱启蒙英语</p> <p>唱唱启蒙英语</p>
<p>0-6岁宝宝英语启蒙必备</p> <p>0-6岁宝宝英语启蒙必备</p>
<div class='point'> <div class="point">
长按扫码&nbsp;&nbsp;领取课程&nbsp;&nbsp; <img :src="icon_right" /> 长按扫码&nbsp;&nbsp;领取课程&nbsp;&nbsp;
<img :src="icon_right" />
</div> </div>
</div> </div>
<div class='right'> <div class="right">
<div id="qrcode" class="qrcode"></div> <div id="qrcode" class="qrcode"></div>
</div> </div>
</div> </div>
<div class="tips" v-if="shareVisible" > <div class="tips" v-if="shareVisible">
<div class="closeBox" @click="shareVisible=false"></div> <div class="closeBox" @click="shareVisible=false"></div>
<img :src="share_tips" /> <img :src="share_tips" />
<!-- <div class="pannel"> <!-- <div class="pannel">
...@@ -83,19 +87,19 @@ ...@@ -83,19 +87,19 @@
<div @click="copyText" class='transparentBtn'> <div @click="copyText" class='transparentBtn'>
复制心得 复制心得
</div> </div>
</div> --> </div>-->
</div>
</div> </div>
<img class='canvasImg' @touchstart='touchStart' @touchend='touchEnd' :src="canvasData" alt="">
<div class='white-pannel'>
<div class='trs'></div>
</div> </div>
<div class='borderDiv'> <img class="canvasImg" @touchstart="touchStart" @touchend="touchEnd" :src="canvasData" alt />
<div class="white-pannel">
<div class="trs"></div>
</div> </div>
<div class="share-btn" @click="showShare()"> <div class="borderDiv"></div>
<img class="imgTip" :src="img_show" />>
<!-- <div class="share-btn" @click="showShare()">
<i class="iconfont icon-pengyouquan"></i>&nbsp;&nbsp; <i class="iconfont icon-pengyouquan"></i>&nbsp;&nbsp;
<span>保存图片·分享至朋友圈</span> <span>保存图片·分享至朋友圈</span>
</div> </div>-->
<div class="share_close" @click="$emit('closeShare')">×</div> <div class="share_close" @click="$emit('closeShare')">×</div>
</div> </div>
</template> </template>
...@@ -114,6 +118,7 @@ import great from "../../assets/newLesson/great.png"; ...@@ -114,6 +118,7 @@ import great from "../../assets/newLesson/great.png";
import perfect from "../../assets/newLesson/perfect.png"; import perfect from "../../assets/newLesson/perfect.png";
import icon_change from "../../assets/newLesson/icon_change@2x.png"; import icon_change from "../../assets/newLesson/icon_change@2x.png";
import icon_right from "../../assets/newLesson/icon_right@2x.png"; import icon_right from "../../assets/newLesson/icon_right@2x.png";
import img_show from "../../assets/newLesson/img_show@2x.png";
import QRCode from "qrcodejs2"; import QRCode from "qrcodejs2";
import html2canvas from "html2canvas"; import html2canvas from "html2canvas";
import { import {
...@@ -129,9 +134,9 @@ export default { ...@@ -129,9 +134,9 @@ export default {
name: "share", name: "share",
data() { data() {
return { return {
oimgPoint:false, oimgPoint: false,
canvasData:'', canvasData: "",
QRCodeB:'', QRCodeB: "",
img_link: img_link, img_link: img_link,
shareVisible: false, shareVisible: false,
shareBg: shareBg, shareBg: shareBg,
...@@ -141,6 +146,7 @@ export default { ...@@ -141,6 +146,7 @@ export default {
icon_baby: icon_baby, icon_baby: icon_baby,
icon_day: icon_day, icon_day: icon_day,
icon_min: icon_min, icon_min: icon_min,
img_show: img_show,
userDetail: null, userDetail: null,
dataURL: null, dataURL: null,
watchDetail: null, watchDetail: null,
...@@ -150,13 +156,14 @@ export default { ...@@ -150,13 +156,14 @@ export default {
imgPoint: good, imgPoint: good,
minute: "", minute: "",
percent: 0, percent: 0,
saveTime:'', saveTime: "",
lastTime:'', lastTime: "",
icon_change:icon_change, icon_change: icon_change,
textIndex:1, textIndex: 1,
textContent:'', textContent: "",
htmlContent: '', htmlContent: "",
icon_right:icon_right icon_right: icon_right,
timeout: ""
}; };
}, },
props: ["contentData"], props: ["contentData"],
...@@ -165,50 +172,97 @@ export default { ...@@ -165,50 +172,97 @@ export default {
Toast.loading({ Toast.loading({
mask: true, mask: true,
message: "", message: "",
duration:300 duration: 300
}); });
this.initPage(); this.initPage();
}, },
beforeDestroy(){ beforeDestroy() {
console.log(Date.parse(new Date())-this.lastTime); console.log(Date.parse(new Date()) - this.lastTime);
this.lesson.nowTime += Date.parse(new Date())-this.lastTime this.lesson.nowTime += Date.parse(new Date()) - this.lastTime;
localStorage.setItem("lessonDetail", JSON.stringify(this.lesson)); localStorage.setItem("lessonDetail", JSON.stringify(this.lesson));
console.log(this.lesson.nowTime); console.log(this.lesson.nowTime);
}, },
methods: { methods: {
touchStart(){ touchStart() {
// console.log(Date.parse(new Date()),'touchStart') let query = JSON.parse(sessionStorage.getItem("classQuery"));
this.timeout = setTimeout(() => {
this.$sa.track("watchClick", {
dayModule: JSON.parse(
localStorage.getItem("lessonDetail")
).domTitle.slice(0, 9),
weekName: JSON.parse(
localStorage.getItem("lessonDetail")
).domTitle.slice(
10,
JSON.parse(localStorage.getItem("lessonDetail")).domTitle.length
),
elementName:
JSON.parse(localStorage.getItem("lessonDetail")).domTitle.slice(
0,
9
) +
"-" +
JSON.parse(localStorage.getItem("lessonDetail")).domTitle.slice(
10,
JSON.parse(localStorage.getItem("lessonDetail")).domTitle.length
),
themeID: JSON.parse(localStorage.getItem("lessonDetail")).themeID,
themeName: JSON.parse(localStorage.getItem("lessonDetail")).themeName,
goodsID: JSON.parse(localStorage.getItem("lessonDetail")).goodsID,
classID: JSON.parse(localStorage.getItem("lessonDetail")).classID,
buttonName: "完成分享",
partName: this.contentData.partName,
elementID: query.elementId.toString()
});
let lessonDetail = JSON.parse(localStorage.getItem("lessonDetail"));
let nowTime = Date.parse(new Date());
let json = {
page_type: 0,
page_id: 4,
stay_time: 0
};
subUserLessonApi(
query.elementId,
query.category_id,
query.periods_id,
json
).then(res => {
lessonDetail.total_watch_time = res;
lessonDetail.nowTime = nowTime;
localStorage.setItem("lessonDetail", JSON.stringify(lessonDetail));
});
}, 800);
}, },
touchEnd(){ touchEnd() {
// console.log(Date.parse(new Date()),'touchEnd') clearInterval(this.timeout);
}, },
copyText(){ copyText() {
this.$sa.track("buttonClick", { this.$sa.track("buttonClick", {
tabTitle: "打卡商品页", tabTitle: "打卡商品页",
moduleTitle: "功能按钮", moduleTitle: "功能按钮",
buttonType: "按钮点击", buttonType: "按钮点击",
buttonName: "复制心得" buttonName: "复制心得"
}); });
this.$copyText(this.textContent).then(e=>{ this.$copyText(this.textContent).then(e => {
Toast('复制成功') Toast("复制成功");
}) });
}, },
changeText(){ changeText() {
if(this.textIndex==1){ if (this.textIndex == 1) {
this.textContent = `我是${this.userDetail.nickname},我家宝宝正在唱唱启蒙英语学习,已坚持${this.watchDetail.total_day}天啦,宝宝的英语一天比一天有进步了,成就感满满,继续坚持[拳头]~` this.textContent = `我是${this.userDetail.nickname},我家宝宝正在唱唱启蒙英语学习,已坚持${this.watchDetail.total_day}天啦,宝宝的英语一天比一天有进步了,成就感满满,继续坚持[拳头]~`;
this.textIndex = 2 this.textIndex = 2;
}else if (this.textIndex==2) { } else if (this.textIndex == 2) {
this.textContent = `陪宝宝在唱唱启蒙英语学习的第${this.watchDetail.total_day}天,宝宝又学会了一首新童谣《${this.lesson.title}》,每天都有新收获,坚持就是胜利,练就英语小神童[胜利]` this.textContent = `陪宝宝在唱唱启蒙英语学习的第${this.watchDetail.total_day}天,宝宝又学会了一首新童谣《${this.lesson.title}》,每天都有新收获,坚持就是胜利,练就英语小神童[胜利]`;
this.textIndex = 3 this.textIndex = 3;
}else{ } else {
this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语👉【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!` this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语👉【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!`;
this.textIndex = 1 this.textIndex = 1;
} }
}, },
showShare() { showShare() {
this.shareVisible = true; this.shareVisible = true;
// this.$refs.audioDom.play() // this.$refs.audioDom.play()
this.playAudio() this.playAudio();
this.$sa.track("watchClick", { this.$sa.track("watchClick", {
dayModule: JSON.parse( dayModule: JSON.parse(
localStorage.getItem("lessonDetail") localStorage.getItem("lessonDetail")
...@@ -246,9 +300,9 @@ export default { ...@@ -246,9 +300,9 @@ export default {
console.log(this.watchDetail, 170); console.log(this.watchDetail, 170);
console.log(this.lesson); console.log(this.lesson);
this.lastTime = Date.parse(new Date()); this.lastTime = Date.parse(new Date());
clearInterval(this.$store.state.timeout) clearInterval(this.$store.state.timeout);
this.userDetail = JSON.parse(localStorage.getItem("userDesc")); this.userDetail = JSON.parse(localStorage.getItem("userDesc"));
this.minute = ( this.watchDetail.stay_time / 60).toFixed(); this.minute = (this.watchDetail.stay_time / 60).toFixed();
// this.minute = (600/60).toFixed() // this.minute = (600/60).toFixed()
if (this.minute < 1) { if (this.minute < 1) {
this.minute = 1; this.minute = 1;
...@@ -256,18 +310,18 @@ export default { ...@@ -256,18 +310,18 @@ export default {
// this.minute<1?1:1 // this.minute<1?1:1
if (this.minute < 8) { if (this.minute < 8) {
this.imgPoint = good; this.imgPoint = good;
this.$store.dispatch('setLookStatus',0) this.$store.dispatch("setLookStatus", 0);
if (this.minute < 5) { if (this.minute < 5) {
this.percent = 75 + Math.floor(49 * Math.random()) / 10; this.percent = 75 + Math.floor(49 * Math.random()) / 10;
} else { } else {
this.percent = 81 + Math.floor(89 * Math.random()) / 10; this.percent = 81 + Math.floor(89 * Math.random()) / 10;
} }
} else if (this.minute <= 12) { } else if (this.minute <= 12) {
this.$store.dispatch('setLookStatus',1) this.$store.dispatch("setLookStatus", 1);
this.percent = 91 + Math.floor(39 * Math.random()) / 10; this.percent = 91 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = great; this.imgPoint = great;
} else { } else {
this.$store.dispatch('setLookStatus',2) this.$store.dispatch("setLookStatus", 2);
console.log(Math.floor(39 * Math.random())); console.log(Math.floor(39 * Math.random()));
this.percent = 96 + Math.floor(39 * Math.random()) / 10; this.percent = 96 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = perfect; this.imgPoint = perfect;
...@@ -282,14 +336,11 @@ export default { ...@@ -282,14 +336,11 @@ export default {
domTitle: this.lesson.domTitle, domTitle: this.lesson.domTitle,
category_id: query.category_id category_id: query.category_id
}; };
let URL = `${process.env.API_URL}#/navShare?invite_code=CC-UDK-${this.userDetail.user_id}`;
// let URL = // let URL =
// process.env.API_URL + // 'https://wechat.changchangenglish.com/' +
// "#/shareGoods?info=" + // "#/shareGoods?info=" +
// encodeURIComponent(JSON.stringify(obj)); // encodeURIComponent(JSON.stringify(obj));
let URL =
'https://wechat.changchangenglish.com/' +
"#/shareGoods?info=" +
encodeURIComponent(JSON.stringify(obj));
console.log(URL); console.log(URL);
this.onShare(URL); this.onShare(URL);
this.toDataURLBase64( this.toDataURLBase64(
...@@ -305,29 +356,34 @@ export default { ...@@ -305,29 +356,34 @@ export default {
} }
); );
this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!`; this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!`;
this.qrcode(URL) this.qrcode(URL);
let that = this let that = this;
setTimeout(()=>{ setTimeout(() => {
this.oimgPoint=true this.oimgPoint = true;
},900) }, 900);
setTimeout(()=>{ setTimeout(() => {
that.$nextTick(()=>{ that.$nextTick(() => {
if(document.getElementById('capture')){ if (document.getElementById("capture")) {
html2canvas(document.getElementById('capture'),{ html2canvas(document.getElementById("capture"), {
async: true, async: true,
scrollX:0, scrollX: 0,
scale: 2, scale: 2,
letterRendering: true, letterRendering: true,
useCORS:true, useCORS: true,
logging:true logging: true
}).then((canvas) => { })
.then(canvas => {
this.divShow = false; this.divShow = false;
let dataURL = canvas.toDataURL("image/jpg",1.0); let dataURL = canvas.toDataURL("image/jpg", 1.0);
this.canvasData = dataURL this.canvasData = dataURL;
}).catch(res=>{alert(res);console.log()});
}
}) })
},1800) .catch(res => {
alert(res);
console.log();
});
}
});
}, 1200);
}, },
enableShare: function(option) { enableShare: function(option) {
let query = JSON.parse(sessionStorage.getItem("classQuery")); let query = JSON.parse(sessionStorage.getItem("classQuery"));
...@@ -610,19 +666,21 @@ export default { ...@@ -610,19 +666,21 @@ export default {
}; };
}, },
qrcode(data) { qrcode(data) {
let spx = document.body.clientWidth/375 // debugger
let spx = document.body.clientWidth / 375;
if (this.QRCodeB) { if (this.QRCodeB) {
this.QRCodeB.makeCode(data); this.QRCodeB.makeCode(data);
} else { } else {
this.QRCodeB = new QRCode("qrcode", { this.QRCodeB = new QRCode("qrcode", {
width: 103*spx, width: 100 * spx,
height: 103*spx, // 高度 height: 100 * spx, // 高度
text: data, // 二维码内容 text: data, // 二维码内容
image: "" image: "",
errorCorrectionLevel: "L"
}); });
} }
}, },
playAudio(){ playAudio() {
// this.$refs.audioDom.load() // this.$refs.audioDom.load()
// this.$refs.audioDom.play() // this.$refs.audioDom.play()
} }
...@@ -633,7 +691,7 @@ export default { ...@@ -633,7 +691,7 @@ export default {
@import "../../util/public"; @import "../../util/public";
@tocurrentvw : 1/2 * @toVw; @tocurrentvw : 1/2 * @toVw;
@tocurrentvh : 1/2 * @toVh; @tocurrentvh : 1/2 * @toVh;
.share_close { .share_close {
position: fixed; position: fixed;
width: 20 * @toVw; width: 20 * @toVw;
top: 26 * @toVw; top: 26 * @toVw;
...@@ -641,8 +699,16 @@ export default { ...@@ -641,8 +699,16 @@ export default {
z-index: 1301; z-index: 1301;
color: white; color: white;
font-size: 16 * @toVw; font-size: 16 * @toVw;
} }
.share-btn { .imgTip {
position: fixed;
top: 515 * @toVw;
left: 91 * @toVw;
z-index: 1301;
width: 190 * @toVw;
pointer-events: none;
}
.share-btn {
position: fixed; position: fixed;
top: 510 * @toVw; top: 510 * @toVw;
left: 31 * @toVw; left: 31 * @toVw;
...@@ -664,8 +730,12 @@ export default { ...@@ -664,8 +730,12 @@ export default {
line-height: 49 * @toVw; line-height: 49 * @toVw;
font-size: 18 * @toVw; font-size: 18 * @toVw;
box-shadow: 0px 3 * @toVw 16 * @toVw 0px rgba(250, 208, 88, 0.59); box-shadow: 0px 3 * @toVw 16 * @toVw 0px rgba(250, 208, 88, 0.59);
background:linear-gradient(0deg,rgba(237,151,1,1) 1%,rgba(252,217,118,1) 99%); background: linear-gradient(
box-shadow:0px 3px 16px 0px rgba(250,208,88,0.59); 0deg,
rgba(237, 151, 1, 1) 1%,
rgba(252, 217, 118, 1) 99%
);
box-shadow: 0px 3px 16px 0px rgba(250, 208, 88, 0.59);
.iconfont { .iconfont {
font-size: 22 * @toVw; font-size: 22 * @toVw;
margin: 0; margin: 0;
...@@ -678,40 +748,45 @@ export default { ...@@ -678,40 +748,45 @@ export default {
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
} }
} }
.canvasImg{position: fixed;top:0;left:0;width:100%;z-index: 1300;} .canvasImg {
.white-pannel{ position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1300;
}
.white-pannel {
position: fixed; position: fixed;
z-index: 1301; z-index: 1301;
top: 0; top: 0;
width: 100%; width: 100%;
height: 510* @toVw; height: 510 * @toVw;
background: transparent; background: transparent;
pointer-events: none; pointer-events: none;
border: 7 * @toVw solid white; border: 7 * @toVw solid white;
border-radius:12 * @toVw; border-radius: 12 * @toVw;
box-shadow: 0 0 0 20px white; box-shadow: 0 0 0 20px white;
box-sizing: border-box; box-sizing: border-box;
.trs{ .trs {
position: fixed; position: fixed;
top: 510* @toVw; top: 510 * @toVw;
width: 100%; width: 100%;
background: white; background: white;
left: 0; left: 0;
height: 30vh; height: 30vh;
} }
} }
.borderDiv{ .borderDiv {
position: fixed; position: fixed;
z-index: 1301; z-index: 1301;
top: 0; top: 0;
width: 100%; width: 100%;
pointer-events: none; pointer-events: none;
height: 510* @toVw; height: 510 * @toVw;
box-sizing: border-box; box-sizing: border-box;
border: 7 * @toVw solid white; border: 7 * @toVw solid white;
}
}
.share-page { .share-page {
position: fixed; position: fixed;
background: url("https://cdn.singsingenglish.com/new-sing/6c6766b21eceef9ddf36597efe3cc152f46ac7f0.png"); background: url("https://cdn.singsingenglish.com/new-sing/6c6766b21eceef9ddf36597efe3cc152f46ac7f0.png");
...@@ -720,7 +795,7 @@ export default { ...@@ -720,7 +795,7 @@ export default {
left: 0; left: 0;
// bottom: 0; // bottom: 0;
right: 0; right: 0;
min-height: 650* @toVw; min-height: 650 * @toVw;
z-index: 1300; z-index: 1300;
.share-block { .share-block {
position: absolute; position: absolute;
...@@ -814,7 +889,7 @@ export default { ...@@ -814,7 +889,7 @@ export default {
animation: pointMove 0.375s 0.5s ease; animation: pointMove 0.375s 0.5s ease;
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
.oimgPoint{ .oimgPoint {
position: absolute; position: absolute;
width: 85 * @toVw; width: 85 * @toVw;
top: -60 * @toVw; top: -60 * @toVw;
...@@ -886,12 +961,14 @@ export default { ...@@ -886,12 +961,14 @@ export default {
top: -14 * @toVw; top: -14 * @toVw;
color: white; color: white;
vertical-align: top; vertical-align: top;
display:flex; display: flex;
justify-content: center; justify-content: center;
// left: 50%; // left: 50%;
// margin-left: -112.5*@toVw; // margin-left: -112.5*@toVw;
span{margin: 0;} span {
.ellipsisCss{ margin: 0;
}
.ellipsisCss {
max-width: 86 * @toVw; max-width: 86 * @toVw;
} }
} }
...@@ -921,22 +998,25 @@ export default { ...@@ -921,22 +998,25 @@ export default {
} }
} }
} }
.qrbox{ .qrbox {
background: #1A9BDA; background: #1a9bda;
top: 514* @toVw; top: 514 * @toVw;
// top: 414* @toVw; // top: 414* @toVw;
color:white; color: white;
position: absolute; position: absolute;
left: 0; left: 0;
width: 100%; width: 100%;
display: flex; display: flex;
padding: 18 * @toVw; padding: 18 * @toVw;
box-sizing: border-box; box-sizing: border-box;
font-weight:bold; font-weight: bold;
p{font-size:18 * @toVw;margin-bottom: 10*@toVw;} p {
.left{ font-size: 18 * @toVw;
margin-bottom: 10 * @toVw;
}
.left {
flex: 1; flex: 1;
.point{ .point {
border: 1px solid white; border: 1px solid white;
height: 30 * @toVw; height: 30 * @toVw;
width: 191 * @toVw; width: 191 * @toVw;
...@@ -944,11 +1024,17 @@ export default { ...@@ -944,11 +1024,17 @@ export default {
line-height: 30 * @toVw; line-height: 30 * @toVw;
border-radius: 5 * @toVw; border-radius: 5 * @toVw;
margin-left: 0; margin-left: 0;
img{width: 14 * @toVw;position: relative;top: 2* @toVw;} img {
width: 14 * @toVw;
position: relative;
top: 2 * @toVw;
} }
} }
.right{ }
.right {
.qrcode {
border: 3px solid white;
}
} }
} }
.tips { .tips {
...@@ -964,7 +1050,7 @@ export default { ...@@ -964,7 +1050,7 @@ export default {
img { img {
width: 80%; width: 80%;
} }
.closeBox{ .closeBox {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -1004,7 +1090,7 @@ export default { ...@@ -1004,7 +1090,7 @@ export default {
height: 40 * @tocurrentvw; height: 40 * @tocurrentvw;
} }
} }
.pannel-main{ .pannel-main {
text-align: left; text-align: left;
margin-top: 18 * @toVw; margin-top: 18 * @toVw;
img { img {
...@@ -1012,26 +1098,27 @@ export default { ...@@ -1012,26 +1098,27 @@ export default {
vertical-align: text-bottom; vertical-align: text-bottom;
} }
} }
.pannel-footer{ .pannel-footer {
margin: 0; margin: 0;
img{ img {
position: relative; position: relative;
top: 2 * @toVw; top: 2 * @toVw;
width: 16 * @toVw; width: 16 * @toVw;
} }
} }
} }
.transparentBtn{ .transparentBtn {
margin-top: 30 * @toVw; margin-top: 30 * @toVw;
} }
} }
} }
</style> </style>
<style lang="less"> <style lang="less">
@import "../../util/public"; @import "../../util/public";
.van-toast{top:35%;} .van-toast {
.pannel-main{ top: 35%;
}
.pannel-main {
img { img {
height: 18 * @toVw; height: 18 * @toVw;
vertical-align: text-bottom; vertical-align: text-bottom;
......
...@@ -426,6 +426,7 @@ export default { ...@@ -426,6 +426,7 @@ export default {
// 神策埋点 点击操作 // 神策埋点 点击操作
if(this.currentTime){ if(this.currentTime){
this.$refs.videoDom.currentTime = this.currentTime this.$refs.videoDom.currentTime = this.currentTime
this.$refs.videoDom.play()
} }
this.$sa.track("watchClick", { this.$sa.track("watchClick", {
......
...@@ -37,9 +37,9 @@ Vue.component('scroll', scroll); ...@@ -37,9 +37,9 @@ Vue.component('scroll', scroll);
// Vue.prototype.$throw = (error)=> errorHandler(error,this); // Vue.prototype.$throw = (error)=> errorHandler(error,this);
/* eslint-disable no-new */ /* eslint-disable no-new */
// Vue.prototype.testAttr = 'testAttr' // Vue.prototype.testAttr = 'testAttr'
// if (process.env.NODE_ENV != 'production') { if (process.env.NODE_ENV != 'production') {
// new VConsole(); new VConsole();
// } }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
next() next()
......
...@@ -485,6 +485,14 @@ const router = new Router({ ...@@ -485,6 +485,14 @@ const router = new Router({
noNew: true, noNew: true,
} }
}, },
{
path: '/navShare',
name: 'navShare',
component: e => require(['@/components/newLesson/navShare'], e),
meta: {
noNew: true,
}
},
{ {
path: '*', path: '*',
component: () => import('@/components/error'), component: () => import('@/components/error'),
......
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