Browse Source

学员

master
李双庆 1 year ago
parent
commit
1389546e15
  1. 14
      components/AQ/AQTabber.vue
  2. 16
      pages.json
  3. 420
      pages/student/index/index.vue
  4. 22
      pages/student/index/work_details.vue
  5. 133
      pages/student/login/forgot.vue
  6. BIN
      static/images/index/dian.png
  7. BIN
      static/images/index/score.png
  8. BIN
      static/images/tabbar/bai.png
  9. BIN
      static/images/tabbar/home.png
  10. BIN
      static/images/tabbar/home_selected.png
  11. BIN
      static/images/tabbar/index.png
  12. BIN
      static/images/tabbar/index_selected.png
  13. BIN
      static/images/tabbar/indexs.png
  14. BIN
      static/images/tabbar/mart.png
  15. BIN
      static/images/tabbar/mart_selected.png
  16. BIN
      static/images/tabbar/my.png
  17. BIN
      static/images/tabbar/my_selected.png
  18. BIN
      static/images/tabbar/mys.png
  19. BIN
      static/images/tabbar/order.png
  20. BIN
      static/images/tabbar/order_selected.png
  21. BIN
      static/images/tabbar/timetable.png
  22. BIN
      static/images/tabbar/timetables.png

14
components/AQ/AQTabber.vue

@ -1,7 +1,7 @@
<!--底部Tabber组件-->
<template>
<view class="main_box">
<fui-tabbar :tabBar="tabBar" :current="tabBerIndex" @click="openView"></fui-tabbar>
<fui-tabbar :tabBar="tabBar" selectedColor="#5bdbbb" :current="tabBerIndex" @click="openView"></fui-tabbar>
</view>
</template>
@ -27,7 +27,7 @@
methods: {
async init(){
uni.setStorageSync('userType','1')
uni.setStorageSync('userType','3')
let userType = uni.getStorageSync('userType')
this.userType = userType
@ -111,20 +111,20 @@
{
text: "首页",
urlPath:'/pages/student/index/index',//
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
iconPath: "/static/images/tabbar/index.png",
selectedIconPath: "/static/images/tabbar/indexs.png",
},
{
text: "课表",
urlPath:'/pages/student/timetable/index',//
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
iconPath: "/static/images/tabbar/timetable.png",
selectedIconPath: "/static/images/tabbar/timetables.png",
},
{
text: "我的",
urlPath:'/pages/student/my/my',//
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
selectedIconPath: "/static/images/tabbar/mys.png",
}
]
break;

16
pages.json

@ -5,7 +5,7 @@
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#fff",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "white"
}
},
@ -45,10 +45,15 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/student/index/work_details",
"style": {
"navigationBarTitleText": "作业详情",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/coach/home/index",
"style": {
@ -58,7 +63,6 @@
"navigationBarTextStyle": "black"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

420
pages/student/index/index.vue

@ -1,77 +1,117 @@
<template>
<view>
<view class="top">
<view class="top_1">发现</view>
<view class="top_2" @click="publishing"><fui-icon name="plussign" size="80" fontWeight="Number"></fui-icon></view>
<view class="content">
<view class="head">
<view class="head-img">
<fui-avatar width="136"
src="https://img1.baidu.com/it/u=3598104138,3632108415&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800"></fui-avatar>
<view class="head-text">智卓燕</view>
</view>
</view>
<view style="position: relative;" class="middle" v-for="(item, index) in list" :key="index" v-if="list.length > 0">
<view class="middles">
<view class="middles_1" v-if="item.headimg">
<image class="middles_1_img" :src="item.headimg"></image>
<view class="card">
<view class="card-back color-style"></view>
<view class="card-backs color-style"></view>
<view class="card-con">
<view class="card-head">
<view>
<span class="card-head-txt">班级</span>
<span class="card-head-txt1 card-head-back1">篮球少儿班</span>
</view>
<view class="middles_1" v-else>
<image class="middles_1_img" src="/static/images/home/tixing.png"></image>
<view>
<span class="card-head-txt">已耗课时</span>
<span class="card-head-txt1 card-head-back2">24/</span><span class="card-head-txt">60</span>
</view>
<view class="middles_2">
<view class="middles_info1">{{item.user}}</view>
<view class="middles_info2">{{item.timedifference}}</view>
</view>
<view class="card-con-txt">课程到期时间2021.12.25</view>
<view class="card-con-txt1">
<view class="card-con-txt1-left">
<image src="@/static/images/index/score.png" class="overlay-image"></image>
<view class="card-con-txt1-left-txt top">90</view>
<view class="card-con-txt1-left-txt top1">综合评分</view>
</view>
<view class="shoucang" style="border: 5rpx #f8627f solid;color: #f8627f;" v-if="item.collections == 1" @click="collection(item.id,um_id)">收藏</view>
<view class="shoucang" style="border: 5rpx #ccc solid;" v-else @click="collection(item.id,um_id)">收藏</view>
<view @click="coninfo(item)" style="height: 300rpx;width: 100%;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;">
<view class="middles_con">
{{item.activity}}
<view class="card-con-txt1-right">
<view style="color: #AAAAAA;padding: 5rpx;">数据测评时间2020.03.12</view>
<view style="display: flex;justify-content: space-around;margin-top: 20rpx;">
<view>
<view style="font-size: 48rpx;color: #29d3b4;">123</view>
<view style="color: #AAAAAA;font-size: 30rpx;">身高CM</view>
</view>
<view class="middles_con" v-if="item.imagesnum!=0">
<view>
<view style="width: 32%;height: 200rpx;display: inline-block;margin:2rpx;" v-for="(item1, index) in item.images" :key="index">
<image :src="item1" style="width: 100%;height: 100%;"></image>
<view style="font-size: 48rpx;color: #29d3b4;">45</view>
<view style="color: #AAAAAA;font-size: 30rpx;">体重KG</view>
</view>
</view>
</view>
<view class="middles_con">
{{item.content}}
</view>
<view class="more">更多</view>
</view>
<view class="middles_con" style="font-size: 20rpx;color: #ccc;" @click="coninfo(item)">
点击内容查看详情
<view class="upcomin-classes">
<view class="upcomin-classes-div">
<view class="upcomin-classes-div-con">
<view class="upcomin-classes-div-con-left">课程预告</view>
<view class="upcomin-classes-div-con-centre"
style="width: 2rpx;height: 60rpx;background-color: #fff;margin-left: 25rpx;"></view>
<view style="margin-left: 25rpx;">
<view>5/28 周五 15:30 - 17:30</view>
<view>301 篮球少儿课程</view>
</view>
<view class="middles_bom">
<view class="middles_bom_1 middles_boms" v-if="item.area">{{item.area}}</view>
<view class="middles_bom_2 middles_boms">
<fui-icon name="fabulous-fill" color="#f8627f" size="45" @click="like(item.id,item.um_id)"></fui-icon>
{{item.likes}}
<view class="upcomin-classes-div-con-right" @click="details">
详情
</view>
<view class="middles_bom_3 middles_boms" @click="Comment(item.id)">
<fui-icon name="comment-fill" color="#6281a6" size="45"></fui-icon>
{{item.comment}}
</view>
</view>
<view style="width: 100%;height: 20rpx;"></view>
</view>
<view class="empty" v-if="!list.length">
<view style="width: 200rpx;">
<img src="@/static/icon-img/kkry.png" alt="" style="width: 180rpx;height: 180rpx;">
<view style="font-size: 28rpx;font-weight: 800;color: #00be8c;">
还没有任何提醒
<view class="after-class">
<view class="after-class-title">
<view class="after-class-title-left">课后作业</view>
<view class="after-class-title-right">全部</view>
</view>
<view class="after-class-con">
<view class="after-class-con-txt">
<view style="width: 25%;margin-top: 5%;">
<view style="font-size: 55rpx;color: #fff;"><span style="color: #29d3b4;">12</span>/23
</view>
<view style="font-size: 35rpx;color: #ccc;padding-left: 10rpx;">已完成</view>
</view>
<view style="width: 70%;">
<view style="color: #fff;display: flex;justify-content: space-between;align-items: center;">
<view style="display: flex;align-items: center;">
<image src="@/static/images/index/dian.png" style="width: 50rpx;height: 50rpx;">
</image>
<span style="padding-left: 10rpx;font-size: 35rpx;">包子皮</span>
</view>
<view>
<fui-button background="#404045" color="#F59A23" borderColor="#F59A23"
btnSize="mini">上传</fui-button>
</view>
</view>
<view style="color: #fff;padding: 10rpx;">时间2020.05:25 15:30 - 17:30</view>
<view class="multi-line-ellipsis">
作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述</view>
</view>
</view>
</view>
<view class="multi-line-ellipsis text-style">
作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述</view>
<view style="width: 92%;margin: auto;border-radius: 15rpx;">
<video style="width: 100%;border-radius: 15rpx;"></video>
</view>
<view class="multi-line-ellipsis text-style">
作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述</view>
<view style="width: 92%;margin: auto;border-radius: 15rpx;">
<video style="width: 100%;border-radius: 15rpx;"></video>
</view>
</view>
<view style="height: 180rpx;width: 100%;"></view>
</view>
<view style="width: 100%;height: 20rpx;"></view>
<AQTabber />
</view>
</template>
<script>
import user from '@/api/user.js';
import fuiIcon from "@/components/firstui/fui-icon/fui-icon.vue"
// import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
fuiIcon,
AQTabber,
},
data() {
@ -80,16 +120,14 @@
}
},
onLoad() {
const um_id = uni.getStorageSync('um_id');
this.um_id = um_id
if (um_id == '') {
},
methods: {
details() {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/student/index/work_details'
})
}
this.fetchData(this.um_id)
},
methods: {
// fetchData(um_id) {
// user.activity_index({
// um_id: um_id
@ -113,102 +151,236 @@
}
</script>
<style>
.empty {
<style scoped>
page {
font-weight: normal;
}
.overlay-image {
width: 95%;
height: 100%;
}
.multi-line-ellipsis {
color: #fff;
padding: 5rpx 10rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
.text-style {
width: 92%;
margin: 15rpx auto;
}
.content {
background-color: #292929;
height: 100vh;
overflow-y: auto;
}
.head {
background-color: #29d3b4;
width: 100%;
}
.head-img {
display: flex;
flex-wrap: wrap;
justify-content: center;
height: 85vh;
align-items: center;
padding: 10rpx 20rpx;
}
.top{
background-color: #fff;
height: 100rpx;
.head-text {
color: #fff;
font-size: 35rpx;
padding-left: 20rpx;
}
.card {
width: 100%;
height: 450rpx;
position: relative;
}
.top_1{
display: inline-block;
font-size: 55rpx;
font-weight: bold;
margin-left: 30rpx;
line-height: 100rpx;
.card-back {
background-color: #29d3b4;
}
.top_2{
margin-left: 600rpx;
position: absolute;
top: 15rpx;
.card-backs {
background-color: #292929;
}
.middle{
width: 95%;
.color-style {
width: 100%;
height: 50%;
}
.card-con {
width: 92%;
height: 92%;
background-color: #fff;
margin: auto;
margin-top: 20rpx;
border-radius: 10rpx;
border-radius: 20rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 30rpx;
}
.middles{
height: 150rpx;
/* background-color: aqua; */
margin-top: 20rpx;
.card-head {
display: flex;
justify-content: space-between;
padding: 30rpx 20rpx 20rpx;
}
.middles_1{
.card-head-txt {
color: #AAAAAA;
}
.card-head-txt1 {
padding-left: 10rpx;
}
.card-head-back1 {
color: #4b4b4b;
}
.card-head-back2 {
color: #2bd3b5;
}
.card-con-txt {
color: #AAAAAA;
padding: 5rpx 20rpx 20rpx;
}
.card-con-txt1 {
display: flex;
justify-content: space-between;
padding: 10rpx 20rpx 0;
height: 220rpx;
}
.card-con-txt1-left {
width: 42%;
height: 100%;
width: 24%;
/* background-color: red; */
display: inline-block;
}
.middles_2{
width: 70%;
/* background-color: green; */
display: inline-block;
position: relative;
top: -15%;
left: 2%;
}
.middles_1_img{
width: 130rpx;
height: 130rpx;
margin-left: 12%;
border-radius: 100rpx;
margin-top: 6%;
.card-con-txt1-left-txt {
font-size: 32rpx;
color: #29d3b4;
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
}
.middles_info1{
font-size: 40rpx;
font-weight: bold;
.top {
top: 60%;
}
.middles_info2{
color: #5e5e5e;
.top1 {
top: 80%;
}
.middles_con{
width: 92%;
margin: 20rpx auto;
font-size: 30rpx;
.card-con-txt1-right {
width: 58%;
height: 100%;
}
.middles_bom{
padding: 30rpx 0 40rpx 25rpx;
position: relative;
.more {
padding: 5rpx 30rpx 30rpx;
text-align: right;
color: #F59A23;
}
.middles_boms{
display: inline-block;
color: #9297b2;
.upcomin-classes {
background-color: #292929;
width: 100%;
height: 136rpx;
}
.middles_bom_2{
position: absolute;
right: 30%;
.upcomin-classes-div {
padding-top: 20rpx;
width: 92%;
background-color: #29d3b4;
height: 106rpx;
margin: auto;
border-radius: 50rpx;
}
.middles_bom_3{
position: absolute;
right: 10%;
.upcomin-classes-div-con {
display: flex;
align-items: center;
color: #fff;
}
.shoucang{
position: absolute;
right: 10%;
top: 10%;
.upcomin-classes-div-con-left {
width: 60rpx;
margin-left: 80rpx;
text-align: right;
}
.upcomin-classes-div-con-centre {
width: 2rpx;
height: 60rpx;
width: 140rpx;
border-radius: 10rpx;
line-height: 54rpx;
background-color: #fff;
margin-left: 25rpx;
}
.upcomin-classes-div-con-right {
width: 100rpx;
height: 50rpx;
background-color: #32baa1;
text-align: center;
line-height: 50rpx;
border-radius: 50rpx;
margin-left: 80rpx;
}
.after-class {
background-color: #292929;
width: 100%;
height: auto;
}
.after-class-title {
width: 92%;
display: flex;
justify-content: space-between;
margin: auto;
}
.after-class-title-left {
color: #fff;
font-size: 35rpx;
border-bottom: 4rpx #29d3b4 solid;
}
.after-class-title-right {
color: #F59A23;
font-size: 30rpx;
}
.after-class-con {
width: 92%;
height: 246rpx;
background-color: #404045;
border-radius: 20rpx;
margin: 15rpx auto;
display: flex;
align-items: center;
}
.after-class-con-txt {
display: flex;
justify-content: space-between;
padding: 20rpx;
height: 95%;
width: 100%;
align-content: space-around;
}
</style>

22
pages/student/index/work_details.vue

@ -0,0 +1,22 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

133
pages/student/login/forgot.vue

@ -1,36 +1,38 @@
<template>
<view>
<view style="height: 500rpx;background-color:#fff;">
<view style="height: 150rpx;"></view>
<view class="image-container;">
<image src="@/static/images/login/login1.png" class="base-image"></image>
<image src="@/static/images/login/login2.png" class="overlay-image"></image>
</view>
<view style="width: 100%;font-size: 60rpx;color: #ccc;text-align: center;margin-top: 60rpx;">
运动课堂
</view>
<view class="title">
<view :class="{'green-text': tset_style === 1}">1.验证手机号码</view>
<view :class="{'green-text': tset_style === 2}">2.设置新密码</view>
</view>
<view :style="{'background-color':'#fff','width':'100%','height':'100vh' }">
<view style="width: 95%;height: 30rpx;"></view>
<view v-if="tset_style == 1">
<view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="登录账号" v-model="user" @input="input"
<fui-input borderTop placeholder="请输入手机号" v-model="user" @input="input"
backgroundColor="#f2f2f2"></fui-input>
</view>
<view style="width: 95%;margin: auto;">
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="password1" placeholder="登录密码"
:password="password" @input="input" backgroundColor="#f2f2f2">
<fui-icon :name="password?'invisible':'visible'" color="#B2B2B2" :size="50"
@click="change"></fui-icon>
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="code" placeholder="请输入短信验证码" @input="input"
backgroundColor="#f2f2f2">
<fui-countdown-verify ref="fui_cdv" @send="sendCode"></fui-countdown-verify>
</fui-input>
</view>
</view>
<view v-if="tset_style == 2">
<view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="请设置6-20位新的登录密码" v-model="user" @input="input"
backgroundColor="#f2f2f2"></fui-input>
</view>
<view style="width: 95%;margin: auto;">
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="code" placeholder="请再次输入新的登录密码" @input="input"
backgroundColor="#f2f2f2">
</fui-input>
</view>
<view style="width: 95%;margin:60rpx auto;">
<fui-button background="#00be8c" radius="5rpx" @click="login">登录</fui-button>
</view>
<view style="width: 95%;margin:60rpx auto;">
<fui-button background="#fff" radius="5rpx" @click="forgot" color="#00be8c">忘记登录密码</fui-button>
<fui-button background="#00be8c" radius="5rpx" @click="nextStep" v-if="tset_style == 1">下一步</fui-button>
<fui-button background="#00be8c" radius="5rpx" @click="submit" v-if="tset_style == 2">提交</fui-button>
</view>
</view>
</view>
</template>
@ -39,66 +41,27 @@
export default {
data() {
return {
password: true,
code: '',
user: '',
password1: ''
tset_style: 1,
}
},
onLoad() {
uni.hideHomeButton()
console.log(uni.getStorageSync('um_id'))
},
methods: {
input(e) {
console.log(e)
},
change() {
this.password = !this.password
},
login() {
let item = {};
item['user'] = this.user
item['password'] = this.password1
medication.medication_login(item).then(res => {
if (res.status == 200) {
uni.setStorageSync('um_id', res.data.um_id);
uni.setStorageSync('user', res.data);
uni.switchTab({
url: '/pages/my/my'
})
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
sendCode() {
//
setTimeout(() => {
//
//...
//success
this.$refs.fui_cdv && this.$refs.fui_cdv.success()
}, 800)
},
loginWx() {
uni.login({
provider: 'weixin',
success: (res) => {
console.log(res)
medication.wechatminilogin({
code: res.code
}).then(res1 => {
if (res1.status == 200) {
uni.setStorageSync('um_id', res1.data.um_id);
uni.setStorageSync('user', res1.data);
uni.switchTab({
url: '/pages/my/my'
})
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
nextStep(){
this.tset_style = 2
}
})
}
});
},
}
}
</script>
@ -116,26 +79,18 @@
padding-right: 24rpx;
}
.image-container {
margin: auto;
position: relative;
width: 150rpx;
/* 设置与第一张图片相同的宽度 */
height: 150rpx;
/* 设置与第一张图片相同的高度 */
}
.base-image {
.title {
display: flex;
justify-content: space-around;
align-items: center;
height: 100rpx;
width: 100%;
height: 100%;
background-color: #fff;
font-size: 26rpx;
border: 4rpx #f5f5f5 solid;
}
.overlay-image {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100rpx;
height: 100rpx;
.green-text{
color: #36d6b9;
}
</style>

BIN
static/images/index/dian.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

BIN
static/images/index/score.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
static/images/tabbar/bai.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

BIN
static/images/tabbar/home.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/tabbar/home_selected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

BIN
static/images/tabbar/index.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/images/tabbar/index_selected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/tabbar/indexs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/images/tabbar/mart.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1020 B

BIN
static/images/tabbar/mart_selected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/tabbar/my.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
static/images/tabbar/my_selected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/tabbar/mys.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
static/images/tabbar/order.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 871 B

BIN
static/images/tabbar/order_selected.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

BIN
static/images/tabbar/timetable.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/images/tabbar/timetables.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Loading…
Cancel
Save