36 lines
815 B
JavaScript
36 lines
815 B
JavaScript
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
|
|
});
|
|
}
|
|
}
|
|
}); |