提交 c1eb47fa 编写于 作者: 张磊's avatar 张磊

page-modal update

上级 ae447a48
......@@ -101,7 +101,8 @@ export default {
<style scoped lang="scss">
.coop-container {
position: relative;
margin: 0px 15px;
top: -14px;
//margin: 0px 15px;
&-status {
position: absolute;
top: 6px;
......
<!-- 通用Navbar -->
<template>
<section
:class="isFixNavbar ? 'nav-top-new fixed' : 'nav-top-new'"
class="nav-top-new"
:style="'height:' + navHeight"
>
<div
class="nav-part-new"
:style="
'background:' +
bgColor +
';' +
'padding-top:' +
paddingTop +
';border-bottom:' +
borderStyle
"
>
<div class="nav-part-new">
<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
v-show="bgColor !== 'none'"
class="nav-title-new-title"
>{{
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>
<span
v-show="isShowKf && !isWeb"
class="nav-share"
......@@ -66,43 +34,14 @@ import { goKfFn } from '@/utils/kf';
export default {
name: 'CommonNavbarNew',
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,
},
isShowKf: {
type: Boolean,
default: false,
},
borderStyle: {
type: String,
default: '0px solid #e7e7e7',
},
isBlack: {
type: Boolean,
default: true,
},
},
data() {
return {
......@@ -117,11 +56,7 @@ export default {
},
computed: {
navHeight() {
if (this.isFixNavbar) {
return '54px';
} else {
return (this.navbarHeight + this.contentHeight) / this.fontSize + 'rem';
}
return (this.navbarHeight + this.contentHeight) / this.fontSize + 'rem';
},
paddingTop() {
return this.navbarHeight / this.fontSize + 'rem';
......@@ -145,18 +80,6 @@ export default {
this.$rocNative.goBack();
}
},
// 分享
goShare() {
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(),
});
},
goKf() {
goKfFn({
code: '0002',
......
<!-- 通用Navbar -->
<template>
<section
:class="isFixNavbar ? 'nav-top fixed' : 'nav-top'"
:style="'height:' + navHeight"
>
<div
class="nav-part"
:style="
'background:' +
bgColor +
';' +
'padding-top:' +
paddingTop +
';border-bottom:' +
borderStyle
"
>
<section class="nav-top fixed">
<div class="nav-part">
<div class="nav-title">
<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
v-show="bgColor !== 'none'"
class="nav-title-title"
>{{
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>
<span class="nav-title-title">{{ title }}</span>
<span
v-show="isShowKf && !isWeb"
class="nav-share"
......@@ -66,43 +32,14 @@ import { goKfFn } from '@/utils/kf';
export default {
name: 'CommonNavbar',
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,
},
isShowKf: {
type: Boolean,
default: false,
},
borderStyle: {
type: String,
default: '0px solid #e7e7e7',
},
isBlack: {
type: Boolean,
default: true,
},
},
data() {
return {
......@@ -115,18 +52,7 @@ export default {
isWeb: false,
};
},
computed: {
navHeight() {
if (this.isFixNavbar) {
return '54px';
} else {
return (this.navbarHeight + this.contentHeight) / this.fontSize + 'rem';
}
},
paddingTop() {
return this.navbarHeight / this.fontSize + 'rem';
},
},
computed: {},
created() {
if (this.$rocNative.isWeb) {
this.isWeb = this.$rocNative.isWeb;
......@@ -145,18 +71,6 @@ export default {
this.$rocNative.goBack();
}
},
// 分享
goShare() {
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(),
});
},
goKf() {
goKfFn({
code: '0002',
......
......@@ -78,7 +78,7 @@ export default {
white-space: nowrap;
&.fixed {
position: fixed;
top: 70px;
top: 56px;
width: 100%;
z-index: 1000000000;
background: #fff;
......
import Vue from 'vue';
import rocNative from '@/utils/jsbridge';
// import echarts from 'echarts';
import { Toast } from 'vant';
const echarts = window.echarts;
......
import { router } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto';
// try {
// console.log('--router', router.prototype);
// const originalPush = router.prototype.push;
// router.prototype.push = function push(location) {
// return originalPush.call(this, location).catch((err) => err);
// };
// } catch (error) {
// console.log(error);
// }
import { headerConfigByMeta } from 'mn-template/util/routerUtil';
const routerConfig = [
{
......@@ -19,6 +11,12 @@ const routerConfig = [
name: 'index',
meta: {
title: '学情报告',
content: [
{
name: '客服',
outShow: true,
},
],
},
component: () => import('@/views/index'),
},
......@@ -51,6 +49,12 @@ const routerConfig = [
name: 'prolist',
meta: {
title: '专项合作',
content: [
{
name: '客服',
outShow: true,
},
],
},
component: () => import('@/views/prolist'),
},
......@@ -71,4 +75,10 @@ const routerConfig = [
component: () => import('@/views/rankedu'),
},
];
router.beforeEach(async (to, from, next) => {
headerConfigByMeta(to);
next();
});
router.addRoutes(routerConfig);
......@@ -202,3 +202,12 @@ export const getProjectList = async (params) => {
url: 'portal/report/getReportListForApp',
});
};
export const getImUrl = (data) => {
return request({
withCredentials: true,
url: '/im/call/im/link',
method: 'post',
data: data,
});
};
......@@ -78,7 +78,6 @@ export function parseTime(time, cFormat) {
// 跳转到新的学情报告页面
export function goPageByNative(vm, pageSubUrl) {
const url = getShareUrl() + pageSubUrl;
console.log('---url', url);
const paramList = [
{
key: 'pageUrl',
......
......@@ -16,7 +16,12 @@ export const JsBridgeOptions = {
GLOBAL_NAME: 'rocNative',
NATIVE_IOS_NAME: 'rociOS',
NATIVE_ANDROID_NAME: '__rocAndroid',
initMethodsWithCallBack: ['getToken', 'getUserInfo', 'getLocalData'], // value is string
initMethodsWithCallBack: [
'getToken',
'getUserInfo',
'getLocalData',
'getAppVersionCode',
], // value is string
initMethodsWithoutCallBack: [
'gotoLogin',
'appInit',
......@@ -51,7 +56,6 @@ export default class PicaJsBridge {
this.isIOS = this._isIos();
this.isAndroid = this._isAndroid();
this.isWeb = this._isWeb();
if (
_toString.call(initMethodsWithCallBack) === ARRAY_CLASS &&
initMethodsWithCallBack.length !== 0
......@@ -90,7 +94,6 @@ export default class PicaJsBridge {
// register method width callback in window
_registerMethod(method) {
const _this = this;
_this[method] = (param) => {
return new Promise((response, reject) => {
_this._callNative(method, param, function (result) {
......@@ -135,7 +138,6 @@ export default class PicaJsBridge {
window[this._NATIVE_ANDROID_NAME].postMessage(pm);
return true;
}
if (this.isIOS) {
window.webkit.messageHandlers[this._NATIVE_IOS_NAME].postMessage(pm);
return true;
......@@ -166,8 +168,6 @@ export default class PicaJsBridge {
throw Error(
'widthCallback flag not defined, registerMethods should take second param value(true/false) for is not has callback.'
);
if (this.isWeb) return; // Add By Anndy Yang
methods.forEach((m) => {
widthCallback === true
? this._registerMethod(m)
......
// 跳转客服
import request from 'mn-template/plugins/http';
import Vue from 'vue';
/*
*code ("0003-药械专线 0004-问诊专线 0007-会员专线 0002-教培专线 0005-招募专线 0001-基础业务")
*type 1-详情,2-ID、名称
......@@ -24,7 +25,8 @@ function nativeGo(url) {
seqNo: 1,
},
];
this.rocNative.dispatchEventByModuleCode({
Vue.prototype.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300',
jsonString: paramList,
});
......
<template>
<section class="exam-score-wrapper">
<CommonHeader title="完成项目考试分数情况" />
<PageModel :header-info="headerInfo" />
<CommonTitleWithDropdown
:data-list="dropdownList"
:title="title"
......@@ -21,8 +21,8 @@
<script>
const cookies = require('cookie-universal')();
import { getGeneralExam } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleWithDropdown from '@/components/common/common-title-with-dropdown';
import CommonNoMore from '@/components/common/common-no-more';
import ExamScoreList from '@/components/bussiness/exam-score-list';
......@@ -31,14 +31,18 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
// CommonHeader,
CommonTitleWithDropdown,
CommonNoMore,
ExamScoreList,
Loading,
PageModel,
},
data() {
return {
headerInfo: {
title: '完成项目考试分数情况',
},
isShowLoading: true,
title: '共0条数据',
needRightBtn: true,
......
<template>
<section class="exam-times-wrapper">
<CommonHeader title="完成项目考试次数情况" />
<!-- <CommonHeader title="完成项目考试次数情况" />-->
<PageModel :header-info="headerInfo" />
<CommonTitleMini
:title="title"
:need-right-btn="needRightBtn"
......@@ -19,8 +20,8 @@
<script>
const cookies = require('cookie-universal')();
import { getGeneralExam } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleMini from '@/components/common/common-title-mini';
import CommonNoMore from '@/components/common/common-no-more';
import ExamTimesList from '@/components/bussiness/exam-times-list';
......@@ -29,14 +30,18 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
// CommonHeader,
CommonTitleMini,
CommonNoMore,
ExamTimesList,
Loading,
PageModel,
},
data() {
return {
headerInfo: {
title: '完成项目考试次数情况',
},
isShowLoading: true,
title: '共0条数据',
needRightBtn: false,
......
<template>
<section class="container">
<CommonHeader
:title="projectInfo.projectName | shortName"
:is-show-kf="isShowKf"
<PageModel
:header-info="headerInfo"
@onService="goKf"
/>
<CommonAreaSelect
v-show="!isScroll"
......@@ -209,6 +209,7 @@
<script>
const cookies = require('cookie-universal')();
import { goPageByNative } from '@/utils';
import { goKfFn } from '@/utils/kf';
import { mapGetters, mapActions } from 'vuex';
import {
getAreaOrOrgList,
......@@ -220,12 +221,10 @@ import {
getGeneralExamList,
getStudyEffect,
} from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
import CommonTitle from '@/components/common/common-title';
import CommonTitleWithWhat from '@/components/common/common-title-with-what';
import CommonTitleWithBtn from '@/components/common/common-title-with-btn';
// import CommonLoading from '@/components/common/common-loading';
import CommonTaps from '@/components/common/common-tabs';
import CommonSwiperItem from '@/components/common/common-swiper-item';
import CommonSplitLine from '@/components/common/common-split-line';
......@@ -254,9 +253,8 @@ import Loading from '@/components/common/common-loading';
import { getGeneralData } from '@/service/index';
export default {
components: {
CommonHeader,
CommonTitle,
// CommonLoading,
PageModel,
CommonTaps,
CommonSwiperItem,
CommonSplitLine,
......@@ -296,6 +294,10 @@ export default {
},
data() {
return {
headerInfo: {
title: '项目名称',
backMethod: 'native',
},
isShowKf: true,
isShowLoading: false,
isScroll: false,
......@@ -323,7 +325,7 @@ export default {
studyRankList: [],
costRankList: [],
projectId: '',
token: '8C124410C0904B69B06D0E65039984B9',
token: '5A8C8B5D697941C8A0303DBFD6247E55',
isOrgStat: false,
// 区域选择通用接口参数
queryParams: {
......@@ -463,10 +465,6 @@ export default {
window.innerHeight ||
0
);
// return {
// 'width': docE && docE.clientWidth || body && body.offsetWidth || window.innerWidth || 0,
// 'height': docE && docE.clientHeight || body && body.offsetHeight || window.innerHeight || 0
// };
},
// 切换机构人员列表中的tabs
......@@ -480,6 +478,8 @@ export default {
getAreaOrOrgList(params).then((res) => {
if (res.code === '000000') {
this.projectInfo = res.data.doctorInfoRep;
const t = this.shortName(this.projectInfo.projectName) || '项目名称';
this.headerInfo = Object.assign({}, { ...this.headerInfo, title: t });
this.queryGDParams.originalFlag = res.data.doctorInfoRep.originalFlag;
if (!this.queryGDParams.regionId) {
this.setOriginalFlag(res.data.doctorInfoRep.originalFlag);
......@@ -816,6 +816,12 @@ export default {
}
},
goKf() {
goKfFn({
code: '0002',
});
},
// 映射Store中的Actions
...mapActions({
setOrgList: 'setOrgList',
......
<template>
<section class="klg-point-wrapper">
<CommonHeader title="培训前后知识点掌握情况" />
<!-- <CommonHeader title="培训前后知识点掌握情况" />-->
<PageModel :header-info="headerInfo" />
<TitleKLGPoint :title="title" />
<TipsInfo :content="tipsContent" />
<ChartColumnHorizontalTCLong
......@@ -13,8 +14,8 @@
<script>
const cookies = require('cookie-universal')();
import { getStudyEffect } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import TitleKLGPoint from '@/components/bussiness/title-klg-point';
import TipsInfo from '@/components/bussiness/tips-info';
import ChartColumnHorizontalTCLong from '@/components/bussiness/charts/chart-column-horizontal-tc-long';
......@@ -23,7 +24,7 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
PageModel,
TitleKLGPoint,
ChartColumnHorizontalTCLong,
TipsInfo,
......@@ -31,6 +32,9 @@ export default {
},
data() {
return {
headerInfo: {
title: '培训前后知识点掌握情况',
},
isShowLoading: true,
title: '共0个知识点',
token: '',
......
<template>
<!-- 专项合作首页: 我参与的,其它项目 -->
<div class="pro-list-container">
<!-- <CommonHeader :title="title"></CommonHeader> -->
<CommonHeaderNew
border-style="1px solid #e7e7e7"
:title="title"
:is-show-kf="isShowKf"
<PageModel
ref="PageModel"
:header-info="headerInfo"
@onService="goKf"
/>
<CoopListItem
style="margin: 10px 0"
:data-list="projectList"
/>
<!-- <Loading v-if="showLoading" />-->
<CoopListItem :data-list="projectList" />
</div>
</template>
<script>
import CommonHeaderNew from '@/components/common/common-header-new';
import PageModel from '@pica-kit/page-model';
import CoopListItem from '@/components/bussiness/coop-list-item';
// import Loading from '@/components/common/common-loading';
import { getProjectList } from '@/service';
import { getProjectList, getImUrl } from '@/service';
import { BASE_URL } from '@/utils/enumerate';
const { VUE_APP_ENV } = process.env;
const cookies = require('cookie-universal')();
console.log('--BASE_URL', BASE_URL);
console.log('--VUE_APP_ENV', VUE_APP_ENV);
export default {
components: {
CommonHeaderNew,
CoopListItem,
// Loading,
PageModel,
},
data() {
return {
token: '8C124410C0904B69B06D0E65039984B9',
title: '学情报告',
headerInfo: {
title: '学情报告',
backMethod: 'native',
},
token: '0434E93C02524BE1BA103658B2BFC835',
projectList: [],
isShowKf: true,
headerEl: null,
};
},
created() {
const _this = this;
console.log('--this.$rocNative.isWeb', this.$rocNative.isWeb);
if (this.$rocNative.isWeb) {
cookies.set('conslToken', _this.token);
_this.headerInfo.backMethod = '';
_this.getProjectList();
} else {
_this.getUserInfo();
......@@ -90,6 +85,30 @@ export default {
}
});
},
goKf() {
const that = this;
getImUrl({
code: '0002',
}).then((res) => {
if (res.code == '000000') {
const paramList = [
{
key: 'pageUrl',
value: res.data,
type: 4,
seqNo: 1,
},
];
that.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300',
jsonString: paramList,
});
}
});
},
changlist() {
this.$refs.PageModel.onEditContent([]);
},
},
};
</script>
......
<template>
<section class="rank-days-wrapper">
<CommonHeader title="完成天数排名" />
<!-- <CommonHeader title="完成天数排名" />-->
<PageModel :header-info="headerInfo" />
<CommonTitleWithDropdown :title="listTitle" />
<RankingItemDays
class="pdt-50"
......@@ -16,8 +17,8 @@
<script>
const cookies = require('cookie-universal')();
import { getStudyTimeData } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleWithDropdown from '@/components/common/common-title-with-dropdown';
import RankingItemDays from '@/components/bussiness/ranking-item-days';
import CommonNoMore from '@/components/common/common-no-more';
......@@ -26,7 +27,7 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
PageModel,
CommonTitleWithDropdown,
RankingItemDays,
CommonNoMore,
......@@ -34,6 +35,9 @@ export default {
},
data() {
return {
headerInfo: {
title: '完成天数排名',
},
isShowLoading: true,
listTitle: '共0条数据',
rankList: [],
......
<template>
<section class="rank-edu-wrapper">
<CommonHeader title="项目情况排名" />
<!-- <CommonHeader title="项目情况排名" />-->
<PageModel :header-info="headerInfo" />
<CommonTitleWithDropdown
:data-list="dropdownList"
:title="title"
......@@ -22,8 +23,8 @@
<script>
const cookies = require('cookie-universal')();
import { getStudyRankData } from '@/service';
import CommonHeader from '@/components/common/common-header';
import PageModel from '@pica-kit/page-model';
// import CommonHeader from '@/components/common/common-header';
import CommonTitleWithDropdown from '@/components/common/common-title-with-dropdown';
import CommonNoMore from '@/components/common/common-no-more';
import RankingList from '@/components/bussiness/ranking-item';
......@@ -32,7 +33,7 @@ import { mapGetters } from 'vuex';
export default {
components: {
CommonHeader,
PageModel,
CommonTitleWithDropdown,
CommonNoMore,
RankingList,
......@@ -40,6 +41,9 @@ export default {
},
data() {
return {
headerInfo: {
title: '项目情况排名',
},
isShowLoading: true,
title: '共0条数据',
rankList: [],
......
因为 它太大了无法显示 源差异 。您可以改为 查看blob
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册