提交 9e1a8512 编写于 作者: 张平's avatar 张平

Merge branch 'dev-phrase2.0.1-200220' into 'release'

替换原生学情报告列表页等  code reviewer: 张平

替换原生学情报告列表页等  code reviewer: 张平

See merge request !9
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-column-vtc { .chart-column-vtc {
font-size: 14px; font-size: 14px;
} }
......
...@@ -207,7 +207,7 @@ export default { ...@@ -207,7 +207,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-column-htc { .chart-column-htc {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -262,7 +262,7 @@ export default { ...@@ -262,7 +262,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie { .chart-pie {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie { .chart-pie {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -51,7 +51,6 @@ export default { ...@@ -51,7 +51,6 @@ export default {
document.body.clientWidth || document.body.clientWidth ||
document.documentElement.clientWidth; document.documentElement.clientWidth;
this.chartWidth = (clientWidth * 0.9).toFixed(1) + 'px'; this.chartWidth = (clientWidth * 0.9).toFixed(1) + 'px';
console.log(clientWidth);
} }
}, },
watch: { watch: {
...@@ -192,7 +191,7 @@ export default { ...@@ -192,7 +191,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-column-vtc { .chart-column-vtc {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie { .chart-pie {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie { .chart-pie {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -122,7 +122,6 @@ export default { ...@@ -122,7 +122,6 @@ export default {
chartPie.setOption(options, true); chartPie.setOption(options, true);
}, },
fmtLengend(name) { fmtLengend(name) {
console.log(name);
let item = this.pieData.find(item => { let item = this.pieData.find(item => {
return item.certName === name; return item.certName === name;
}); });
...@@ -132,7 +131,7 @@ export default { ...@@ -132,7 +131,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie { .chart-pie {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -50,7 +50,6 @@ export default { ...@@ -50,7 +50,6 @@ export default {
document.body.clientWidth || document.body.clientWidth ||
document.documentElement.clientWidth; document.documentElement.clientWidth;
this.chartWidth = Math.ceil(clientWidth * 0.90) + 'px'; this.chartWidth = Math.ceil(clientWidth * 0.90) + 'px';
console.log('this.chartWidth', this.chartWidth);
this.handlePieData(newValue); this.handlePieData(newValue);
this.drawPie(); this.drawPie();
} else { } else {
...@@ -174,7 +173,7 @@ export default { ...@@ -174,7 +173,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie-edu { .chart-pie-edu {
position: relative; position: relative;
top: -12px; top: -12px;
......
...@@ -57,7 +57,6 @@ export default { ...@@ -57,7 +57,6 @@ export default {
document.body.clientWidth || document.body.clientWidth ||
document.documentElement.clientWidth; document.documentElement.clientWidth;
this.chartWidth = Math.ceil(clientWidth * 0.90) + 'px'; this.chartWidth = Math.ceil(clientWidth * 0.90) + 'px';
console.log('this.chartWidth', this.chartWidth);
this.handlePieData(newValue); this.handlePieData(newValue);
this.drawPie(); this.drawPie();
} else { } else {
...@@ -171,7 +170,6 @@ export default { ...@@ -171,7 +170,6 @@ export default {
chartPie.setOption(options, true); chartPie.setOption(options, true);
}, },
fmtLengend(name) { fmtLengend(name) {
console.log(name);
let item = this.dataList.find(item => { let item = this.dataList.find(item => {
return item.name === name; return item.name === name;
}); });
...@@ -181,7 +179,7 @@ export default { ...@@ -181,7 +179,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie { .chart-pie {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -154,7 +154,6 @@ export default { ...@@ -154,7 +154,6 @@ export default {
chartPie.setOption(options, true); chartPie.setOption(options, true);
}, },
fmtLengend(name) { fmtLengend(name) {
console.log(name);
let item = this.pieData.find(item => { let item = this.pieData.find(item => {
return item.certName === name; return item.certName === name;
}); });
...@@ -164,7 +163,7 @@ export default { ...@@ -164,7 +163,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.chart-pie { .chart-pie {
position: relative; position: relative;
top: -6px; top: -6px;
......
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-process { .common-process {
width: 100%; width: 100%;
height: 20px; height: 20px;
......
此差异已折叠。
<template>
<!-- 专项合作列表 -->
<section class="coop-container">
<div
v-for="(item , index) in dataList"
:key="index"
class="coop-item"
@click="jumpByAuthId(item)"
>
<div class="coop-item-left">
<img :src="item.attachmentUrl">
</div>
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.projectName}}</span>
<span class="coop-item-right-other">
<img src="../../assets/images/org.png" >
{{item.organizationNameList | subOrgNames}}
</span>
<span v-if="item.authType == 1"
class="coop-item-right-other">
<img src="../../assets/images/pub-time.png" >
2010-10-10
<!-- {{item.oldTime}} -->
<!-- <span class="pro-status" :class="{continue: item.projectStatus == 5}">
{{item.projectStatus == 5 ? '进行中' : item.projectStatus == 10 ? '已结束' : ''}}
</span> -->
</span>
<span v-else
class="coop-item-right-other"
><img src="../../assets/images/pub-time.png" >
2010.01.10 ~ 2010.10.10
<!-- {{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}} -->
<!-- <span class="pro-status" :class="{continue: item.projectStatus == 5}">
{{item.projectStatus == 5 ? '进行中' : item.projectStatus == 10 ? '已结束' : ''}}
</span> -->
</span>
</div>
</div>
<!-- <NoMoreContent v-show="dataList.length > 9"></NoMoreContent> -->
<!-- <NoContent v-show="!dataList.length && isShow"></NoContent> -->
<!-- <van-popup
v-model="showGoUpdate"
position="bottom"
:style="{ height: '4.427rem' }"
>
<div class="update-dialog-content">
<p class="title">本项目需要更新至最新版本才能参加哦</p>
<p class="update-btn v-hairline-top confirm-btn" @click="goUpdateHandler">立即更新</p>
<p class="update-btn v-hairline-top" @click="showGoUpdate = false">取消</p>
</div>
</van-popup> -->
</section>
</template>
<script>
// import NoMoreContent from "@/components/business/no-more-content";
// import NoContent from "@/components/business/no-content";
// import UpdateDialog from "@/components/business/update-dialog";
// import { setEventByModuleCode, deepCopy, getWebPageUrl } from "@/utils/index";
import { goNativePage, goPageByNative } from "@/utils/index";
// import { getAppVersion } from "@/utils";
// import { mapActions, mapGetters } from "vuex";
// import { Popup } from 'vant';
export default {
name: "coop-list-item",
data() {
return {
bgColor: "green"
};
},
props: {
dataList: {
type: Array,
default: () => []
},
},
// computed: {
// ...mapGetters(["userInfo"])
// },
components: {
// NoMoreContent,
// NoContent,
// UpdateDialog,
},
mounted() {},
filters: {
subOrgNames(orgNameList) {
let allName = orgNameList[0];
for(let i = 1; i < orgNameList.length; i ++) {
allName += `/${orgNameList[i]}`
}
if (allName && allName.length > 13) {
return allName.substring(0, 13) + '...'
} else {
return allName
}
},
// 将字符串截短至指定长度,并用在最后追加特定字符串(例如:...)
shortNameL(value, length = 15, append = '...') {
if (value && value.length > length) {
return value.substring(0, length) + append
} else {
return value
}
},
},
methods: {
jumpByAuthId(pInfo) {
// this.$sendBuriedData({
// component_tag: '467#400141'
// });
if(pInfo.authId == 1) {
goNativePage(this, pInfo);
} else {
goPageByNative(this, pInfo);
}
}
}
};
</script>
<style scoped lang="less">
.coop-container {
position: relative;
margin: 0px 15px;
&-status {
position: absolute;
top: 6px;
left: 0;
// display: block;
width: 44px;
height: 18px;
line-height: 18px;
padding: 0 0 0 4px;
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: 11px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
}
.coop-item {
display: flex;
width: 100%;
height: 128px;
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: 115px;
height: 86px;
margin-right: 15px;
border-radius: 3px;
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: 215px;
flex-direction: column;
padding-top: 4px;
&-title {
height: 50px;
line-height: 23px;
font-size: 16px;
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: 20px;
line-height: 20px;
font-size: 13px;
font-weight: 400;
color: rgba(151, 152, 153, 1);
& > img {
position: relative;
top: 2px;
left: 0;
width: 15px;
height: 15px;
margin-right: 0;
}
.pro-status {
float: right;
font-size: 13px;
padding-right: 4px;
color: #979899;
&.continue {
color: #449284;
}
&.end {
color: #979899;
}
}
}
}
}
.update-dialog-content{
padding: 0 15px;
box-sizing: border-box;
.title{
text-align: center;
color: #373839;
font-size: 18px;
padding: 15px 0;
line-height: 25px;
}
.update-btn{
text-align: center;
height: 55px;
line-height: 55px;
font-size: 16px;
color: #979899;
&.confirm-btn{
color: #449284;
}
&.v-hairline-top::after{
border-top-width: 1px;
}
}
}
</style>
<style>
.van-overlay{
background-color: rgba(0,0,0,0.5);
}
</style>
<template>
<!-- 专项合作列表 -->
<section class="coop-container">
<div
v-for="(item , index) in dataList"
:key="index"
class="coop-item"
@click="jumpByPType(item)"
>
<div class="coop-item-left">
<img :src="item.attachmentUrl">
</div>
<div class="coop-item-right">
<span class="coop-item-right-title">{{item.projectName}}</span>
<span class="coop-item-right-other">
<img src="../../assets/images/org.png" >
{{item.organizationNameList | subOrgNames}}
</span>
<span v-if="item.pType == 1"
class="coop-item-right-other">
<img src="../../assets/images/pub-time.png" >
{{item.oldTime}}
</span>
<span v-else
class="coop-item-right-other"
><img src="../../assets/images/pub-time.png" >
{{item.projectBegintimeLong | formatTime}}-{{item.projectEndtimeLong | formatTime}}
</span>
</div>
</div>
</section>
</template>
<script>
import { goNativePage, goPageByNative, parseTime } from "@/utils/index";
import { BASE_URL } from '@/utils/enumerate';
const { NUXT_ENV_APP } = process.env;
export default {
name: "coop-list-item",
data() {
return {
bgColor: "green"
};
},
props: {
dataList: {
type: Array,
default: () => []
},
},
mounted() {},
filters: {
subOrgNames(orgNameList) {
let allName = orgNameList[0];
for(let i = 1; i < orgNameList.length; i ++) {
allName += `/${orgNameList[i]}`
}
if (allName && allName.length > 13) {
return allName.substring(0, 13) + '...'
} else {
return allName
}
},
// 将字符串截短至指定长度,并用在最后追加特定字符串(例如:...)
shortNameL(value, length = 15, append = '...') {
if (value && value.length > length) {
return value.substring(0, length) + append
} else {
return value
}
},
// 格式化日期
formatTime: function (timeStamp, format = '{yyyy}.{mm}.{dd}') {
return parseTime(timeStamp, format)
},
},
methods: {
jumpByPType(pInfo) {
this.$sendBuriedData && this.$sendBuriedData({
component_tag: `467#400141#${pInfo.id}#${pInfo.projectName}`,
class_name: `learning_report`,
url: `${BASE_URL[NUXT_ENV_APP]}/file/log/trace1`
});
if(pInfo.pType == 1) {
goNativePage(this, pInfo);
} else {
goPageByNative(this, `/lreport_ssr/?projectId=${pInfo.id}`);
}
}
}
};
</script>
<style scoped lang="less">
.coop-container {
position: relative;
margin: 0px 15px;
&-status {
position: absolute;
top: 6px;
left: 0;
// display: block;
width: 44px;
height: 18px;
line-height: 18px;
padding: 0 0 0 4px;
background: rgba(88, 144, 221, 1);
color: #fff;
font-size: 11px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
}
.coop-item {
display: flex;
width: 100%;
height: 128px;
border-bottom: 1px solid #f0f0f0;
background: #fff;
flex-direction: row;
justify-content: center;
align-items: center;
img {
width: 115px;
height: 86px;
margin-right: 15px;
border-radius: 3px;
}
&-left {
display: flex;
position: relative;
top: 0;
}
&-right {
display: flex;
width: 215px;
flex-direction: column;
padding-top: 4px;
&-title {
height: 50px;
line-height: 23px;
font-size: 16px;
font-weight: 700;
color: rgba(55, 56, 57, 1);
}
&-other {
height: 20px;
line-height: 20px;
font-size: 13px;
font-weight: 400;
color: rgba(151, 152, 153, 1);
& > img {
position: relative;
top: 2px;
left: 0;
width: 15px;
height: 15px;
margin-right: 0;
}
.pro-status {
float: right;
font-size: 13px;
padding-right: 4px;
color: #979899;
&.continue {
color: #449284;
}
&.end {
color: #979899;
}
}
}
}
}
.update-dialog-content{
padding: 0 15px;
box-sizing: border-box;
.title{
text-align: center;
color: #373839;
font-size: 18px;
padding: 15px 0;
line-height: 25px;
}
.update-btn{
text-align: center;
height: 55px;
line-height: 55px;
font-size: 16px;
color: #979899;
&.confirm-btn{
color: #449284;
}
&.v-hairline-top::after{
border-top-width: 1px;
}
}
}
// .van-overlay{
// background-color: rgba(0,0,0,0.5);
// }
</style>
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="less">
.corse-times-list { .corse-times-list {
font-size: 14px; font-size: 14px;
.title { .title {
......
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.lr-course-times { .lr-course-times {
margin: 20px 15px; margin: 20px 15px;
li { li {
......
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="less">
.exam-list-wrapper { .exam-list-wrapper {
font-size: 14px; font-size: 14px;
.title { .title {
......
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="less">
.exam-score-wrapper { .exam-score-wrapper {
font-size: 14px; font-size: 14px;
.title { .title {
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="less">
.exam-times-wrapper { .exam-times-wrapper {
font-size: 14px; font-size: 14px;
.title { .title {
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.nc-container { .nc-container {
display: flex; display: flex;
width: 100%; width: 100%;
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="less">
.corse-times-list { .corse-times-list {
font-size: 14px; font-size: 14px;
.title { .title {
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.pop-notice-wrapper { .pop-notice-wrapper {
position: fixed; position: fixed;
width: 100%; width: 100%;
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
}, },
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="less">
.rank-item-days { .rank-item-days {
margin: 0 15px; margin: 0 15px;
li { li {
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="less">
.rank-item { .rank-item {
margin: 0 15px; margin: 0 15px;
li { li {
......
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-title-wrapper-point { .common-title-wrapper-point {
position: fixed; position: fixed;
width: 100%; width: 100%;
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-area-select { .common-area-select {
// padding-top: 50px; // padding-top: 50px;
display: flex; display: flex;
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-area-select { .common-area-select {
&.fixed { &.fixed {
position: fixed; position: fixed;
......
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-bottom-info { .common-bottom-info {
display: flex; display: flex;
width: 100%; width: 100%;
......
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-card { .common-card {
display: flex; display: flex;
margin: 30px 15px; margin: 30px 15px;
......
<!-- 通用Navbar -->
<template>
<section :class="isFixNavbar ? 'nav-top-new fixed' : 'nav-top-new'" :style="'height:' + navHeight">
<div
class="nav-part-new"
:style="'background:' + bgColor + ';'
+ 'padding-top:' + paddingTop + ';border-bottom:' + borderStyle"
>
<div class="nav-title-new">
<span class="nav-back" @click="goBack">
<img v-show="isBlack" src="../../assets/images/left-arrow-black.png" alt="">
<img v-show="!isBlack" src="../../assets/images/left-arrow-black.png" alt="">
</span>
<span class="nav-title-new-title" v-show="bgColor!=='none'">{{title}}</span>
<span v-show="isShowShare" class="nav-share" @click="goShare">
<img
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png"
>
</span>
</div>
</div>
</section>
</template>
<script>
export default {
name: "common-navbar-new",
data() {
return {
navbarHeight: 28,
contentHeight: 35,
fontSize: 37.5,
content: "",
shareImageUrl:
"https://file.yunqueyi.com/logo.png?version=" + new Date().getTime()
};
},
props: {
bgColor: {
type: String,
default: ""
},
title: {
type: String,
default: "暂无数据"
},
// 是否fix定位
isFixNavbar: {
type: Boolean,
default: true
},
burialPoint: {
default: "",
type: String
},
backMethod: {
type: String,
default: "native" // inner native
},
isShowShare: {
type: Boolean,
default: false
},
borderStyle: {
type: String,
default: "0px solid #e7e7e7"
},
isBlack: {
type: Boolean,
default: true
}
},
computed: {
navHeight() {
if (this.isFixNavbar) {
return '54px';
} else {
return (this.navbarHeight + this.contentHeight) / this.fontSize + "rem";
}
},
paddingTop() {
return this.navbarHeight / this.fontSize + "rem";
}
},
mounted() {
let htmlDom = document.getElementsByTagName("html")[0].style.fontSize;
this.fontSize = htmlDom;
},
methods: {
//返回
goBack() {
if(this.$rocNative.isWeb) {
this.$router.back(-1);
} else {
this.$rocNative.goBack();
}
},
//分享
goShare() {
let url = location.href,
_this = this;
rocNative.shareWechat({
type: 6,
shareId: 0,
shareUrl: 'shareUrl',
title1: "this.shareTitle1",
title2: "this.shareTitle2",
shareImageUrl: "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime()
});
}
}
};
</script>
<style lang="less" scoped>
.back {
position: absolute;
left: 0px;
top: 15px;
z-index: 2010;
display: inline-block;
width: 50px;
height: 60px;
img {
padding: 10px;
width: 20px;
height: 20px;
}
}
.nav-top-new {
position: relative;
z-index: 1000000010;
font-size: 18px;
height: 56px;
// margin-top: 20px;
padding-top: 20px;
background: #fff;
color: #333;
.nav-back {
font-size: 18px;
display: inline-block;
position: absolute;
left: 0px;
top: 0;
z-index: 1000000011;
height: 25px;
width: 55px;
padding-left: 15px;
padding-right: 15px;
}
img {
display: block;
padding-top: 2px;
height: 20px;
width: 20px;
}
.nav-icon {
display: inline-block;
width: 50px;
height: 50px;
svg {
stroke: #000;
fill: #0000ff;
}
}
.nav-share {
position: absolute;
right: 16px;
top: 0;
z-index: 2010;
height: 20px;
width: 20px;
}
.nav-title-new {
font-size: 18px;
position: relative;
top: 10px;
left: 0;
z-index: 1000000011;
display: inline-block;
width: 100%;
height: 36px;
&-title {
height: 18px;
font-size: 18px;
font-weight: 700;
color: rgba(51, 51, 51, 1);
line-height: 26px;
}
}
.nav-part-new {
width: 100%;
font-size: 18px;
text-align: center;
padding: 0 0 10px 0;
}
}
.nav-part-new {
font-size: 18px;
position: fixed;
top: 0;
left: 0;
z-index: 1000000011;
border-bottom: 0px solid #e7e7e7;
background: #fff;
img {
display: block;
padding-top: 2px;
height: 20px;
width: 20px;
}
}
</style>
\ No newline at end of file
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.back { .back {
position: absolute; position: absolute;
left: 0px; left: 0px;
...@@ -126,14 +126,16 @@ export default { ...@@ -126,14 +126,16 @@ export default {
} }
} }
.nav-top { .nav-top {
position: relative;
z-index: 1000000010;
font-size: 18px;
height: 56px; height: 56px;
// margin-top: 20px; // margin-top: 20px;
padding-top: 20px; padding-top: 20px;
background: #fff; background: #fff;
color: #333; color: #333;
position: relative;
z-index: 1000000010;
.nav-back { .nav-back {
font-size: 18px;
display: inline-block; display: inline-block;
position: absolute; position: absolute;
left: 0px; left: 0px;
...@@ -168,6 +170,7 @@ export default { ...@@ -168,6 +170,7 @@ export default {
width: 20px; width: 20px;
} }
.nav-title { .nav-title {
font-size: 18px;
position: relative; position: relative;
top: 10px; top: 10px;
left: 0; left: 0;
...@@ -182,6 +185,12 @@ export default { ...@@ -182,6 +185,12 @@ export default {
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
line-height: 26px; line-height: 26px;
} }
img {
display: block;
padding-top: 2px;
height: 20px;
width: 20px;
}
} }
.nav-part { .nav-part {
width: 100%; width: 100%;
...@@ -192,11 +201,19 @@ export default { ...@@ -192,11 +201,19 @@ export default {
} }
.nav-part { .nav-part {
width: 100%;
font-size: 18px;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1000000011; z-index: 1000000011;
border-bottom: 0px solid #e7e7e7; border-bottom: 0px solid #e7e7e7;
background: #fff; background: #fff;
img {
display: block;
padding-top: 2px;
height: 20px;
width: 20px;
}
} }
</style> </style>
\ No newline at end of file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="less" scoped>
.common-loader { .common-loader {
.loader-mask { .loader-mask {
position: fixed; position: fixed;
......
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.no-more { .no-more {
display: flex; display: flex;
height: 62px; height: 62px;
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-show-all { .common-show-all {
display: flex; display: flex;
width: 100%; width: 100%;
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-split-line { .common-split-line {
margin: 20px 0; margin: 20px 0;
} }
......
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-swiper-item { .common-swiper-item {
font-size: 20px; font-size: 20px;
margin-top: 20px; margin-top: 20px;
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-tabs-wrapper { .common-tabs-wrapper {
display: flex; display: flex;
position: relative; position: relative;
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-tabs-wrapper { .common-tabs-wrapper {
.sub-wrapper { .sub-wrapper {
display: flex; display: flex;
......
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-title-wrapper { .common-title-wrapper {
position: fixed; position: fixed;
width: 100%; width: 100%;
......
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style lang="less">
.common-title-wb-wrapper { .common-title-wb-wrapper {
height: 44px; height: 44px;
line-height: 44px; line-height: 44px;
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-title-wd-wrapper { .common-title-wd-wrapper {
position: fixed; position: fixed;
width: 100%; width: 100%;
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-title-with-what { .common-title-with-what {
font-size: 18px; font-size: 18px;
margin: 30px 15px 20px; margin: 30px 15px 20px;
......
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-title { .common-title {
margin: 30px 15px 20px; margin: 30px 15px 20px;
li { li {
......
...@@ -201,11 +201,9 @@ export default { ...@@ -201,11 +201,9 @@ export default {
// 获取省列表 // 获取省列表
async getProvinceData(params) { async getProvinceData(params) {
console.log("getProvinceData");
await getProvinceList(params).then(res => { await getProvinceList(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.areaList.provinceList = (res.data && res.data.list) || []; this.areaList.provinceList = (res.data && res.data.list) || [];
console.log(this.areaList.provinceList);
this.areaList.provinceList.map(a => { this.areaList.provinceList.map(a => {
if (a.id == this.value.provinceId) { if (a.id == this.value.provinceId) {
a.selected = true; a.selected = true;
...@@ -217,7 +215,6 @@ export default { ...@@ -217,7 +215,6 @@ export default {
// 获取城市列表 // 获取城市列表
async getCityData(params) { async getCityData(params) {
console.log("getCityData");
await getCityList(params).then(res => { await getCityList(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.areaList.cityList = (res.data && res.data.list) || []; this.areaList.cityList = (res.data && res.data.list) || [];
...@@ -237,7 +234,6 @@ export default { ...@@ -237,7 +234,6 @@ export default {
// 获取区/县列表 // 获取区/县列表
async getCountyData(params) { async getCountyData(params) {
console.log("getCountyData");
await getCountyList(params).then(res => { await getCountyList(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.areaList.countyList = (res.data && res.data.list) || []; this.areaList.countyList = (res.data && res.data.list) || [];
...@@ -279,7 +275,6 @@ export default { ...@@ -279,7 +275,6 @@ export default {
// 选择省份的操作 // 选择省份的操作
provinceSelect(item, idx) { provinceSelect(item, idx) {
console.log("provinceSelect", item, this.rank);
this.value.regionId = item.id; this.value.regionId = item.id;
this.value.provinceId = item.id; this.value.provinceId = item.id;
this.queryParams.regionId = item.id; this.queryParams.regionId = item.id;
...@@ -318,7 +313,6 @@ export default { ...@@ -318,7 +313,6 @@ export default {
// 选择市的操作 // 选择市的操作
citySelect(item, idx) { citySelect(item, idx) {
console.log("citySelect", item, this.rank);
this.value.regionId = item.id; this.value.regionId = item.id;
this.value.cityId = item.id; this.value.cityId = item.id;
this.queryParams.regionId = item.id; this.queryParams.regionId = item.id;
...@@ -354,7 +348,6 @@ export default { ...@@ -354,7 +348,6 @@ export default {
// 选择区/县的操作 // 选择区/县的操作
countySelect(item, idx) { countySelect(item, idx) {
console.log("countySelect", item, this.rank);
this.value.regionId = item.id; this.value.regionId = item.id;
this.value.countyId = item.id; this.value.countyId = item.id;
this.queryParams.regionId = item.id; this.queryParams.regionId = item.id;
...@@ -388,7 +381,6 @@ export default { ...@@ -388,7 +381,6 @@ export default {
// 选择乡镇的操作 // 选择乡镇的操作
townSelect(item, idx) { townSelect(item, idx) {
console.log("townSelect", item, this.rank);
this.value.regionId = item.id; this.value.regionId = item.id;
this.value.townId = item.id; this.value.townId = item.id;
this.queryParams.regionId = item.id; this.queryParams.regionId = item.id;
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.common-process { .common-process {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
此差异已折叠。
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"test": "jest", "test": "jest",
"dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=10.177.11.247 PORT=4001 nodemon server/index.js --watch server", "dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=0.0.0.0 PORT=4001 nodemon server/index.js --watch server",
"build": "NUXT_ENV_APP=${ENV} nuxt build", "build": "NUXT_ENV_APP=${ENV} nuxt build",
"start": "cross-env NUXT_ENV_APP=${ENV} HOST=0.0.0.0 PORT=3100 NODE_ENV=production node server/index.js", "start": "cross-env NUXT_ENV_APP=${ENV} HOST=0.0.0.0 PORT=3100 NODE_ENV=production node server/index.js",
"generate": "nuxt generate" "generate": "nuxt generate"
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
"koa": "^2.6.2", "koa": "^2.6.2",
"nuxt": "^2.0.0", "nuxt": "^2.0.0",
"v-charts": "^1.19.0", "v-charts": "^1.19.0",
"vant": "^2.2.13" "vant": "^2.2.13",
"web-buried-point": "^2.1.0",
"vconsole": "^3.3.4"
}, },
"devDependencies": { "devDependencies": {
"@nuxtjs/axios": "^5.5.4", "@nuxtjs/axios": "^5.5.4",
......
<template> <template>
<section> <section class="exam-score-wrapper">
<CommonHeader title="完成项目考试分数情况"></CommonHeader> <CommonHeader title="完成项目考试分数情况"></CommonHeader>
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown> <CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<ExamScoreList class="pdt-50" :dataList="dataList"></ExamScoreList> <ExamScoreList class="pdt-50" :dataList="dataList"></ExamScoreList>
...@@ -104,10 +104,12 @@ export default { ...@@ -104,10 +104,12 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .exam-score-wrapper {
padding-top: 50px; .pdt-50 {
} padding-top: 50px;
.mt-10 { }
margin-top: 10px !important; .mt-10 {
margin-top: 10px !important;
}
} }
</style> </style>
\ No newline at end of file
<template> <template>
<section> <section class="exam-times-wrapper">
<CommonHeader title="完成项目考试次数情况"></CommonHeader> <CommonHeader title="完成项目考试次数情况"></CommonHeader>
<CommonTitleMini :title="title" :needRightBtn="needRightBtn"></CommonTitleMini> <CommonTitleMini :title="title" :needRightBtn="needRightBtn"></CommonTitleMini>
<ExamTimesList class="pdt-50" :dataList="dataList"></ExamTimesList> <ExamTimesList class="pdt-50" :dataList="dataList"></ExamTimesList>
...@@ -82,10 +82,12 @@ export default { ...@@ -82,10 +82,12 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .exam-times-wrapper {
padding-top: 50px; .pdt-50 {
} padding-top: 50px;
.mt-10 { }
margin-top: 10px !important; .mt-10 {
margin-top: 10px !important;
}
} }
</style> </style>
\ No newline at end of file
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
studyRankList: [], studyRankList: [],
costRankList: [], costRankList: [],
projectId: "", projectId: "",
token: "2DEF4802111943C49A98A1429095A876" || token: "6774A32CF72F4AA0ABB86DF37DB7F916" ||
"79A005DB585C45C389ED1DD0C76E3633" || "79A005DB585C45C389ED1DD0C76E3633" ||
"A220943B006347799F277CC524EBB662", "A220943B006347799F277CC524EBB662",
isOrgStat: false, isOrgStat: false,
...@@ -338,31 +338,12 @@ export default { ...@@ -338,31 +338,12 @@ export default {
if (this.$rocNative.isWeb) { if (this.$rocNative.isWeb) {
this.getProjectInfo(this.queryParams); this.getProjectInfo(this.queryParams);
} }
// window.addEventListener(
// 'scroll', window.addEventListener('scroll', () => { this.handleScroll() }, false);
// () => {
// if (timeOutId) {
// clearTimeout(timeOutId);
// }
// timeOutId = setTimeout(this.handleScroll, 10);
// },
// false
// );
window.addEventListener(
'scroll',
() => {
this.handleScroll()
},
false
);
}, },
methods: { methods: {
handleScroll() { handleScroll() {
var scrollTop = var scrollTop = window.scrollY;
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
if (scrollTop > 40) { if (scrollTop > 40) {
this.isScroll = true; this.isScroll = true;
} else { } else {
...@@ -690,7 +671,6 @@ export default { ...@@ -690,7 +671,6 @@ export default {
this.$rocNative.getUserInfo && this.$rocNative.getUserInfo &&
this.$rocNative.getUserInfo().then(params => { this.$rocNative.getUserInfo().then(params => {
this.token = params.userToken; // 测试用时注释掉 this.token = params.userToken; // 测试用时注释掉
// cookies.remove("token");
cookies.set("lreporttoken", this.token); cookies.set("lreporttoken", this.token);
this.setUserToken(this.token); this.setUserToken(this.token);
this.setProjectId(this.projectId); this.setProjectId(this.projectId);
......
<template> <template>
<section> <section class="klg-point-wrapper">
<CommonHeader title="培训前后知识点掌握情况"></CommonHeader> <CommonHeader title="培训前后知识点掌握情况"></CommonHeader>
<TitleKLGPoint :title="title"></TitleKLGPoint> <TitleKLGPoint :title="title"></TitleKLGPoint>
<TipsInfo :content="tipsContent"></TipsInfo> <TipsInfo :content="tipsContent"></TipsInfo>
...@@ -79,7 +79,9 @@ export default { ...@@ -79,7 +79,9 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.mt-10 { .klg-point-wrapper {
margin-top: 20px !important; .mt-10 {
} margin-top: 20px !important;
}
}
</style> </style>
\ No newline at end of file
<template>
<!-- 专项合作首页: 我参与的,其它项目 -->
<div class="pro-list-container">
<!-- <CommonHeader :title="title"></CommonHeader> -->
<CommonHeaderNew borderStyle="1px solid #e7e7e7" :title="title"></CommonHeaderNew>
<CoopListItem style="margin: 10px 0;" :dataList="projectList"></CoopListItem>
<Loading v-if="showLoading"/>
</div>
</template>
<script>
import CommonHeaderNew from "@/components/common/common-header-new";
import CoopListItem from "@/components/bussiness/coop-list-item";
import Loading from "@/components/common/common-loading";
import { getProjectList } from "@/service";
import { BASE_URL } from '@/utils/enumerate';
const { NUXT_ENV_APP } = process.env;
const cookies = require("cookie-universal")();
export default {
data() {
return {
token: '6177426E77F8435B88A5B946B3546904',
showLoading: true,
title: "学情报告",
projectList: []
};
},
components: {
CommonHeaderNew,
CoopListItem,
Loading
},
created() {
if (process.client) {
var _this = this;
if (this.$rocNative.isWeb) {
cookies.set("lreporttoken", _this.token);
_this.getProjectList();
} else {
_this.getUserInfo();
}
}
},
mounted() {
this.$sendBuriedData && this.$sendBuriedData({
action: 'ACTION_WEB_ENTER',
component_tag: `467`,
class_name: `learning_report`,
url: `${BASE_URL[NUXT_ENV_APP]}/file/log/trace1`
});
},
methods: {
// 与原生交互,获取用户信息
getUserInfo() {
this.$rocNative.getUserInfo &&
this.$rocNative.getUserInfo().then(params => {
this.token = params.userToken;
cookies.set("lreporttoken", this.token);
this.getProjectList();
});
},
// 课程数据
getProjectList() {
let params = {
token: this.token
}
getProjectList(params).then(res => {
this.showLoading = true;
if (res.code === "000000") {
this.projectList = res.data && res.data.data || [];
setTimeout(() => {
this.showLoading = false;
}, 100);
// this.$forceUpdate();
// this.$nextTick( () => {
// this.showLoading = false;
// })
}
});
}
}
};
</script>
<style lang="less" scoped>
</style>
<template> <template>
<section> <section class="rank-days-wrapper">
<CommonHeader title="完成天数排名"></CommonHeader> <CommonHeader title="完成天数排名"></CommonHeader>
<CommonTitleWithDropdown :title="listTitle" @selectSortItem="selectSortItem"></CommonTitleWithDropdown> <CommonTitleWithDropdown :title="listTitle" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingItemDays class="pdt-50" :rankList="rankList"></RankingItemDays> <RankingItemDays class="pdt-50" :rankList="rankList"></RankingItemDays>
...@@ -82,10 +82,12 @@ export default { ...@@ -82,10 +82,12 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .rank-days-wrapper {
padding-top: 50px; .pdt-50 {
} padding-top: 50px;
.mt-10 { }
margin-top: 10px !important; .mt-10 {
margin-top: 10px !important;
}
} }
</style> </style>
\ No newline at end of file
<template> <template>
<section> <section class="rank-edu-wrapper">
<CommonHeader title="项目情况排名"></CommonHeader> <CommonHeader title="项目情况排名"></CommonHeader>
<CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown> <CommonTitleWithDropdown :dataList="dropdownList" :title="title" :needRightBtn="needRightBtn" @selectSortItem="selectSortItem"></CommonTitleWithDropdown>
<RankingList class="pdt-50" :certFlag="certFlag" :rankList="rankList"></RankingList> <RankingList class="pdt-50" :certFlag="certFlag" :rankList="rankList"></RankingList>
...@@ -104,11 +104,14 @@ export default { ...@@ -104,11 +104,14 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdt-50 { .rank-edu-wrapper {
padding-top: 50px; .pdt-50 {
} padding-top: 50px;
.mt-10 { }
margin-top: 10px !important; .mt-10 {
margin-top: 10px !important;
}
} }
</style> </style>
\ No newline at end of file
...@@ -2,11 +2,23 @@ import Vue from 'vue' ...@@ -2,11 +2,23 @@ import Vue from 'vue'
import rocNative from '@/utils/jsbridge' import rocNative from '@/utils/jsbridge'
import echarts from 'echarts' import echarts from 'echarts'
import { Toast } from 'vant'; import { Toast } from 'vant';
import { BASE_URL } from '@/utils/enumerate';
import WebBuriedPoint, { sendBuriedData } from 'web-buried-point';
const { NUXT_ENV_APP } = process.env;
// Vue.use(WebBuriedPoint, {
// // component_tag: `467`,
// class_name: `learning_report`,
// url: `${BASE_URL[NUXT_ENV_APP]}/file/log/trace1`
// });
Vue.prototype.$sendBuriedData = sendBuriedData;
Vue.use(Toast); Vue.use(Toast);
// "vconsole": "^3.3.4" // // "vconsole": "^3.3.4"
// import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole // import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
// let vConsole = new VConsole() // 初始化 // new VConsole() // 初始化
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts
Vue.prototype.$rocNative = new rocNative(); Vue.prototype.$rocNative = new rocNative();
\ No newline at end of file
...@@ -66,7 +66,6 @@ export default function(options) { ...@@ -66,7 +66,6 @@ export default function(options) {
resolve(res.data); resolve(res.data);
}) })
.catch(error => { .catch(error => {
// console.log('axios catch error: ', error.message);
VUE_ENV === 'client' && Toast({ message: '系统繁忙,请稍后重新进入页面查询', duration: 1000 }); VUE_ENV === 'client' && Toast({ message: '系统繁忙,请稍后重新进入页面查询', duration: 1000 });
// VUE_ENV === 'client' && Toast({ message: error.message, duration: 1000 }); // VUE_ENV === 'client' && Toast({ message: error.message, duration: 1000 });
// reject(error); // reject(error);
......
...@@ -228,4 +228,16 @@ export const getStudyTimeData = async data => { ...@@ -228,4 +228,16 @@ export const getStudyTimeData = async data => {
withCredentials: true, withCredentials: true,
url: 'stats/report/studyTime/' + data.pageCfg.type url: 'stats/report/studyTime/' + data.pageCfg.type
}); });
}; };
\ No newline at end of file
/**
* 查询用户项目列表
*/
export const getProjectList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: 'portal/report/getReportListForApp'
});
};
const { NUXT_ENV_APP } = process.env; const { NUXT_ENV_APP } = process.env;
export const BASE_URL = { export const BASE_URL = {
// dev: 'https://dev-sc.yunqueyi.com', dev: 'https://dev-sc.yunqueyi.com',
dev: 'https://uat-sc.yunqueyi.com', // dev: 'https://uat-sc.yunqueyi.com',
// dev: 'https://sc.yunqueyi.com', // dev: 'https://sc.yunqueyi.com',
test: 'https://test1-sc.yunqueyi.com', test: 'https://test1-sc.yunqueyi.com',
uat: 'https://uat-sc.yunqueyi.com', uat: 'https://uat-sc.yunqueyi.com',
...@@ -11,7 +11,8 @@ export const BASE_URL = { ...@@ -11,7 +11,8 @@ export const BASE_URL = {
export const SHARE_URL = { export const SHARE_URL = {
// dev: 'https://dev-phome.yunqueyi.com', // dev: 'https://dev-phome.yunqueyi.com',
dev: 'http://10.177.11.247:4001', // dev: 'http://10.177.11.247:4001',
dev: 'https://dev-phome.yunqueyi.com',
test: 'https://test1-phome.yunqueyi.com', test: 'https://test1-phome.yunqueyi.com',
uat: 'https://uat-phome.yunqueyi.com', uat: 'https://uat-phome.yunqueyi.com',
prod: 'https://phome.yunqueyi.com', prod: 'https://phome.yunqueyi.com',
......
...@@ -41,10 +41,42 @@ export const echartColors = [ ...@@ -41,10 +41,42 @@ export const echartColors = [
"#FFB01B" "#FFB01B"
] ]
// 日期与时间解析函数
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if (('' + time).length === 10) time = parseInt(time) * 1000
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
if (key === 'a') return ['一', '二', '三', '四', '五', '六', '日'][value - 1]
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
// 跳转到新的学情报告页面
export function goPageByNative(vm, pageSubUrl){ export function goPageByNative(vm, pageSubUrl){
let url = getShareUrl() + pageSubUrl; let url = getShareUrl() + pageSubUrl;
console.log('##########', url)
let paramList = [ let paramList = [
{ {
"key":"pageUrl", "key":"pageUrl",
...@@ -67,4 +99,32 @@ export function goPageByNative(vm, pageSubUrl){ ...@@ -67,4 +99,32 @@ export function goPageByNative(vm, pageSubUrl){
modeCode: 'M300', modeCode: 'M300',
jsonString: paramList jsonString: paramList
}) })
}
// 跳转到原生的学情详情页面
export function goNativePage(vm, config = {id: 1, authType: 1}){
let paramList = [
{
"key":"className",
// "value": 'com.picahealth.yunque.activitys.learnreport.learnreport2.NewLearnReportActivity###NewLearnReportVC.PicaDo',
"value": 'com.picahealth.yunque.activitys.learnreport.MyLearnReportActivity###StudyCourseListViewController',
"type":4,
"seqNo":1
},
// {
// "key":"id",
// "value": config.id,
// "type":1,
// "seqNo":2
// },{
// "key":"authType",
// "value": config.authType,
// "type": 1,
// "seqNo": 3
// }
]
vm.$rocNative.dispatchEventByModuleCode && vm.$rocNative.dispatchEventByModuleCode({
modeCode: 'M200',
jsonString: paramList
})
} }
\ No newline at end of file
...@@ -16,8 +16,8 @@ export const JsBridgeOptions = { ...@@ -16,8 +16,8 @@ export const JsBridgeOptions = {
GLOBAL_NAME: 'rocNative', GLOBAL_NAME: 'rocNative',
NATIVE_IOS_NAME: 'rociOS', NATIVE_IOS_NAME: 'rociOS',
NATIVE_ANDROID_NAME: '__rocAndroid', NATIVE_ANDROID_NAME: '__rocAndroid',
initMethodsWithCallBack: ['getToken', 'getUserInfo'], // value is string initMethodsWithCallBack: ['getToken', 'getUserInfo', 'getLocalData'], // value is string
initMethodsWithoutCallBack: ['gotoLogin', 'appInit', 'goBack', 'shareWechat', 'showNativeToast', 'dispatchEventByModuleCode', 'appBuryingPointEntrust', 'webLoadSuccess'] // value is string initMethodsWithoutCallBack: ['gotoLogin', 'appInit', 'goBack', 'shareWechat', 'showNativeToast', 'dispatchEventByModuleCode', 'appBuryingPointEntrust', 'webLoadSuccess', 'sendBuriedPoint'] // value is string
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册