Commit aad334a3 by tangjiale

交互优化

parent 527409e8
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-01-13 17:47:44
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-15 10:33:27
* @LastEditTime: 2022-06-16 14:24:19
*/
// wx.setStorageSync('host', 'https://sdb.youchengzhang.cn/'); //正式环境
// wx.setStorageSync('host', 'https://test.xiaobentiyu.cn'); //测试环境
......@@ -27,7 +27,15 @@ App({
})
}
this.autoUpdate();
// 获取手机系统信息
wx.getSystemInfo({
success: res => {
//导航高度
this.globalData.navHeight = res.statusBarHeight + 46;
}, fail(err) {
console.log(err);
}
})
wx.setStorageSync('appId', 'wx7d7fbc0e6746baf5');
plugins.configPlugin({
......
/*
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-06-16 15:04:53
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-16 15:12:33
*/
// components/empty/empty.js
Component({
/**
* 组件的属性列表
*/
properties: {
text: {
type: String,
value: '暂无数据'
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="empty-data">
<image src="/images/home/no-data.png"></image>
<view class="empty-text">{{text}}</view>
</view>
\ No newline at end of file
.empty-data {
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
width: 100%;
height: 360rpx;
padding-top: calc((100% - 360rpx) / 2);
}
.empty-data image {
height: 360rpx;
margin: 0 auto;
}
.empty-text {
font-size: 28rpx;
font-weight: 400;
color: rgba(0, 0, 0, 0.3);
margin-top: 20rpx;
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
min-height: 100vh;
width: 100%;
background-color: #fff;
padding-bottom: 112rpx;
padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
}
.content{
......
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-06 16:44:43
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-16 10:07:35
* @LastEditTime: 2022-06-16 15:35:33
*/
var app = getApp();
var API = require("../../utils/request.js");
......@@ -33,25 +33,25 @@ Page({
icon:'https://cdn.xiaobentiyu.cn/sport_minapp_img/home/icon_question.png'
},{
title:'切换身份',event:'change',
icon:'https://cdn.xiaobentiyu.cn/sport_minapp_img/home/icon_question.png'
icon:'/images/course/sf-icon.png'
}
],
'parent':[
{
title:'体验课订购',event:'order',
icon:'https://cdn.xiaobentiyu.cn/sport_minapp_img/home/icon_question.png'
icon:'/images/course/dk-icon.png'
},{
title:'班课报名',event:'enroll',
icon:'https://cdn.xiaobentiyu.cn/sport_minapp_img/home/icon_question.png'
icon:'/images/course/bm-icon.png'
},{
title:'销课记录',event:'sales',
icon:'https://cdn.xiaobentiyu.cn/sport_minapp_img/home/icon_question.png'
icon:'/images/course/sf-icon.png'
},{
title:'我的收藏',event:'collect',
icon:'https://cdn.xiaobentiyu.cn/sport_minapp_img/home/icon_question.png'
icon:'/images/course/collect-icon.png'
},{
title:'切换身份',event:'change',
icon:'https://cdn.xiaobentiyu.cn/sport_minapp_img/home/icon_question.png'
icon:'/images/course/sf-icon.png'
}
]
}
......
......@@ -3,15 +3,19 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-06 16:45:35
* @LastEditors: tangjiale
* @LastEditTime: 2022-06-16 11:25:35
* @LastEditTime: 2022-06-16 14:59:17
*/
var API = require("../../utils/request");
var App = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
navT: wx.getMenuButtonBoundingClientRect().top,
navH:wx.getMenuButtonBoundingClientRect().bottom - wx.getMenuButtonBoundingClientRect().top,
stuInfo:{},
skipType: 1, //1、定时跳,2、定数跳,3、自由跳
timeList: {
......@@ -160,6 +164,10 @@ nextType() {
})
}
this.setData({
stuInfo:{
name:userInfo.stuName || '',
render:userInfo.stuGender || ''
},
skipType: 1, //1、定时跳,2、定数跳,3、自由跳
selectType: 2,
selectContent: this.data.timeList[2]
......
{
"navigationStyle": "custom",
"usingComponents": {
"t-popup":"../../components/t-popup/index",
"stu-info":"../../components/sport/stu-info-popup/stu-info-popup"
},
"navigationBarTitleText": "运动"
}
}
\ No newline at end of file
<view class="list">
<view class="nav-bg" style="margin-top:{{navT}}px">
<view class="flex-c" style="height:{{navH}}px">
<image class="stu-img" wx:if="{{stuInfo.name}}" src="{{stuInfo.render==2?'https://ttxs01-10066525.cos.ap-shanghai.myqcloud.com/headImgs/girl_default.png':'https://ttxs01-10066525.cos.ap-shanghai.myqcloud.com/headImgs/boy_default.png'}}" /> {{stuInfo.name}}
</view>
</view>
<view class="top-content {{skipType==1?'top-content-a':skipType==2?'top-content-b':skipType==3?'top-content-c':'top-content-a'}}">
<image class="time-skip" style="{{skipType==1 ? 'display:block' : ''}}" src="../../images/home/time_skip.png"></image>
<image class="time-skip" style="{{skipType==2 ? 'display:block' : ''}}" src="../../images/home/num_skip.png"></image>
......
.nav-bg{
overflow: hidden;
width: 100%;
display: flex;
align-items: center;
font-size: 36rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: rgba(0, 0, 0, 0.9);
}
.flex-c{display: flex;align-items: center;}
.stu-img{
height: 50rpx;
width: 50rpx;
margin-right: 10rpx;
}
.list{
width: 690rpx;
width: calc(100% - 60rpx);
overflow: hidden;
margin: 0 auto;
margin: 0 30rpx;
min-height: 100vh;
padding-bottom: 100rpx;
padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
}
.list .li:nth-child(2n-1){
position: relative;
float: left;
width: 49%;
margin-left: 2%;
width: calc((100% - 24rpx) / 2);
margin-bottom: 40rpx;
}
.list .li:nth-child(2n){
position: relative;
float: left;
width: 49%;
margin-left: 0%;
width: calc((100% - 24rpx) / 2);
margin-left: 24rpx;
margin-bottom: 40rpx;
}
......@@ -64,9 +80,9 @@
.top-content {
position: relative;
width: 690rpx;
height: 382rpx;
margin: 16rpx auto 30rpx auto;
width: 100%;
margin: 16rpx 0px 30rpx 0px;
}
.time-skip {
......
......@@ -37,6 +37,20 @@
"name": "我的收藏",
"pathName": "subPages/course/collect-list/collect-list",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "运动",
"pathName": "pages/sport/sport",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "subPages/course/attempt-list/attempt-list",
"query": "",
"scene": null,
"launchMode": "default"
}
......
{
"usingComponents": {},
"usingComponents": {
"empty":"/components/empty/empty"
},
"navigationBarTitleText": "体验课订购"
}
\ No newline at end of file
......@@ -2,7 +2,8 @@
<!-- 体验课订单列表 -->
<view class="page-bg">
<view class="course" wx:for="{{list}}">
<block wx:if="{{list && list.length}}">
<view class="course" wx:for="{{list}}" wx:key="{{index}}">
<view class="flex-s">
<view class="course-time"><text class="blod-c">订购时间</text>:{{item.orderTime}}</view>
<!-- 0:待支付,1:已订购,2:待退款,3:已退款,4:已关闭) -->
......@@ -35,5 +36,10 @@
</view>
</view>
</view>
</block>
<block wx:if="{{!list.length && finish}}">
<empty></empty>
</block>
</view>
\ No newline at end of file
{
"usingComponents": {},
"usingComponents": {
"empty":"/components/empty/empty"
},
"navigationBarTitleText": "我的收藏"
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
<!-- 体验课订单列表 -->
<view class="page-bg">
<block wx:if="{{list && list.length}}">
<view class="course" wx:for="{{list}}" bindtap="gotoDetail" data-id="{{item.id}}">
<van-swipe-cell right-width="{{ 80 }}">
<view class="course-ctn flex-c">
......@@ -32,5 +33,10 @@
<view slot="right" class="del-btn" data-id="{{item.id}}" bindtap="cannalCollect">删除</view>
</van-swipe-cell>
</view>
</block>
<block wx:if="{{!list.length && finish}}">
<empty></empty>
</block>
</view>
\ No newline at end of file
{
"usingComponents": {},
"usingComponents": {
"empty":"/components/empty/empty"
},
"navigationBarTitleText": "班课报名"
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
<!-- 体验课订单列表 -->
<view class="page-bg">
<block wx:if="{{list && list.length}}">
<view class="course" wx:for="{{list}}">
<view class="flex-s">
<view class="course-time"><text class="blod-c">报名时间</text>:{{item.bmTime}}</view>
......@@ -35,5 +36,10 @@
</view>
</view>
</view>
</block>
<block wx:if="{{!length && finish}}">
<empty></empty>
</block>
</view>
\ No newline at end of file
{
"usingComponents": {},
"usingComponents": {
"empty":"/components/empty/empty"
},
"navigationBarTitleText": "小奔运动"
}
\ No newline at end of file
......@@ -2,8 +2,7 @@
<!-- 课程列表(体验课/班课) -->
<view class="page-bg">
<view class="list">
<view class="list" wx:if="{{list && list.length}}">
<!-- 体验课 -->
<block wx:if="{{type == 2}}">
<view class="course-bg" wx:for="{{list}}" data-id="{{item.id}}" bindtap="gotoDetail">
......@@ -64,4 +63,8 @@
</block>
</view>
<block wx:if="{{!list.length && finish}}">
<empty></empty>
</block>
</view>
\ No newline at end of file
{
"usingComponents": {},
"usingComponents": {
"empty":"/components/empty/empty"
},
"navigationBarTitleText": "消课记录"
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
<!-- 体验课订单列表 -->
<view class="page-bg">
<block wx:if="{{list && list.length}}">
<view class="course" wx:for="{{list}}" bindtap="gotoDetail" data-id="{{item.courseId}}">
<view class="flex-s">
<view class="course-time"><text class="blod-c">{{item.type==1?'报名时间':'订购时间'}}</text>:{{item.courseTime}}</view>
......@@ -32,5 +33,11 @@
</view>
</view>
</view>
</block>
<block wx:if="{{!list.length && finish}}">
<empty></empty>
</block>
</view>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment