|
@@ -70,6 +70,26 @@
|
|
|
<!-- <view class="lixian ddflex">会话已结束,用时 05:30</view>
|
|
<!-- <view class="lixian ddflex">会话已结束,用时 05:30</view>
|
|
|
<view class="lixian ddflex">当前顾问处于离线状态,<button open-type="contact">点此联系智能客服</button></view>
|
|
<view class="lixian ddflex">当前顾问处于离线状态,<button open-type="contact">点此联系智能客服</button></view>
|
|
|
-->
|
|
-->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 引导添加官方企微 -->
|
|
|
|
|
+ <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle">
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="code-pop" v-if="isShowCodePop">
|
|
|
|
|
+ <view class="code-text">
|
|
|
|
|
+ <view>专属顾问长时间未回复</view>
|
|
|
|
|
+ <view>您可添加官方企微咨询</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="ddflex" style="justify-content: center;">
|
|
|
|
|
+ <view class="code-content">
|
|
|
|
|
+ <image :src="about.index_post"
|
|
|
|
|
+ show-menu-by-longpress="true" mode="aspectFit"></image>
|
|
|
|
|
+ <view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别二维码</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="code-btn" @click="isShowCodePop = false">
|
|
|
|
|
+ 知道了
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- <view style="height: 1px;"></view> -->
|
|
<!-- <view style="height: 1px;"></view> -->
|
|
|
</template>
|
|
</template>
|
|
@@ -133,7 +153,9 @@
|
|
|
defaultAvatar: "../../../static/theme2x.png",
|
|
defaultAvatar: "../../../static/theme2x.png",
|
|
|
defaultGroupAvatar: "../../..//static/groupTheme.png",
|
|
defaultGroupAvatar: "../../..//static/groupTheme.png",
|
|
|
recommendCard: '',
|
|
recommendCard: '',
|
|
|
- isShowCodePop: false,
|
|
|
|
|
|
|
+
|
|
|
|
|
+ about:{},
|
|
|
|
|
+ isShowCodePop:false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -164,8 +186,8 @@
|
|
|
msgStorage.off("newChatMsg", this.dispMsg)
|
|
msgStorage.off("newChatMsg", this.dispMsg)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- mounted(event) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ async mounted(event) {
|
|
|
|
|
+ await this.getConfig().then(res => {});
|
|
|
let me = this;
|
|
let me = this;
|
|
|
if (getApp().globalData.isIPX) {
|
|
if (getApp().globalData.isIPX) {
|
|
|
this.setData({
|
|
this.setData({
|
|
@@ -207,6 +229,7 @@
|
|
|
});
|
|
});
|
|
|
msgStorage.on("newChatMsg", this.dispMsg);
|
|
msgStorage.on("newChatMsg", this.dispMsg);
|
|
|
this.getUserInfo();
|
|
this.getUserInfo();
|
|
|
|
|
+ this.getCodeShow()
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
|
|
@@ -229,6 +252,21 @@
|
|
|
url:"/pages/index/index"
|
|
url:"/pages/index/index"
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ getConfig() {
|
|
|
|
|
+ var _this = this;
|
|
|
|
|
+ return new Promise((res, rej) => {
|
|
|
|
|
+ req.g(
|
|
|
|
|
+ '/api/other/config',
|
|
|
|
|
+ data => {
|
|
|
|
|
+ req.setStorage('configRes', JSON.stringify(data));
|
|
|
|
|
+ this.about = data;
|
|
|
|
|
+ res(data);
|
|
|
|
|
+ },
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
showWeChatCodePop() {
|
|
showWeChatCodePop() {
|
|
|
this.$emit("showWeChatCodePop", true, this.recommendCard);
|
|
this.$emit("showWeChatCodePop", true, this.recommendCard);
|
|
@@ -493,6 +531,27 @@
|
|
|
event.target.dataset.msg.msg.ext.msg_extension) {
|
|
event.target.dataset.msg.msg.ext.msg_extension) {
|
|
|
this.$emit("clickMsg", event.target.dataset.msg.msg.ext)
|
|
this.$emit("clickMsg", event.target.dataset.msg.msg.ext)
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 引导企微添加
|
|
|
|
|
+ getCodeShow(){
|
|
|
|
|
+ console.log('getCodeShow')
|
|
|
|
|
+ // 是销售员则直接返回
|
|
|
|
|
+ if(req.getStorage('userInfo') && req.getStorage('userInfo').userType!=1){}
|
|
|
|
|
+ else return false
|
|
|
|
|
+ // 如果有消息记录
|
|
|
|
|
+ if(this.chatMsg && this.chatMsg.length){
|
|
|
|
|
+ let lastMsg = this.chatMsg[this.chatMsg.length-1]
|
|
|
|
|
+ // 如果最后一条记录是销售员的
|
|
|
|
|
+ if(lastMsg.style=="self") {
|
|
|
|
|
+ let ot =new Date(timeFormats.timeFormat(lastMsg.time, 'yyyy/mm/dd hh:MM:ss')).getTime()
|
|
|
|
|
+ let nt = new Date().getTime()
|
|
|
|
|
+ //如果配置了超时时间且销售员最后一条消息超时未回复
|
|
|
|
|
+ if(this.about.IM_COMPANY_WECHAT_NO_ANSWER_TIMES && ((nt-ot)/1000/60) > Number(this.about.IM_COMPANY_WECHAT_NO_ANSWER_TIMES)){
|
|
|
|
|
+ this.isShowCodePop = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|