Browse Source

改版

master
unknown 1 year ago
parent
commit
9e8bfe2360
  1. 33
      components/UserTab/UserTab.vue
  2. 1
      components/cardNav/cardNav.vue
  3. 4
      pages/login/login.vue
  4. 25
      pages/tabbar/mine/index.vue
  5. 12
      pages/tabbar/statistics/comp/tabDate.vue
  6. 55
      pages/tabbar/statistics/comp/topUserInfo.vue
  7. 69
      pages/tabbar/student/index.vue

33
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"),

1
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;

4
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)

25
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() {
// 使APIIPipinfo.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);
});
}
}
}
</script>

12
pages/tabbar/statistics/comp/tabDate.vue

@ -3,13 +3,13 @@
<view class="tabs">
<view class="tab" @click="tabClick(1)" :class="{active: currentTab==1}">按日</view>
<view class="tab" @click="tabClick(2)" :class="{active: currentTab==2}">按月</view>
<view class="tab" @click="tabClick(3)" :class="{active: currentTab==3}">按年</view>
<view class="tab long" @click="tabClick(4)" :class="{active: currentTab==4}">{{ customDate }}</view>
<!-- <view class="tab" @click="tabClick(3)" :class="{active: currentTab==3}">按年</view> -->
<!-- <view class="tab long" @click="tabClick(4)" :class="{active: currentTab==4}">{{ customDate }}</view> -->
</view>
<u-popup :show="showDatePicker" mode="bottom" :round="20" :closeable="true" :closeOnClickOverlay="true" @close="showDatePicker=false">
<!-- <u-popup :show="showDatePicker" mode="bottom" :round="20" :closeable="true" :closeOnClickOverlay="true" @close="showDatePicker=false">
<timeScreen @selectDateClick="selectDateClick" />
</u-popup>
</u-popup> -->
</view>
</template>
@ -49,7 +49,7 @@
<style lang="scss" scoped>
.tabs {
display: flex;
justify-content: space-between;
// justify-content: space-between;
padding-bottom: 24rpx;
.tab {
@ -62,7 +62,7 @@
text-align: center;
line-height: 60rpx;
color: $themC;
margin-right: 30rpx;
&.active {
color: #fff;
background-color: $themC;

55
pages/tabbar/statistics/comp/topUserInfo.vue

@ -0,0 +1,55 @@
<template>
<view class="userInfo">
<view class="tit">Hi,大乔教练</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">翔力驾校</view>
<view class="tag">合作教练</view>
</view>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.userInfo {
.tit {
font-size: 48rpx;
color: #fff;
font-weight: 500;
}
.userRow {
align-items: center;
margin-bottom: 20rpx;
.schoolIcon {
width: 28rpx;
height: 28rpx;
}
.schoolName {
font-size: 28rpx;
padding: 20rpx;
max-width: 220rpx;
color: #fff;
}
.tag {
min-width: 112rpx;
height: 44rpx;
background: #82AFDD;
border-radius: 22rpx;
font-size: 20rpx;
color: #fff;
line-height: 44rpx;
text-align: center;
white-space: nowrap;
width: fit-content;
}
}
}
</style>

69
pages/tabbar/student/index.vue

@ -1,6 +1,9 @@
<template>
<view class="pageBgImg pad">
<view class="searchBox">
<view class="pageBgImg pad" >
<!-- <view class="pad" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }" > -->
<view class="status_bar"></view>
<view style="width: 100%;height: 60rpx;"></view>
<!-- <view class="searchBox">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
</view>
<view class="card" v-if="identity=='实操教练'">
@ -25,7 +28,31 @@
<view class="lab">今日退学学员</view>
</view>
</view>
</view>
</view> -->
<view class="searchBox" v-if="identity=='校长'">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
</view>
<topUserInfo v-if="identity=='实操教练'"/>
<view class="card">
<view class="h2" v-if="identity=='实操教练'">我的学员</view>
<view class="statistics">
<view class="statisticsItem">
<view class="val">260</view>
<view class="lab">累计学员数量</view>
</view>
<view class="statisticsItem">
<view class="val">260</view>
<view class="lab">今日新增学员</view>
</view>
<view class="statisticsItem" v-if="identity=='校长'">
<view class="val">260</view>
<view class="lab">今日退学学员</view>
</view>
</view>
<view class="addStudent" @click="$goPage('/pages/recordEntry/student/addStudent/addStudent')" v-if="identity=='实操教练'">+ 添加学员</view>
</view>
<view class="screen_row">
<view class="selectItem" @click="showDatePicker=true">
@ -69,9 +96,14 @@
</template>
<script>
import { imgUrl } from '@/config/site.config'
import topUserInfo from '../statistics/comp/topUserInfo.vue'
export default {
components: { topUserInfo },
data() {
return {
imgUrl: imgUrl+'indexTopBanner.png',
backgroundSize: '100% 492rpx',
screen: {
timer: '报名时间',
car: '全部车型',
@ -120,6 +152,9 @@
</script>
<style lang="scss" scoped>
.pad {
min-height: 100vh;
}
.card {
padding: 0 28rpx;
margin-bottom: 24rpx;
@ -127,26 +162,22 @@
.searchBox {
padding: 140rpx 0 24rpx 0;
}
.h2 {
font-size: 32rpx;
font-weight: 500;
color: $themC;
padding-top: 26rpx;
}
.addStudent {
height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: space-between;
.h2 {
font-size: 32rpx;
font-weight: 500;
}
.btnBg {
width: 192rpx;
}
padding: 10rpx 0 30rpx 0;
font-size: 28rpx;
color: $themC;
text-align: center;
}
.statistics {
display: flex;
height: 200rpx;
height: 170rpx;
.statisticsItem {
display: flex;
align-items: center;
@ -170,6 +201,7 @@
.lab {
font-size: 28rpx;
color: #999;
// margin-top: 20rpx;
}
}
@ -194,6 +226,7 @@
color: $themC;
flex: 1;
text-align: center;
font-size: 26rpx;
}
.downIcon {
width: 24rpx;

Loading…
Cancel
Save