提交 3e72bdf8 编写于 作者: guangjun.yang's avatar guangjun.yang

代码整理等

上级 dc6a4b8d
...@@ -75,7 +75,7 @@ import MergeTitle from "@/components/business/merge-title"; ...@@ -75,7 +75,7 @@ import MergeTitle from "@/components/business/merge-title";
import NoMoreContent from "@/components/business/no-more-content"; import NoMoreContent from "@/components/business/no-more-content";
import { Collapse, CollapseItem, Dialog, Toast } from 'vant'; import { Collapse, CollapseItem, Dialog, Toast } from 'vant';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getAppVersion } from "@/utils"; import { getAppVersion, getWebPageUrl } from "@/utils";
import vueFilters from '@/utils/filter'; import vueFilters from '@/utils/filter';
const actionMap = { const actionMap = {
11: "去考试", 11: "去考试",
...@@ -259,9 +259,8 @@ export default { ...@@ -259,9 +259,8 @@ export default {
// 跳转到课程 // 跳转到课程
gotoCourse: function(item, contentList, index, trySee) { gotoCourse: function(item, contentList, index, trySee) {
let token = localStorage.getItem('token'); let token = localStorage.getItem('token');
let jumpUrl = getWebPageUrl(`profexam/#/course-detail?courseId=${courseId}&projectId=${this.projectId}&token=${token}`); let jumpUrl = getWebPageUrl(`profexam/#/course-detail?courseId=${item.id}&projectId=${this.projectId}&token=${token}`);
window.location.href = jumpUrl; window.location.href = jumpUrl;
}, },
......
...@@ -54,10 +54,10 @@ export default { ...@@ -54,10 +54,10 @@ export default {
methods: { methods: {
// 广告位跳转 // 广告位跳转
jumpPage() { jumpPage() {
if (this.isWeb) { // if (this.isWeb) {
window.location.href = this.showInfo.jumpUrl; // window.location.href = this.showInfo.jumpUrl;
return; // return;
} // }
let paramList = [ let paramList = [
{ {
key: "pageUrl", key: "pageUrl",
......
<template>
<div class="download-button-wrapper" @click="download">
<img src="../../images/course/pica-icon.png" alt />
<span :class="{'short': needShort}">{{downloadTips}}</span>
</div>
</template>
<script>
export default {
data() {
return {
downloadTips: "打开云鹊医APP",
needShort: false,
}
},
methods: {
download() {
window.location.href =
"https://a.app.qq.com/o/simple.jsp?pkgname=com.picahealth.yunque";
},
},
created() {
setTimeout(() => {
this.downloadTips = '';
this.needShort = true;
}, 5000);
},
};
</script>
<style lang="less" scoped>
.download-button-wrapper {
display: flex;
// width: 100%;
position: absolute;
z-index: 1000;
top: 15px;
right: 0;
height: 30px;
align-items: center;
img {
position: relative;
left: 15px;
width: 30px;
height: 30px;
}
span {
display: inline-block;
height: 30px;
line-height: 30px;
padding: 0 8px 0 23px;
font-size: 12px;
font-weight: 700;
color: #5ba99b;
background: #fff;
width: 120px;
&.short {
width: 10px;
transition: width 1s;
-moz-transition: width 1s; /* Firefox 4 */
-webkit-transition: width 1s; /* Safari 和 Chrome */
-o-transition: width 1s; /* Opera */
padding: 0 12px;
}
}
}
</style>
\ No newline at end of file
...@@ -65,7 +65,7 @@ const user = { ...@@ -65,7 +65,7 @@ const user = {
// 通过登陆 // 通过登陆
goLogin() { goLogin() {
window.location.href = envConfig[process.env.BUILD_ENV]['phomeDemain'] + "/pica_login?target_url=" + encodeURIComponent(location.href); window.location.href = envConfig[process.env.BUILD_ENV]['webPageUrl'] + "/pica_login?target_url=" + encodeURIComponent(location.href);
}, },
// 登出 // 登出
......
...@@ -8,24 +8,24 @@ export const envConfig = { ...@@ -8,24 +8,24 @@ export const envConfig = {
// baseUrl: 'http://10.177.15.180:10202/', // baseUrl: 'http://10.177.15.180:10202/',
// baseUrl: 'http://192.168.140.14:10201/', // baseUrl: 'http://192.168.140.14:10201/',
// apiUrl: 'https://dev-api.yunqueyi.com/', apiUrl: 'https://dev-api.yunqueyi.com/',
// webPageUrl: 'https://dev-phome.yunqueyi.com/', webPageUrl: 'https://dev-phome.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/', baseUrl: 'https://dev-sc.yunqueyi.com/',
// //hactiveUrl: 'https://dev-hactive.yunqueyi.com', hactiveUrl: 'https://dev-hactive.yunqueyi.com',
fileUrl: 'https://dev-www.yunqueyi.com',
appId: 'wxf4e66242d31c81c2', // 用于微信授权登录
// http://dev-hactive.yunqueyi.com/message_push/#/study-card
// baseUrl: 'https://test1-sc.yunqueyi.com/', // baseUrl: 'https://test1-sc.yunqueyi.com/',
// apiUrl: 'https://test1-api.yunqueyi.com/', // apiUrl: 'https://test1-api.yunqueyi.com/',
// webPageUrl: 'https://test1-phome.yunqueyi.com/' // webPageUrl: 'https://test1-phome.yunqueyi.com/'
// hactiveUrl: 'https://dev-hactive.yunqueyi.com', // hactiveUrl: 'https://dev-hactive.yunqueyi.com',
// baseUrl: 'https://uat-sc.yunqueyi.com/', // baseUrl: 'https://uat-sc.yunqueyi.com/',
apiUrl: 'https://uat-api.yunqueyi.com/', // apiUrl: 'https://uat-api.yunqueyi.com/',
webPageUrl: 'https://uat-phome.yunqueyi.com/', // webPageUrl: 'https://uat-phome.yunqueyi.com/',
hactiveUrl: 'https://uat-hactive.yunqueyi.com', // hactiveUrl: 'https://uat-hactive.yunqueyi.com',
phomeDemain: 'https://dev-phome.yunqueyi.com', // fileUrl: 'https://dev-www.yunqueyi.com',
fileUrl: 'https://dev-www.yunqueyi.com', // appId: 'wxf4e66242d31c81c2', // 用于微信授权登录
appId: 'wxf4e66242d31c81c2', // 用于微信授权登录
// baseUrl: 'https://sc.yunqueyi.com/', // baseUrl: 'https://sc.yunqueyi.com/',
// apiUrl: 'https://api.yunqueyi.com/', // apiUrl: 'https://api.yunqueyi.com/',
...@@ -38,7 +38,6 @@ export const envConfig = { ...@@ -38,7 +38,6 @@ export const envConfig = {
apiUrl: 'https://dev-api.yunqueyi.com/', apiUrl: 'https://dev-api.yunqueyi.com/',
webPageUrl: 'https://dev-phome.yunqueyi.com/', webPageUrl: 'https://dev-phome.yunqueyi.com/',
hactiveUrl: 'https://dev-hactive.yunqueyi.com', hactiveUrl: 'https://dev-hactive.yunqueyi.com',
phomeDemain: 'https://dev-phome.yunqueyi.com',
fileUrl: 'https://dev-www.yunqueyi.com', fileUrl: 'https://dev-www.yunqueyi.com',
appId: 'wxf4e66242d31c81c2', // 用于微信授权登录 appId: 'wxf4e66242d31c81c2', // 用于微信授权登录
}, },
...@@ -47,7 +46,6 @@ export const envConfig = { ...@@ -47,7 +46,6 @@ export const envConfig = {
apiUrl: 'https://test1-api.yunqueyi.com/', apiUrl: 'https://test1-api.yunqueyi.com/',
webPageUrl: 'https://test1-phome.yunqueyi.com/', webPageUrl: 'https://test1-phome.yunqueyi.com/',
hactiveUrl: 'https://test1-hactive.yunqueyi.com', hactiveUrl: 'https://test1-hactive.yunqueyi.com',
phomeDemain: 'https://test1-phome.yunqueyi.com',
fileUrl: 'https://test1-www.yunqueyi.com', fileUrl: 'https://test1-www.yunqueyi.com',
appId: 'wxcaad75b7fff5659c', // 用于微信授权登录 appId: 'wxcaad75b7fff5659c', // 用于微信授权登录
}, },
...@@ -56,7 +54,6 @@ export const envConfig = { ...@@ -56,7 +54,6 @@ export const envConfig = {
apiUrl: 'https://uat-api.yunqueyi.com/', apiUrl: 'https://uat-api.yunqueyi.com/',
webPageUrl: 'https://uat-phome.yunqueyi.com/', webPageUrl: 'https://uat-phome.yunqueyi.com/',
hactiveUrl: 'https://uat-hactive.yunqueyi.com', hactiveUrl: 'https://uat-hactive.yunqueyi.com',
phomeDemain: 'https://uat-phome.yunqueyi.com',
fileUrl: 'https://uat-www.yunqueyi.com', fileUrl: 'https://uat-www.yunqueyi.com',
appId: 'wx342ef0e5afee54a7', // 用于微信授权登录 appId: 'wx342ef0e5afee54a7', // 用于微信授权登录
}, },
...@@ -65,7 +62,6 @@ export const envConfig = { ...@@ -65,7 +62,6 @@ export const envConfig = {
apiUrl: 'https://api.yunqueyi.com/', apiUrl: 'https://api.yunqueyi.com/',
webPageUrl: 'https://phome.yunqueyi.com/', webPageUrl: 'https://phome.yunqueyi.com/',
hactiveUrl: 'https://hactive.yunqueyi.com', hactiveUrl: 'https://hactive.yunqueyi.com',
phomeDemain: 'httpss://phome.yunqueyi.com',
fileUrl: 'https://www.yunqueyi.com', fileUrl: 'https://www.yunqueyi.com',
appId: 'wx2c577552a2d28550', // 用于微信授权登录 appId: 'wx2c577552a2d28550', // 用于微信授权登录
} }
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
</div> --> </div> -->
<Loading v-if="showLoading" /> <Loading v-if="showLoading" />
<DownloadButton v-if="showDownloadButton"></DownloadButton>
</div> </div>
</template> </template>
...@@ -88,6 +89,7 @@ import CourseCatalog from '@/components/course/course-catalog'; ...@@ -88,6 +89,7 @@ import CourseCatalog from '@/components/course/course-catalog';
import CourseWare from '@/components/course/course-ware'; import CourseWare from '@/components/course/course-ware';
import CourseComment from '@/components/course/course-comment'; import CourseComment from '@/components/course/course-comment';
import Loading from "@/components/common/common-loading"; import Loading from "@/components/common/common-loading";
import DownloadButton from "@/components/course/download-button";
import { getPdfFileUrl, formatLeftTimeObj, deepCopy } from '@/utils'; import { getPdfFileUrl, formatLeftTimeObj, deepCopy } from '@/utils';
export default { export default {
...@@ -98,7 +100,8 @@ export default { ...@@ -98,7 +100,8 @@ export default {
CourseCatalog, CourseCatalog,
CourseWare, CourseWare,
CourseComment, CourseComment,
Loading Loading,
DownloadButton
}, },
data() { data() {
return { return {
...@@ -120,6 +123,7 @@ export default { ...@@ -120,6 +123,7 @@ export default {
qsList: [], // 讨论列表 qsList: [], // 讨论列表
coverType: 0, // 遮罩, coverType: 0, // 遮罩,
showLoading: false, showLoading: false,
showDownloadButton: false,
}; };
}, },
computed: { computed: {
...@@ -163,6 +167,7 @@ export default { ...@@ -163,6 +167,7 @@ export default {
this.showLoading = true; this.showLoading = true;
this.GET(`/contents/courses/${courseId}/pcCourseInfo`, { projectId }).then(res => { this.GET(`/contents/courses/${courseId}/pcCourseInfo`, { projectId }).then(res => {
this.showLoading = false; this.showLoading = false;
this.showDownloadButton = true;
if (res.code == "000000") { if (res.code == "000000") {
const { const {
showFlag = 0, // 0可看,10该课程为付费课程-请去App查看,20可试看,激活/购买后才可查看 showFlag = 0, // 0可看,10该课程为付费课程-请去App查看,20可试看,激活/购买后才可查看
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
:options="videoOptions" :options="videoOptions"
@sk-tip="isShowSkDialog=true" @sk-tip="isShowSkDialog=true"
></CommonTcPlayer> ></CommonTcPlayer>
<div class="sk-btn-cover-new" @click="continueStudy()" v-if="bannerType == 2 && hasBindCard"> <!-- <div class="sk-btn-cover-new" @click="continueStudy()" v-if="bannerType == 2 && hasBindCard">
<span :class="{'android': isAndroid}">继续学习</span> <span :class="{'android': isAndroid}">继续学习</span>
</div> </div> -->
<!-- 项目标题 --> <!-- 项目标题 -->
<CommonDescription <CommonDescription
:projectName="project.projectName" :projectName="project.projectName"
...@@ -134,24 +134,6 @@ ...@@ -134,24 +134,6 @@
></span> ></span>
</div> </div>
<!-- <ShiKanCommonDialog
class="shikan"
needSubContent
content="试看结束"
subContent="购买后可看完整课程"
confirmBtnText="去购买"
:isShowDialog="isShowSkDialog"
@handlerAction="goBuyKc"
/>-->
<IOSDownloadDialog
class="shikan"
isSingle
content="请您下载新版本App"
cancleBtnText="我知道了"
:isShowDialog="isShowIOSDownloadDialog"
@handlerAction="goBack"
/>
<!-- 未登录提示 --> <!-- 未登录提示 -->
<div class="course-tips" v-if="!logged"> <div class="course-tips" v-if="!logged">
...@@ -187,11 +169,8 @@ ...@@ -187,11 +169,8 @@
@btnClick="download(1)" @btnClick="download(1)"
></CourseCovers> ></CourseCovers>
</div> </div>
<DownloadButton v-if="showDownloadButton"></DownloadButton>
<div class="download-abs" @click="download">
<img src="../images/course/pica-icon.png" alt />
<span :class="{'short': needShort}">{{downloadTips}}</span>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -212,8 +191,6 @@ import CommonDialog from "@/components/cme/common-dialog"; ...@@ -212,8 +191,6 @@ import CommonDialog from "@/components/cme/common-dialog";
import ExjumperButton from "@/components/cme/exjumper-button"; import ExjumperButton from "@/components/cme/exjumper-button";
import NoMoreContent from "@/components/business/no-more-content"; import NoMoreContent from "@/components/business/no-more-content";
import CommonAdertImg from "@/components/common/common-advert-img"; import CommonAdertImg from "@/components/common/common-advert-img";
import ShiKanCommonDialog from "@/components/cme/common-dialog";
import IOSDownloadDialog from "@/components/cme/common-dialog";
import { getWebPageUrl, gotoPage, getAppVersion } from "@/utils/index"; import { getWebPageUrl, gotoPage, getAppVersion } from "@/utils/index";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
...@@ -222,6 +199,7 @@ import { Toast } from "vant"; ...@@ -222,6 +199,7 @@ import { Toast } from "vant";
import BindCardButtonShare from "@/components/cme/bind-card-button-share"; import BindCardButtonShare from "@/components/cme/bind-card-button-share";
import ChangeCard from "@/components/cme/change-card"; import ChangeCard from "@/components/cme/change-card";
import CourseCovers from "@/components/course/course-covers"; import CourseCovers from "@/components/course/course-covers";
import DownloadButton from "@/components/course/download-button";
let cataOffsetTop = 0; let cataOffsetTop = 0;
let intorOffsetTop = 0; let intorOffsetTop = 0;
...@@ -319,8 +297,8 @@ export default { ...@@ -319,8 +297,8 @@ export default {
isShowSkDialog: false, isShowSkDialog: false,
isShowEndDialog: false, isShowEndDialog: false,
isShowFFDialog: false, isShowFFDialog: false,
isShowIOSDownloadDialog: false, needShort: false,
needShort: false showDownloadButton: false,
}; };
}, },
components: { components: {
...@@ -341,9 +319,8 @@ export default { ...@@ -341,9 +319,8 @@ export default {
NoMoreContent, NoMoreContent,
BindCardButtonShare, BindCardButtonShare,
ChangeCard, ChangeCard,
ShiKanCommonDialog, CourseCovers,
IOSDownloadDialog, DownloadButton
CourseCovers
}, },
computed: { computed: {
...@@ -371,10 +348,6 @@ export default { ...@@ -371,10 +348,6 @@ export default {
}, },
mounted() { mounted() {
window.addEventListener("scroll", this.scrollFun); window.addEventListener("scroll", this.scrollFun);
setTimeout(() => {
this.downloadTips = '';
this.needShort = true;
}, 5000);
}, },
beforeDestroyed() { beforeDestroyed() {
this.$refs.tcPlayerRef && this.$refs.tcPlayerRef.pause(); this.$refs.tcPlayerRef && this.$refs.tcPlayerRef.pause();
...@@ -634,6 +607,7 @@ export default { ...@@ -634,6 +607,7 @@ export default {
_this.showLoading = true; _this.showLoading = true;
this.NEW_GET(`cme/project/${_this.projectId}/info`, param).then(res => { this.NEW_GET(`cme/project/${_this.projectId}/info`, param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showDownloadButton = true;
if (videoUrl) { if (videoUrl) {
_this.limitTimes = this.$route.query.trySeeTime || 300000; _this.limitTimes = this.$route.query.trySeeTime || 300000;
_this.videoOptions.mp4 = videoUrl; _this.videoOptions.mp4 = videoUrl;
...@@ -903,12 +877,6 @@ export default { ...@@ -903,12 +877,6 @@ export default {
this.isShowSkDialog = false; this.isShowSkDialog = false;
type == 2 && this.confirm(); type == 2 && this.confirm();
}, },
// 直接返回到上层
goBack() {
this.isShowIOSDownloadDialog = false;
rocNative.goBack();
}
} }
}; };
</script> </script>
...@@ -1052,41 +1020,6 @@ export default { ...@@ -1052,41 +1020,6 @@ export default {
top: 0; top: 0;
left: 0; left: 0;
} }
.download-abs {
display: flex;
// width: 100%;
position: absolute;
z-index: 101;
top: 15px;
right: 0;
height: 30px;
align-items: center;
img {
position: relative;
left: 15px;
width: 30px;
height: 30px;
}
span {
display: inline-block;
height: 30px;
line-height: 30px;
padding: 0 8px 0 23px;
font-size: 12px;
font-weight: 700;
color: #5ba99b;
background: #fff;
width: 120px;
&.short {
width: 10px;
transition: width 1s;
-moz-transition: width 1s; /* Firefox 4 */
-webkit-transition: width 1s; /* Safari 和 Chrome */
-o-transition: width 1s; /* Opera */
padding: 0 12px;
}
}
}
} }
.no-more-bottom { .no-more-bottom {
position: relative; position: relative;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册