0000
This commit is contained in:
36
template/serviceTel/serviceTel.js
Normal file
36
template/serviceTel/serviceTel.js
Normal file
@@ -0,0 +1,36 @@
|
||||
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
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user