Просмотр исходного кода

fix(津南水查查):增加点击手机号拨打电话的功能

zouwenying 4 лет назад
Родитель
Сommit
4cb5ed1163

+ 8 - 0
shuichacha-for-TJ/pages/customermanage/customermanage.js

@@ -111,6 +111,14 @@ Page({
     this.popup.show();
 
   },
+  call(e){
+    let mobile= e.currentTarget.dataset['index'];
+    if(mobile!==""){
+      wx.makePhoneCall({
+        phoneNumber: mobile
+      })
+    }
+  },
   cancelEvent: function () {
     this.popup.close();
   },

+ 3 - 1
shuichacha-for-TJ/pages/customermanage/customermanage.wxml

@@ -10,7 +10,9 @@
         <text>户名:{{item.username || '--'}}</text>
         <text>户号:{{item.userNumber || '--'}}</text>
         <text>地址:{{item.address || '--'}}</text>
-        <text>手机:{{item.mobilePhone || '--'}}</text>
+        <text bindtap="call" data-index="{{item.mobilePhone}}">手机:{{item.mobilePhone || '--'}}</text>
+        <text>紧急联系人:{{item.emergencyContact || '--'}}</text>
+        <text bindtap="call" data-index="{{item.emergencyContactPhoneNumber}}">紧急联系人手机号:{{item.emergencyContactPhoneNumber || '--'}}</text>
         <text>标签:{{item.label || '--'}}</text>
         <view class="check clearfix" data-item="{{item}}" bindtap="setDefault">
           <image class="fl-left" src="/static/img/{{item.isDefault ? 'icon_selected' : 'icon_unSelect'}}.png"></image>

+ 0 - 15
shuichacha-for-TJ/pages/index/index.js

@@ -34,7 +34,6 @@ Page({
       icon: '/static/img/icon_customer_manage.png'
     }],
     weixinLogin: false,
-    // showTips: false
   },
   getPhoneNumber(e) {
     let that = this;
@@ -67,10 +66,6 @@ Page({
                   url: `/pages/${item.id || param}/${item.id || param}${item.url ? item.url : ''}`
                 })
               }
-              // that.setData({
-              //   showTips: false,
-              //   weixinLogin:true
-              // })
               wx.showToast({
                 title: '授权成功',
                 icon: 'none',
@@ -89,15 +84,7 @@ Page({
                 duration: 2000
               })
               return;
-              // that.setData({
-              //   showTips: true,
-              //   weixinLogin:true
-              // })
             }
-            // wx.setStorage({
-            //   key: 'isLogin',
-            //   data: true
-            // })
           })
         }
       })
@@ -163,12 +150,10 @@ Page({
       // 未授权
       if(status===-602){
         that.setData({
-          // showTips: true,
           weixinLogin:false
         })
       }else{
         that.setData({
-          showTips: false,
           weixinLogin:true
         })
       }

+ 0 - 2
shuichacha-for-TJ/pages/index/index.wxml

@@ -2,8 +2,6 @@
 <view class="container home">
 	<view class="unbind-box" wx:if="{{!userInfo.userNumber && !onQuery}}">
 		<image class="unbind-img" src="/static/img/img_no_customer.png"></image>
-		<!-- <text>您还没绑定您的户号</text> -->
-		<!-- <text wx:if="{{ showTips }}" data-param="customermanage">您尚未注册,请到平台端开通账号后重试</text> -->
 		<button  class="open-button"  wx:if="{{ !weixinLogin }}"open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">点击授权</button>
 	</view>
 	<view wx:else class="waterInfo">