123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- import router from '@/router'
- // 打开标讯详情页
- export function doOpenArticlePage({ id }) {
- const link = router.resolve({
- name: 'article_detail',
- params: {
- id,
- content: 'content'
- }
- })
- window.open(
- `${link.href.replace('/swordfish/page_big_pc', '')}.html`,
- '_blank'
- )
- }
- // 打开采购单位详情页
- export function doOpenBuyerPage({ name, query = {} }) {
- const link = router.resolve({
- path: `/unit_portrayal/${name}`,
- query
- })
- window.open(link.href, '_blank')
- }
- // 打开SEO版本 采购单位详情页
- export function doOpenBuyerPageSEO({ seoId }) {
- if (!seoId) {
- return
- }
- window.open(`/dw/${seoId}.html`, '_blank')
- }
- // 打开采购单位监控列表页
- export function doOpenBuyerListPage() {
- window.open('/swordfish/page_big_pc/my_client', '_blank')
- }
- // 打开中标企业详情页
- export function doOpenWinnerPage({ id, query = {} }) {
- const link = router.resolve({
- path: `/ent_portrait/${id}`,
- query
- })
- window.open(link.href, '_blank')
- }
- // 打开企业监控列表页
- export function doOpenWinnerListPage() {
- window.open('/swordfish/page_big_pc/free/ent_follow', '_blank')
- }
- // 打开更多客户监控列表
- export function doOpenCorListPage(query = {}) {
- const link = router.resolve({
- path: '/potential_cor_list/c',
- query
- })
- window.open(link.href, '_blank')
- }
- // 打开项目监控详情页
- export function doOpenProjectDetailPage({ id, mark }) {
- window.open(
- `/swordfish/page_big_pc/pro_follow_detail?sid=${id}${
- mark ? `&mark=${mark}` : ''
- }`,
- '_blank'
- )
- }
- // 打开项目监控列表页
- export function doOpenProjectProgressListPage() {
- window.open('/swordfish/page_big_pc/free/project_progress', '_blank')
- }
- // 打开推送提醒设置
- export function doOpenPushSettingPage() {
- window.open('/page_workDesktop/work-bench/app/big/push_setting')
- }
- /**
- * 判断在哪个容器
- * @returns {string} - in-web (iframe 中) in-app
- */
- export function GetInWhichContainer() {
- const InWhichContainer = window.parent !== window ? 'in-app' : 'in-web'
- return InWhichContainer
- }
- // 打开企业信用报告购买页
- export function doOpenCreditReportPage(event, buyer = '') {
- const btnName = event.target.textContent.trim() || '投标企业信用报告'
- const infoType = event.target.dataset.infoType || event.currentTarget.dataset.infoType || ''
- const breakName = `${btnName}_${infoType}`
- // 自定义埋点上报事件(数据统计需求:点击信用报告按钮要求统计到当前标讯的信息类型)
- const openURL = '/swordfish/page_big_pc/free/report/preview?source=bidCreditReportPreview&buyer' + buyer
- try {
- window.__EasyJTrack.addTrack(breakName)
- window.open(openURL, '_blank')
- } catch (error) {
- window.open(openURL, '_blank')
- }
- }
|