提交 3954c1f3 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'Branch_tag-app-1128-sousuo' of...

Merge branch 'Branch_tag-app-1128-sousuo' of http://192.168.110.53/com.pica.cloud.education.frontend/pica.cloud.web-app into Branch_tag-app-1128-sousuo
{
"editor.fontSize": 18
}
\ No newline at end of file
...@@ -18,8 +18,8 @@ var webpackConfig = merge(baseWebpackConfig, { ...@@ -18,8 +18,8 @@ var webpackConfig = merge(baseWebpackConfig, {
//devtool: config.build.productionSourceMap ? '#source-map' : false, //devtool: config.build.productionSourceMap ? '#source-map' : false,
output: { output: {
path: config.build.assetsRoot, path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].js'), filename: utils.assetsPath('js/[name].js?chunkhash=[chunkhash]'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash].min.js') chunkFilename: utils.assetsPath('js/[name].[chunkhash].min.js?chunkhash=[chunkhash]')
}, },
vue: { vue: {
loaders: utils.cssLoaders({ loaders: utils.cssLoaders({
......
...@@ -21,7 +21,7 @@ module.exports = { ...@@ -21,7 +21,7 @@ module.exports = {
env: { env: {
NODE_ENV: '"development"' NODE_ENV: '"development"'
}, },
port: 8009, port: 8019,
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/',
// proxyTable: { // proxyTable: {
......
无法预览此类型文件
此差异已折叠。
此差异已折叠。
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
<!--展示形式 左一 右二--> <!--展示形式 左一 右二-->
<div class="teacher-item space-between"> <div class="teacher-item space-between">
<div class="category-left" @click="goToPage(leftObj)"> <div class="category-left" @click="goToPage(leftObj)">
<img class="category-img" v-lazy="leftObj.imageUrl"/> <img class="category-img" :src="leftObj.imageUrl"/>
</div> </div>
<div class="category-right"> <div class="category-right">
<div class="right-img" @click="goToPage(rightTop)"> <div class="right-img" @click="goToPage(rightTop)">
<img class="category-img" v-lazy="rightTop.imageUrl"/> <img class="category-img" :src="rightTop.imageUrl"/>
</div> </div>
<div class="right-img mt5" @click="goToPage(rightBottom)"> <div class="right-img mt5" @click="goToPage(rightBottom)">
<img class="category-img" v-lazy="rightBottom.imageUrl"/> <img class="category-img" :src="rightBottom.imageUrl"/>
</div> </div>
</div> </div>
</div> </div>
<div class="holder-img" @click="goToPage(rightBp)"> <div class="holder-img" @click="goToPage(rightBp)">
<img v-lazy="rightBp.imageUrl" class="category-img"/> <img :src="rightBp.imageUrl" class="category-img"/>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
<!--展示形式 左一 右二--> <!--展示形式 左一 右二-->
<div class="teacher-item space-between"> <div class="teacher-item space-between">
<div class="category-left" @click="goToPage(parmData[0])"> <div class="category-left" @click="goToPage(parmData[0])">
<img class="category-img" v-lazy="parmData[0].imageUrl"/> <img class="category-img" :src="parmData[0].imageUrl"/>
</div> </div>
<div class="category-right"> <div class="category-right">
<div class="right-img" @click="goToPage(parmData[1])"> <div class="right-img" @click="goToPage(parmData[1])">
<img class="category-img" v-lazy="parmData[1].imageUrl"/> <img class="category-img" :src="parmData[1].imageUrl"/>
</div> </div>
<div class="right-img mt5" @click="goToPage(parmData[2])"> <div class="right-img mt5" @click="goToPage(parmData[2])">
<img class="category-img" v-lazy="parmData[2].imageUrl"/> <img class="category-img" :src="parmData[2].imageUrl"/>
</div> </div>
</div> </div>
</div> </div>
<div class="holder-img" @click="goToPage(parmData[3])"> <div class="holder-img" @click="goToPage(parmData[3])">
<img v-lazy="parmData[3].imageUrl" class="category-img"/> <img :src="parmData[3].imageUrl" class="category-img"/>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="tea-listbox"> <div class="tea-listbox">
<div class="tea-item" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)"> <div class="tea-item" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)">
<div class="head-pic"> <div class="head-pic">
<img class="tea-itemimg" v-lazy="item.avatarImageUrl"/> <img class="tea-itemimg" :src="item.avatarImageUrl"/>
</div> </div>
<span class="tea-itemname">{{item.name}}</span> <span class="tea-itemname">{{item.name}}</span>
</div> </div>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="tea-listbox"> <div class="tea-listbox">
<div class="tea-item" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)"> <div class="tea-item" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)">
<div class="head-pic"> <div class="head-pic">
<img class="tea-itemimg" v-lazy="item.avatarImageUrl"/> <img class="tea-itemimg" :src="item.avatarImageUrl"/>
</div> </div>
<span class="tea-itemname">{{item.name}}</span> <span class="tea-itemname">{{item.name}}</span>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="banner-box"> <div class="banner-box">
<div class="banner space-between"> <div class="banner space-between">
<div :class="index+1==parmData.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)"> <div :class="index+1==parmData.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)">
<img class="banner-img" v-lazy="item.imageUrl"/> <img class="banner-img" :src="item.imageUrl"/>
<span class="banner-text fs24"> <span class="banner-text fs24">
{{item.name}} {{item.name}}
<!-- <i></i> --> <!-- <i></i> -->
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div :class="searchFix?'header fixed' : 'header' " id="search-top" :style="{height:menuptop}"> <div :class="searchFix?'header fixed' : 'header' " id="search-top" :style="{height:menuptop}">
<div class="search-menu"> <div class="search-menu">
<div :class="isTransparent?'search-transparent':'bgWhite'" class="search"> <div :class="isTransparent?'search-transparent':'bgWhite'" class="search">
<input type="search" :class="isTransparent?'search-transparent':''" class="input" v-model="searchVal" :placeholder="placeholder" :disabled="disabled" /> <input type="search" :class="isTransparent?'search-transparent':''" class="input" v-model="searchVal" :placeholder="placeholder" @click="goToPage"/>
<img v-if="searchFix" class="search-img" src='../../images/search-grey.png'> <img v-if="searchFix" class="search-img" src='../../images/search-grey.png'>
<img v-else class="search-img" src='../../images/search-white.png'> <img v-else class="search-img" src='../../images/search-white.png'>
</div> </div>
...@@ -103,15 +103,19 @@ export default { ...@@ -103,15 +103,19 @@ export default {
}, },
goToPage(){ goToPage(){
// alert("000"); this.$router.push({
this.$emit('setAppMsg',false) path: '/search'
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_notification',
actionCode:'c_notification',
}) })
rocNative.readMessage(); // alert("000");
// this.$emit('setAppMsg',false)
// this.$emit('jumpToSS',false)
// this.pageBurialPoin({
// menuLevel:1,
// menuCode:'m_home',
// functionCode:'f_notification',
// actionCode:'c_notification',
// })
// rocNative.readMessage();
} }
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="top-evaluat" v-if="isShow"> <div class="top-evaluat" v-if="isShow">
<div class="evaluat-info"> <div class="evaluat-info">
<span class="evaluat-icon"> <span class="evaluat-icon">
<img v-lazy='parmObj.avatarImageUrl'/> <img :src='parmObj.avatarImageUrl'/>
</span> </span>
<span class="evaluat-persent">您的学习速度战胜了本院内{{setStyle(parmObj.gradePKToHospital)}}%的医生</span> <span class="evaluat-persent">您的学习速度战胜了本院内{{setStyle(parmObj.gradePKToHospital)}}%的医生</span>
</div> </div>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</div> </div>
<div class="teacher-item space-between"> <div class="teacher-item space-between">
<div class="tea-itemImg"> <div class="tea-itemImg">
<img v-lazy="resourceData.img"/> <img :src="resourceData.img"/>
</div> </div>
<div class="five-text"> <div class="five-text">
<div class="tea-itemname fw fs30">{{resourceData.name}}</div> <div class="tea-itemname fw fs30">{{resourceData.name}}</div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="hot-teacher"> <div class="hot-teacher">
<div :style="{'text-align': direction}" class="title">{{title}}</div> <div :style="{'text-align': direction}" class="title">{{title}}</div>
<div class="teacher-item" :key="index" v-for="(item,index) in hotTeachers"> <div class="teacher-item" :key="index" v-for="(item,index) in hotTeachers">
<img class="tea-itemimg" v-lazy="item.img"/> <img class="tea-itemimg" :src="item.img"/>
<span class="tea-itemname">{{item.name}}</span> <span class="tea-itemname">{{item.name}}</span>
<span class="tea-hospital">{{item.hospital}}</span> <span class="tea-hospital">{{item.hospital}}</span>
</div> </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div :style="{'text-align': direction}" class="hotTagTitle">{{resourceData.title}}</div> <div :style="{'text-align': direction}" class="hotTagTitle">{{resourceData.title}}</div>
<mt-swipe :show-indicators="false" :auto="0"> <mt-swipe :show-indicators="false" :auto="0">
<mt-swipe-item> <mt-swipe-item>
<img class="newClassImg" v-lazy="resourceData.item[0].img"/> <img class="newClassImg" :src="resourceData.item[0].img"/>
<div class="fs32">{{resourceData.item[0].title}}</div> <div class="fs32">{{resourceData.item[0].title}}</div>
<div class="space-between"> <div class="space-between">
<div> <div>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
</mt-swipe-item> </mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[1]"> <mt-swipe-item v-if="resourceData.item[1]">
<img class="newClassImg" v-lazy="resourceData.item[1].img"/> <img class="newClassImg" :src="resourceData.item[1].img"/>
<div class="fs32">{{resourceData.item[1].title}}</div> <div class="fs32">{{resourceData.item[1].title}}</div>
<div class="space-between"> <div class="space-between">
<div> <div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
</mt-swipe-item> </mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[2]"> <mt-swipe-item v-if="resourceData.item[2]">
<img class="newClassImg" v-lazy="resourceData.item[2].img"/> <img class="newClassImg" :src="resourceData.item[2].img"/>
<div class="fs32">{{resourceData.item[2].title}}</div> <div class="fs32">{{resourceData.item[2].title}}</div>
<div class="space-between"> <div class="space-between">
<div> <div>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="couse-list"> <div class="couse-list">
<div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in parmData"> <div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in parmData">
<div class="course-pic" @click="goToPage(item)"> <div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" /> <img :src="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span> <span class="course-tag">{{item.disName}}</span>
</div> </div>
<p class="course-txt"> <p class="course-txt">
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
props:{ props:{
parmData:{ parmData:{
type:Array, type:Array,
default:[] default: () => []
}, },
userToken:{ userToken:{
type:String, type:String,
......
<template>
<section>
<GroupTitle groupNum="6" />
<div class="cource-teach">
<div class="couse-list">
<div
:class="index % 2 == 1 ? 'course-item end-left' : 'course-item'"
v-show="index < 4" v-for="(item, index) in parmData" :key="index">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div v-if="parmData.length==0" class="noSource">暂无最新教程数据</div>
</div>
<ShowAllItem />
<NoMoreItem v-show="false" />
<SplitLine borderWidth="3px" />
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
import NoMoreItem from '@/components/business/no-more-item';
import ShowAllItem from '@/components/business/show-all-item';
import SplitLine from '@/components/business/split-line';
export default {
name: 'YqyTeacherList',
data() {
return {
list: [],
title: '最新课程',
pageNo: 1,
pageSize: 6,
parmData: []
}
},
components: {
GroupTitle,
NoMoreItem,
ShowAllItem,
SplitLine
},
mounted() {
this.getData()
//this.list = this.parmData;
},
props: {
userToken: {
type: String,
default: ''
},
},
methods: {
//跳转
goToPage(item) {
this.$emit("setRefrshParm", {
isclick: true
})
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
let itemData = {};
if (item == '') {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.famousteacherschool.AllDiseaseActivity###MicroProfessionMoreTableController",
"type": 4,
"seqNo": 1
},
{
"key": "disCategoryId",
"value": '-1',
"type": 1,
"seqNo": 2
}
]
}
};
} else {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController",
"type": 4,
"seqNo": 1
},
{
"key": "courseId",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
}
};
}
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken)
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers',
data: {
token: _this.userToken,
}
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
//alert(res.message);
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.parmData;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
getData() {
//alert("最新课程");
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation', parm).then(function (res) {
if (res.code === '000000') {
_this.parmData = res.data.contentAppModels || [];
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/global.scss';
@import '../../style/mixin.scss';
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.get-more {
border: 1px solid RGBA(169, 174, 183, 0.5);
border-radius: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
display: inline-block;
float: right;
margin-top: px2rem(3px);
height: px2rem(16px);
line-height: px2rem(16px);
font-size: px2rem(11px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.noSource {
text-align: center;
font-size: px2rem(13px);
padding: px2rem(13px) 0;
color: #999;
}
.cource-teach {
padding: 0 px2rem(15px);
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
border-radius: px2rem(3px);
display: block;
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.opt-info {
color: #999;
}
.course-opt {
font-size: px2rem(12px);
/* margin-top: px2rem(6px);*/
position: relative;
.opt {
display: inline-block;
top: 0;
right: 0;
position: absolute;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.title {
font-size: px2rem(18px);
height: px2rem(18px);
margin: 0 0 px2rem(21px) 0;
font-weight: bold;
color: #28344C
}
</style>
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
<!--展示形式 左一 右二--> <!--展示形式 左一 右二-->
<div class="teacher-item space-between"> <div class="teacher-item space-between">
<div class="category-left"> <div class="category-left">
<img class="category-img1" v-lazy="resourceData.item.pic1.right"/> <img class="category-img1" :src="resourceData.item.pic1.right"/>
</div> </div>
<div class="category-right"> <div class="category-right">
<div class="right-img"> <div class="right-img">
<img class="category-img" v-lazy="resourceData.item.pic2.bg"/> <img class="category-img" :src="resourceData.item.pic2.bg"/>
</div> </div>
<div class="right-img mt5"> <div class="right-img mt5">
<img class="category-img" v-lazy="resourceData.item.pic3.bg"/> <img class="category-img" :src="resourceData.item.pic3.bg"/>
</div> </div>
</div> </div>
</div> </div>
<di class="holder-img"> <di class="holder-img">
<img v-lazy="resourceData.item.pic3.bg" class="category-img"/> <img :src="resourceData.item.pic3.bg" class="category-img"/>
</di> </di>
</div> </div>
</template> </template>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
<div class="teacher-item space-between" :key="index" v-for="(item,index) in hotTeachers"> <div class="teacher-item space-between" :key="index" v-for="(item,index) in hotTeachers">
<div class="teacher-itemimg"> <div class="teacher-itemimg">
<img v-lazy="item.img"/> <img :src="item.img"/>
</div> </div>
<div class="five-text"> <div class="five-text">
<div class="teacher-itemname fs14">{{item.name}}</div> <div class="teacher-itemname fs14">{{item.name}}</div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="banner-box"> <div class="banner-box">
<div class="banner space-between"> <div class="banner space-between">
<div :class="index+1==resourceData.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in resourceData"> <div :class="index+1==resourceData.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in resourceData">
<!-- <img class="bannerImg" v-lazy="item.img"/> --> <!-- <img class="bannerImg" :src="item.img"/> -->
<img class="banner-img" src="../../images/Shape@2x.png"/> <img class="banner-img" src="../../images/Shape@2x.png"/>
<span class="banner-text fs24"> <span class="banner-text fs24">
{{item.name}}<i></i> {{item.name}}<i></i>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</div> </div>
<div class="teacher-item space-between"> <div class="teacher-item space-between">
<div class="tea-itemImg"> <div class="tea-itemImg">
<img v-lazy="resourceData.img"/> <img :src="resourceData.img"/>
</div> </div>
<div class="five-text"> <div class="five-text">
<div class="tea-itemname fw fs30">{{resourceData.name}}</div> <div class="tea-itemname fw fs30">{{resourceData.name}}</div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="hot-teacher"> <div class="hot-teacher">
<div :style="{'text-align': direction}" class="title">{{title}}</div> <div :style="{'text-align': direction}" class="title">{{title}}</div>
<div class="teacher-item" :key="index" v-for="(item,index) in hotTeachers"> <div class="teacher-item" :key="index" v-for="(item,index) in hotTeachers">
<img class="tea-itemimg" v-lazy="item.img"/> <img class="tea-itemimg" :src="item.img"/>
<span class="tea-itemname">{{item.name}}</span> <span class="tea-itemname">{{item.name}}</span>
<span class="tea-hospital">{{item.hospital}}</span> <span class="tea-hospital">{{item.hospital}}</span>
</div> </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div :style="{'text-align': direction}" class="hotTagTitle">{{resourceData.title}}</div> <div :style="{'text-align': direction}" class="hotTagTitle">{{resourceData.title}}</div>
<mt-swipe :show-indicators="false" :auto="0"> <mt-swipe :show-indicators="false" :auto="0">
<mt-swipe-item> <mt-swipe-item>
<img class="newClassImg" v-lazy="resourceData.item[0].img"/> <img class="newClassImg" :src="resourceData.item[0].img"/>
<div class="fs32">{{resourceData.item[0].title}}</div> <div class="fs32">{{resourceData.item[0].title}}</div>
<div class="space-between"> <div class="space-between">
<div> <div>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
</mt-swipe-item> </mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[1]"> <mt-swipe-item v-if="resourceData.item[1]">
<img class="newClassImg" v-lazy="resourceData.item[1].img"/> <img class="newClassImg" :src="resourceData.item[1].img"/>
<div class="fs32">{{resourceData.item[1].title}}</div> <div class="fs32">{{resourceData.item[1].title}}</div>
<div class="space-between"> <div class="space-between">
<div> <div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
</mt-swipe-item> </mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[2]"> <mt-swipe-item v-if="resourceData.item[2]">
<img class="newClassImg" v-lazy="resourceData.item[2].img"/> <img class="newClassImg" :src="resourceData.item[2].img"/>
<div class="fs32">{{resourceData.item[2].title}}</div> <div class="fs32">{{resourceData.item[2].title}}</div>
<div class="space-between"> <div class="space-between">
<div> <div>
......
此差异已折叠。
<template>
<section>
<GroupTitle :groupNum="groupNum" />
<div class="cource-teach">
<div class="couse-list">
<div
:class="index % 2 == 1 ? 'course-item end-left' : 'course-item'"
v-for="(item, index) in parmData" :key="index">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div v-if="parmData.length==0" class="noSource">暂无最新教程数据</div>
</div>
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
export default {
name: 'CourseList',
data() {
return {
list: [],
title: '最新课程',
pageNo: 1,
pageSize: 6,
needShow: true
// parmData: []
}
},
props: {
userToken: {
type: String,
default: ''
},
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
}
},
computed: {
cParmData() {
return this.parmData
},
// groupNum() {
// return this.parmData.length + ''
// }
},
components: {
GroupTitle
},
mounted() {
// this.getData()
// this.list = this.parmData;
},
methods: {
showAllItem(index) {
// this.needShow = !this.needShow
},
//跳转
goToPage(item) {
this.$emit("setRefrshParm", {
isclick: true
})
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
let itemData = {};
if (item == '') {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.famousteacherschool.AllDiseaseActivity###MicroProfessionMoreTableController",
"type": 4,
"seqNo": 1
},
{
"key": "disCategoryId",
"value": '-1',
"type": 1,
"seqNo": 2
}
]
}
};
} else {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController",
"type": 4,
"seqNo": 1
},
{
"key": "courseId",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
}
};
}
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken)
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers'
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.parmData;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
getData() {
//alert("最新课程");
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation', parm).then(function (res) {
if (res.code === '000000') {
_this.parmData = res.data.contentAppModels || [];
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/global.scss';
@import '../../style/mixin.scss';
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.get-more {
border: 1px solid RGBA(169, 174, 183, 0.5);
border-radius: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
display: inline-block;
float: right;
margin-top: px2rem(3px);
height: px2rem(16px);
line-height: px2rem(16px);
font-size: px2rem(11px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.noSource {
text-align: center;
font-size: px2rem(13px);
padding: px2rem(13px) 0;
color: #999;
}
.cource-teach {
padding: 0 px2rem(15px);
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
border-radius: px2rem(3px);
display: block;
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.opt-info {
color: #999;
}
.course-opt {
font-size: px2rem(12px);
/* margin-top: px2rem(6px);*/
position: relative;
.opt {
display: inline-block;
top: 0;
right: 0;
position: absolute;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.title {
font-size: px2rem(18px);
height: px2rem(18px);
margin: 0 0 px2rem(21px) 0;
font-weight: bold;
color: #28344C
}
</style>
<template>
<section>
<GroupTitle :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder"/>
<div class="cource-teach">
<div class="couse-list">
<div
:class="index % 2 == 1 ? 'course-item end-left' : 'course-item'"
v-for="(item, index) in parmData" :key="index">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div v-if="parmData.length==0" class="noSource">暂无最新教程数据</div>
</div>
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
export default {
name: 'CourseList',
data() {
return {
list: [],
title: '最新课程',
pageNo: 1,
pageSize: 6,
needShow: true
// parmData: []
}
},
props: {
userToken: {
type: String,
default: ''
},
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
computed: {
cParmData() {
return this.parmData
},
// groupNum() {
// return this.parmData.length + ''
// }
},
components: {
GroupTitle
},
mounted() {
// this.getData()
// this.list = this.parmData;
},
methods: {
showAllItem(index) {
// this.needShow = !this.needShow
},
//跳转
goToPage(item) {
this.$emit("setRefrshParm", {
isclick: true
})
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
let itemData = {};
if (item == '') {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.famousteacherschool.AllDiseaseActivity###MicroProfessionMoreTableController",
"type": 4,
"seqNo": 1
},
{
"key": "disCategoryId",
"value": '-1',
"type": 1,
"seqNo": 2
}
]
}
};
} else {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController",
"type": 4,
"seqNo": 1
},
{
"key": "courseId",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
}
};
}
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken)
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers'
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.parmData;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
getData() {
//alert("最新课程");
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation', parm).then(function (res) {
if (res.code === '000000') {
_this.parmData = res.data.contentAppModels || [];
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/global.scss';
@import '../../style/mixin.scss';
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.get-more {
border: 1px solid RGBA(169, 174, 183, 0.5);
border-radius: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
display: inline-block;
float: right;
margin-top: px2rem(3px);
height: px2rem(16px);
line-height: px2rem(16px);
font-size: px2rem(11px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.noSource {
text-align: center;
font-size: px2rem(13px);
padding: px2rem(13px) 0;
color: #999;
}
.cource-teach {
padding: 0 px2rem(15px);
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
border-radius: px2rem(3px);
display: block;
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.opt-info {
color: #999;
}
.course-opt {
font-size: px2rem(12px);
/* margin-top: px2rem(6px);*/
position: relative;
.opt {
display: inline-block;
top: 0;
right: 0;
position: absolute;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.title {
font-size: px2rem(18px);
height: px2rem(18px);
margin: 0 0 px2rem(21px) 0;
font-weight: bold;
color: #28344C
}
</style>
此差异已折叠。
<template>
<section class="group-title">
<span class="group-title-name">{{groupTitle}} </span>
<span v-show="isShowNum"> ({{groupNum}})</span>
</section>
</template>
<script>
export default {
data() {
return {
}
},
props: {
groupTitle: {
type: String,
default: '课程'
},
isShowNum: {
type: Boolean,
default: true
},
groupNum: {
type: String,
default: "0"
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.group-title {
margin-left: px2rem(15px);
display: flex;
flex-direction: row;
&-name {
margin-right: px2rem(6px);
}
span {
padding: px2rem(20px) 0 px2rem(15px);
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
}
}
</style>
<template>
<section class="group-title">
<article v-show="showTitle" class="group-title-title">
<span>{{groupTitle}} </span>
<span v-show="isShowNum"> ({{groupNum}})</span>
</article>
<article v-show="showOrder" class="group-title-order">
<div @click="order(1)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 1}">学习人数</span>
<img src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 1"/>
</div>
<div @click="order(2)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 2}">发布时间</span>
<img src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 2"/>
</div>
</article>
</section>
</template>
<script>
export default {
data() {
return {
showOrderIndex: 1
}
},
props: {
groupTitle: {
type: String,
default: '课程'
},
isShowNum: {
type: Boolean,
default: true
},
groupNum: {
type: String,
default: "0"
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
methods: {
toggle() {
this.showTitle = !showTitle
this.showOrder = !showOrder
},
order(index) {
this.showOrderIndex = index
this.$emit('order', index)
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.group-title {
margin-left: px2rem(15px);
display: flex;
flex-direction: row;
&-order {
display: flex;
flex-direction: row;
padding: px2rem(20px) 0 px2rem(15px);
font-size: px2rem(13px);
&-item {
position: relative;
span {
margin-right: px2rem(20px);
}
img {
position: absolute;
top: px2rem(2px);
left: px2rem(51px);
height: px2rem(15px);
width: px2rem(15px);
}
}
}
.active {
color: #449284;
}
&-title {
padding: px2rem(20px) 0 px2rem(15px);
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
}
}
</style>
此差异已折叠。
<template>
<article v-if="allLabels && allLabels.length > 0" class="history-labels">
<section class="history-labels-title">
<span>{{title}}</span>
<span v-show="showDelete" class="history-labels-title-all">
<span @click="showConfirm=true">全部删除</span><span>|</span><span @click="toggleDelete">取消</span>
</span>
<img @click="toggleDelete" v-show="!showDelete" src="../../images/sousuo/recicle.png" alt="删除">
</section>
<section class="history-labels-item"
@click="searchAction(item.keyword)"
v-for="(item, index) in allLabels" :key="index" >
<span class="history-labels-item-name">
<span>{{item.keyword}}</span>
<img @click="deleteLabels(false, index)" v-show="showDelete"
src="../../images/sousuo/delete.png" alt=""
>
</span>
</section>
<ConfirmTip v-show="showConfirm" @cancle="showConfirm=false" @confirm="confirm"/>
</article>
</template>
<script>
import ConfirmTip from '@/components/common/confirm-tip'
export default {
name: 'HistoryLabels',
props: {
// allLabels: {
// type: Array
// },
title: {
type: String,
default: '历史搜索'
}
},
components: {
ConfirmTip
},
data () {
return {
allLabels: [],
showDelete: false,
showConfirm: false
}
},
mounted(){
this.getData()
},
methods: {
searchAction(searchText) {
if(this.showDelete) return
this.$router.push({
path: '/result',
query: {
searchText: searchText
}
})
},
// 获取历史搜索
getData() {
let _this = this,
para = {
token: _this.token,
setEntry: 'headers'
}
let url = 'contents/searchHistory/listHistory'
this.GET(url, para).then(res => {
if (res.code == '000000') {
this.allLabels = res.data.list
console.log(res)
}
})
},
// 删除关键词
deleteLabels(isAll, index=0, length=1) {
let _this = this,
para = {
token: _this.token,
setEntry: 'headers',
keywordIds: []
};
let url = 'contents/searchHistory/deleteHistory'
if (isAll) {
para.keywordIds = this.allLabels.map(element => {
return element.id
});
} else {
para.keywordIds.push(this.allLabels[index].id)
}
this.POST(url, para).then(res => {
if (res.code == '000000') {
// this.allLabels = res.data.list
this.allLabels.splice(index, para.keywordIds.length)
}
})
},
confirm() {
this.deleteLabels(true)
},
toggleDelete() {
this.showDelete = !this.showDelete
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.history-labels {
width: 100%;
padding: 0 px2rem(15px) 0;
margin-bottom: px2rem(6px);
background-color: #fff;
&-title {
display: inline-flex;
width: 100%;
align-items: center;
justify-content: space-between;
span {
font-size: px2rem(12px);
color: #666;
}
img {
width: px2rem(20px);
height: px2rem(20px);
padding: px2rem(4px);
}
&-all {
span {
padding: px2rem(4px) px2rem(5px);
font-size: px2rem(12px);
color: #999;
}
}
}
&-item {
display: inline-flex;
height: px2rem(30px);
margin: px2rem(0px) px2rem(15px) 0 0;
text-align: center;
align-items: center;
&-name {
position: relative;
top: 0;
left: 0;
padding: px2rem(6px) px2rem(15px) px2rem(8px);
border-radius: px2rem(15px);
background-color: #F8F8F8;
color: #999;
font-size: px2rem(13px);
img {
position: absolute;
top: px2rem(-10px);
right: px2rem(-10px);
width: px2rem(20px);
height: px2rem(20px);
padding: px2rem(4px);
}
}
}
}
</style>
<template>
<article class="history-search">
<header class="history-search-title">
<span>历史搜索</span>
<img src="../../images/search-grey.png" alt="删除">
</header>
<section class="history-search-content">
<span v-for="(item, index) in sourceData" :key="index">{{item.name}}</span>
</section>
</article>
</template>
<script>
export default {
props: {
sourceData: {
type: Array,
default: () => [{name:'222'},{name:'222'},{name:'222'},{name:'222'},{name:'222'},{name:'222'},{name:'222'}]
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
.history-search {
margin: px2rem(15px);
&-title {
width: 100%;
justify-content: space-between;
display: inline-flex;
span {
padding: px2rem(4px) px2rem(4px);
font-size: px2rem(12px);
color: 6;
}
}
&-content {
}
}
</style>
此差异已折叠。
<template>
<section class="no-more">
<span class="no-more-sub"></span>
<span class="no-more-text">{{noMoreText}}</span>
<span class="no-more-sub"></span>
</section>
</template>
<script>
export default {
data() {
return {
noMoreText: '已经到底了'
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.no-more {
display: flex;
height: px2rem(41px);
flex-direction: row;
justify-content: center;
align-items: center;
background:rgba(248,248,248,1);
&-sub {
width: px2rem(13px);
// height: px2rem(26px);
border: px2rem(1px) solid rgba(200,200,200,1);
border-bottom: 0;
}
&-text {
padding: 0 px2rem(4px);
font-size: px2rem(11px);
color: #B3B3B3;
}
}
</style>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册