feat(客服功能): 优化客服联系按钮显示和交互逻辑
修改客服电话模板为更明显的按钮样式 在页面列表和跳转逻辑中增加客服联系判断条件
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template name="pageList">
|
||||
<view class="index-href-box">
|
||||
<block wx:for="{{urlList}}" wx:key="index">
|
||||
<button wx:if="{{item.phone}}" class="item" open-type="contact" show-message-card="true">
|
||||
<button wx:if="{{item.phone || item.name=='联系客服'}}" class="item" open-type="contact" show-message-card="true">
|
||||
<view class="item_b" style="background-image:url('{{item.img}}')">
|
||||
<view class="name">{{item.name}}</view>
|
||||
</view>
|
||||
|
||||
@@ -124,8 +124,15 @@ Page({
|
||||
},
|
||||
toPage: function (t) {
|
||||
console.info(t);
|
||||
|
||||
// 有phone字段 但允许为空
|
||||
if (t.currentTarget.dataset.phone || t.currentTarget.dataset.name=='联系客服') {
|
||||
// 打开客服聊天窗口
|
||||
return wx.openCustomerServiceChat();
|
||||
}
|
||||
|
||||
var a = t.currentTarget.dataset, i = a.url, o = a.needlogin, n = a.showimg;
|
||||
if (console.log("showImg", n), i) {
|
||||
if (console.log("showImg", a), i) {
|
||||
this.isneedUpload = !0;
|
||||
if (o && !e.globalData.user.session) return this.isneedUpload = !0, wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<view class="service-tel">
|
||||
<!-- <view>=客服电话=</view>
|
||||
<view bindtap="callUs">{{tel}}</view> -->
|
||||
<!-- <button class="service-tel" open-type="contact" show-message-card="true">联系客服</button> -->
|
||||
</view>
|
||||
<button size="mini" type="default" plain="ture" open-type="contact" >== 联系客服 ==</button>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user