JMApp/template/serviceTel/serviceTel.js

36 lines
815 B
JavaScript
Raw Permalink Normal View History

2024-03-20 03:39:05 +00:00
var t = getApp();
Component({
properties: {},
data: {
tel: ""
},
lifetimes: {
attached: function() {
this.attachedIn();
}
},
attached: function() {
this.attachedIn();
},
methods: {
attachedIn: function() {
this.getTel();
},
getTel: function() {
var e = this;
if (!t.globalData.canGetData) return setTimeout(function() {
e.getTel();
}, 300), !1;
this.setData({
tel: t.globalData.servicetel
});
},
callUs: function() {
if (!t.globalData.servicetel) return !1;
wx.makePhoneCall({
phoneNumber: "" + t.globalData.servicetel
});
}
}
});