提交 082da397 编写于 作者: 杨广俊's avatar 杨广俊

删除多余的文件

上级 d94a37eb
......@@ -8,15 +8,15 @@
<transition name="router-fade" mode="out-in">
<router-view v-if="!$route.meta.keepAlive"></router-view>
</transition>
<svg-icon></svg-icon>
<!-- <svg-icon></svg-icon> -->
</div>
</template>
<script>
import svgIcon from './components/common/svg';
// import svgIcon from './componentsn/common/svg';
export default {
components:{
svgIcon
// svgIcon
},
}
......@@ -25,7 +25,7 @@
<style lang="scss">
@import './style/common';
.router-fade-enter-active, .router-fade-leave-active {
transition: opacity .3s;
transition: opacity .1s;
}
.router-fade-enter, .router-fade-leave-active {
opacity: 0;
......
<template>
<section>
<GroupTitle groupTitle="大家在看" :isShowNum="isShowNum"/>
<div class="cource-teach" id="adjust-u">
<!-- <div :class="isFixed ? 'cource-header fixed' : 'cource-header'" :style="{height:menuptop}">
<div class="fixBox">
<div class="bgFill" :style="{height:ptop}"></div>
<div class="font-title">
{{title}}
</div>
</div>
</div> -->
<div class="couse-cont">
<!-- <div class="couse-list" v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="10" :style="'height:'+clientHeight"> -->
<div class="couse-list" infinite-scroll-disabled="loading" infinite-scroll-distance="10" :style="'height:'+clientHeight">
<div v-show="index < 4" :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index"
v-for="(item,index) in cParamData">
<div class="course-pic" @click="goToPage(item)">
<img :src="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 class="loading-box">
<span class="loading-more-txt" v-if="isLoading">努力加载中...</span>
<span class="no-more" v-if="noMore">没有更多了......</span>
</div> -->
</div>
<!-- <LOADING v-if="isShowLoading"></LOADING> -->
</div>
</section>
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
import {
m_search_history_no_search_result_d,
m_search_history_no_search_result_m
} from '@/utils/buryingPoint'
import {
Loadmore,
Spinner,
InfiniteScroll
} from 'mint-ui';
import GroupTitle from '@/components/business/group-title';
// import { setEventByModuleCode } from '@/utils/index'
// import LOADING from '../../components/common/loading-new';
export default {
data() {
return {
token: '',
isShowNum: false,
list: [],
pageNo: 2,
isDisabled: false,
pageSize: 10,
title: '为您推荐',
isCollected: '',
allLoaded: true,
loading: false, //是否滚动加载
isLoading: false, //加载中
noMore: false,
clientHeight: 'auto',
isShowLoading: true,
menuHeight: 0,
ptop: 20,
popHeight: 0,
menuptop: 0,
isReauestBack: true,
}
},
props: {
isFixed: {
default: false,
type: Boolean
},
statusBarHeight: {
type: Number,
default: 0
},
adjustPageNo: {
type: Number,
default: 1
},
userToken: {
type: String,
default: ''
},
parmData: {
type: Array,
default: () => []
},
},
created() {
let _this = this
window.__getUserInfo_CA = function(params){
_this.token = params.userToken
_this.getData()
_this.setUserInfo(params)
}
window.__refresh = function (parm) {
_this.getUserInfo();
}
},
mounted() {
this.getUserInfo()
},
computed: {
...mapGetters({
userInfo: 'userInfo',
refreshNum: 'refreshNum'
}),
cParamData() {
if(this.list && this.list.length){
return this.list
} else {
return this.parmData
}
}
},
watch: {
refreshNum(val) {
this.getData()
}
},
components: {
GroupTitle
},
methods: {
...mapActions({
setUserInfo: 'setUserInfo'
}),
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo_CA'})
},
//跳转
goToPage(item) {
this.pageBurialPoin({
...m_search_history_no_search_result_d,
labelId: item.id,
labelValue: item.name,
createdTime: new Date().getTime(),
})
this.pageNo = 1;
this.$emit("setRefrshParm", {
isclick: true
})
let 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
})
},
//滑动加载更多
loadMore() {
let _this = this;
if (_this.isReauestBack) {
_this.isLoading = true;
//埋点
this.pageBurialPoin({
...m_search_history_no_search_result_m,
labelValue: item.name,
createdTime: new Date().getTime(),
})
setTimeout(() => {
_this.getData('loadMore');
}, 500)
}
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken);
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_search',
functionCode: 'f_recommend',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.token,
type: status,
courseId: id,
setEntry: 'headers',
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
// _this.handelData(id, status);
_this.getData()
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.list;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
this.list = (d || []).slice()
},
//加载数据
getData(type) {
let _this = this,
parm = {
pageNo: 1,
pageSize: 4,
token: _this.token,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList', parm).then(function (res) {
if (res.code === '000000') {
_this.list = res.data || []
}
})
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
img {
@include bis('../../images/evaluatBg.png');
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.bgFill {
background: inherit;
height: px2rem(20px);
}
.cource-teach .cource-header,
.couse-cont {
padding: 0 px2rem(15px);
}
.couse-cont {}
.fixBox {}
.cource-header {
/* margin: 0 0 px2rem(11px) 0;*/
/*height: px2rem(45px);*/
margin-bottom: px2rem(15px);
.font-title {
line-height: px2rem(36px);
height: px2rem(36px);
background: #fff;
}
}
.loading-box {
font-size: px2rem(16px);
padding: px2rem(10px) 0 px2rem(20px) 0;
text-align: center;
span {
color: #999;
}
}
.change-part {
margin-top: px2rem(10px);
float: right;
font-size: px2rem(11px);
line-height: px2rem(11px);
border: 1px solid #A9AEB7;
border-radius: px2rem(9px);
vertical-align: middle;
padding: px2rem(3px) px2rem(5px) px2rem(4px) px2rem(6px);
img {
width: px2rem(12px);
height: px2rem(12px);
}
}
.fixed {
.fixBox {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 112;
.font-title {
background: #44A99B;
padding: 0 px2rem(15px);
color: #fff;
}
}
.bgFill {
background: #44A99B;
}
}
.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%;
display: block;
border-radius: px2rem(3px);
}
.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);
}
.course-opt {
font-size: px2rem(12px);
position: relative;
/*margin-top: px2rem(6px);*/
.opt-info {
color: #999;
}
.opt {
display: inline-block;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
position: absolute;
right: 0;
top: 0;
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.font-title {
font-size: px2rem(18px);
font-weight: bold;
color: #28344C
}
.title {
font-size: px2rem(16px);
text-align: left;
width: px2rem(170px);
max-height: px2rem(20px);
}
</style>
<template>
<section>
<GroupTitle ref="courseListGT" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder" @order="orderAction"/>
<div class="hot-teacher">
<!-- <div :class="index>1 && (index+1 == cParmData.length)?'teacher-item item-end' : 'teacher-item'" :key="index" -->
<div :class="index>1 && (index+1 == cParmData.length)?'teacher-item item-end' : 'teacher-item'" :key="index"
v-for="(item,index) in cParmData" @click="goToPage(item)">
<div class="teacher-itemimg">
<img :src="item.courseInfoUrl"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14 ellipsis-2" >
<span v-show="item.typeName" class="teacher-itemname-tag">{{item.typeName}}</span>
<span class="teacher-itemname-name" v-html="item.highLightName"></span>
</div>
<div class="fs13 ellipsis-1" >
<span class="five-text-shourtcut" v-html="item.shortcut">{{item.shortcut}}</span>
</div>
<div class="fs13 five-text-teacher">
<img src="../../images/teacher-icon.png" /><span class="five-text-teacher-name" v-for="(doctor, dIndex) in item.doctors" :key="dIndex">
{{doctor.doctorName}}
<!-- {{item.doctors[0].doctorName}} -->
</span>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import { mapActions, mapGetters } from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_course_detail,
m_search_result_course_order,
m_search_result_course_more,
m_search_result_course_top
} from '@/utils/buryingPoint'
import GroupTitle from '@/components/business/group-title';
let mapDesc = ['', '课程名', '关键字', '一句话简介', '章', '节']
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() {
let cCourseList = []
if (this.list && this.list.length) {
cCourseList = this.list.slice()
} else {
cCourseList = this.parmData.slice()
}
return cCourseList.map(function(item){
let cItem = Object.assign({}, item)
if(cItem.highLightField) {
cItem.highLightName = cItem.highLightName + ' (' + mapDesc[cItem.highLightField] + ')'
}
return cItem
})
},
...mapGetters({
cSearchText: 'cSearchText',
orderNum: 'orderNum'
})
},
watch: {
orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true)
}
}
},
components: {
GroupTitle
},
mounted() {
},
methods: {
//跳转
goToPage(item) {
// this.$emit("setRefrshParm", {
// isclick: true
// })
this.pageBurialPoin({
...m_search_result_course_detail,
labelValue: item.name,
createdTime: new Date().getTime(),
})
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
})
},
// resetGT() {
// this.$refs.courseListGT.resetShowOrderIndex()
// },
orderAction(orderIndex, notBP) {
if(!notBP) {
this.pageBurialPoin({
...m_search_result_course_order,
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
}
this.searchForOrder('1', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
// this.$refs.courseListGT.resetShowOrderIndex()
this.list = param
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/global.scss';
@import '../../style/mixin.scss';
.course-list {
margin: 0 px2rem(15px);
&-item {
display: flex;
flex-direction: row;
img {
height: px2rem(56px);
width: px2rem(100px);
margin-right: px2rem(10px);
border-radius: px2rem(6px);
}
&-desc {
display: flex;
flex-direction: column;
position: relative;
// span {
// display: inline-flex;
// }
&-type {
display: inline-flex;
height: px2rem(18px);
width: px2rem(30px);
padding: 0 px2rem(2px);
margin-right: px2rem(5px);
font-size: px2rem(11px);
border-radius: px2rem(2px);
background-color: #6A9FE9;
color: #fff;
}
&-name {
display: inline-flex;
font-size: px2rem(16px);
height: px2rem(16px);
width: px2rem(200px);
line-height: px2rem(16px);
color: #333333;
}
}
}
}
</style>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.hot-teacher {
width: 100%;
background-color: #fff;
padding: 0 px2rem(15px) 0;
.img {
width: px2rem(109px);
height: px2rem(22px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.five-more {
border: 1px solid RGBA(169, 174, 183, 1);
border-radius: px2rem(16px);
height: px2rem(16px);
line-height: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
}
.teacher-item {
width: 100%;
height: px2rem(106px);
position: relative;
margin: px2rem(4px) 0 px2rem(15px);
padding-top: px2rem(4px);
&:not(:last-child) {
border-bottom: 1px solid RGBA(240, 240, 240, 1);
}
.teacher-itemimg {
width: px2rem(100px);
height: px2rem(56px);
margin-right: px2rem(10px);
border-radius: px2rem(3px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(0, 78, 64, 0.1);
float: left;
img {
width: 100%;
height: 100%;
display: inline-block;
border-radius: px2rem(3px);
}
}
.five-text {
margin-left: px2rem(70px);
height: px2rem(38px);
&-shourtcut {
font-size: px2rem(14px);
color: #777;
}
&-teacher {
margin-top: px2rem(4px);
height: px2rem(20px);
line-height: px2rem(20px);
margin-left: px2rem(40px);
img {
width: px2rem(10px);
height: px2rem(10px);
margin-right: px2rem(2px);
color: #777;
}
&-name {
// margin-left:40px;
// padding-top:10px;
margin-left: 0 !important;
padding-left: 0;
font-size: px2rem(13px);
color: #999;
}
}
}
.teacher-itemname {
color: RGBA(102, 102, 102, 1);
height: px2rem(36px);
line-height: px2rem(19px);
font-size: px2rem(13px);
margin-bottom: px2rem(5px);
&-tag {
vertical-align: top;
height: px2rem(20px);
line-height: px2rem(20px);
padding: px2rem(2px) px2rem(3px) px2rem(1px);
border-radius: px2rem(2px);
font-size: px2rem(12px);
color: #fff;
background: rgba(106,159,233,1);
}
&-name {
height: px2rem(18px);
line-height: px2rem(18px);
font-size: px2rem(16px);
color: #333;
}
}
.five-tag {
position: relative;
padding-right: px2rem(25px);
.m-tag {
height: px2rem(17px);
line-height: px2rem(17px);
padding: 0 px2rem(5px);
color: #BF9E15;
border-radius: 0 px2rem(3px) px2rem(3px) px2rem(3px);
background: #FFFDFA;
/* background-color: px2rem(17px);*/
border: 1px solid #FAE5AF;
}
}
.m-play {
width: px2rem(28px);
height: px2rem(28px);
display: inline-block;
position: absolute;
right: 0;
bottom: 0;
.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;
border-radius: 2px 2px 0 0;
}
}
.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;
animation: bodong 0.5s infinite ease-in-out alternate;
}
span:first-child {
left: px2rem(8px);
-webkit-animation-delay: .1s;
animation-delay: .1s;
}
span:nth-child(2) {
left: px2rem(12px);
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
span:nth-child(3) {
left: px2rem(16px);
-webkit-animation-delay: .5s;
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);
}
}
@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%;
display: block;
}
}
}
.item-end {
height: px2rem(92px);
}
}
.ellipsis-1 {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
white-space: nowrap;
}
.ellipsis-2 {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
// white-space: nowrap;
}
</style>
<template>
<section>
<GroupTitle groupTitle="5分钟医学院" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder" @order="orderAction"/>
<div class="hot-teacher">
<div :class="index>1 && (index+1 == cParamData.length)?'teacher-item item-end' : 'teacher-item'" :key="index"
v-for="(item,index) in cParamData" @click="goToPage(item)">
<div class="teacher-itemimg">
<img :src="item.appImageUrl"/>
<!-- <img v-show="index >= 6" :src="item.appImageUrl"/> -->
</div>
<div class="five-text">
<div class="teacher-itemname fs14" v-html="item.highLightTitle">{{item.title}}</div>
<div class="five-tag fs11">
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click.stop="playFun(item)">
<div class="play-opt play-start" v-show="item['play'] =='1'">
<span></span>
<span></span>
<span></span>
</div>
<div class="play-opt play-stop" v-show="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>
</div>
</div>
</div>
</section>
</template>
<script>
import { mapGetters } from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_five_minutes_detail,
m_search_result_five_minutes_order,
m_search_result_five_minutes_top,
} from '@/utils/buryingPoint'
import { pageJumpUrl } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
export default {
name: 'YqyFiveMinutes',
data() {
return {
list: [],
isPlay: false,
id: ''
}
},
components: {
GroupTitle
},
props: {
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
searchText: {
type: String,
default: ''
},
showOrder: {
type: Boolean,
default: false
}
},
computed: {
...mapGetters({
cSearchText: 'cSearchText',
orderNum: 'orderNum'
}),
cParamData() {
if (this.list && this.list.length) {
return this.list
} else {
return this.parmData
}
}
},
watch: {
groupNum(val) {
if (val > 100) {
this.searchForOrder
}
},
orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true)
}
}
},
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() {
},
methods: {
goToPage(item) {
let obj = {
}
let itemData = {
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": []
}
};
if (!!item) {
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_content',
labelId: item.id,
labelValue: item.title,
}
itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
},
{
"key": "id",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
} else {
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_all'
}
itemData.appModuleInfo.paramList = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
}]
}
this.pageBurialPoin({
...m_search_result_five_minutes_detail,
labelValue: item.title,
createdTime: new Date().getTime(),
})
let paramList = this.setEventByModuleCode(itemData);
// alert(itemData.appModuleInfo.code)
// alert(JSON.stringify(paramList))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
changePlay(id, str) {
//play : 1播放 2:暂停 0:初始状态
for (let i = 0; i < this.parmData.length; i++) {
if (id == this.parmData[i].id) {
if (str == '1') {
this.parmData[i].play = '1';
} else if (str == '2') {
this.parmData[i].play = '2';
// alert(str)
} else if (str == '0') {
this.parmData[i].play = '0';
}
} else {
this.parmData[i].play = '0';
}
}
},
playFun(item) {
console.log('sssss', item)
this.id = item.id; //保存id
this.changePlay(item.id, '1');
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_play',
labelId: item.id,
labelValue: item.title,
})
rocNative.openFiveMintusAudio({
categoryName: item.categoryName,
appImageUrl: item.appImageUrl,
publishTime: item.publishTime,
id: item.id,
filePath: item.filePath,
title: item.title,
size: item.size,
isPlay: true,
fileType: item.fileType,
totalTime: item.totalTime
})
},
//处理五分钟数据 初始化播放状态
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
},
orderAction(orderIndex, notBP) {
if(!notBP) {
this.pageBurialPoin({
...m_search_result_five_minutes_order,
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
}
this.searchForOrder('2', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param
})
}
},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.hot-teacher {
width: 100%;
background-color: #fff;
padding: 0 px2rem(15px) 0;
.img {
width: px2rem(109px);
height: px2rem(22px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.five-more {
border: 1px solid RGBA(169, 174, 183, 1);
border-radius: px2rem(16px);
height: px2rem(16px);
line-height: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
}
.teacher-item {
width: 100%;
height: px2rem(75px);
position: relative;
margin-top: px2rem(4px);
margin: px2rem(4px) 0 px2rem(15px);
&:not(:last-child) {
border-bottom: 1px solid RGBA(240, 240, 240, 1);
}
.teacher-itemimg {
width: px2rem(60px);
height: px2rem(60px);
border-radius: px2rem(3px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(0, 78, 64, 0.1);
float: left;
img {
width: 100%;
height: 100%;
display: inline-block;
border-radius: px2rem(3px);
}
}
.five-text {
margin-left: px2rem(70px);
height: px2rem(38px);
}
.teacher-itemname {
color: RGBA(102, 102, 102, 1);
height: px2rem(38px);
line-height: px2rem(19px);
font-size: px2rem(14px);
margin-bottom: px2rem(5px);
}
.five-tag {
position: relative;
padding-right: px2rem(25px);
.m-tag {
height: px2rem(17px);
line-height: px2rem(17px);
padding: 0 px2rem(5px);
color: #BF9E15;
border-radius: 0 px2rem(3px) px2rem(3px) px2rem(3px);
background: #FFFDFA;
/* background-color: px2rem(17px);*/
border: 1px solid #FAE5AF;
}
}
.m-play {
width: px2rem(28px);
height: px2rem(28px);
display: inline-block;
position: absolute;
right: 0;
bottom: 0;
.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;
border-radius: 2px 2px 0 0;
}
}
.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;
animation: bodong 0.5s infinite ease-in-out alternate;
}
span:first-child {
left: px2rem(8px);
-webkit-animation-delay: .1s;
animation-delay: .1s;
}
span:nth-child(2) {
left: px2rem(12px);
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
span:nth-child(3) {
left: px2rem(16px);
-webkit-animation-delay: .5s;
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);
}
}
@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%;
display: block;
}
}
}
.item-end {
height: px2rem(60px);
}
}
</style>
<template>
<section class="group-title">
<article v-show="showTitle" class="group-title-title">
<span>{{groupTitle}}</span><span class="group-title-title-ml-6" 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>
import { mapGetters } from 'vuex'
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
}
},
computed: {
...mapGetters({
orderNum: 'orderNum'
})
},
watch: {
orderNum(val) {
this.showOrderIndex = 1
}
},
methods: {
toggle() {
this.showTitle = !showTitle
this.showOrder = !showOrder
},
order(index) {
this.showOrderIndex = index
this.$emit('order', index)
},
// resetShowOrderIndex(){
// this.showOrderIndex = 1
// }
}
}
</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(10px);
font-size: px2rem(13px);
&-item {
position: relative;
span {
margin-right: px2rem(30px);
}
img {
position: absolute;
top: px2rem(2px);
left: px2rem(51px);
height: px2rem(15px);
width: px2rem(15px);
}
}
}
.active {
color: #449284;
}
&-title {
padding: px2rem(20px) 0 px2rem(10px);
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
&-ml-6 {
margin-left: -6px;
}
}
}
</style>
<template>
<section>
<GroupTitle groupTitle="健康漫画" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder" @order="orderAction"/>
<div class="font-style">
<div class="teach-opt">
<div class="teach-list">
<div :class="index%2==1 ? 'list-item mr0':'list-item'"
v-for="(item, index) in cParamData" :key="index"
@click="goToPage(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.imageUrl">
<!-- <span class="learn-p">{{item.joinNum}}人已学</span> -->
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div>
<div class="tea-txt">
<!-- <div class="tea-name">{{item.doctorName}}</div> -->
<div class="tea-position" v-html="item.highLightHeaderName">
<!-- {{item.headerName}} -->
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import { mapGetters } from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_health_cartoon_detail,
m_search_result_health_cartoon_order,
m_search_result_health_cartoon_top,
} from '@/utils/buryingPoint'
import GroupTitle from '@/components/business/group-title';
export default {
data() {
return {
topTitle: '讲师集',
isScroll: false,
token: '',
list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序
}
},
components: {
GroupTitle
},
props: {
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
computed: {
...mapGetters({
cSearchText: 'cSearchText',
orderNum: 'orderNum'
}),
cParamData() {
if (this.list && this.list.length) {
return this.list
} else {
return this.parmData
}
}
},
watch: {
orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true)
}
}
},
mounted() {
let _this = this
this.token = this.$route.query.userToken || this.$route.query.token
// this.getUserInfo()
// this.getData();
// window.__getUserInfo = function(parm){
// // alert('in __getUserInfo')
// _this.token = parm.userToken || _this.$route.query.token;
// this.getData();
// }
// window.__refresh = function (parm) {
// _this.getData();
// }
window.addEventListener('scroll', this.handleScroll)
},
methods: {
handleScroll: function () {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
if (scrollTop > 25) {
this.isScroll = true;
} else {
this.isScroll = false;
}
},
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
goToPage(item) {
let itemData = {
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": []
}
};
itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.webs.CaricatureDetailActivity###EducationDetailViewController',
// "value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
},
{
"key": "id",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
this.pageBurialPoin({
...m_search_result_health_cartoon_detail,
labelValue: item.headerName,
createdTime: new Date().getTime(),
})
},
orderAction(orderIndex, notBP) {
if(!notBP) {
this.pageBurialPoin({
...m_search_result_health_cartoon_order,
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
}
this.searchForOrder('4', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param
})
}
}
}
</script>
<style>
body {
background: #fff
}
</style>
<style lang="scss" scoped>
body {
background: #fff
}
@import '../../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.teach-opt {
padding: 0 px2rem(15px) px2rem(15px) px2rem(15px);
.teach-title {
font-size: px2rem(18px);
// padding-bottom: px2rem(0px);
color: #333;
}
.teach-list {
margin-top: px2rem(-14px);
overflow: hidden;
}
.opt-span {
span {
color: #449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(10px);
line-height: px2rem(10px);
img {
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item {
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
border-radius: 0 0 px2rem(3px) px2rem(3px);
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) 0 RGBA(0, 0, 0, 0.06);
}
.mr0 {
margin-right: 0
}
.tea-txt {
padding: px2rem(5px) px2rem(7px);
}
.tea-img {
width: px2rem(170px);
height: px2rem(125px);
position: relative;
border-radius: px2rem(3px) px2rem(3px) 0 0;
img {
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0;
}
.learn-p {
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left: 0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
color: #fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name {
padding: 0;
color: #333;
font-size: px2rem(14px);
font-weight: 500;
}
.tea-position {
height: px2rem(53px);
padding: px2rem(7px) px2rem(0px) px2rem(10px);
line-height: px2rem(15px);
font-size: px2rem(14px);
font-weight: 400;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.logo_img {
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
</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="confirmDelete">全部删除</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"
v-if="index < 15"
@click="searchAction(item.keyword)"
v-for="(item, index) in allLabels" :key="index" >
<span class="history-labels-item-name">
<span >{{item.keyword}}</span>
<img @click.stop="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 {
m_search_history_search_hs,
m_search_history_search_db,
m_search_history_search_d,
m_search_history_search_da,
m_search_history_search_dc,
} from '@/utils/buryingPoint'
import ConfirmTip from '@/components/common/confirm-tip'
export default {
name: 'HistoryLabels',
props: {
// allLabels: {
// type: Array
// },
title: {
type: String,
default: '历史搜索'
}
},
components: {
ConfirmTip
},
data () {
return {
token: '',
allLabels: [],
showDelete: false,
showConfirm: false
}
},
created() {
let _self = this;
window.__getUserInfo_HL = function(params){
_self.token = params.userToken
_self.getData()
}
},
mounted(){
if(window.__isWeb) {
this.getData()
}
this.getUserInfo()
},
methods: {
searchAction(searchText) {
this.pageBurialPoin({
...m_search_history_search_hs,
labelValue: searchText,
createdTime: new Date().getTime(),
})
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 => {
// alert('getData' + JSON.stringify(res))
if (res.code == '000000') {
this.allLabels = res.data.list
console.log(res)
}
})
},
// 删除关键词
deleteLabels(isAll, index=0, length=1) {
if(isAll) {
this.pageBurialPoin({
...m_search_history_search_dc,
labelValue: '',
createdTime: new Date().getTime(),
})
} else {
this.pageBurialPoin({
...m_search_history_search_d,
labelValue: '',
createdTime: new Date().getTime(),
})
}
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.pageBurialPoin({
...m_search_history_search_db,
labelValue: this.showDelete - 0,
createdTime: new Date().getTime(),
})
this.showDelete = !this.showDelete
},
getUserInfo: function () {
// alert('in hist getUserInfo')
rocNative.getUserInfo({'__funcName': '__getUserInfo_HL'})
},
confirmDelete() {
this.showConfirm = true
this.pageBurialPoin({
...m_search_history_search_da,
labelValue: this.showConfirm - 1,
createdTime: new Date().getTime(),
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.history-labels {
width: 100%;
padding: 0 px2rem(15px) 0;
margin-bottom: px2rem(20px);
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);
span {
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 v-if="allLabels && allLabels.length > 0" class="history-labels">
<section class="history-labels-title">
<span>{{title}}</span>
</section>
<!-- <section class="history-labels-item" @click="hotLabel(item.resourceType, item.structureId, item.resourceUrl, item.labelName, item)" v-for="(item, index) in allLabels" :key="index"> -->
<section class="history-labels-item"
v-if="index < 15"
@click="gotoPage(item)"
v-for="(item, index) in allLabels" :key="index">
<span class="history-labels-item-name">{{item.keyword}}</span>
</section>
</article>
</template>
<script>
import {
m_search_history_hot_search
} from '@/utils/buryingPoint'
import {
mapMutations
} from 'vuex'
export default {
name: 'HotLabels',
props: {
title: {
type: String,
default: '热门搜索'
}
},
data() {
return {
allLabels: []
}
},
mounted() {
this.getData()
},
methods: {
gotoPage(itemData){
console.log('itemData', itemData)
// 如果没有跳转信息,则直接到搜索结果页面
this.pageBurialPoin({
...m_search_history_hot_search,
labelId: itemData.id,
labelValue: itemData.keyword,
createdTime: new Date().getTime()
})
if(!itemData.appModuleInfo
|| !(itemData.appModuleInfo.code === 'M001'
|| itemData.appModuleInfo.code === 'M002'
|| itemData.appModuleInfo.code === 'M003'
|| itemData.appModuleInfo.code === 'M100'
|| itemData.appModuleInfo.code === 'M200'
|| itemData.appModuleInfo.code === 'M300'
|| itemData.appModuleInfo.code === 'M400'
|| itemData.appModuleInfo.code === 'M500'
)){
console.log('不支持的中转。。。')
this.searchAction(itemData.keyword)
return
}
// if(!itemData.appModuleInfo || (itemData.appModuleInfo.code === 'M100' )){
// this.searchAction(itemData.keyword)
// return
// }
let paramList = this.setEventByModuleCode(itemData);
if(paramList !== 'NO') {
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
}
},
searchAction(searchText) {
if(this.showDelete) return
this.$router.push({
path: '/result',
query: {
searchText: searchText
}
})
},
// ...mapMutations([
// 'SET_CLEAR_VUEX'
// ]),
hotLabel(val, id, url, name, item) {
this.$emit('hotLabel', id, name)
//讲师集
switch (val) {
case 1:
this.SET_CLEAR_VUEX()
this.jumpToCourse(item.resourceId);
break;
case 2:
this.SET_CLEAR_VUEX()
//window.location.href=url;
this.jumpToCartoon(url, name)
break;
case 3:
this.SET_CLEAR_VUEX()
this.$router.push({
path: '/lecturer',
query: {
id: id
}
})
break;
default:
break;
}
},
dispatchEventByModuleCode(itemData) {
let modeCode = itemData.appModuleInfo.code
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if (modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
} else if (modeCode === 'M100' || modeCode === 'M300') {
let urlPara = this.getUrlPara(paramList)
paramList[0].value += urlPara
}
if (typeof paramList === 'string' && !paramList) {
paramList = []
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//跳到相应的课程
jumpToCourse(id) {
let itemData = {
"title": "测试课介绍页",
"imageUrl": "https://test-file.yunqueyi.com/image/jpeg/2018/09/18/20180918103322254-f8bba621.jpg",
"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": `${id}`,
"type": 1,
"seqNo": 2
}
]
}
};
this.dispatchEventByModuleCode(itemData);
},
// 跳到漫画详情页
jumpToCartoon(url, name) {
let itemData = {
"title": "测试课介绍页",
"imageUrl": "https://test-file.yunqueyi.com/image/jpeg/2018/09/18/20180918103322254-f8bba621.jpg",
"appModuleInfo": {
"code": "M300",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "pageUrl",
"value": url,
"type": 4,
"seqNo": 1
}, {
"key": "showTitle",
"value": true,
"type": 1,
"seqNo": 2
}, {
"key": "title",
"value": name,
"type": 1,
"seqNo": 2
}]
}
};
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: itemData.appModuleInfo.paramList
})
},
// 获取历史搜索
getData() {
let _this = this,
para = {
type: 2,
token: _this.token,
setEntry: 'headers'
}
let url = '/contents/searchKeyword/listKeywords'
this.GET(url, para).then(res => {
if (res.code == '000000') {
this.allLabels = res.data
console.log(res)
}
})
}
}
}
</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);
}
}
&-item {
display: inline-flex;
height: px2rem(30px);
margin: px2rem(0px) px2rem(15px) 0 0;
text-align: center;
align-items: center;
&-name {
padding: px2rem(6px) px2rem(15px) px2rem(8px);
border-radius: px2rem(15px);
background-color: #F8F8F8;
color: #999;
font-size: px2rem(13px);
}
}
}
</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>
<template>
<section class="no-result">
<img src="../../images/sousuo/search-big.png" alt="">
<p>没有找到相关内容</p>
<p>您可以修改条件后重新搜索</p>
</section>
</template>
<script>
export default {
data() {
return {
}
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.no-result {
height: px2rem(180px);
margin-top: px2rem(0px);
text-align: center;
img {
width: px2rem(100px);
height: px2rem(100px);
}
p {
font-size: px2rem(15px);
color: #999;
}
}
</style>
<template>
<article class="search-wrapper">
<section class="search-wrapper-input">
<!-- <form action="" @submit.stop.prevent="search"> -->
<img src='../../images/search-grey.png'>
<input type="search" v-model="currentText2" @keydown.enter="search"/>
<!-- <button type="submit" v-show="false"/> -->
<!-- </form> -->
</section>
<section class="search-wrapper-cancle">
<span @click="cancel">取消</span>
</section>
</article>
</template>
<script>
export default {
data() {
return {
currentText2: ''
}
},
props: {
searchText: {
type: String,
default: ''
}
},
computed: {
currentText: {
get: function(){
return this.searchText
},
set: function(val) {
this.currentText2 = val
}
}
},
// watch: {
// searchText(val) {
// this.currentText = val
// console.log(val)
// }
// },
mounted() {
// this.getData()
},
methods: {
// 取消
cancel() {
console.log('in cancel')
this.currentText = ''
},
// 搜索
search() {
console.log(this.currentText2)
this.$emit('search', this.currentText2)
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
.search-wrapper {
display: flex;
position: fixed;
top: 0;
left: 0;
z-index: 2;
width: 100%;
flex-direction: row;
padding: px2rem(20px) px2rem(10px) px2rem(10px) px2rem(15px);
text-align: center;
align-items: center;
background: #fff;
border-bottom: 1px solid #F8F8F8;
&-input {
width: px2rem(290px);
height: px2rem(30px);
border: 1px solid #efefef;
border-radius: px2rem(18px);
background: rgba(245, 246, 246, 1);
img {
position: relative;
top: px2rem(-13px);
left: px2rem(0px);
width: px2rem(14px);
height: px2rem(14px);
}
input {
position: relative;
top: px2rem(-15px);
left: px2rem(-8px);
width: px2rem(240px);
height: px2rem(30px);
line-height: px2rem(30px);
text-decoration-color: #bbb;
color: #666;
font-size: px2rem(13px);
font-weight: 400;
background: rgba(245, 246, 246, 1);
user-select: all;
&[type="search"]::-webkit-search-cancel-button{
display: none;
}
}
}
&-cancle {
position: relative;
top: 0;
left: px2rem(15px);
// width: px2rem(60px);
font-size: px2rem(14px);
color: #999;
span {
padding: px2rem(4px);
}
}
}
</style>
<template>
<article v-if="allLabels && allLabels.length > 0" class="search-tag search-label">
<!-- <section :style="{'text-align': direction}" class="search-tag-title">
{{title}}
</section> -->
<header class="history-search-title">
<span>{{title}}</span>
<img v-show="showDelete" src="../../images/sousuo/recicle.png" alt="删除">
</header>
<div class="search-tag-item"
@click="hotLabel(item.resourceType, item.structureId, item.resourceUrl, item.labelName, item)"
v-for="(item, index) in allLabels" :key="index" >
<span class="item-name">{{item.doctorName}}</span>
</div>
</article>
</template>
<script>
import {mapMutations} from 'vuex'
export default {
name: 'YqyHotLabel',
props: {
allLabels: {
type: Array
},
direction: {
type: String,
default: 'left'
},
title: {
type: String,
default: '历史搜索'
},
hasBanner: {
type: Boolean,
default: false
},
hasInfo: {
type: Boolean,
default: false
},
showDelete: {
type: Boolean,
default: true
}
},
data () {
return {
}
},
mounted(){
},
methods: {
...mapMutations([
'SET_CLEAR_VUEX'
]),
hotLabel(val,id,url,name,item){
this.$emit('hotLabel',id,name)
//讲师集
switch (val) {
case 1:
this.SET_CLEAR_VUEX()
this.jumpToCourse(item.resourceId);
break;
case 2:
this.SET_CLEAR_VUEX()
//window.location.href=url;
this.jumpToCartoon(url,name)
break;
case 3:
this.SET_CLEAR_VUEX()
this.$router.push({path:'/lecturer',query:{id:id}})
break;
default:
break;
}
},
dispatchEventByModuleCode(itemData) {
let modeCode = itemData.appModuleInfo.code
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
} else if( modeCode === 'M100' || modeCode === 'M300' ) {
let urlPara = this.getUrlPara(paramList)
paramList[0].value += urlPara
}
if(typeof paramList === 'string' && !paramList){
paramList = []
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//跳到相应的课程
jumpToCourse(id){
let itemData={
"title":"测试课介绍页",
"imageUrl":"https://test-file.yunqueyi.com/image/jpeg/2018/09/18/20180918103322254-f8bba621.jpg",
"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":`${id}`,
"type":1,
"seqNo":2
}
]
}
};
this.dispatchEventByModuleCode(itemData);
},
// 跳到漫画详情页
jumpToCartoon(url,name) {
let itemData={
"title":"测试课介绍页",
"imageUrl":"https://test-file.yunqueyi.com/image/jpeg/2018/09/18/20180918103322254-f8bba621.jpg",
"appModuleInfo":{
"code":"M300",
"type":4,
"name":"课程介绍页",
"paramFlag":1,
"paramList":[
{
"key":"pageUrl",
"value": url,
"type":4,
"seqNo":1
},{
"key":"showTitle",
"value": true,
"type":1,
"seqNo":2
},{
"key":"title",
"value": name,
"type":1,
"seqNo":2
}
]
}
};
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: itemData.appModuleInfo.paramList
})
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.search-tag {
padding: 0 px2rem(15px) 0;
}
.search-label {
width: 100%;
background-color: #fff;
margin-bottom: px2rem(6px);
}
.search-tag-title {
font-size: px2rem(12px);
font-weight: bold;
}
.search-tag-item {
display: inline-flex;
height: px2rem(30px);
margin: px2rem(0px) px2rem(15px) 0 0;
text-align: center;
align-items: center;
.item-name {
padding: px2rem(6px) px2rem(15px) px2rem(8px);
border-radius: px2rem(15px);
background-color: #F8F8F8;
color: #999;
font-size: px2rem(13px);
}
}
.history-search-title {
display: inline-flex;
width: 100%;
align-items: center;
justify-content: space-between;
span {
// padding: px2rem(4px) px2rem(4px);
font-size: px2rem(12px);
color: 6;
}
img {
width: px2rem(20px);
height: px2rem(20px);
padding: px2rem(4px);
}
}
</style>
<template>
<section class="show-wrapper">
<article class="show-wrapper-all" :class="{'border-top': showTopBorder}">
<span class="show-wrapper-all-item" @click="showAllItem">{{noMoreText}}</span>
</article>
</section>
</template>
<script>
import {
m_search_result_colligation_all
} from '@/utils/buryingPoint'
export default {
data() {
return {
}
},
props: {
showTopBorder: {
type: Boolean,
default: true
},
noMoreText: {
type: String,
default: '查看全部'
},
itemIndex: {
type: String,
default: '0'
}
},
methods: {
showAllItem() {
this.pageBurialPoin({
...m_search_result_colligation_all,
labelValue: '',
createdTime: new Date().getTime(),
})
this.$emit('showAllItem', this.itemIndex)
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
.show-wrapper {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
&-all {
height: px2rem(40px);
width: px2rem(345px);
&-item {
display: block;
margin-top: px2rem(11px);
text-align: center;
font-size: px2rem(11px);
color: #999999;
}
}
}
.border-top {
border-top: px2rem(1px) solid rgba(240,240,240,1);
}
</style>
<template>
<section style="border-bottom: 0" :style="{'border-color': borderColor, 'border-style': borderStyle, 'border-width': borderWidth}">
</section>
</template>
<script>
export default {
props: {
borderWidth: {
type: String,
default: '0.5px'
},
borderStyle: {
type: String,
default: 'solid'
},
borderColor: {
type: String,
default: '#F8F8F8'
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
</style>
<template>
<section>
<GroupTitle groupTitle="讲师" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder" @order="orderAction"/>
<div class="font-style">
<div class="teach-opt">
<div class="teach-list">
<div :class="index % 2 == 1 ? 'list-item mr0' : 'list-item'"
v-for="(item, index) in cParamData" :key="index"
@click="goToPage(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.appImageUrl">
<span class="learn-p">{{item.joinNum}}人已学</span>
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div>
<div class="tea-txt">
<div class="tea-name" v-html="item.highLightName">{{item.name}}</div>
<div class="tea-position">
{{item.doctorHospital}}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import { mapGetters } from 'vuex'
import { jumpWebPageUrl } from '@/utils/index'
import { sortParmData } from '@/utils/index'
import {
m_search_result_lecturer_detail,
m_search_result_lecturer_order,
m_search_result_lecturer_top,
} from '@/utils/buryingPoint'
import GroupTitle from '@/components/business/group-title';
export default {
data() {
return {
topTitle: '讲师集',
token: '',
list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序
}
},
components: {
GroupTitle
},
props: {
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
mounted() {
// window.__refresh = function (parm) {
// _this.getData();
// }
window.addEventListener('scroll', this.handleScroll)
},
computed: {
...mapGetters({
cSearchText: 'cSearchText',
userInfo: 'userInfo',
orderNum: 'orderNum'
}),
cParamData() {
if (this.list && this.list.length) {
return this.randomBg(this.list)
} else {
return this.randomBg(this.parmData)
}
}
},
watch: {
orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true)
}
}
},
methods: {
//跳转
goToPage(item){
let _this = this,
url = '',action_code = '',label_id = '';
url = jumpWebPageUrl+'appl/#/teachersDetail?id='+item.id+"&from=appHome&userToken="+ _this.userInfo.userToken
action_code = 'c_teacher';
label_id = item.id;
let itemData = {
"title":"",
"imageUrl":"",
"appModuleInfo":{
"code":"M300",
"type":4,
"name":"wwww",
"paramFlag":1,
"paramList":[
{
"key":"pageUrl",
"value": url,
"type":4,
"seqNo":1
},{
"key":"showTitle",
"value": false,
"type":1,
"seqNo":2
},{
"key":"title",
"value": '',
"type":1,
"seqNo":3
}
]
}
};
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: itemData.appModuleInfo.paramList
})
this.pageBurialPoin({
...m_search_result_lecturer_detail,
labelId: label_id,
labelValue :item.name,
createdTime: new Date().getTime()
})
},
// goToDetail(item) {
// let _this = this;
// this.$router.push({
// path: '/details',
// query: {
// id: item.doctorId,
// token: _this.token
// }
// })
// this.pageBurialPoin({
// ...m_search_result_lecturer_detail,
// labelValue: item.name,
// createdTime: new Date().getTime(),
// })
// },
randomBg(d) {
for (let i = 0; i < d.length; i++) {
if (i % 4 == 0) {
d[i].bgColor = '#EBF6F1'
} else if (i % 4 == 1) {
d[i].bgColor = '#EDF3FA'
} else if (i % 4 == 2) {
d[i].bgColor = '#F0F0FA'
} else if (i % 4 == 3) {
d[i].bgColor = '#F6EFE6'
}
}
return d
},
orderAction(orderIndex, notBP) {
if(!notBP) {
this.pageBurialPoin({
...m_search_result_lecturer_order,
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
}
this.searchForOrder('3', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param
})
}
}
}
</script>
<style>
body {
background: #fff
}
</style>
<style lang="scss" scoped>
body {
background: #fff
}
@import '../../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.teach-opt {
padding: 0 px2rem(15px) px2rem(15px) px2rem(15px);
.teach-title {
font-size: px2rem(18px);
// padding-bottom: px2rem(0px);
color: #333;
}
.teach-list {
margin-top: px2rem(-14px);
overflow: hidden;
}
.opt-span {
span {
color: #449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(10px);
line-height: px2rem(10px);
img {
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item {
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
border: 1px solid rgba(0, 0, 0, 0.02);
border-radius: 0 0 px2rem(3px) px2rem(3px);
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) RGBA(0, 0, 0, 0.06);
}
.mr0 {
margin-right: 0
}
.tea-txt {
padding: px2rem(5px) px2rem(7px);
}
.tea-img {
width: px2rem(170px);
height: px2rem(83px);
position: relative;
border-radius: px2rem(3px) px2rem(3px) 0 0;
img {
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0;
}
.learn-p {
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left: 0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
color: #fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name {
padding: 0;
color: #333;
font-size: px2rem(14px);
font-weight: 500;
}
.tea-position {
height: px2rem(30px);
font-size: px2rem(12px);
line-height: px2rem(15px);
color: #666;
font-weight: 400;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.logo_img {
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
.ellipsis-1 {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
.ellipsis-2 {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
</style>
<template>
<div class="alet_container">
<section class="tip_text_container">
<div class="tip_icon">
<span></span>
<span></span>
</div>
<p class="tip_text">{{alertText}}</p>
<div class="confrim" @click="closeTip">确认</div>
</section>
</div>
</template>
<script>
export default {
data(){
return{
positionY: 0,
timer: null,
}
},
mounted(){
},
props: ['alertText'],
methods: {
closeTip(){
this.$emit('closeTip')
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
@keyframes tipMove{
0% { transform: scale(1) }
35% { transform: scale(.8) }
70% { transform: scale(1.1) }
100% { transform: scale(1) }
}
.alet_container{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 200;
}
.tip_text_container{
position: absolute;
top: 50%;
left: 50%;
margin-top: -6rem;
margin-left: -6rem;
width: 12rem;
animation: tipMove .4s ;
background-color: rgba(255,255,255,1);
border: 1px;
padding-top: .6rem;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
border: 1px;
border-radius: 0.25rem;
.tip_icon{
@include wh(3rem, 3rem);
border: 0.15rem solid #f8cb86;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
span:nth-of-type(1){
@include wh(.12rem, 1.5rem);
background-color: #f8cb86;
}
span:nth-of-type(2){
@include wh(.2rem, .2rem);
border: 1px;
border-radius: 50%;
margin-top: .2rem;
background-color: #f8cb86;
}
}
.tip_text{
@include sc(.7rem, #333);
line-height: .9rem;
text-align: center;
margin-top: .8rem;
padding: 0 .4rem;
}
.confrim{
@include sc(.8rem, #fff);
font-weight: bold;
margin-top: .8rem;
background-color: #4cd964;
width: 100%;
text-align: center;
line-height: 1.8rem;
border: 1px;
border-bottom-left-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
}
}
</style>
<template>
<section class="back-top">
<div class="back-btn" @click="backTop">
<img src="../../images/backTop.png"/>
</div>
</section>
</template>
<script>
import {
m_search_result_colligation_top
} from '@/utils/buryingPoint'
export default {
data(){
return {
objPoint:{}
}
},
props: {
burialPoint:{
default:'',
type:String
}
},
// computed: {
// cNeedShow() {
// return this.needShow
// }
// },
mounted(){
},
methods: {
backTop: function(){
this.pageBurialPoin({
...m_search_result_colligation_top,
labelValue: '',
createdTime: new Date().getTime(),
})
var osTop = document.documentElement.scrollTop || document.body.scrollTop;
if(osTop > 0){
document.documentElement.scrollTop = document.body.scrollTop = 0;
this.$emit('backTop')
// this.needShow = false
}
}
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.back-btn{
position: fixed;
width: px2rem(35px);
height: px2rem(35px);
right: px2rem(15px);
z-index: 100;
bottom: px2rem(80px);;
img{
width: 100%;
height: 100%;
display: block;
}
}
</style>
<template>
<section class="cart_module">
<section v-if="!foods.specifications.length" class="cart_button">
<transition name="showReduce">
<span @click="removeOutCart(foods.category_id, foods.item_id, foods.specfoods[0].food_id, foods.specfoods[0].name, foods.specfoods[0].price, '', foods.specfoods[0].packing_fee, foods.specfoods[0].sku_id, foods.specfoods[0].stock)" v-if="foodNum">
<svg>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#cart-minus"></use>
</svg>
</span>
</transition>
<transition name="fade">
<span class="cart_num" v-if="foodNum">{{foodNum}}</span>
</transition>
<svg class="add_icon" @touchstart="addToCart(foods.category_id, foods.item_id, foods.specfoods[0].food_id, foods.specfoods[0].name, foods.specfoods[0].price, '', foods.specfoods[0].packing_fee, foods.specfoods[0].sku_id, foods.specfoods[0].stock, $event)">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#cart-add"></use>
</svg>
</section>
<section v-else class="choose_specification">
<section class="choose_icon_container">
<transition name="showReduce">
<svg class="specs_reduce_icon" v-if="foodNum" @click="showReduceTip">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#cart-minus"></use>
</svg>
</transition>
<transition name="fade">
<span class="cart_num" v-if="foodNum">{{foodNum}}</span>
</transition>
<span class="show_chooselist" @click="showChooseList(foods)">选规格</span>
</section>
</section>
</section>
</template>
<script>
import {mapState, mapMutations} from 'vuex'
export default {
data(){
return{
showMoveDot: [], //控制下落的小圆点显示隐藏
}
},
mounted(){
},
computed: {
...mapState([
'cartList'
]),
/**
* 监听cartList变化,更新当前商铺的购物车信息shopCart,同时返回一个新的对象
*/
shopCart: function (){
return Object.assign({},this.cartList[this.shopId]);
},
//shopCart变化的时候重新计算当前商品的数量
foodNum: function (){
let category_id = this.foods.category_id;
let item_id = this.foods.item_id;
if (this.shopCart&&this.shopCart[category_id]&&this.shopCart[category_id][item_id]) {
let num = 0;
Object.values(this.shopCart[category_id][item_id]).forEach((item,index) => {
num += item.num;
})
return num;
}else {
return 0;
}
},
},
props:['foods', 'shopId'],
methods: {
...mapMutations([
'ADD_CART','REDUCE_CART',
]),
//移出购物车
removeOutCart(category_id, item_id, food_id, name, price, specs, packing_fee, sku_id, stock){
if (this.foodNum > 0) {
this.REDUCE_CART({shopid: this.shopId, category_id, item_id, food_id, name, price, specs, packing_fee, sku_id, stock});
}
},
//加入购物车,计算按钮位置。
addToCart(category_id, item_id, food_id, name, price, specs, packing_fee, sku_id, stock, event){
this.ADD_CART({shopid: this.shopId, category_id, item_id, food_id, name, price, specs, packing_fee, sku_id, stock});
let elLeft = event.target.getBoundingClientRect().left;
let elBottom = event.target.getBoundingClientRect().bottom;
this.showMoveDot.push(true);
this.$emit('showMoveDot', this.showMoveDot, elLeft, elBottom);
},
//显示规格列表
showChooseList(foodScroll){
this.$emit('showChooseList', foodScroll)
},
//点击多规格商品的减按钮,弹出提示
showReduceTip(){
this.$emit('showReduceTip')
},
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.cart_module{
.add_icon{
position: relative;
z-index: 999;
}
.cart_button{
display: flex;
align-items: center;
}
svg{
@include wh(.9rem, .9rem);
fill: #3190e8;
}
.specs_reduce_icon{
fill: #999;
}
.cart_num{
@include sc(.65rem, #666);
min-width: 1rem;
text-align: center;
font-family: Helvetica Neue,Tahoma;
}
.choose_specification{
.choose_icon_container{
display: flex;
align-items: center;
.show_chooselist{
display: block;
@include sc(.55rem, #fff);
padding: .1rem .2rem;
background-color: $blue;
border-radius: 0.2rem;
border: 1px solid $blue;
}
}
}
}
.showReduce-enter-active, .showReduce-leave-active {
transition: all .3s ease-out;
}
.showReduce-enter, .showReduce-leave-active {
opacity: 0;
transform: translateX(1rem);
}
.fade-enter-active, .fade-leave-active {
transition: all .3s;
}
.fade-enter, .fade-leave-active {
opacity: 0;
}
.fadeBounce-enter-active, .fadeBounce-leave-active {
transition: all .3s;
}
.fadeBounce-enter, .fadeBounce-leave-active {
opacity: 0;
transform: scale(.7);
}
</style>
<template>
<div class="page">
<span class="rem_time" style="color: orange;border-width: 1px;border-style: solid;border-color: orange;" @click="gotoPay">
{{remaining}}
</span>
<alert-tip v-if="showAlert" @closeTip="showAlert = false" :alertText="alertText"></alert-tip>
</div>
</template>
<script>
import alertTip from 'src/components/common/alertTip'
export default {
data(){
return{
countNum: 900,
showAlert: false,
alertText: null,
}
},
mounted(){
this.countNum -= this.numTime;
this.remainingTime();
},
props: ['time'],
components: {
alertTip,
},
methods: {
closeTip(){
this.$emit('closeTip')
},
//计算时间
remainingTime(){
clearInterval(this.timer);
this.timer = setInterval(() => {
this.countNum --;
if (this.countNum == 0) {
clearInterval(this.timer);
this.showAlert = true;
this.alertText = '支付超时';
}
}, 1000);
},
gotoPay(){
this.showAlert = true;
this.alertText = '暂不开放支付接口';
}
},
computed: {
//转换时间成分秒
remaining: function (){
let minute = parseInt(this.countNum/60);
let second = parseInt(this.countNum%60);
if (minute < 10) {
minute = '0' + minute;
}
if (second < 10) {
second = '0' + second;
}
return '去支付(还剩' + minute + '分' + second + '秒)';
},
//订单返回时间秒分分别处理
numTime: function (){
if (this.time.toString().indexOf('分钟') !== -1) {
return parseInt(this.time)*60;
}else{
return parseInt(this.time);
}
}
},
}
</script>
<style lang="scss" scoped>
@import 'src/style/mixin';
.page{
display: inline-block;
.rem_time{
@include sc(.55rem, orange);
padding: .1rem .2rem;
border-radius: .15rem;
}
}
</style>
<template>
<section class="xb-pop-wrap">
<div v-if="show" class="img-content">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/xbdzz/xb_pop.png"/>
<span @click="goSearch"></span>
<img class="close" @click="close" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/xbdzz/xb_close.png"/>
</div>
<div v-if="show" @click="close" class="shadow"></div>
</section>
</template>
<script>
export default {
data() {
return {
show: true
}
},
methods: {
// 关闭xb弹框
close() {
this.show = false
},
// 去看看
goSearch() {
this.$router.push({path:'xb',query:{pop:true}})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.xb-pop-wrap {
.img-content {
position: fixed;
left: px2rem(61px);
top: px2rem(192px);
z-index: 9999999999;
width: px2rem(250px);
img {
width: 100%;
}
img.close {
display: block;
width: px2rem(30px);
margin: 0 auto;
}
span {
position: absolute;
left: px2rem(46px);
bottom: px2rem(41px);
display: block;
width: px2rem(158px);
height: px2rem(46px);
}
}
.shadow {
position: fixed;
left: 0;
top: 0;
z-index: 999999999;
background: #000;
opacity: 0.5;
width: 100%;
height: 100%;
}
}
</style>
<template>
<section class="loader loader--style3" title="2">
<div class="loader-mask"></div>
<article class="confirm-content">
<span class="confirm-content-title">{{confirmTitle}}</span>
<div class="confirm-content-split"></div>
<div class="confirm-content-btn">
<span class="confirm-content-btn-confirm" @click="confirm">{{confirmBtnText}}</span>
<span class="confirm-content-btn-split"></span>
<span class="confirm-content-btn-concle" @click="cancle">{{concleBtnText}}</span>
</div>
</article>
</section>
</template>
<script>
export default {
data() {
return {
}
},
props: {
confirmTitle: {
type: String,
default: '确认删除所有搜索历史'
},
confirmBtnText: {
type: String,
default: '删除'
},
concleBtnText: {
type: String,
default: '再想想'
}
},
methods: {
confirm() {
this.$emit('confirm')
},
cancle() {
this.$emit('cancle')
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.loader {
&-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background: rgba(205,205,205, 0.6);
}
.confirm-content {
position: absolute;
top: px2rem(280px);
left: px2rem(52.5px);
z-index: 101;
width: px2rem(270px);
height: px2rem(116px);
border-radius: px2rem(6px);
text-align: center;
font-weight: 400;
background: #fff;
&-title {
display: inline-flex;
height: px2rem(70px);
line-height: px2rem(70px);
font-size: px2rem(17px);
color: rgba(102,102,102,1);
}
&-split {
border-top: 1px solid #F0F0F0;
}
&-btn {
display: flex;
padding-top: px2rem(14px);
justify-content: center;
font-size: px2rem(15px);
&-confirm {
color: #999;
}
&-split {
margin: 0 px2rem(50px);
border-left: 1px solid #F0F0F0;
}
&-concle {
color: #4A9E8F;
}
}
}
}
</style>
<template>
<div class="loader">
<img class="loader-mask" src="../../images/sousuo/sousuo-fc.png" />
<span @click="closeFC" class="loader-btn">我知道了</span>
</div>
</template>
<script>
export default {
methods: {
closeFC() {
this.$emit('closeFC')
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.loader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 5;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
&-mask {
position: fixed;
top: px2rem(64px);
left: px2rem(38px);
bottom: px2rem(64px);
right: px2rem(37px);
width: px2rem(300px);
z-index: 4;
background: rgba(0, 0, 0, 0.5);
}
&-btn {
display: inline-block;
position: absolute;
left: px2rem(128px);
bottom: px2rem(120px);
height: px2rem(30px);
width: px2rem(120px);
z-index: 6;
text-align: center;
padding-top: px2rem(4px);
font-size: px2rem(15px);
border: 1px solid #fff;
border-radius: px2rem(30px);
color: #fff;
}
}
</style>
<template>
<div class="loader loader--style3" title="2">
<div class="loader-mask"></div>
<svg version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
<animateTransform attributeType="xml"
attributeName="transform"
type="rotate"
from="0 25 25"
to="360 25 25"
dur="0.6s"
repeatCount="indefinite"/>
</path>
</svg>
</div>
</template>
<style lang="scss" scoped>
@import '../../style/mixin';
.loader {
margin: 0 0 2em;
height: 100px;
width: 20%;
text-align: center;
padding: 1em;
margin: 0 auto 1em;
display: inline-block;
vertical-align: top;
&-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background: rgba(205,205,205, 0.8);
}
svg {
position: absolute;
top: px2rem(280px);
left: px2rem(166px);
z-index: 101;
}
}
svg path, svg rect{
fill: #449284;
}
</style>
<template>
<div class="loader loader--style3" title="2">
<div class="loader-mask"></div>
<svg version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
<animateTransform attributeType="xml"
attributeName="transform"
type="rotate"
from="0 25 25"
to="360 25 25"
dur="0.6s"
repeatCount="indefinite"/>
</path>
</svg>
</div>
</template>
<style lang="scss" scoped>
@import '../../style/mixin';
.loader {
&-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background: rgba(0, 0, 0, 0.5);
}
svg {
position: absolute;
top: px2rem(280px);
left: px2rem(166px);
z-index: 101;
}
}
svg path, svg rect{
fill: #fff;
// fill: #449284;
}
</style>
<template>
<div class="loading_container">
<div class="load_img" :style="{backgroundPositionY: -(positionY%7)*2.5 + 'rem'}">
</div>
<svg class="load_ellipse" xmlns="http://www.w3.org/2000/svg" version="1.1">
<ellipse cx="26" cy="10" rx="26" ry="10" style="fill:#ddd;stroke:none;"></ellipse>
</svg>
</div>
</template>
<script>
export default {
data(){
return{
positionY: 0,
timer: null,
}
},
mounted(){
this.timer = setInterval(() => {
this.positionY ++;
}, 600)
},
beforeDestroy(){
clearInterval(this.timer);
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
@keyframes load{
0% {transform: translateY(0px);}
50% {transform: translateY(-50px);}
100% {transform: translateY(0px);}
}
@keyframes ellipse{
0% {transform: scale(1);}
50% {transform: scale(0.3);}
100% {transform: scale(1);}
}
.loading_container{
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
@include wh(2.5rem, 2.5rem);
}
.load_img{
@include wh(100%, 100%);
// background: url(../../images/icon_loading.png) no-repeat 0 0;
background: url(../../images/loading-new.png) no-repeat 0 0;
background-size: 2.5rem auto;
transform: translateY(0px);
animation: load .6s infinite ease-in-out;
position: relative;
z-index: 11;
}
.load_ellipse{
position: absolute;
@include wh(2.6rem, 2rem);
top: 2.2rem;
left: 0.2rem;
z-index: 10;
animation: ellipse .6s infinite ease-in-out;
}
</style>
import { getStyle } from '../../config/mUtils'
import { imgBaseUrl, localapi, proapi } from '../../config/env'
export const loadMore = {
directives: {
'load-more': {
bind: (el, binding) => {
let windowHeight = window.screen.height;
let height;
let setTop;
let paddingBottom;
let marginBottom;
let requestFram;
let oldScrollTop;
let scrollEl;
let heightEl;
let scrollType = el.attributes.type && el.attributes.type.value;
let scrollReduce = 2;
if (scrollType == 2) {
scrollEl = el;
heightEl = el.children[0];
} else {
scrollEl = document.body;
heightEl = el;
}
el.addEventListener('touchstart', () => {
height = heightEl.clientHeight;
if (scrollType == 2) {
height = height
}
setTop = el.offsetTop;
paddingBottom = getStyle(el, 'paddingBottom');
marginBottom = getStyle(el, 'marginBottom');
}, false)
el.addEventListener('touchmove', () => {
loadMore();
}, false)
el.addEventListener('touchend', () => {
oldScrollTop = scrollEl.scrollTop;
moveEnd();
}, false)
const moveEnd = () => {
requestFram = requestAnimationFrame(() => {
if (scrollEl.scrollTop != oldScrollTop) {
oldScrollTop = scrollEl.scrollTop;
moveEnd()
} else {
cancelAnimationFrame(requestFram);
height = heightEl.clientHeight;
loadMore();
}
})
}
const loadMore = () => {
if (scrollEl.scrollTop + windowHeight >= height + setTop + paddingBottom + marginBottom - scrollReduce) {
binding.value();
}
}
}
}
}
};
export const getImgPath = {
methods: {
//传递过来的图片地址需要处理后才能正常使用
getImgPath(path) {
let suffix;
if (!path) {
return '//yqy.cangdu.org/img/default.jpg'
}
if (path.indexOf('jpeg') !== -1) {
suffix = '.jpeg'
} else {
suffix = '.png'
}
let url = '/' + path.substr(0, 1) + '/' + path.substr(1, 2) + '/' + path.substr(3) + suffix;
return 'https://fuss10.elemecdn.com' + url
},
}
}
\ No newline at end of file
<template>
<div class="rating_container">
<section class="star_container">
<svg class="grey_fill" v-for="num in 5" :key="num">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#star"></use>
</svg>
</section>
<div :style="'width:' + rating*2/5 + 'rem'" class="star_overflow">
<section class="star_container" >
<svg class="orange_fill" v-for="num in 5" :key="num">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#star"></use>
</svg>
</section>
</div>
</div>
</template>
<script>
export default {
data(){
return{
}
},
mounted(){
},
props:['rating'],
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.rating_container{
position: relative;
top: .2rem;
@include wh(2rem, .4rem);
.star_overflow{
overflow: hidden;
position: relative;
height: 100%;
}
.star_container{
position: absolute;
display: flex;
width: 2rem;
height: 0.4rem;
top: -0.02rem;
left: -0.02rem;
.grey_fill{
fill: #d1d1d1;
}
.orange_fill{
fill: #ff9a0d;
}
}
}
</style>
<template>
<div class="shoplist_container">
<ul v-load-more="loaderMore" v-if="shopListArr.length" type="1">
<router-link :to="{path: 'shop', query:{geohash, id: item.id}}" v-for="item in shopListArr" tag='li' :key="item.id" class="shop_li">
<section>
<img :src="imgBaseUrl + item.image_path" class="shop_img">
</section>
<hgroup class="shop_right">
<header class="shop_detail_header">
<h4 :class="item.is_premium? 'premium': ''" class="" class="shop_title ellipsis">{{item.name}}</h4>
<ul class="shop_detail_ul">
<li v-for="item in item.supports" :key="item.id" class="supports">{{item.icon_name}}</li>
</ul>
</header>
<h5 class="rating_order_num">
<section class="rating_order_num_left">
<section class="rating_section">
<rating-star :rating='item.rating'></rating-star>
<span class="rating_num">{{item.rating}}</span>
</section>
<section class="order_section">
月售{{item.recent_order_num}}
</section>
</section>
<section class="rating_order_num_right">
<span class="delivery_style delivery_left" v-if="item.delivery_mode">{{item.delivery_mode.text}}</span>
<span class="delivery_style delivery_right" v-if="zhunshi(item.supports)">准时达</span>
</section>
</h5>
<h5 class="fee_distance">
<p class="fee">
¥{{item.float_minimum_order_amount}}起送
<span class="segmentation">/</span>
{{item.piecewise_agent_fee.tips}}
</p>
<p class="distance_time">
<span v-if="Number(item.distance)">{{item.distance > 1000? (item.distance/1000).toFixed(2) + 'km': item.distance + 'm'}}
<span class="segmentation">/</span>
</span>
<span v-else>{{item.distance}}</span>
<span class="segmentation">/</span>
<span class="order_time">{{item.order_lead_time}}</span>
</p>
</h5>
</hgroup>
</router-link>
</ul>
<ul v-else class="animation_opactiy">
<li class="list_back_li" v-for="item in 10" :key="item">
<img src="../../images/shopback.svg" class="list_back_svg">
</li>
</ul>
<p v-if="touchend" class="empty_data">没有更多了</p>
<aside class="return_top" @click="backTop" v-if="showBackStatus">
<svg class="back_top_svg">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#backtop"></use>
</svg>
</aside>
<div ref="abc" style="background-color: red;"></div>
<transition name="loading">
<loading v-show="showLoading"></loading>
</transition>
</div>
</template>
<script>
import {mapState} from 'vuex'
import {shopList} from 'src/service/getData'
import {imgBaseUrl} from 'src/config/env'
import {showBack, animate} from 'src/config/mUtils'
import {loadMore, getImgPath} from './mixin'
import loading from './loading'
import ratingStar from './ratingStar'
export default {
data(){
return {
offset: 0, // 批次加载店铺列表,每次加载20个 limit = 20
shopListArr:[], // 店铺列表数据
preventRepeatReuqest: false, //到达底部加载数据,防止重复加载
showBackStatus: false, //显示返回顶部按钮
showLoading: true, //显示加载动画
touchend: false, //没有更多数据
imgBaseUrl,
}
},
mounted(){
this.initData();
},
components: {
loading,
ratingStar,
},
props: ['restaurantCategoryId', 'restaurantCategoryIds', 'sortByType', 'deliveryMode', 'supportIds', 'confirmSelect', 'geohash'],
mixins: [loadMore, getImgPath],
computed: {
...mapState([
'latitude','longitude'
]),
},
updated(){
// console.log(this.supportIds, this.sortByType)
},
methods: {
async initData(){
//获取数据
let res = await shopList(this.latitude, this.longitude, this.offset, this.restaurantCategoryId);
this.shopListArr = [...res];
if (res.length < 20) {
this.touchend = true;
}
this.hideLoading();
//开始监听scrollTop的值,达到一定程度后显示返回顶部按钮
showBack(status => {
this.showBackStatus = status;
});
},
//到达底部加载更多数据
async loaderMore(){
if (this.touchend) {
return
}
//防止重复请求
if (this.preventRepeatReuqest) {
return
}
this.showLoading = true;
this.preventRepeatReuqest = true;
//数据的定位加20位
this.offset += 20;
let res = await shopList(this.latitude, this.longitude, this.offset, this.restaurantCategoryId);
this.hideLoading();
this.shopListArr = [...this.shopListArr, ...res];
//当获取数据小于20,说明没有更多数据,不需要再次请求数据
if (res.length < 20) {
this.touchend = true;
return
}
this.preventRepeatReuqest = false;
},
//返回顶部
backTop(){
animate(document.body, {scrollTop: '0'}, 400,'ease-out');
},
//监听父级传来的数据发生变化时,触发此函数重新根据属性值获取数据
async listenPropChange(){
this.showLoading = true;
this.offset = 0;
let res = await shopList(this.latitude, this.longitude, this.offset, '', this.restaurantCategoryIds, this.sortByType, this.deliveryMode, this.supportIds);
this.hideLoading();
//考虑到本地模拟数据是引用类型,所以返回一个新的数组
this.shopListArr = [...res];
},
//开发环境与编译环境loading隐藏方式不同
hideLoading(){
this.showLoading = false;
},
zhunshi(supports){
let zhunStatus;
if ((supports instanceof Array) && supports.length) {
supports.forEach(item => {
if (item.icon_name === '准') {
zhunStatus = true;
}
})
}else{
zhunStatus = false;
}
return zhunStatus
},
},
watch: {
//监听父级传来的restaurantCategoryIds,当值发生变化的时候重新获取餐馆数据,作用于排序和筛选
restaurantCategoryIds: function (value){
this.listenPropChange();
},
//监听父级传来的排序方式
sortByType: function (value){
this.listenPropChange();
},
//监听父级的确认按钮是否被点击,并且返回一个自定义事件通知父级,已经接收到数据,此时父级才可以清除已选状态
confirmSelect: function (value){
this.listenPropChange();
}
}
}
</script>
<style lang="scss" scoped>
@import 'src/style/mixin';
.shoplist_container{
background-color: #fff;
margin-bottom: 2rem;
}
.shop_li{
display: flex;
border-bottom: 0.025rem solid #f1f1f1;
padding: 0.7rem 0.4rem;
}
.shop_img{
@include wh(2.7rem, 2.7rem);
display: block;
margin-right: 0.4rem;
}
.list_back_li{
height: 4.85rem;
.list_back_svg{
@include wh(100%, 100%)
}
}
.shop_right{
flex: auto;
.shop_detail_header{
@include fj;
align-items: center;
.shop_title{
width: 8.5rem;
color: #333;
padding-top: .01rem;
@include font(0.65rem, 0.65rem, 'PingFangSC-Regular');
font-weight: 700;
}
.premium::before{
content: '品牌';
display: inline-block;
font-size: 0.5rem;
line-height: .6rem;
color: #333;
background-color: #ffd930;
padding: 0 0.1rem;
border-radius: 0.1rem;
margin-right: 0.2rem;
}
.shop_detail_ul{
display: flex;
transform: scale(.8);
margin-right: -0.3rem;
.supports{
@include sc(0.5rem, #999);
border: 0.025rem solid #f1f1f1;
padding: 0 0.04rem;
border-radius: 0.08rem;
margin-left: 0.05rem;
}
}
}
.rating_order_num{
@include fj(space-between);
height: 0.6rem;
margin-top: 0.52rem;
.rating_order_num_left{
@include fj(flex-start);
.rating_section{
display: flex;
.rating_num{
@include sc(0.4rem, #ff6000);
margin: 0 0.2rem;
}
}
.order_section{
transform: scale(.8);
margin-left: -0.2rem;
@include sc(0.4rem, #666);
}
}
.rating_order_num_right{
display: flex;
align-items: center;
transform: scale(.7);
min-width: 5rem;
justify-content: flex-end;
margin-right: -0.8rem;
.delivery_style{
font-size: 0.4rem;
padding: 0.04rem 0.08rem 0;
border-radius: 0.08rem;
margin-left: 0.08rem;
border: 1px;
}
.delivery_left{
color: #fff;
background-color: $blue;
border: 0.025rem solid $blue;
}
.delivery_right{
color: $blue;
border: 0.025rem solid $blue;
}
}
}
.fee_distance{
margin-top: 0.52rem;
@include fj;
@include sc(0.5rem, #333);
.fee{
transform: scale(.9);
@include sc(0.5rem, #666);
}
.distance_time{
transform: scale(.9);
span{
color: #999;
}
.order_time{
color: $blue;
}
.segmentation{
color: #ccc;
}
}
}
}
.loader_more{
@include font(0.6rem, 3);
text-align: center;
color: #999;
}
.empty_data{
@include sc(0.5rem, #666);
text-align: center;
line-height: 2rem;
}
.return_top{
position: fixed;
bottom: 3rem;
right: 1rem;
.back_top_svg{
@include wh(2rem, 2rem);
}
}
.loading-enter-active, .loading-leave-active {
transition: opacity 1s
}
.loading-enter, .loading-leave-active {
opacity: 0
}
</style>
<template>
<section :class="isNavFix ? 'nav-top fixed' : 'nav-top'">
<div class="nav-part" :style="'background:'+bgColor">
<div class="nav-title">
<span class="nav-back" @click="goBack">
<img src="../../images/grey-throw.png"/>
</span>
{{title}}
<!-- <span class="nav-share" @click="goShare">
<img src="../../images/Shape1@2x.png"/>
</span> -->
</div>
</div>
</section>
</template>
<script>
export default {
data(){
return{
// title:'测试',
content:'',
shareImageUrl:'',
}
},
props:{
bgColor:{//背景色
type:String,
default:''
},
title:{//标题
type:String,
default:'暂无数据'
},
isNavFix:{//是否fix定位
type:Boolean,
default:true
},
burialPoint:{
default:'',
type:String
}
},
mounted(){
if(this.burialPoint == 'activity'){
this.objPoint = {
menuLevel:2,
menuFromCode:'m_home',
menuCode:'m_content_list',
functionCode:'f_activity',
actionCode:'c_last'
}
}
},
methods: {
//返回
goBack(){
if(this.burialPoint == 'activity'){
this.pageBurialPoin(this.objPoint);
}
this.$router.back(-1);
//rocNative.backPreviousPage();
//rocNative.goBack();
},
//分享
goShare(){
let url = location.hef,_this = this;
rocNative.shareWechat({
url:url,
title:_this.title,
content:_this.content,
shareImageUrl:_this.shareImageUrl
})
}
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.nav-top{
height: px2rem(65px);
background: #fff;
color: #333;
position: relative;
z-index: 109;
.nav-back{
display: inline-block;
position: absolute;
left:px2rem(8px);;
top:0;
height: px2rem(25px);
width: px2rem(25px);
transform:rotate(180deg);
}
img{
display: block;
width: 100%;
height: 100%
}
.nav-icon{
display: inline-block;
width: 50px;
height: 50px;
svg{
stroke: #000;
fill: #0000ff;
}
}
.nav-share{
position: absolute;
right: px2rem(8px);;
top:0;
height: px2rem(25px);
width: px2rem(25px);
}
.nav-title{
display: inline-block;
width: 100%;
/* padding:0 px2rem(33px);*/
position: relative;
}
.nav-part{
width: 100%;
font-size: px2rem(18px);
text-align: center;
padding: px2rem(30px) 0 px2rem(10px) 0;
/* height: px2rem(25px);*/
}
}
.fixed{
.nav-part{
position: fixed;
top:0;
left: 0;
border-bottom: 1px solid #E7E7E7;
/* height: px2rem(25px);*/
}
}
</style>
<!-- courselist中的人数/收藏等细节,在图片的下方显示,有此种情形时,选用此组件 -->
<template>
<div class="section" :style="{paddingLeft:padding,paddingRight:padding}">
<header :class="{'title-center':titlePosition=='center','title-left':titlePosition=='left','title-right':titlePosition=='right'}">
<div class="title">{{title}}</div>
<div class="change-content" :class="{'active':hasChange=='true'}">
<!-- 注意更改这里 -->
<div class="text">换一批</div>
<img class="icon" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/recommendPic.png" alt="">
</div>
</header>
<div class="recommends">
<div class="recommend-item" v-for="(course,index) in courses" :key="index">
<div class="top-sec">
<img class="recommend-image" :src="course.imgUrl" alt="">
<div
class="recommend-course-tag"
:class="{'active':hasCourseTag=='true','left-tag':tagPosition=='left','right-tag':tagPosition=='right'}"
>{{course.courseTag}}</div>
<!-- <div class="recommend-name">{{course.name}}</div> -->
<!-- <div class="recommend-num"><span>{{course.num}}</span>人已学</div> -->
</div>
<div class="recommend-title">{{course.title}}</div>
<div class="course-detail">
<div class="course-detail-item course-time">
{{course.time}}
</div>
<div class="course-detail-item bar"></div>
<div class="course-detail-item course-num">{{course.num}}已学</div>
<div class="course-detail-item save-button not-saved" v-if="!course.saveStatus">收藏</div>
<div class="course-detail-item save-button has-saved" v-if="course.saveStatus">已收藏</div>
</div>
</div>
</div>
<div class="show-more" :class="{'active':hasMore=='true'}">
更多课程
</div>
</div>
</template>
<script>
export default {
name:"CourseList",
props:{
courses:{
type:Array,
default:()=>{
return [
{name:'肖丹',num:'666人',time:'刚刚',saveStatus:true,title:'高血压急诊处理原则',imgUrl:'https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/recommendPic.png',courseTag:'诊断'}
]
}
},
title:{
type:String,
default:'更多课程'
},
titlePosition:{
type:String,
default:'left'
},
hasChange:{
type:String,
default:false//传递true/false
},
hasMore:{
type:String,
default:false//传递true/false
},
hasCourseTag:{
type:String,
default:true//传递true/false
},
tagPosition:{
type:String,
default:'left'
},
padding:{
type:String,
default:'0'//注意传输单位,如'2rem''2px'
}
},
data(){
return{
}
},
mounted(){
},
created(){
}
}
</script>
<style lang="scss" scoped>
@import 'src/style/mixin';
.section>header{
display: flex;
display:-webkit-flex;
flex-direction: row;
position:relative;
align-items:center;
margin-top:px2rem(20px);
margin-bottom: px2rem(20px);
}
.section>header.title-center{
justify-content: center;
}
.section>header.title-left{
justify-content: flex-start;
}
.section>header.title-right{
justify-content: flex-end;
}
.section>header .title{
font-size:px2rem(18px);
color:#333;
}
.section>header .change-content{
display:none;
}
.section>header .change-content.active{
position:absolute;
right:0;
width:px2rem(56.5px);
height:px2rem(16px);
padding-left:px2rem(7px);
border:px2rem(0.5px) solid #A9AEB7;
border-radius:px2rem(8.5px);
opacity:0.5;
font-weight:400;
color:#28344c;
display:block;
padding-top:px2rem(0.5px);
padding-bottom:px2rem(0.5px);
}
.section>header .change-content .text{
font-size:px2rem(11px);
width:px2rem(33px);
height:px2rem(14px);
line-height:px2rem(14px);
}
.section>header .change-content .icon{/*!加图片后调整*/
width:px2rem(12px);
height:px2rem(12px);
position:absolute;
top:px2rem(1.5px);
right:0;
}
// .section>header .change-content .icon img{
// width:px2rem(12px);
// height:px2rem(12px);
// }
.recommends{
display: -webkit-flex;
display:flex;
flex-direction:row;
flex-wrap:wrap;
-ms-flex-wrap: wrap;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
width:px2rem(345px)
}
.recommend-item{
position: relative;
width:px2rem(172.5px);
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.recommend-item:nth-child(odd){
padding-right:px2rem(2.5px);
}
.recommend-item:nth-child(even){
padding-left:px2rem(2.5px);
}
.recommend-item .top-sec{
width:px2rem(170px);
height:px2rem(95.5px);
position:relative;
}
.recommend-item .recommend-image{
/* width:100%; */
width:px2rem(170px);
height:px2rem(95.5px);
border-radius: px2rem(3px);
}
.recommend-item .recommend-course-tag{
display:none;
}
.recommend-item .recommend-course-tag.active{
display:block;
position:absolute;
top:px2rem(5px);
left:px2rem(5px);
width:px2rem(40px);
height:px2rem(16px);
line-height:px2rem(16px);
background-color:#FAFCFF;
font-size:px2rem(10px);
color:#4A87D4;
text-align:center;
border:px2rem(0.5px) solid rgba(195,220,251,1);
border-radius: px2rem(2px);
// padding:px2rem(3px) 0;
}
.recommend-item .recommend-course-tag.active.left-tag{
top:px2rem(5px);
left:px2rem(5px);
}
.recommend-item .recommend-course-tag.active.right-tag{
top:px2rem(5px);
right:px2rem(5px);
}
.recommend-item .recommend-title{
margin-top:px2rem(5px);
margin-bottom:px2rem(6px);
height:px2rem(38px);
line-height:px2rem(19px);
font-size:px2rem(14px);
font-weight:400;
color:rgb(51,51,51);
overflow:hidden;
text-overflow:ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.course-detail {
display:flex;
display:-webkit-flex;
flex-direction:row;
position:relative;
margin-bottom:px2rem(18px);
}
.course-detail div.course-detail-item{
font-size:px2rem(12px);
}
.course-detail .course-time,.course-detail .course-num{
height:px2rem(12px);
line-height:px2rem(12px);
color:#999;
margin-top:px2rem(6px);
}
.course-detail .bar{//?这个样式注意一下
width:px2rem(1.5px);
height:px2rem(10.5px);
background-color:#999;
margin-top:px2rem(6.5px);
}
.course-detail .course-time{
margin-right:px2rem(5px)
}
.course-detail .course-num{
margin-left:px2rem(3.5px)
}
.course-detail .save-button{
position:absolute;
top:px2rem(3px);
right:px2rem(2.5px);
font-size:px2rem(11px);
text-align:center;
}
.course-detail .save-button.not-saved{
width:px2rem(30px);
height:px2rem(18px);
line-height:px2rem(18px);
color:#666;
background-color:rgba(247,248,249,1)
}
.course-detail .save-button.has-saved{
width:px2rem(39px);
height:px2rem(18px);
line-height:px2rem(18px);
color:#F47A48;
background-color:rgba(244,122,72,0.04);
}
/* 更多课程 */
.section .show-more{
display:none;
}
.section .show-more.active{
display:block;
font-size:px2rem(15px);
font-weight:400;
color:#999;
text-align:center;
padding-top:px2rem(14px);
padding-bottom: px2rem(15px);
border-top:px2rem(0.5px) solid #e7e7e7;
}
</style>
<template>
<div class="info">
<!-- 左侧头像 -->
<div class="info-profile">
<img :src="profileImage" alt="">
</div>
<!-- 右侧个人信息 -->
<div class="info-detail">
<div class="info-detail-name">
{{profileName}}
</div>
<div class="info-detail-others"><span>{{date}}</span>&nbsp;&nbsp;您与云鹊医相识已经<span>{{days}}</span>天啦
</div>
</div>
<!-- arrow -->
<div class="arrow-right">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/arrowRight.png" alt="">
</div>
</div>
</template>
<script>
export default {
name:'PersonalInformation',
props:{
profileImage:{
type:String,
default:'https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/basicBg.png'
},
profileName:{
type:String,
default:'你的名字'
},
date:{
type:String,
default:'2018.10.1'
},
days:{
type:Number,
default:343
}
},
}
</script>
<style lang="scss" scoped>
@import 'src/style/mixin';
.info{
display:flex;
display:-webkit-flex;
flex-direction:row;
justify-content: center;
// position: absolute;
// top:px2rem(80px);
width:px2rem(345px);
height:px2rem(70px);
background-color: $fc;
border-radius:px2rem(3px);
box-shadow: 0 px2rem(1px) px2rem(11px) 0 rgba(21,138,123,0.1);
}
.info-profile {
margin-right:px2rem(5px);
display:flex;
display:-webkit-flex;
flex-direction: row;
align-items:center;
}
.info-profile img{
width:px2rem(40px);
height:px2rem(40px);
border-radius:px2rem(20px);
}
.info-detail{
display:flex;
display:-webkit-flex;
flex-direction:column;
justify-content: center;
width:px2rem(260px);
}
.info-detail .info-detail-name{
font-size:px2rem(15px);
font-weight:500;
// margin-bottom:px2rem(3px);
text-align:left;
}
.info-detail .info-detail-others{
height:px2rem(13px);
line-height:px2rem(13px);
font-size:px2rem(13px);
font-weight:400;
margin-top:px2rem(10px);
color:#999;
span{
color:#999;
}
}
.arrow-right{
margin-left:px2rem(5px);
}
.arrow-right img{
width:px2rem(20px);
height:px2rem(20px);
}
</style>
<template>
<div class="section" :style="{paddingLeft:padding,paddingRight:padding}">
<header :class="{'title-center':titlePosition=='center','title-left':titlePosition=='left','title-right':titlePosition=='right'}">
<div class="title">{{title}}</div>
<div class="change-content" :class="{'active':hasChange=='true'}">
<!-- 注意更改这里 -->
<div class="text">换一批</div>
<img class="icon" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/recommendPic.png" alt="">
</div>
</header>
<div class="recommends">
<div class="recommend-item" v-for="(recommend,index) in recommends" :key="index">
<div class="top-sec">
<img class="recommend-image" :src="recommend.imgUrl" alt="">
<div
class="recommend-course-tag"
:class="{'active':hasCourseTag=='true','left-tag':tagPosition=='left','right-tag':tagPosition=='right'}"
>{{recommend.courseTag}}</div>
<div class="recommend-name">{{recommend.name}}</div>
<div class="recommend-num"><span>{{recommend.num}}</span>人已学</div>
</div>
<div class="recommend-title">{{recommend.title}}</div>
</div>
</div>
<div class="show-more" :class="{'active':hasMore=='true'}">
更多课程
</div>
</div>
</template>
<script>
export default {
name:"RecommendList",
props:{
recommends:{
type:Array,
default:()=>{
return [
{name:'肖丹',num:'666人',time:'刚刚',saveStatus:true,title:'高血压急诊处理原则',imgUrl:'https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/recommendPic.png',courseTag:'诊断'}
]
}
},
title:{
type:String,
default:'更多课程'
},
titlePosition:{
type:String,
default:'left'
},
hasChange:{
type:String,
default:'false'//传递true/false
},
hasMore:{
type:String,
default:'false'//传递true/false
},
hasCourseTag:{
type:String,
default:'false'//传递true/false
},
tagPosition:{
type:String,
default:'left'
},
padding:{
type:String,
default:'0'//注意传输单位,如'2rem''2px'
}
},
data(){
return{
// iconJCLink:'https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/iconJC.png',//检查
// iconSFLink:'https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/iconSF.png',//随访
// iconZDLink:'https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/iconZD.png',//诊断
// iconZLLink:'https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/iconZL.png',//治疗
}
},
mounted(){
// this.recommends.forEach((v,k)=>{
// switch (v.tagType){
// case 'JC':
// v.tagUrl=this.iconJCLink;
// break;
// case 'SF':
// v.tagUrl=this.iconSFLink;
// break;
// case 'ZD':
// v.tagUrl=this.iconZDLink;
// break;
// case 'ZL':
// v.tagUrl=this.iconZLLink;
// break;
// default:
// v.tagUrl=""
// }
// })
},
// props:{
// recommends:"",
// title:"",
// position:"",
// hasChange:null,//希望含有时,穿参数true
// },
created(){
console.log(this.hasChange,this.position,this.recommends[0])
}
}
</script>
<style lang="scss" scoped>
@import 'src/style/mixin';
.section>header{
display: flex;
display:-webkit-flex;
flex-direction: row;
position:relative;
align-items:center;
margin-top:px2rem(20px);
margin-bottom: px2rem(20px);
}
.section>header.title-center{
justify-content: center;
}
.section>header.title-left{
justify-content: flex-start;
}
.section>header.title-right{
justify-content: flex-end;
}
.section>header .title{
font-size:px2rem(18px);
color:#333;
}
.section>header .change-content{
display:none;
}
.section>header .change-content.active{
position:absolute;
right:0;
width:px2rem(56.5px);
height:px2rem(16px);
padding-left:px2rem(7px);
border:px2rem(0.5px) solid #A9AEB7;
border-radius:px2rem(8.5px);
opacity:0.5;
font-weight:400;
color:#28344c;
display:block;
padding-top:px2rem(0.5px);
padding-bottom:px2rem(0.5px);
}
.section>header .change-content .text{
font-size:px2rem(11px);
width:px2rem(33px);
height:px2rem(14px);
line-height:px2rem(14px);
}
.section>header .change-content .icon{/*!加图片后调整*/
width:px2rem(12px);
height:px2rem(12px);
position:absolute;
top:px2rem(1.5px);
right:0;
}
.recommends{
display: -webkit-flex;
display:flex;
flex-direction:row;
flex-wrap:wrap;
-ms-flex-wrap: wrap;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
width:px2rem(345px)
}
.recommend-item{
position: relative;
width:px2rem(172.5px);
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.recommend-item:nth-child(odd){
padding-right:px2rem(2.5px);
}
.recommend-item:nth-child(even){
padding-left:px2rem(2.5px);
}
.recommend-item .top-sec{
width:px2rem(170px);
height:px2rem(95.5px);
position:relative;
}
.recommend-item .recommend-image{
/* width:100%; */
width:px2rem(170px);
height:px2rem(95.5px);
}
.recommend-item .recommend-course-tag{
display:none;
}
.recommend-item .recommend-course-tag.active{
display:block;
position:absolute;
top:px2rem(5px);
left:px2rem(5px);
width:px2rem(40px);
height:px2rem(16px);
line-height:px2rem(16px);
background-color:#FAFCFF;
font-size:px2rem(10px);
color:#4A87D4;
text-align:center;
border:px2rem(0.5px) solid rgba(195,220,251,1);
border-radius: px2rem(2px);
// padding:px2rem(3px) 0;
}
.recommend-item .recommend-course-tag.active.left-tag{
top:px2rem(5px);
left:px2rem(5px);
}
.recommend-item .recommend-course-tag.active.right-tag{
top:px2rem(5px);
right:px2rem(5px);
}
.recommend-item .recommend-title{
margin-top:px2rem(5px);
margin-bottom:px2rem(6px);
height:px2rem(38px);
line-height:px2rem(19px);
font-size:px2rem(14px);
font-weight:400;
color:rgb(51,51,51);
overflow:hidden;
text-overflow:ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.recommend-item .recommend-name{
position:absolute;
top:px2rem(79.5px);
left:px2rem(18px);
width:px2rem(40px);
height:px2rem(11px);
line-height:px2rem(11px);
font-size:px2rem(11px);
font-weight:400;
color:rgb(255,255,255);
}
.recommend-item .recommend-num{
position:absolute;
top:px2rem(79.5px);
right:px2rem(5px);
font-size:px2rem(11px);
/* width:5.2rem; */
height:px2rem(11px);
line-height:px2rem(11px);
font-weight:400;
color:rgb(255,255,255);
}
.recommend-item .recommend-num span{
color:rgb(255,255,255);
}
/* 更多课程 */
.section .show-more{
display:none;
}
.section .show-more.active{
display:block;
font-size:px2rem(15px);
font-weight:400;
color:#999;
text-align:center;
padding-top:px2rem(14px);
padding-bottom: px2rem(15px);
border-top:px2rem(0.5px) solid #e7e7e7;
}
</style>
<template>
<div class="alet_container">
<section class="tip_text_container">
我是文本
</section>
</div>
</template>
<script>
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="wrapper" :class="{active:isScroll}">
<!-- <div class="status-bar"></div> -->
<div class="top-header" :class="{active:isScroll}">
<div class="content left-icon" @click="goBack()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png" alt="">
</div>
<div v-if="isScroll && isJSJ" class="content title" :class="{active:isScroll}">讲师集</div>
<div v-if="isScroll && !isJSJ" class="content title" :class="{active:isScroll}">云鹊医讲师</div>
<!-- <div class="content right-icon" @click="share()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon.png" alt="">
</div> -->
</div>
</div>
</template>
<script>
import {teacher_back} from '../../utils/buryingPoint.js';
// import {shareUrl} from '@/utils/index'
import {shareUrl} from '../../utils/index.js'
export default {
name:'MyHeader',
props:{
isOpacity:{
type:Boolean,
default:true
},
isScroll:{
type:Boolean,
default:false
},
isShare:{
type:Boolean,
default:true
},
doctorId:{
type:String,
default:""
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
computed: {
topTitle2() {
return this.topTitle
}
},
mounted(){
// console.log(this.isShare);
console.log(shareUrl);
console.log(`${shareUrl}`+'?doctorId='+this.doctorId)
},
methods:{
// backPre(){
// if(this.backMethod === 'inner') {
// this.$router.go(-1)
// } else {
// rocNative.goBack()
// }
// },
goBack(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
share(){
rocNative.shareWechat({
title1:'个人评价',
title2:'个人评价出现了喔',
shareUrl:`${shareUrl}gpr#/home`+'?doctorId='+this.doctorId,
type:6,
shareImageUrl:'https://file.yunqueyi.com/logo.png?version='+new Date().getTime(),
shareId:0
})
this.buryingPointShare();
},
/////////埋点//////////
//返回
buryingPointBack:function(){
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_back',
labelValue:'返回',
createdTime:new Date().getTime()
})
},
//分享
buryingPointShare:function(){
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_share',
labelValue:'分享',
createdTime:new Date().getTime()
})
},
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.wrapper{
position:fixed;
top: 0;
width:100%;
z-index:100000000;
/**************表头******************/
.top-header{
display:flex;
display:-webkit-flex;
flex-direction: row;
// justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果
align-items:center;
width:100%;
height:px2rem(45px);//header高度
margin-top:px2rem(25px);///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
}
.top-header.active{
// margin-top:0;
border-bottom:px2rem(2px) solid #e7e7e7;
background-color:#fff;
}
.top-header .left-icon{
margin-left:px2rem(15px);
}
.top-header .title{
width:px2rem(116px);
height:px2rem(18px);
line-height:px2rem(18px);
margin-left:px2rem(90px);
text-align:center;
color:#fff;
font-size:px2rem(18px);
}
.top-header .title.active{
color:#000;
}
.top-header .right-icon{
margin-left:px2rem(95px);
}
.top-header .left-icon img,.top-header .right-icon img{
display:block;//这样其外的div可以正好将其包裹住
width:px2rem(25px);
height:px2rem(25px);
}
}
.wrapper.active{
background-color:#fff;
// background-color:rgba(0,0,0,0.84);
// background-color:rgba(255,255,255,0.34)
}
</style>
<template>
<div>
<back-header :isScroll="isScroll" :backMethod="backMethod" :isJSJ="isJSJ"></back-header>
<div class="teach-top">
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</div>
</template>
<script>
import BackHeader from '../../components/teachers/back-header';
export default {
data () {
return {
bgColor:'#fff',
parmObj:''
}
},
components:{
BackHeader
},
props:{
isShowCount: {
default:false,
type:Boolean
},
followCount: {
type:Number,
default:0
},
studyCount: {
type:Number,
default:0
},
statusBarHeight: {
type:Number,
default:0
},
isScroll:{
type: Boolean,
default: false
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.pt150 {
margin-top: px2rem(150px)
}
.teach-top{
width: 100%;
height: px2rem(145px);
// @include bis('../../images/treatmentHeaderTop.png');
@include bis('../../images/treatmentHeaderTop.png');
.tc{
text-align: center;
}
.back{
position: fixed;
z-index: 110;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
font-size: px2rem(25px);
color: #fff;
padding: px2rem(45px) 0 px2rem(8px);
font-weight: 500
}
.count{
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
}
}
</style>
<template>
<div class="teach-top">
<span class="back" @click="backPre">
<!-- <img src="../../images/left-icon.png"> -->
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
</span>
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</template>
<script>
export default {
data () {
return {
parmObj:''
}
},
props:{
isShowCount: {
default:false,
type:Boolean
},
followCount: {
type:Number,
default:0
},
studyCount: {
type:Number,
default:0
},
statusBarHeight: {
type:Number,
default:0
},
backMethod: {
type: String,
default: 'native'
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.teach-top{
width: 100%;
height: px2rem(185px);
position: relative;
@include bis('../../images/headerTop.png');
.tc{
text-align: center;
}
.back{
position: fixed;
z-index: 110;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
font-size: px2rem(25px);
color: #fff;
padding: px2rem(55px) 0 px2rem(8px) 0;
font-weight: 500
}
.count{
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
}
}
</style>
<template>
<div>
<back-header :isScroll="isScroll" :backMethod="backMethod" :isJSJ="isJSJ"></back-header>
<div class="teach-top">
<!-- <div class="teach-top" :class="{'pt150': isScroll}"> -->
<!-- <div class="back" v-if="isScroll" @click="backPre" style="flex-direction:row;width:100%;">
<img src="../../images/left-icon.png">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
<span style="padding-bottom:10px;">dddd</span>
</div> -->
<!-- <TopNav :bgColor="bgColor" :title="navTitle" :isNavFix="isNavFix" :burialPoint="pointStyle"></TopNav> -->
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</div>
</template>
<script>
import BackHeader from '../../components/teachers/back-header';
export default {
data () {
return {
bgColor:'#fff',
parmObj:''
}
},
components:{
BackHeader
},
props:{
isShowCount: {
default:false,
type:Boolean
},
followCount: {
type:Number,
default:0
},
studyCount: {
type:Number,
default:0
},
statusBarHeight: {
type:Number,
default:0
},
isScroll:{
type: Boolean,
default: false
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.pt150 {
margin-top: px2rem(150px)
}
.teach-top{
width: 100%;
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.tc{
text-align: center;
}
.back{
position: fixed;
z-index: 110;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
font-size: px2rem(25px);
color: #fff;
padding: px2rem(55px) 0 px2rem(8px) 0;
font-weight: 500
}
.count{
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
}
}
</style>
<template>
<div class="wrapper" :class="{active:isScroll}">
<!-- <div class="status-bar"></div> -->
<div class="top-header" :class="{active:isScroll}">
<div class="content left-icon" @click="backPre()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png" alt="">
</div>
<div v-if="isScroll" class="content title" :class="{active:isScroll}">{{title}}</div>
<div v-if="!showShare" class="content right-icon" @click="share()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon.png" alt="">
</div>
</div>
</div>
</template>
<script>
import {mapMutations} from 'vuex'
// import {shareUrl} from '@/utils/index'
import {shareUrl} from '../../utils/index.js'
export default {
name:'MyHeader',
props:{
isOpacity:{
type:Boolean,
default:true
},
isScroll:{
type:Boolean,
default:false
},
showShare:{
type: Boolean,
default:true
},
doctorId:{
type:String,
default:""
},
title:{
type: String,
default: ""
},
isWeb:{
type: Boolean
}
},
mounted(){
// console.log(this.isShare);
console.log(shareUrl);
console.log(`${shareUrl}`+'?doctorId='+this.doctorId)
},
methods:{
...mapMutations([
'SET_CLEAR_VUEX'
]),
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
goBack(){
this.$emit('goBack');
if (this.isWeb) {
this.$router.go(-1)
} else {
rocNative.goBack();
}
this.SET_CLEAR_VUEX()
rocNative.goBack();
},
share(){
rocNative.shareWechat({
title1:'个人评价',
title2:'个人评价出现了喔',
shareUrl:`${shareUrl}gpr#/home`+'?doctorId='+this.doctorId,
type:6,
shareImageUrl:'https://file.yunqueyi.com/logo.png?version='+new Date().getTime(),
shareId:0
})
this.buryingPointShare();
},
//分享
buryingPointShare:function(){
rocNative.appBuryingPointEntrust({
...point_granking,
functionCode:'f_gpranking',
actionCode:'c_share',
labelValue:'分享',
createdTime:new Date().getTime()
})
},
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.wrapper{
position:fixed;
width:100%;
z-index:100000000;
/**************表头******************/
.top-header{
display:flex;
display:-webkit-flex;
flex-direction: row;
// justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果
align-items:center;
width:100%;
height:px2rem(45px);//header高度
margin-top:px2rem(25px);///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
}
.top-header.active{
// margin-top:0;
border-bottom:px2rem(2px) solid #e7e7e7;
background-color:#fff;
}
.top-header .left-icon{
margin-left:px2rem(15px);
}
.top-header .title{
// width:px2rem(116px);
height:px2rem(18px);
line-height:px2rem(18px);
margin-left:px2rem(90px);
text-align:center;
color:#fff;
font-size:px2rem(18px);
}
.top-header .title.active{
color:#000;
}
.top-header .right-icon{
margin-left:px2rem(95px);
}
.top-header .left-icon img,.top-header .right-icon img{
display:block;//这样其外的div可以正好将其包裹住
width:px2rem(25px);
height:px2rem(25px);
}
}
.wrapper.active{
background-color:#fff;
// background-color:rgba(0,0,0,0.84);
// background-color:rgba(255,255,255,0.34)
}
</style>
......@@ -292,7 +292,7 @@ export default {
selectAreaAction(item, index) {
if(item.name){
this.selectedAreaIndex = index
// this.selectedAreaSubIndex = -1
this.selectedAreaSubIndex = -1
this.allAreaSubList = item.cities
this.selectedAreaName = item.name
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册