提交 217dafb8 编写于 作者: changdi.hao's avatar changdi.hao

新增客服入口

上级 0170a8f3
...@@ -17,11 +17,15 @@ ...@@ -17,11 +17,15 @@
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png"
> >
</span> </span>
<span v-show="isShowKf && !isWeb" class="nav-share" @click="goKf">
<img src="../../assets/images/kf.png" alt="">
</span>
</div> </div>
</div> </div>
</section> </section>
</template> </template>
<script> <script>
import { kfAccid } from '@/utils/enumerate';
export default { export default {
name: "common-navbar-new", name: "common-navbar-new",
data() { data() {
...@@ -31,7 +35,8 @@ export default { ...@@ -31,7 +35,8 @@ export default {
fontSize: 37.5, fontSize: 37.5,
content: "", content: "",
shareImageUrl: shareImageUrl:
"https://file.yunqueyi.com/logo.png?version=" + new Date().getTime() "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime(),
isWeb: false
}; };
}, },
props: { props: {
...@@ -60,6 +65,10 @@ export default { ...@@ -60,6 +65,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowKf: {
type: Boolean,
default: false
},
borderStyle: { borderStyle: {
type: String, type: String,
default: "0px solid #e7e7e7" default: "0px solid #e7e7e7"
...@@ -81,6 +90,11 @@ export default { ...@@ -81,6 +90,11 @@ export default {
return this.navbarHeight / this.fontSize + "rem"; return this.navbarHeight / this.fontSize + "rem";
} }
}, },
created() {
if (process.client) {
this.isWeb = this.$rocNative.isWeb;
}
},
mounted() { mounted() {
let htmlDom = document.getElementsByTagName("html")[0].style.fontSize; let htmlDom = document.getElementsByTagName("html")[0].style.fontSize;
this.fontSize = htmlDom; this.fontSize = htmlDom;
...@@ -106,6 +120,9 @@ export default { ...@@ -106,6 +120,9 @@ export default {
title2: "this.shareTitle2", title2: "this.shareTitle2",
shareImageUrl: "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime() shareImageUrl: "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime()
}); });
},
goKf() {
rocNative.openImSession({ sessionId: getKFAccid(kfAccid) });
} }
} }
}; };
......
...@@ -17,11 +17,15 @@ ...@@ -17,11 +17,15 @@
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png"
> >
</span> </span>
<span v-show="isShowKf && !isWeb" class="nav-share" @click="goKf">
<img src="../../assets/images/kf.png" alt="">
</span>
</div> </div>
</div> </div>
</section> </section>
</template> </template>
<script> <script>
import { kfAccid } from '@/utils/enumerate';
export default { export default {
name: "common-navbar", name: "common-navbar",
data() { data() {
...@@ -31,7 +35,8 @@ export default { ...@@ -31,7 +35,8 @@ export default {
fontSize: 37.5, fontSize: 37.5,
content: "", content: "",
shareImageUrl: shareImageUrl:
"https://file.yunqueyi.com/logo.png?version=" + new Date().getTime() "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime(),
isWeb: false
}; };
}, },
props: { props: {
...@@ -60,6 +65,10 @@ export default { ...@@ -60,6 +65,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowKf: {
type: Boolean,
default: false
},
borderStyle: { borderStyle: {
type: String, type: String,
default: "0px solid #e7e7e7" default: "0px solid #e7e7e7"
...@@ -81,6 +90,11 @@ export default { ...@@ -81,6 +90,11 @@ export default {
return this.navbarHeight / this.fontSize + "rem"; return this.navbarHeight / this.fontSize + "rem";
} }
}, },
created() {
if (process.client) {
this.isWeb = this.$rocNative.isWeb;
}
},
mounted() { mounted() {
let htmlDom = document.getElementsByTagName("html")[0].style.fontSize; let htmlDom = document.getElementsByTagName("html")[0].style.fontSize;
this.fontSize = htmlDom; this.fontSize = htmlDom;
...@@ -106,6 +120,9 @@ export default { ...@@ -106,6 +120,9 @@ export default {
title2: "this.shareTitle2", title2: "this.shareTitle2",
shareImageUrl: "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime() shareImageUrl: "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime()
}); });
},
goKf() {
rocNative.openImSession({ sessionId: getKFAccid(kfAccid) });
} }
} }
}; };
......
<template> <template>
<section class="container"> <section class="container">
<CommonHeader :title="projectInfo.projectName | shortName"></CommonHeader> <CommonHeader :title="projectInfo.projectName | shortName" :isShowKf="isShowKf"></CommonHeader>
<CommonAreaSelect v-show="!isScroll" @areaClick="areaTabClick" :areaName="areaName" :showArea="isShowArea"> <CommonAreaSelect v-show="!isScroll" @areaClick="areaTabClick" :areaName="areaName" :showArea="isShowArea">
</CommonAreaSelect> </CommonAreaSelect>
<CommonTaps :needFixed="isScroll" :projectInfo="projectInfo" @tabClicked="tabClicked"></CommonTaps> <CommonTaps :needFixed="isScroll" :projectInfo="projectInfo" @tabClicked="tabClicked"></CommonTaps>
...@@ -181,6 +181,7 @@ export default { ...@@ -181,6 +181,7 @@ export default {
}, },
data() { data() {
return { return {
isShowKf: true,
isShowLoading: true, isShowLoading: true,
isScroll: false, isScroll: false,
isShowArea: false, isShowArea: false,
...@@ -206,7 +207,7 @@ export default { ...@@ -206,7 +207,7 @@ export default {
studyRankList: [], studyRankList: [],
costRankList: [], costRankList: [],
projectId: "", projectId: "",
token: "C519A26F3F9942C6B622BCC4201445AA", token: "568E9A4C115F47649BDA1B0B70D4B4F9",
isOrgStat: false, isOrgStat: false,
// 区域选择通用接口参数 // 区域选择通用接口参数
queryParams: { queryParams: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- 专项合作首页: 我参与的,其它项目 --> <!-- 专项合作首页: 我参与的,其它项目 -->
<div class="pro-list-container"> <div class="pro-list-container">
<!-- <CommonHeader :title="title"></CommonHeader> --> <!-- <CommonHeader :title="title"></CommonHeader> -->
<CommonHeaderNew borderStyle="1px solid #e7e7e7" :title="title"></CommonHeaderNew> <CommonHeaderNew borderStyle="1px solid #e7e7e7" :title="title" :isShowKf="isShowKf"></CommonHeaderNew>
<CoopListItem style="margin: 10px 0;" :dataList="projectList"></CoopListItem> <CoopListItem style="margin: 10px 0;" :dataList="projectList"></CoopListItem>
<Loading v-if="showLoading"/> <Loading v-if="showLoading"/>
</div> </div>
...@@ -19,10 +19,11 @@ const cookies = require("cookie-universal")(); ...@@ -19,10 +19,11 @@ const cookies = require("cookie-universal")();
export default { export default {
data() { data() {
return { return {
token: '6177426E77F8435B88A5B946B3546904', token: '568E9A4C115F47649BDA1B0B70D4B4F9',
showLoading: true, showLoading: true,
title: "学情报告", title: "学情报告",
projectList: [] projectList: [],
isShowKf: true
}; };
}, },
......
...@@ -20,7 +20,7 @@ Axios.interceptors.request.use( ...@@ -20,7 +20,7 @@ Axios.interceptors.request.use(
if (method === 'post' || method === 'put' || method === 'delete') {} if (method === 'post' || method === 'put' || method === 'delete') {}
if (config.withCredentials) { if (config.withCredentials) {
// config.headers.token = '3EB9111164E84A45B5B00428D52BC966'; // config.headers.token = '3EB9111164E84A45B5B00428D52BC966';
config.headers.token = cookies.get('lreporttoken') || 'EDEE2B73649A4B0D98851406DDD6007E' || '299F66567E7C48C78ADE418B364C5A35' || 'F24CD42F1CFA46829639228E9CFE1E3D' || 'C284B868425D494386EAEF6C9AE99937'; config.headers.token = cookies.get('lreporttoken') || '568E9A4C115F47649BDA1B0B70D4B4F9';
} }
// config.timeout = 30000; // config.timeout = 30000;
return config; return config;
......
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://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',
prod: 'https://sc.yunqueyi.com' prod: 'https://sc.yunqueyi.com'
}; };
export const SHARE_URL = { export const SHARE_URL = {
// dev: 'https://dev-phome.yunqueyi.com',
// dev: 'http://10.177.11.247:4001',
dev: 'https://dev-phome.yunqueyi.com', 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',
} }
export const KF_ACCID_LIST = {
dev: 'picakf_dev',
test: 'picakf_test',
uat: 'picakf_uat',
prod: 'picakf',
}
export const kfAccid = KF_ACCID_LIST[NUXT_ENV_APP];
export function getShareUrl() { export function getShareUrl() {
return SHARE_URL[NUXT_ENV_APP] return SHARE_URL[NUXT_ENV_APP]
} }
......
...@@ -17,7 +17,7 @@ export const JsBridgeOptions = { ...@@ -17,7 +17,7 @@ export const JsBridgeOptions = {
NATIVE_IOS_NAME: 'rociOS', NATIVE_IOS_NAME: 'rociOS',
NATIVE_ANDROID_NAME: '__rocAndroid', NATIVE_ANDROID_NAME: '__rocAndroid',
initMethodsWithCallBack: ['getToken', 'getUserInfo', 'getLocalData'], // value is string initMethodsWithCallBack: ['getToken', 'getUserInfo', 'getLocalData'], // value is string
initMethodsWithoutCallBack: ['gotoLogin', 'appInit', 'goBack', 'shareWechat', 'showNativeToast', 'dispatchEventByModuleCode', 'appBuryingPointEntrust', 'webLoadSuccess', 'sendBuriedPoint'] // value is string initMethodsWithoutCallBack: ['gotoLogin', 'appInit', 'goBack', 'shareWechat', 'showNativeToast', 'dispatchEventByModuleCode', 'appBuryingPointEntrust', 'webLoadSuccess', 'sendBuriedPoint', 'openImSession'] // value is string
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册