提交 f9e3b3ee 编写于 作者: chendeli's avatar chendeli

add

上级 57666add
......@@ -15,7 +15,18 @@
<div class="five-tag fs11">
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click.stop="playFun(item)">
<img class="five-radio" src="../../images/play.png"/>
<div class="play-opt play-start" v-if="item.play =='1'">
<span></span>
<span></span>
<span></span>
</div>
<div class="play-opt play-stop" v-if="item.play == '2'">
<span></span>
<span></span>
<span></span>
</div>
<img class="five-radio" src="../../images/play.png" v-if="item.play == '0'"/>
</span>
</div>
......@@ -30,9 +41,29 @@ export default {
name: 'YqyFiveMinutes',
data(){
return {
list:[]
list:[],
isPlay:false,
id:''
}
},
created(){
let _this = this;
//暂停
window.__pauseAudioView = function(parm){
_this.changePlay(_this.id,'2');
}
//开始
window.__playAudioView = function(parm){
_this.changePlay(_this.id,'1');
}
window.__closeAudioView = function(parm){
_this.changePlay(_this.id,'0');
}
},
mounted(){
this.getData();
},
......@@ -124,7 +155,7 @@ export default {
this.API_GET('contents/fiveMinutes/contents',parm).then(res => {
if(res.respCode == '200'){
_this.list = res.fiveMinutesMedicalContentList || []
_this.list = _this.handel(res.fiveMinutesMedicalContentList) || []
}
})
},
......@@ -132,8 +163,37 @@ export default {
playMore(){
},
handel(d){
for(let i=0;i<d.length;i++){
d[i].play = '0';
}
return d;
},
changePlay(id,str){
//play : 1播放 2:暂停 0:初始状态
for(let i=0;i<this.list.length;i++){
if(id == this.list[i].id){
if(str == '1'){
this.list[i].play = '1';
}else if(str == '2'){
this.list[i].play = '2';
// alert(str)
}else if(str == '0'){
this.list[i].play = '0';
}
}else{
this.list[i].play = '0';
}
}
},
playFun(item){
this.id = item.id;//保存id
this.changePlay(item.id,'1');
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
......@@ -232,6 +292,8 @@ export default {
border:1px solid #FAE5AF;
}
}
.m-play{
width: px2rem(28px);
height: px2rem(28px);
......@@ -239,6 +301,70 @@ export default {
position:absolute;
right: 0;
bottom: 0;
.play-stop{
}
.play-opt{
position:relative;
width: px2rem(28px);
height: px2rem(28px);
border:1px solid #56c3bb;
border-radius:50%;
span{
width:px2rem(3px);
height: px2rem(5px);
bottom:px2rem(5px);
position:absolute;
background:#56c3bb;
}
}
.play-stop{
span:first-child{
left:px2rem(8px);
height: px2rem(5px);
}
span:nth-child(2){
left:px2rem(12px);
height: px2rem(15px);
}
span:nth-child(3){
left:px2rem(16px);
height: px2rem(10px);
}
}
.play-start{
span{
-webkit-animation: bodong 0.5s infinite ease-in-out alternate;
}
span:first-child{
left:px2rem(8px);
-webkit-animation-delay:.1s;
}
span:nth-child(2){
left:px2rem(12px);
-webkit-animation-delay:.3s;
}
span:nth-child(3){
left:px2rem(16px);
-webkit-animation-delay:.5s;
}
@-webkit-keyframes bodong{
0%{height:px2rem(5px); }
30%{height:px2rem(10px);}
60%{height:px2rem(15px);}
80%{height:px2rem(10px);}
100%{height:px2rem(5px);}
}
}
img{
width: 100%;
height: 100%;
......
......@@ -36,10 +36,13 @@ export default {
labelvalue:itemData.name,
})
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
if(itemData.appModuleInfo && itemData.appModuleInfo.code != 'M400'){
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
}
},
getData(){
......
......@@ -28,8 +28,19 @@ export default {
parmObj:{}
}
},
props:{
userMobile:{
default:'',
type:String
}
},
mounted(){
this.getData();
if(this.userMobile != ''){
this.getData();
}else{
this.isShow = false;
}
},
methods: {
continueStudy(item){
......
......@@ -102,12 +102,11 @@ module.exports = {
let path = paramList[0]['key'];
let v = paramList[0]['value'];
let query = this.setRouterParm(paramList);
console.log(this);
this.$router.push({
path: v,
query:query
})
}
if(typeof paramList === 'string' && !paramList){
paramList = []
......
......@@ -4,6 +4,7 @@
e.rocNative = {
// 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法
__nativeCall: function (e, t, n) {
///alert(t);
// if (t === '__gotoAuthentication') {
// __gotoAuthentication()
// }
......@@ -19,6 +20,16 @@
__getStatusBarHeight(n);
}
if(t == 'pauseAudioView'){
__pauseAudioView(n);
}
if(t == 'playAudioView'){
__playAudioView(n);
}
if(t == 'closeAudioView'){
__closeAudioView(n);
}
},
__callNative: function (t, a, o) {
......@@ -72,7 +83,7 @@
})
}
})
}("dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "gotoLogin", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight","setTabMiniIcon","getUserInfo")
}("dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "gotoLogin", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight","setTabMiniIcon","getUserInfo","pauseAudioView")
if (e.__rocAndroid) {
e.__isAndroid = true
e.__isIOS = false
......
......@@ -135,13 +135,15 @@ export default {
.activity-item{
position: relative;
width: px2rem(345px);
/* height: px2rem(170px);*/
max-height: px2rem(170px);
margin-top:px2rem(15px);
box-shadow: 0 px2rem(2px) px2rem(6px) RGBA(42, 94, 161, 0.15);
display: block;
overflow: hidden;
.img{
width: 100%;
height: 100%;
display: block;
max-height: 100%;
}
.time{
position: absolute;
......
......@@ -33,7 +33,7 @@
</div>
<!--继续学习-->
<YqyHomeKeepon/>
<YqyHomeKeepon :userMobile="userMobile"/>
<!--专题分类-->
<YqyCategoryThree1/>
......@@ -103,6 +103,7 @@ export default {
userToken:'',
searchFix:false,
statusBarHeight:20,
userMobile:''
}
},
components:{
......@@ -128,10 +129,11 @@ export default {
}
window.__getUserInfo = function(parm){
///userMobile userName userToken systemType(Andriod: 1, iOS: 2) appVersion doctorId
_this.systemType = parm.systemType;
_this.appVersion = parm.appVersion;
_this.userToken = parm.userToken;
_this.userMobile = parm.userMobile;
if(!!_this.systemType && !!_this.appVersion){
_this.getSwiper();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册