diff --git a/pages/contactService/index.vue b/pages/contactService/index.vue index f232551..225ea94 100644 --- a/pages/contactService/index.vue +++ b/pages/contactService/index.vue @@ -6,22 +6,23 @@ 服务时间 - {{ info.service_period }} + {{ info.service_period || '-' }} 客服电话 - {{ info.phone }} + {{ info.phone || '-' }} 联系地址 - {{ info.address }} + {{ info.address || '-' }} 客服微信 - + {{ info.wechat }} 复制 + - 当前版本 @@ -46,11 +47,12 @@ // 获取信息 getInfo(){ this.$http(this.API.API_CONTACT).then(res => { - this.info = res.data; + this.info = res.data || {}; }) }, // 拨打电话 makePhoneCall(){ + if(!this.info?.phone) return; uni.makePhoneCall({ phoneNumber: this.info.phone })