From 8a9a1c23b53bdec49af78195ddac819dd32673e1 Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Fri, 31 Mar 2023 18:01:12 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=9C=AA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E5=9C=B0=E5=8C=BA=E7=8E=B0=E5=9C=A8?= =?UTF-8?q?=E6=9A=82=E6=97=A0=E6=95=B0=E6=8D=AE=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- high-unionPay/pages/tabBar/home/home.vue | 56 +++++++++++++----------- high-unionPay/pages/tabBar/user/user.vue | 26 +++++++---- 2 files changed, 48 insertions(+), 34 deletions(-) diff --git a/high-unionPay/pages/tabBar/home/home.vue b/high-unionPay/pages/tabBar/home/home.vue index e12e67a..d650c8f 100644 --- a/high-unionPay/pages/tabBar/home/home.vue +++ b/high-unionPay/pages/tabBar/home/home.vue @@ -5,9 +5,12 @@ --> - - - + + + + + + @@ -163,10 +166,11 @@ imgadres: '/home/home1.png', imgadres1: '/home/home2.png', imgadres2: 'jt.png', - // imgadres5: 'unionarea.png', + // imgadres5: 'unionarea.png', imgadres5: 'loading.gif', imgadres3: '', imgadres4: 'cusservice.png', + imgadres6: 'notOpened.png', webUrl: '', //猜你喜欢列表 productList: [], @@ -179,7 +183,7 @@ homeCateList: [], //切换状态 jumpType: '', - isdisplay: true //是否展示 + isdisplay: 1 //是否展示 }; }, onShow() { @@ -198,8 +202,8 @@ } }) }, - onLoad() { - this.hqaddress(); + onLoad() { + this.hqaddress(); }, methods: { //等待加载 @@ -244,15 +248,15 @@ }) }, test(item) { - let datas = []; - for (var i = 0; i < this.homeCateList.length; i++) { - if (this.homeCateList[i].type == 3) { - datas.push(this.homeCateList[i]) - } - } - let jumpid = datas[0].childDate[item].type; - uni.navigateTo({ - url: '../../user/news/news?id=' + jumpid + let datas = []; + for (var i = 0; i < this.homeCateList.length; i++) { + if (this.homeCateList[i].type == 3) { + datas.push(this.homeCateList[i]) + } + } + let jumpid = datas[0].childDate[item].type; + uni.navigateTo({ + url: '../../user/news/news?id=' + jumpid }) }, //定位信息 @@ -300,7 +304,7 @@ app.globalData.cityId = res.return_data.regionId; // app.globalData.cityId = '520000'; app.globalData.companyId = res.return_data.companyId; - this.getCmsContentcmsContent(); + this.getCmsContentcmsContent(); this.getCmsAactibity(); } }); @@ -313,9 +317,11 @@ categoryCode: 'CMS_HOME' } getCmsContent(params).then(res => { - this.isdisplay = false; - if (res.return_code == '000000') { + if (res.return_code == '000000' && res.return_data != null) { this.homeCateList = res.return_data; + this.isdisplay = 3; + } else { + this.isdisplay = 2; } }); }, @@ -383,12 +389,12 @@ }) }, //商品跳转 - toGoods(e, id) { - uni.navigateTo({ - url: e + id - }); + toGoods(e, id) { + uni.navigateTo({ + url: e + id + }); }, - + //拨打客服电话 playPhone() { uni.showModal({ @@ -695,4 +701,4 @@ border-radius: 50%; } } - + \ No newline at end of file diff --git a/high-unionPay/pages/tabBar/user/user.vue b/high-unionPay/pages/tabBar/user/user.vue index b5ee6f0..9f4c485 100644 --- a/high-unionPay/pages/tabBar/user/user.vue +++ b/high-unionPay/pages/tabBar/user/user.vue @@ -259,16 +259,20 @@ url: '../../login/updatePas/updatePas', text: '支付密码', img: '../../../static/img/user/user11.png' - }, { - url: '', - text: '退出登录', - img: '../../../static/img/user/user12.png' }, { url: '', text: '客服', img: '../../../static/img/user/user13.png' } ] + if (app.globalData.userInfo) { + let menus = { + url: '', + text: '退出登录', + img: '../../../static/img/user/user12.png' + } + this.czList.push(menus); + } return; } this.czList = [{ @@ -280,17 +284,21 @@ url: '../../login/updatePas/resetPas', text: '支付密码', img: '../../../static/img/user/user11.png' - }, { - url: '', - text: '退出登录', - img: '../../../static/img/user/user12.png' - }, + }, { url: '', text: '客服', img: '../../../static/img/user/user13.png' } ] + if (app.globalData.userInfo) { + let menus = { + url: '', + text: '退出登录', + img: '../../../static/img/user/user12.png' + } + this.czList.push(menus); + } }, methods: { findUser() {