Commit ac87ee1e authored by wangwei's avatar wangwei

星星修改

parent c198c9a6
......@@ -30,7 +30,7 @@
</template>
<script>
import {sendMobileCodeApi,bindMobileApi} from "../service/api";
import {sendMobileCodeApi,getUserDetailApi,bindMobileApi} from "../service/api";
import logoUrl from '../assets/logo.png'
import { Toast } from 'mint-ui';
import common from '../util/common'
......@@ -165,13 +165,16 @@
if(window.location.href.indexOf('teacher_id') > -1){
json.teacher_id = common.getUrlParam().teacher_id || this.$route.query.teacher_id
}
bindMobileApi(json).then(res=>{
bindMobileApi(json).then(data=>{
getUserDetailApi().then(res=>{
localStorage.setItem('userDesc',JSON.stringify(res));
if(this.$route.query.retUrl){
this.$router.push(this.$route.query.retUrl)
}else{
this.$router.push({name:'index'});
}
this.flag = true
})
}).catch(res=>{
this.refImgCode();
this.flag = true
......
......@@ -80,7 +80,7 @@
<span v-if="item.push_time === '0000-00-00'">课程还未开始哦</span>
</div>
</div>
<div class="star-block">
<div class="star-block" v-if="item.push_time !== '0000-00-00'">
<img class="star-img" :src="star_act" v-for="s in item.star_num">
<img class="star-img" :src="star_def" v-for="s in 3-item.star_num">
</div>
......
......@@ -94,7 +94,7 @@
},
initPage(){
this.userDetail = JSON.parse(localStorage.getItem('userDesc'));
this.toDataURLBase64(res.avatar.replace('http://','https://'), (avatar) =>{
this.toDataURLBase64(this.userDetail.avatar.replace('http://','https://'), (avatar) =>{
this.userDetail.avatar = avatar;
getUserWatchApi().then(res=>{
this.watchDetail = res;
......@@ -103,6 +103,7 @@
});
},
enableShare: function(option) {
let that = this;
getwechatParam({
api_list: 'onMenuShareAppMessage,onMenuShareTimeline',
url:window.location.href.split('#')[0]
......@@ -124,9 +125,11 @@
imgUrl: option.shareIcon || 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
console.log('分享成功');
that.$emit('closeShare')
},
cancel: function() {
console.log('分享失败')
that.$emit('closeShare')
}
});
wx.onMenuShareAppMessage({
......@@ -135,9 +138,10 @@
link: option.shareUrl, // 分享链接
imgUrl: option.shareIcon || 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
that.$emit('closeShare')
},
cancel: function() {
that.$emit('closeShare')
}
});
})
......
......@@ -18,7 +18,7 @@
<div class="good-content" v-if="goodsDetail">
<div class="content" v-html="goodsDetail.desc.detail">
</div>
<div class="btn-block">
<div class="btn-block" ref="btn_block">
<div class="btn" @click="toBuy">
快去报名
</div>
......@@ -61,7 +61,16 @@
}
},
mounted(){
this.initPage()
this.initPage();
window.onscroll= ()=>{
//变量t是滚动条滚动时,距离顶部的距离
let t = document.documentElement.scrollTop||document.body.scrollTop;
if(t>500){
this.$refs.btn_block.style.opacity = 1
}else{
this.$refs.btn_block.style.opacity = 0
}
}
}
}
</script>
......@@ -120,7 +129,7 @@
}
.good-content{
background: #00E0AE;
padding: 0 20*@toVw 0*@toVw 20*@toVw;
padding: 0 20*@toVw 80*@toVw 20*@toVw;
.content{
background: white;
border-radius: 8*@toVw;
......@@ -129,6 +138,13 @@
}
.btn-block{
padding:8*@toVw;
position: fixed;
left: 0;
width: 100%;
background: white;
opacity: 0;
transition: all 0.5s;
bottom: 0;
.btn{
width: 287*@toVw;
height: 44*@toVw;
......
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