diff --git a/components/myAvatar/myAvatar.vue b/components/myAvatar/myAvatar.vue index e454c4d..2030b29 100644 --- a/components/myAvatar/myAvatar.vue +++ b/components/myAvatar/myAvatar.vue @@ -10,14 +10,14 @@ - {{nickname}} + {{nickname}} - + @@ -44,7 +44,8 @@ nickname: '用户', normal: '/static/my/wo_icon_pthy.png', VIP: '/static/my/wo_icon_vip.png', - isLoad: true + isLoad: true, + timoutText: 1 }; }, created() { @@ -66,14 +67,10 @@ //获取头像昵称和普通会员和VIP会员 getUser() { this.$apiServe.getUser().then(res => { - console.log('个人信息==', res.data); - // if (res.data.msg === "登录超时,请重新登录") { - // this.$toast.warn('登录超时,请重新登录') - // this.isLoad = false - // // uni.navigateTo({ - // // url: '/pages/my/login/login' - // // }) - // } + // console.log('个人信息==', res.data); + if (res.data.msg === "登录超时,请重新登录") { + this.isLoad = false + } var data = res.data.data this.avatar = uni.getStorageSync('img_url') + data.avatar this.nickname = data.nickname @@ -89,7 +86,7 @@ return } this.isLoad = true - this.$refs.myavatar.getUser() + this.getUser() }, failToLoad() { uni.navigateBack({ diff --git a/packageReport/certifiedCjDetail/certifiedCjDetail.vue b/packageReport/certifiedCjDetail/certifiedCjDetail.vue index 2466bb7..9402ad6 100644 --- a/packageReport/certifiedCjDetail/certifiedCjDetail.vue +++ b/packageReport/certifiedCjDetail/certifiedCjDetail.vue @@ -28,7 +28,7 @@ - {{phone}} + {{mobile}} 是否拨打客服电话 @@ -53,12 +53,13 @@ imgUrl: '', isLoad: true, showCall: false, - phone: '138 1222 222', + mobile: '', } }, onLoad(option) { this.id = option.id this.getCertifiedCjDetail() + this.getCsTel() this.imgUrl = uni.getStorageSync('img_url') if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) { this.isLoad = false @@ -67,6 +68,12 @@ this.isLoad = true }, methods: { + //获取客服电话 + getCsTel() { + this.$apiServe.getCsTel().then(res => { + this.mobile = res.data.data.cs_tel + }).finally(_ => {}) + }, //获取认证厂家详情 getCertifiedCjDetail() { this.$apiServe.getCertifiedCjDetail(this.id).then(res => { @@ -100,7 +107,8 @@ }, confirmCall() { this.showCall = false - let phone = '‭1381222222‬' + let phone = this.mobile + phone = phone.toString() uni.makePhoneCall({ phoneNumber: phone, success: function() { @@ -119,6 +127,11 @@