From 9e8bfe2360a28b27940926779bd2ad1487feab91 Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Thu, 28 Sep 2023 18:01:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/UserTab/UserTab.vue | 33 ++++++------- components/cardNav/cardNav.vue | 1 + pages/login/login.vue | 4 +- pages/tabbar/mine/index.vue | 25 ++++++++-- pages/tabbar/statistics/comp/tabDate.vue | 12 ++--- pages/tabbar/statistics/comp/topUserInfo.vue | 55 ++++++++++++++++++++++ pages/tabbar/student/index.vue | 69 ++++++++++++++++++++-------- 7 files changed, 152 insertions(+), 47 deletions(-) create mode 100644 pages/tabbar/statistics/comp/topUserInfo.vue diff --git a/components/UserTab/UserTab.vue b/components/UserTab/UserTab.vue index 448c56c..45286a6 100644 --- a/components/UserTab/UserTab.vue +++ b/components/UserTab/UserTab.vue @@ -31,17 +31,24 @@ if (uni.getStorageSync('identity') == '实操教练') { //教练 - _this.list = [{ - "pagePath": "/pages/tabbar/statistics/index", - "text": "统计", - "iconPath": require("../../static/images/tabbar/tj.png"), - "selectedIconPath": require("../../static/images/tabbar/tjActive.png") - }, + _this.list = [ + // { + // "pagePath": "/pages/tabbar/statistics/index", + // "text": "统计", + // "iconPath": require("../../static/images/tabbar/tj.png"), + // "selectedIconPath": require("../../static/images/tabbar/tjActive.png") + // }, + // { + // "pagePath": "/pages/tabbar/examSimulation/index", + // "text": "考场模拟", + // "iconPath": require("../../static/images/tabbar/kc.png"), + // "selectedIconPath": require("../../static/images/tabbar/kcActive.png") + // }, { - "pagePath": "/pages/tabbar/examSimulation/index", - "text": "考场模拟", - "iconPath": require("../../static/images/tabbar/kc.png"), - "selectedIconPath": require("../../static/images/tabbar/kcActive.png") + "pagePath": "/pages/tabbar/student/index", + "text": "学员", + "iconPath": require("../../static/images/tabbar/xy.png"), + "selectedIconPath": require("../../static/images/tabbar/xyActive.png") }, { "pagePath": "/pages/tabbar/operateTrain/index", @@ -50,12 +57,6 @@ "selectedIconPath": require("../../static/images/tabbar/scActive.png") }, { - "pagePath": "/pages/tabbar/student/index", - "text": "学员", - "iconPath": require("../../static/images/tabbar/xy.png"), - "selectedIconPath": require("../../static/images/tabbar/xyActive.png") - }, - { "pagePath": "/pages/tabbar/mine/index", "text": "我的", "iconPath": require("../../static/images/tabbar/wd.png"), diff --git a/components/cardNav/cardNav.vue b/components/cardNav/cardNav.vue index a24a15f..6f93c76 100644 --- a/components/cardNav/cardNav.vue +++ b/components/cardNav/cardNav.vue @@ -27,6 +27,7 @@ text-align: center; line-height: 72rpx; color: #ADADAD; + font-size: 28rpx; &.active { background: rgba(25,137,250,0.1); border-radius: 16rpx; diff --git a/pages/login/login.vue b/pages/login/login.vue index 90f040f..e526471 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -166,8 +166,8 @@ }, async submitFn() { - // this.chooseIdentity('实操教练') - // return + this.chooseIdentity('考场模拟教练') + return if(!this.btnHighlight) return const {data: res} = await loginPwd(this.FormData) this.$store.commit('update_vuex_loginInfo', res) diff --git a/pages/tabbar/mine/index.vue b/pages/tabbar/mine/index.vue index c17e834..f57a6c1 100644 --- a/pages/tabbar/mine/index.vue +++ b/pages/tabbar/mine/index.vue @@ -33,20 +33,20 @@ onLoad() { if(this.identity=='实操教练') { this.tabData = [ - {text: '待结算记录', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/settled/settled'}, - {text: '指标充值记录', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/userCenter/indicatorRecharge/indicatorRecharge'}, + // {text: '待结算记录', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/settled/settled'}, + // {text: '指标充值记录', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/userCenter/indicatorRecharge/indicatorRecharge'}, {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, {text: '考场信息', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'}, {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'}, - {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'}, + // {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'}, ] }else if(this.identity=='校长') { this.tabData = [ {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'}, + {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'}, {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'}, {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'}, - {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'}, ] }else if(this.identity=='考场模拟教练') { this.tabData = [ @@ -58,9 +58,24 @@ }, onShow() { uni.hideTabBar(); + this.getIpAddress() }, methods: { - goPage() {} + goPage() {}, + + getIpAddress() { + // 使用第三方API服务获取IP地址,例如ipinfo.io + fetch('https://ipinfo.io/json') + .then(response => response.json()) + .then(data => { + const ipAddress = data.ip; + console.log(data) + console.log('用户的IP地址是:', ipAddress); + }) + .catch(error => { + console.error('获取IP地址时出错:', error); + }); + } } } diff --git a/pages/tabbar/statistics/comp/tabDate.vue b/pages/tabbar/statistics/comp/tabDate.vue index a8c171a..03ecf0e 100644 --- a/pages/tabbar/statistics/comp/tabDate.vue +++ b/pages/tabbar/statistics/comp/tabDate.vue @@ -3,13 +3,13 @@ 按日 按月 - 按年 - {{ customDate }} + + - + @@ -49,7 +49,7 @@ \ No newline at end of file diff --git a/pages/tabbar/student/index.vue b/pages/tabbar/student/index.vue index 7bb251c..207349c 100644 --- a/pages/tabbar/student/index.vue +++ b/pages/tabbar/student/index.vue @@ -1,6 +1,9 @@