814

parent b2d59fb4
......@@ -11,4 +11,4 @@
position: fixed;
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>
\ No newline at end of file
/* 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
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:""}])}});
\ No newline at end of file
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
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}}([]);
\ No newline at end of file
!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
<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>
<div >
<div>
<div class="share-page" id="capture">
<div class="share-block">
<div class="content" v-if="userDetail" ref="imageWrapper" >
<!-- <img :src="shareConBg" class="content-black"/> -->
<div class="main-content">
<div class="topBox">
<img class="shareTitle" :src="shareTitle" />
<div class="head-block">
<img :src="userDetail.avatar" />
</div>
<div class="content-title"> <span class="ellipsisCss">{{userDetail.nickname}}</span> <span>家宝宝</span> </div>
</div>
<div class="main-text">
<div v-if="watchDetail" class="item">
<div class>
<img :src="icon_day" alt />
<div class="share-block">
<div class="content" v-if="userDetail" ref="imageWrapper">
<!-- <img :src="shareConBg" class="content-black"/> -->
<div class="main-content">
<div class="topBox">
<img class="shareTitle" :src="shareTitle" />
<div class="head-block">
<img :src="userDetail.avatar" />
</div>
<div class="text1">已在唱唱学习</div>
<div class="text2">
<span>{{watchDetail.total_day}}</span>
<div class="content-title">
<span class="ellipsisCss">{{userDetail.nickname}}</span>
<span>家宝宝</span>
</div>
</div>
<div v-if="watchDetail" class="item">
<div class>
<img :src="icon_min" alt />
<div class="main-text">
<div v-if="watchDetail" class="item">
<div class>
<img :src="icon_day" alt />
</div>
<div class="text1">已在唱唱学习</div>
<div class="text2">
<span>{{watchDetail.total_day}}</span>
</div>
</div>
<div class="text1">今天学习了</div>
<div class="text2">
<span>{{minute}}</span>分钟
</div>
</div>
<div v-if="watchDetail" class="item">
<div class>
<img :src="icon_baby" alt />
<div v-if="watchDetail" class="item">
<div class>
<img :src="icon_min" alt />
</div>
<div class="text1">今天学习了</div>
<div class="text2">
<span>{{minute}}</span>分钟
</div>
</div>
<div class="text1">超过了</div>
<div class="text2">
<span>{{percent}}%</span>
<br />同龄人
<div v-if="watchDetail" class="item">
<div class>
<img :src="icon_baby" alt />
</div>
<div class="text1">超过了</div>
<div class="text2">
<span>{{percent}}%</span>
<br />同龄人
</div>
</div>
</div>
<img class="img_link" :src="img_link" alt />
<img class="imgPoint" :src="imgPoint" alt />
<img class="oimgPoint" v-if="oimgPoint" :src="imgPoint" alt />
</div>
<div class="sing-content">
<div class="text1">今日童谣主题</div>
<div class="text2">{{lesson.title}}</div>
<div class="text3">{{lesson.domTitle}}</div>
</div>
<img class="img_link" :src="img_link" alt />
<img class="imgPoint" :src="imgPoint" alt />
<img class="oimgPoint" v-if="oimgPoint" :src="imgPoint" alt />
</div>
<div class="sing-content">
<div class="text1">今日童谣主题</div>
<div class="text2">{{lesson.title}}</div>
<div class="text3">{{lesson.domTitle}}</div>
</div>
</div>
</div>
<div class='qrbox'>
<div class="left">
<p>唱唱启蒙英语</p>
<p>0-6岁宝宝英语启蒙必备</p>
<div class='point'>
长按扫码&nbsp;&nbsp;领取课程&nbsp;&nbsp; <img :src="icon_right" />
</div>
</div>
<div class='right'>
<div id="qrcode" class="qrcode"></div>
<div class="qrbox">
<div class="left">
<p>唱唱启蒙英语</p>
<p>0-6岁宝宝英语启蒙必备</p>
<div class="point">
长按扫码&nbsp;&nbsp;领取课程&nbsp;&nbsp;
<img :src="icon_right" />
</div>
</div>
<div class="tips" v-if="shareVisible" >
<div class="closeBox" @click="shareVisible=false"></div>
<img :src="share_tips" />
<!-- <div class="pannel">
<div class="right">
<div id="qrcode" class="qrcode"></div>
</div>
</div>
<div class="tips" v-if="shareVisible">
<div class="closeBox" @click="shareVisible=false"></div>
<img :src="share_tips" />
<!-- <div class="pannel">
<div class="pannel-container">
<div class="pannel-header">
<img src="../../assets/icon_copy.png" alt />
......@@ -83,20 +87,20 @@
<div @click="copyText" class='transparentBtn'>
复制心得
</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>
<div class='borderDiv'>
<img class="canvasImg" @touchstart="touchStart" @touchend="touchEnd" :src="canvasData" alt />
<div class="white-pannel">
<div class="trs"></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;
<span>保存图片·分享至朋友圈</span>
</div>
<div class="share_close" @click="$emit('closeShare')">×</div>
</div>-->
<div class="share_close" @click="$emit('closeShare')">×</div>
</div>
</template>
......@@ -114,6 +118,7 @@ import great from "../../assets/newLesson/great.png";
import perfect from "../../assets/newLesson/perfect.png";
import icon_change from "../../assets/newLesson/icon_change@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 html2canvas from "html2canvas";
import {
......@@ -129,9 +134,9 @@ export default {
name: "share",
data() {
return {
oimgPoint:false,
canvasData:'',
QRCodeB:'',
oimgPoint: false,
canvasData: "",
QRCodeB: "",
img_link: img_link,
shareVisible: false,
shareBg: shareBg,
......@@ -141,6 +146,7 @@ export default {
icon_baby: icon_baby,
icon_day: icon_day,
icon_min: icon_min,
img_show: img_show,
userDetail: null,
dataURL: null,
watchDetail: null,
......@@ -150,13 +156,14 @@ export default {
imgPoint: good,
minute: "",
percent: 0,
saveTime:'',
lastTime:'',
icon_change:icon_change,
textIndex:1,
textContent:'',
htmlContent: '',
icon_right:icon_right
saveTime: "",
lastTime: "",
icon_change: icon_change,
textIndex: 1,
textContent: "",
htmlContent: "",
icon_right: icon_right,
timeout: ""
};
},
props: ["contentData"],
......@@ -165,50 +172,97 @@ export default {
Toast.loading({
mask: true,
message: "",
duration:300
duration: 300
});
this.initPage();
},
beforeDestroy(){
console.log(Date.parse(new Date())-this.lastTime);
this.lesson.nowTime += Date.parse(new Date())-this.lastTime
beforeDestroy() {
console.log(Date.parse(new Date()) - this.lastTime);
this.lesson.nowTime += Date.parse(new Date()) - this.lastTime;
localStorage.setItem("lessonDetail", JSON.stringify(this.lesson));
console.log(this.lesson.nowTime);
},
methods: {
touchStart(){
// console.log(Date.parse(new Date()),'touchStart')
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(){
// console.log(Date.parse(new Date()),'touchEnd')
touchEnd() {
clearInterval(this.timeout);
},
copyText(){
copyText() {
this.$sa.track("buttonClick", {
tabTitle: "打卡商品页",
moduleTitle: "功能按钮",
buttonType: "按钮点击",
buttonName: "复制心得"
});
this.$copyText(this.textContent).then(e=>{
Toast('复制成功')
})
this.$copyText(this.textContent).then(e => {
Toast("复制成功");
});
},
changeText(){
if(this.textIndex==1){
this.textContent = `我是${this.userDetail.nickname},我家宝宝正在唱唱启蒙英语学习,已坚持${this.watchDetail.total_day}天啦,宝宝的英语一天比一天有进步了,成就感满满,继续坚持[拳头]~`
this.textIndex = 2
}else if (this.textIndex==2) {
this.textContent = `陪宝宝在唱唱启蒙英语学习的第${this.watchDetail.total_day}天,宝宝又学会了一首新童谣《${this.lesson.title}》,每天都有新收获,坚持就是胜利,练就英语小神童[胜利]`
this.textIndex = 3
}else{
this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语👉【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!`
this.textIndex = 1
changeText() {
if (this.textIndex == 1) {
this.textContent = `我是${this.userDetail.nickname},我家宝宝正在唱唱启蒙英语学习,已坚持${this.watchDetail.total_day}天啦,宝宝的英语一天比一天有进步了,成就感满满,继续坚持[拳头]~`;
this.textIndex = 2;
} else if (this.textIndex == 2) {
this.textContent = `陪宝宝在唱唱启蒙英语学习的第${this.watchDetail.total_day}天,宝宝又学会了一首新童谣《${this.lesson.title}》,每天都有新收获,坚持就是胜利,练就英语小神童[胜利]`;
this.textIndex = 3;
} else {
this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语👉【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!`;
this.textIndex = 1;
}
},
showShare() {
this.shareVisible = true;
// this.$refs.audioDom.play()
this.playAudio()
this.playAudio();
this.$sa.track("watchClick", {
dayModule: JSON.parse(
localStorage.getItem("lessonDetail")
......@@ -246,88 +300,90 @@ export default {
console.log(this.watchDetail, 170);
console.log(this.lesson);
this.lastTime = Date.parse(new Date());
clearInterval(this.$store.state.timeout)
clearInterval(this.$store.state.timeout);
this.userDetail = JSON.parse(localStorage.getItem("userDesc"));
this.minute = ( this.watchDetail.stay_time / 60).toFixed();
// this.minute = (600/60).toFixed()
if (this.minute < 1) {
this.minute = 1;
}
// this.minute<1?1:1
if (this.minute < 8) {
this.imgPoint = good;
this.$store.dispatch('setLookStatus',0)
if (this.minute < 5) {
this.percent = 75 + Math.floor(49 * Math.random()) / 10;
} else {
this.percent = 81 + Math.floor(89 * Math.random()) / 10;
}
} else if (this.minute <= 12) {
this.$store.dispatch('setLookStatus',1)
this.percent = 91 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = great;
this.minute = (this.watchDetail.stay_time / 60).toFixed();
// this.minute = (600/60).toFixed()
if (this.minute < 1) {
this.minute = 1;
}
// this.minute<1?1:1
if (this.minute < 8) {
this.imgPoint = good;
this.$store.dispatch("setLookStatus", 0);
if (this.minute < 5) {
this.percent = 75 + Math.floor(49 * Math.random()) / 10;
} else {
this.$store.dispatch('setLookStatus',2)
console.log(Math.floor(39 * Math.random()));
this.percent = 96 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = perfect;
this.percent = 81 + Math.floor(89 * Math.random()) / 10;
}
// Toast.clear();
let query = JSON.parse(sessionStorage.getItem("classQuery"));
let obj = {
user_id: this.userDetail.user_id,
minute: this.minute,
percent: this.percent,
title: this.lesson.title,
domTitle: this.lesson.domTitle,
category_id: query.category_id
};
// let URL =
// process.env.API_URL +
// "#/shareGoods?info=" +
// encodeURIComponent(JSON.stringify(obj));
let URL =
'https://wechat.changchangenglish.com/' +
"#/shareGoods?info=" +
encodeURIComponent(JSON.stringify(obj));
console.log(URL);
this.onShare(URL);
this.toDataURLBase64(
this.userDetail.avatar.replace("http://", "https://"),
avatar => {
this.toDataURLBase64(this.shareConBg, cal => {
this.shareConBg = cal;
this.userDetail.avatar = avatar;
this.$nextTick(() => {
// this.$refs.share_image.initPage();
});
} else if (this.minute <= 12) {
this.$store.dispatch("setLookStatus", 1);
this.percent = 91 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = great;
} else {
this.$store.dispatch("setLookStatus", 2);
console.log(Math.floor(39 * Math.random()));
this.percent = 96 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = perfect;
}
// Toast.clear();
let query = JSON.parse(sessionStorage.getItem("classQuery"));
let obj = {
user_id: this.userDetail.user_id,
minute: this.minute,
percent: this.percent,
title: this.lesson.title,
domTitle: this.lesson.domTitle,
category_id: query.category_id
};
let URL = `${process.env.API_URL}#/navShare?invite_code=CC-UDK-${this.userDetail.user_id}`;
// let URL =
// 'https://wechat.changchangenglish.com/' +
// "#/shareGoods?info=" +
// encodeURIComponent(JSON.stringify(obj));
console.log(URL);
this.onShare(URL);
this.toDataURLBase64(
this.userDetail.avatar.replace("http://", "https://"),
avatar => {
this.toDataURLBase64(this.shareConBg, cal => {
this.shareConBg = cal;
this.userDetail.avatar = avatar;
this.$nextTick(() => {
// this.$refs.share_image.initPage();
});
}
);
this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!`;
this.qrcode(URL)
let that = this
setTimeout(()=>{
this.oimgPoint=true
},900)
setTimeout(()=>{
that.$nextTick(()=>{
if(document.getElementById('capture')){
html2canvas(document.getElementById('capture'),{
async: true,
scrollX:0,
scale: 2,
letterRendering: true,
useCORS:true,
logging:true
}).then((canvas) => {
this.divShow = false;
let dataURL = canvas.toDataURL("image/jpg",1.0);
this.canvasData = dataURL
}).catch(res=>{alert(res);console.log()});
}
});
}
);
this.textContent = `我是${this.userDetail.nickname},我正在参加唱唱启蒙英语【${this.lesson.course_title}】打卡活动,打卡第${this.watchDetail.total_day}天,我坚持,我最棒[强]!`;
this.qrcode(URL);
let that = this;
setTimeout(() => {
this.oimgPoint = true;
}, 900);
setTimeout(() => {
that.$nextTick(() => {
if (document.getElementById("capture")) {
html2canvas(document.getElementById("capture"), {
async: true,
scrollX: 0,
scale: 2,
letterRendering: true,
useCORS: true,
logging: true
})
.then(canvas => {
this.divShow = false;
let dataURL = canvas.toDataURL("image/jpg", 1.0);
this.canvasData = dataURL;
})
},1800)
.catch(res => {
alert(res);
console.log();
});
}
});
}, 1200);
},
enableShare: function(option) {
let query = JSON.parse(sessionStorage.getItem("classQuery"));
......@@ -610,19 +666,21 @@ export default {
};
},
qrcode(data) {
let spx = document.body.clientWidth/375
// debugger
let spx = document.body.clientWidth / 375;
if (this.QRCodeB) {
this.QRCodeB.makeCode(data);
} else {
this.QRCodeB = new QRCode("qrcode", {
width: 103*spx,
height: 103*spx, // 高度
width: 100 * spx,
height: 100 * spx, // 高度
text: data, // 二维码内容
image: ""
image: "",
errorCorrectionLevel: "L"
});
}
},
playAudio(){
playAudio() {
// this.$refs.audioDom.load()
// this.$refs.audioDom.play()
}
......@@ -633,85 +691,102 @@ export default {
@import "../../util/public";
@tocurrentvw : 1/2 * @toVw;
@tocurrentvh : 1/2 * @toVh;
.share_close {
.share_close {
position: fixed;
width: 20 * @toVw;
top: 26 * @toVw;
right: 14 * @toVw;
z-index: 1301;
color: white;
font-size: 16 * @toVw;
}
.imgTip {
position: fixed;
top: 515 * @toVw;
left: 91 * @toVw;
z-index: 1301;
width: 190 * @toVw;
pointer-events: none;
}
.share-btn {
position: fixed;
top: 510 * @toVw;
left: 31 * @toVw;
z-index: 1301;
text-align: center;
width: 314 * @toVw;
height: 49 * @toVw;
display: flex;
justify-content: center;
background: linear-gradient(
0deg,
rgba(243, 180, 3, 1) 1%,
rgba(252, 231, 171, 1) 100%
);
text-shadow: 0px 1 * @toVw 1 * @toVw rgba(170, 127, 4, 0.7);
// box-shadow:0px 3*@toVw 16*@toVw 0px rgba(200,96,37,0.59);
border-radius: 22 * @toVw;
color: white;
line-height: 49 * @toVw;
font-size: 18 * @toVw;
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%
);
box-shadow: 0px 3px 16px 0px rgba(250, 208, 88, 0.59);
.iconfont {
font-size: 22 * @toVw;
margin: 0;
}
img {
width: 270 * @toVw;
}
span {
font-weight: 580;
font-weight: bold;
margin: 0;
}
}
.canvasImg {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1300;
}
.white-pannel {
position: fixed;
z-index: 1301;
top: 0;
width: 100%;
height: 510 * @toVw;
background: transparent;
pointer-events: none;
border: 7 * @toVw solid white;
border-radius: 12 * @toVw;
box-shadow: 0 0 0 20px white;
box-sizing: border-box;
.trs {
position: fixed;
width: 20 * @toVw;
top: 26 * @toVw;
right: 14 * @toVw;
z-index: 1301;
color: white;
font-size: 16 * @toVw;
top: 510 * @toVw;
width: 100%;
background: white;
left: 0;
height: 30vh;
}
.share-btn {
position: fixed;
top: 510 * @toVw;
left: 31 * @toVw;
z-index: 1301;
text-align: center;
width: 314 * @toVw;
height: 49 * @toVw;
display: flex;
justify-content: center;
background: linear-gradient(
0deg,
rgba(243, 180, 3, 1) 1%,
rgba(252, 231, 171, 1) 100%
);
text-shadow: 0px 1 * @toVw 1 * @toVw rgba(170, 127, 4, 0.7);
// box-shadow:0px 3*@toVw 16*@toVw 0px rgba(200,96,37,0.59);
border-radius: 22 * @toVw;
color: white;
line-height: 49 * @toVw;
font-size: 18 * @toVw;
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%);
box-shadow:0px 3px 16px 0px rgba(250,208,88,0.59);
.iconfont {
font-size: 22 * @toVw;
margin: 0;
}
img {
width: 270 * @toVw;
}
span {
font-weight: 580;
font-weight: bold;
margin: 0;
}
}
.canvasImg{position: fixed;top:0;left:0;width:100%;z-index: 1300;}
.white-pannel{
position: fixed;
z-index: 1301;
top: 0;
width: 100%;
height: 510* @toVw;
background: transparent;
pointer-events: none;
border: 7 * @toVw solid white;
border-radius:12 * @toVw;
box-shadow: 0 0 0 20px white;
box-sizing: border-box;
.trs{
position: fixed;
top: 510* @toVw;
width: 100%;
background: white;
left: 0;
height: 30vh;
}
}
.borderDiv{
position: fixed;
z-index: 1301;
top: 0;
width: 100%;
pointer-events: none;
height: 510* @toVw;
box-sizing: border-box;
border: 7 * @toVw solid white;
}
}
.borderDiv {
position: fixed;
z-index: 1301;
top: 0;
width: 100%;
pointer-events: none;
height: 510 * @toVw;
box-sizing: border-box;
border: 7 * @toVw solid white;
}
.share-page {
position: fixed;
background: url("https://cdn.singsingenglish.com/new-sing/6c6766b21eceef9ddf36597efe3cc152f46ac7f0.png");
......@@ -720,7 +795,7 @@ export default {
left: 0;
// bottom: 0;
right: 0;
min-height: 650* @toVw;
min-height: 650 * @toVw;
z-index: 1300;
.share-block {
position: absolute;
......@@ -814,7 +889,7 @@ export default {
animation: pointMove 0.375s 0.5s ease;
animation-fill-mode: forwards;
}
.oimgPoint{
.oimgPoint {
position: absolute;
width: 85 * @toVw;
top: -60 * @toVw;
......@@ -886,12 +961,14 @@ export default {
top: -14 * @toVw;
color: white;
vertical-align: top;
display:flex;
display: flex;
justify-content: center;
// left: 50%;
// margin-left: -112.5*@toVw;
span{margin: 0;}
.ellipsisCss{
span {
margin: 0;
}
.ellipsisCss {
max-width: 86 * @toVw;
}
}
......@@ -921,22 +998,25 @@ export default {
}
}
}
.qrbox{
background: #1A9BDA;
top: 514* @toVw;
.qrbox {
background: #1a9bda;
top: 514 * @toVw;
// top: 414* @toVw;
color:white;
color: white;
position: absolute;
left: 0;
width: 100%;
display: flex;
padding: 18 * @toVw;
box-sizing: border-box;
font-weight:bold;
p{font-size:18 * @toVw;margin-bottom: 10*@toVw;}
.left{
font-weight: bold;
p {
font-size: 18 * @toVw;
margin-bottom: 10 * @toVw;
}
.left {
flex: 1;
.point{
.point {
border: 1px solid white;
height: 30 * @toVw;
width: 191 * @toVw;
......@@ -944,11 +1024,17 @@ export default {
line-height: 30 * @toVw;
border-radius: 5 * @toVw;
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 {
......@@ -964,7 +1050,7 @@ export default {
img {
width: 80%;
}
.closeBox{
.closeBox {
position: absolute;
top: 0;
left: 0;
......@@ -973,65 +1059,66 @@ export default {
}
}
.pannel {
width: 616 * @tocurrentvw;
height: 380 * @tocurrentvw;
border-radius: 16 * @tocurrentvw;
position: fixed;
z-index: 2;
top: 48vh;
left: 67 * @tocurrentvw;
border: 2 * @tocurrentvw dashed #fff;
color: white;
.pannel-container {
width: 558 * @tocurrentvw;
height: 324 * @tocurrentvw;
margin: 28 * @tocurrentvw;
// background-color: pink;
width: 616 * @tocurrentvw;
height: 380 * @tocurrentvw;
border-radius: 16 * @tocurrentvw;
position: fixed;
z-index: 2;
top: 48vh;
left: 67 * @tocurrentvw;
border: 2 * @tocurrentvw dashed #fff;
color: white;
.pannel-container {
width: 558 * @tocurrentvw;
height: 324 * @tocurrentvw;
margin: 28 * @tocurrentvw;
// background-color: pink;
display: flex;
flex-direction: column;
justify-content: flex-start;
.pannel-header {
display: flex;
flex-direction: column;
justify-content: flex-start;
.pannel-header {
display: flex;
margin: 0;
align-items: center;
margin: 0;
align-items: center;
height: 40 * @tocurrentvw;
font-size: 28 * @tocurrentvw;
color: #fff;
text-align: left;
img {
display: block;
width: 38 * @tocurrentvw;
height: 40 * @tocurrentvw;
font-size: 28 * @tocurrentvw;
color: #fff;
text-align: left;
img {
display: block;
width: 38 * @tocurrentvw;
height: 40 * @tocurrentvw;
}
}
.pannel-main{
text-align: left;
margin-top: 18 * @toVw;
img {
height: 18 * @toVw;
vertical-align: text-bottom;
}
}
.pannel-footer{
margin: 0;
img{
position: relative;
top: 2 * @toVw;
width: 16 * @toVw;
}
}
.pannel-main {
text-align: left;
margin-top: 18 * @toVw;
img {
height: 18 * @toVw;
vertical-align: text-bottom;
}
}
.transparentBtn{
margin-top: 30 * @toVw;
.pannel-footer {
margin: 0;
img {
position: relative;
top: 2 * @toVw;
width: 16 * @toVw;
}
}
}
.transparentBtn {
margin-top: 30 * @toVw;
}
}
}
</style>
<style lang="less">
@import "../../util/public";
.van-toast{top:35%;}
.pannel-main{
@import "../../util/public";
.van-toast {
top: 35%;
}
.pannel-main {
img {
height: 18 * @toVw;
vertical-align: text-bottom;
......
......@@ -426,6 +426,7 @@ export default {
// 神策埋点 点击操作
if(this.currentTime){
this.$refs.videoDom.currentTime = this.currentTime
this.$refs.videoDom.play()
}
this.$sa.track("watchClick", {
......
......@@ -37,9 +37,9 @@ Vue.component('scroll', scroll);
// Vue.prototype.$throw = (error)=> errorHandler(error,this);
/* eslint-disable no-new */
// Vue.prototype.testAttr = 'testAttr'
// if (process.env.NODE_ENV != 'production') {
// new VConsole();
// }
if (process.env.NODE_ENV != 'production') {
new VConsole();
}
router.beforeEach((to, from, next) => {
next()
......
......@@ -485,6 +485,14 @@ const router = new Router({
noNew: true,
}
},
{
path: '/navShare',
name: 'navShare',
component: e => require(['@/components/newLesson/navShare'], e),
meta: {
noNew: true,
}
},
{
path: '*',
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