|
@@ -2,8 +2,7 @@ Component({
|
|
|
/**
|
|
|
* 组件的属性列表
|
|
|
*/
|
|
|
- properties: {
|
|
|
- },
|
|
|
+ properties: {},
|
|
|
|
|
|
/**
|
|
|
* 组件的初始数据
|
|
@@ -35,7 +34,9 @@ Component({
|
|
|
text: '我的',
|
|
|
url: '/pages/tabbar-pages/user/index'
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ show: false,
|
|
|
+ phoneNumber: "17757394388"
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -44,6 +45,9 @@ Component({
|
|
|
methods: {
|
|
|
/* tabbar */
|
|
|
onChange(event) {
|
|
|
+ if (event.target.dataset.index == 1) return this.setData({
|
|
|
+ show: true
|
|
|
+ })
|
|
|
this.setData({
|
|
|
active: event.target.dataset.index
|
|
|
});
|
|
@@ -57,5 +61,18 @@ Component({
|
|
|
active: this.data.tabbarList.findIndex(item => item.url === `/${page.route}`)
|
|
|
});
|
|
|
},
|
|
|
+ /* 呼叫电话 */
|
|
|
+ CallOut() {
|
|
|
+ wx.makePhoneCall({
|
|
|
+ phoneNumber: this.data.phoneNumber
|
|
|
+ }).catch((e) => {
|
|
|
+ console.log(123)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onClose() {
|
|
|
+ this.setData({
|
|
|
+ show: false
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
})
|