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

add native save

上级 d317609d
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 = [
{
......@@ -77,4 +69,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,
});
};
......@@ -24,7 +24,7 @@ function nativeGo(url) {
seqNo: 1,
},
];
this.rocNative.dispatchEventByModuleCode({
this.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300',
jsonString: paramList,
});
......
......@@ -16,9 +16,8 @@
// import CommonHeaderNew from '@/components/common/common-header-new';
import PageModel from '@pica-kit/page-model';
import CoopListItem from '@/components/bussiness/coop-list-item';
import { getProjectList } from '@/service';
import { getProjectList, getImUrl } from '@/service';
import { BASE_URL } from '@/utils/enumerate';
import { goKfFn } from '@/utils/kf';
const { VUE_APP_ENV } = process.env;
const cookies = require('cookie-universal')();
......@@ -34,7 +33,7 @@ export default {
title: '学情报告',
backMethod: 'native',
},
token: 'C98719AA9D544876A92277955A692C8D',
token: '0F1712A49D7F4DC79A31484ED97E9433',
projectList: [],
isShowKf: true,
};
......@@ -91,8 +90,24 @@ export default {
});
},
goKf() {
goKfFn({
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,
});
}
});
},
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册