|
@@ -14,6 +14,7 @@
|
|
|
<!-- <div class="tip" v-if="isCorpWX">
|
|
|
工时报表统计等更多功能,请从PC端企业微信进入
|
|
|
</div> -->
|
|
|
+ <van-icon v-if="isCorpWX && kefuShow" class="kefu" name="service-o" size="30" color="#20a0ff" @click="tokefu" />
|
|
|
<div class="tip" v-if="!isCorpWX">
|
|
|
体验报表统计等更多功能,尽在PC端<br>
|
|
|
网页用户访问http://worktime.ttkuaiban.com,钉钉用户直接从钉钉PC端进入工时管家
|
|
@@ -28,6 +29,7 @@
|
|
|
return {
|
|
|
isCorpWX:false,
|
|
|
isWX:false,
|
|
|
+ kefuShow: false,
|
|
|
// user: JSON.parse(localStorage.userInfo) || '',
|
|
|
user: '',
|
|
|
unreadNum:0,
|
|
@@ -47,7 +49,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
// 手机上看控制台
|
|
|
- // if(this.user.companyId == '7'){
|
|
|
+ // if(this.user.companyName == '比基尼小镇'){
|
|
|
// let consoleScript = document.createElement("script");
|
|
|
// consoleScript.src = "https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js";
|
|
|
// consoleScript.onload = function () {
|
|
@@ -77,6 +79,16 @@
|
|
|
Footer
|
|
|
},
|
|
|
methods: {
|
|
|
+ tokefu(){
|
|
|
+ wx.invoke('openThirdAppServiceChat', {
|
|
|
+ }, function(res) {
|
|
|
+ if (res.err_msg == "openThirdAppServiceChat:ok" || res.err_msg == "openThirdAppServiceChat:cancel") {
|
|
|
+ }else{
|
|
|
+ this.$toast.fail('请联系管理员添加客服');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
// 模块
|
|
|
getModule() {
|
|
|
if(this.user.userNameNeedTranslate == '1'){
|
|
@@ -172,12 +184,13 @@
|
|
|
timestamp: res.data.timestamp, // 必填,生成签名的时间戳
|
|
|
nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
|
|
|
signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
|
|
|
- jsApiList: ['selectExternalContact'], //必填,传入需要使用的接口名称
|
|
|
+ jsApiList: ['selectExternalContact','openThirdAppServiceChat'], //必填,传入需要使用的接口名称
|
|
|
success: function (result) {
|
|
|
// console.log(result, '请求微信成功')
|
|
|
// console.log(window, 'window')
|
|
|
// wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
|
|
|
window.WWOpenData.bind(document.querySelector('ww-open-data'))
|
|
|
+ this.kefuShow = true
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
// console.log('查看错误信息', res)
|
|
@@ -324,6 +337,16 @@
|
|
|
height: calc(100vh - 50px);
|
|
|
position: relative;
|
|
|
}
|
|
|
+ .kefu{
|
|
|
+ position: fixed;
|
|
|
+ right: 10px;
|
|
|
+ bottom: 100px;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ background-color: #fff;
|
|
|
+ z-index: 1000;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
|
|
|
.tip {
|
|
|
position: absolute;
|