Commit e69929a8 authored by wangwei's avatar wangwei

神策 打包

parent 073d1181
...@@ -6,8 +6,8 @@ module.exports = merge(prodEnv, { ...@@ -6,8 +6,8 @@ module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
API_URL: '"/"', API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10', MAX_FILESIZE:'1024*1024*10',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"', IMAGE_URL_HEAD:'"http://cdn.changchangenglish.com/"',
BUY_URL:'"http://wechat.test.singsingenglish.com/#/buyDetail?"', BUY_URL:'"http://wechat.test.changchangenglish.com/#/buyDetail?"',
AUTHOR_UEL:'"http://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://192.168.31.242:8085/#/"', AUTHOR_UEL:'"http://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://192.168.31.242:8085/#/"',
REDIRECT_URL:'"http://localhost:8085/"', REDIRECT_URL:'"http://localhost:8085/"',
}); });
<template> <template xmlns:v-clipboard="http://www.w3.org/1999/xhtml">
<div class="group-index" ref="index" v-if="groupDetail" style="background-color: #fda813;"> <div class="group-index" ref="index" v-if="groupDetail" style="background-color: #fda813;">
<div> <div>
<img class="tips" :src="tipsUrl"/> <img class="tips" :src="tipsUrl"/>
......
...@@ -5,22 +5,35 @@ ...@@ -5,22 +5,35 @@
</div> </div>
<div class="bg-desc"> <div class="bg-desc">
</div> </div>
<div class="content" :style="{backgroundImage:`url('${shareConBg}')`}"> <div class="content" v-if="userDetail" :style="{backgroundImage:`url('${shareConBg}')`}">
<div class="main-content"> <div class="main-content">
<div class="head-block"> <div class="head-block">
<img src="http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKY2qKktZffhlfqtXG1XcxFsGMm9Id63PnwhKH1p40ibDH2IGusbibnib4gg2RgUyLz21BsEzR7SyqDg/132"/> <img :src="userDetail.avatar"/>
</div> </div>
<div class="content-title" :style="{backgroundImage:`url('${shareTitle}')`}"> <div class="content-title" :style="{backgroundImage:`url('${shareTitle}')`}">
{{userDetail.nickname}}
</div> </div>
<div> <div class="main-text">
<div class="title">累计学习</div>
<div v-if="watchDetail" class="day">
{{watchDetail.total_day}} <span>Days</span>
</div>
</div>
<div class="main-desc">
<span>
继续坚持
</span>
<br>
学无涯 行必知
</div> </div>
</div> </div>
<div class="main-content-desc"> <div class="main-content-desc">
<img :src="share_code_bg">
</div> </div>
</div> </div>
<div class="share-btn">
<img :src="shareBtn"/>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -29,13 +42,35 @@ ...@@ -29,13 +42,35 @@
import shareBg from '../../assets/newLesson/shareBg.png' import shareBg from '../../assets/newLesson/shareBg.png'
import shareConBg from '../../assets/newLesson/shareConBg.png' import shareConBg from '../../assets/newLesson/shareConBg.png'
import shareTitle from '../../assets/newLesson/shareTitle.png' import shareTitle from '../../assets/newLesson/shareTitle.png'
import shareBtn from '../../assets/newLesson/share_button.png'
import {getUserDetailApi,getUserWatchApi} from "../../service/api";
import share_code_bg from '../../assets/newLesson/share-code-bg.png'
export default { export default {
name: "share", name: "share",
data(){ data(){
return { return {
shareBg:shareBg, shareBg:shareBg,
shareConBg:shareConBg, shareConBg:shareConBg,
shareTitle:shareTitle shareTitle:shareTitle,
shareBtn:shareBtn,
userDetail:null,
watchDetail:null,
share_code_bg:share_code_bg
}
},
mounted(){
this.initPage()
},
methods:{
initPage(){
getUserDetailApi().then(res=>{
res.avatar = res.avatar.replace('http://','https://');
this.userDetail = res;
getUserWatchApi().then(res=>{
this.watchDetail = res
})
})
} }
} }
} }
...@@ -44,7 +79,7 @@ ...@@ -44,7 +79,7 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.share-page{ .share-page{
position: absolute; position: fixed;
background: #EEEEEE; background: #EEEEEE;
top: 0; top: 0;
left: 0; left: 0;
...@@ -58,6 +93,7 @@ ...@@ -58,6 +93,7 @@
left: 20*@toVw; left: 20*@toVw;
right: 20*@toVw; right: 20*@toVw;
bottom: 20*@toVw; bottom: 20*@toVw;
overflow: auto;
.bg-title{ .bg-title{
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -90,6 +126,47 @@ ...@@ -90,6 +126,47 @@
background: white; background: white;
border-radius: 8*@toVw; border-radius: 8*@toVw;
position: relative; position: relative;
.main-text{
padding-top: 100*@toVw;
width: 215*@toVw;
text-align: center;
margin: auto;
border-bottom: 1*@toVw solid #EEEEEE;
.title{
font-size:16*@toVw;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(51,51,51,1);
}
.day{
font-size:48px;
margin: 5*@toVw 0;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(105,192,255,1);
span{
font-size:20px;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(105,192,255,1);
}
}
}
.main-desc{
margin-top: 10*@toVw;
text-align: center;
font-size:12px;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(0,0,0,1);
span{
font-size:16px;
font-family:PingFang-SC-Medium;
font-weight:500;
display: inline-block;
margin: 0 0 5*@toVw 0;
}
}
.head-block{ .head-block{
position: absolute; position: absolute;
height: 85*@toVw; height: 85*@toVw;
...@@ -121,12 +198,22 @@ ...@@ -121,12 +198,22 @@
margin-left: -112.5*@toVw; margin-left: -112.5*@toVw;
} }
} }
.share-btn{
margin-top: 22*@toVw;
text-align: center;
img{
width: 240*@toVw;
}
}
.main-content-desc{ .main-content-desc{
width: 261*@toVw; width: 261*@toVw;
height: 82*@toVw; height: 82*@toVw;
background: white; background: white;
border-radius: 8*@toVw; border-radius: 8*@toVw;
margin-top: 10*@toVw; margin-top: 10*@toVw;
img{
width: 100%;
}
} }
} }
} }
......
<template>
<div>
<div class="share-good-head" v-if="userDetail" :style="{backgroundImage:`url('${shareGoodsBg}')`}">
<img class="head" :src="userDetail.user_info.avatar">
<div class="title" :style="{backgroundImage:`url('${title_share_goods}')`}" >
{{userDetail.user_info.nickname}}
</div>
<div class="day">
{{userDetail.total_day}}
<span>
Days
</span>
</div>
<div class="iknow" @click="toBuy">
</div>
</div>
<div class="good-content" v-if="goodsDetail">
<div class="content" v-html="goodsDetail.desc.detail">
</div>
<div class="btn-block">
<div class="btn" @click="toBuy">
了解一下
</div>
</div>
</div>
</div>
</template>
<script>
import shareGoodsBg from '../../assets/newLesson/shareGoodsBg.png'
import title_share_goods from '../../assets/newLesson/title-share-goods.png'
import {getOtherUserWatchApi,getShareGoodsApi,getGoodsDetailApi} from "../../service/api";
export default {
name: "shareGoods",
data(){
return {
shareGoodsBg:shareGoodsBg,
title_share_goods:title_share_goods,
userDetail:null,
shopId:null,
goodsDetail:null
}
},
methods:{
initPage(){
getOtherUserWatchApi(this.$route.query.userID).then(res=>{
res.user_info.avatar = res.user_info.avatar.replace('http://','https://');
this.userDetail = res
});
getShareGoodsApi().then(res=>{
this.shopId = res[0].value;
getGoodsDetailApi(this.shopId).then(res=>{
res.desc = JSON.parse(res.desc)
this.goodsDetail = res
})
})
},
toBuy(){
window.location.href = process.env.BUY_URL + 'shopId=' + this.shopId
}
},
mounted(){
this.initPage()
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.share-good-head{
width: 100%;
height: 584*@toVw;
margin-top: -64*@toVw;
background-size: 100% 100%;
position: relative;
.iknow{
position: absolute;
top: 460*@toVw;
width: 200*@toVw;
height: 44*@toVw;
left: 87*@toVw;
}
.head{
position: absolute;
width: 70*@toVw;
height: 70*@toVw;
top: 155*@toVw;
left: 153*@toVw;
border-radius: 100*@toVw;
}
.title{
position: absolute;
width: 225*@toVw;
height: 54*@toVw;
background-size: 100% 100%;
top: 215*@toVw;
left: 75*@toVw;
text-align: center;
color: white;
font-size: 20*@toVw;
line-height: 48*@toVw;
}
.day{
position: absolute;
top: 320*@toVw;
width: 100%;
text-align: center;
color: #069777;
font-size:48*@toVw;
font-family:PingFang-SC-Bold;
font-weight:bold;
span{
font-size:20*@toVw;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(6,151,119,1);
}
}
}
.good-content{
background: #00E0AE;
padding: 0 20*@toVw 0*@toVw 20*@toVw;
.content{
background: white;
border-radius: 8*@toVw;
padding: 10*@toVw;
};
}
.btn-block{
padding:8*@toVw;
.btn{
width: 287*@toVw;
height: 44*@toVw;
margin: auto;
background: #FF785D;
border-radius: 100*@toVw;
color: white;
line-height: 44*@toVw;
text-align: center;
font-size:16px;
font-family:PingFang-SC-Medium;
font-weight:500;
}
}
</style>
<style>
img{
max-width: 100% !important;
}
</style>
...@@ -44,7 +44,10 @@ ...@@ -44,7 +44,10 @@
</div> </div>
</mt-popup> </mt-popup>
<guide-block/> <guide-block/>
<share-page/> <div v-if="share_show">
<img :src="share_close" class="close-share-show" @click="share_show = false"/>
<share-page/>
</div>
</div> </div>
</template> </template>
...@@ -53,6 +56,7 @@ ...@@ -53,6 +56,7 @@
import luolacoming from '../../assets/newLesson/luoLacoming.png' import luolacoming from '../../assets/newLesson/luoLacoming.png'
import luolalaila from '../../assets/newLesson/luolalaila.png' import luolalaila from '../../assets/newLesson/luolalaila.png'
import guideBlock from '../guide/video' import guideBlock from '../guide/video'
import share_close from '../../assets/newLesson/share_close.png'
import {subUserLessonApi} from "../../service/api"; import {subUserLessonApi} from "../../service/api";
import tapToAudio from '../../assets/tapToAudio.png' import tapToAudio from '../../assets/tapToAudio.png'
import finishStuat from '../../assets/newLesson/finishStudy.png' import finishStuat from '../../assets/newLesson/finishStudy.png'
...@@ -70,6 +74,8 @@ ...@@ -70,6 +74,8 @@
finishStuat:finishStuat, finishStuat:finishStuat,
popupVisible:false, popupVisible:false,
ageShow:false, ageShow:false,
share_close:share_close,
share_show:false,
showObj:{ showObj:{
video:[], video:[],
change:false change:false
...@@ -107,7 +113,7 @@ ...@@ -107,7 +113,7 @@
if((Number(lookTime) + Number(lessonDetail.total_watch_time))/60 < 7){ if((Number(lookTime) + Number(lessonDetail.total_watch_time))/60 < 7){
this.popupVisible = true this.popupVisible = true
}else{ }else{
this.share_show = true
} }
}, },
videoEnd(event){ videoEnd(event){
...@@ -144,6 +150,13 @@ ...@@ -144,6 +150,13 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.close-share-show{
position: fixed;
z-index: 9999;
top: 18*@toVw;
right: 12*@toVw;
width: 20*@toVw;
}
.playImage{background:url('https://static-cdn.changchangenglish.com/new-sing/static/images/playImage.png') no-repeat;background-size:40*@toVw 189*@toVw;display: inline-block} .playImage{background:url('https://static-cdn.changchangenglish.com/new-sing/static/images/playImage.png') no-repeat;background-size:40*@toVw 189*@toVw;display: inline-block}
._154722344142123489{height:5*@toVw;width:9*@toVw;background-position:0 0;} ._154722344142123489{height:5*@toVw;width:9*@toVw;background-position:0 0;}
._282918034425091245{height:8*@toVw;width:9*@toVw;background-position:0 -4*@toVw;vertical-align: bottom} ._282918034425091245{height:8*@toVw;width:9*@toVw;background-position:0 -4*@toVw;vertical-align: bottom}
......
...@@ -21,7 +21,15 @@ const router =new Router({ ...@@ -21,7 +21,15 @@ const router =new Router({
meta:{ meta:{
deep:0 deep:0
} }
}, { },
{
path: '/shareGoods',
name: 'shareGoods',
component: e=>require(['@/components/newLesson/shareGoods'],e),//
meta:{
deep:0
}
},{
path: '/myGoodsList', path: '/myGoodsList',
name: 'myGoodsList', name: 'myGoodsList',
component: e=>require(['@/components/myGoodsList'],e), component: e=>require(['@/components/myGoodsList'],e),
......
...@@ -176,3 +176,15 @@ export const delUserCollectApi = function (id) { ...@@ -176,3 +176,15 @@ export const delUserCollectApi = function (id) {
return Vue.prototype.$put(delUserCollectUrl+id) return Vue.prototype.$put(delUserCollectUrl+id)
}; };
// 获取他人看课统计
const getOtherUserWatchUrl = `/api/client/user/watch/report/`;
export const getOtherUserWatchApi = function (id) {
return Vue.prototype.$fetch(getOtherUserWatchUrl+id)
};
// 获取分享商品
const getShareGoodsUrl = '/api/client/share/goods';
export const getShareGoodsApi = function () {
return Vue.prototype.$fetch(getShareGoodsUrl)
};
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