Commit 679acf37 authored by 石盼盼's avatar 石盼盼

徽章接口对接,样式修改

parent 915dab03
<view class="noneBox">
<image src="../../images/none.png"></image>
<image src="/images/without.png"></image>
<view>暂无内容</view>
</view>
\ No newline at end of file
......@@ -9,7 +9,6 @@ Page({
min: 0,//最少字数
max: 300, //最多字数
currentWordNumber:0,
currentValue: 50,
},
onLoad: function (options) {
......
......@@ -2,10 +2,10 @@
<view class="performance">
<view class="title">运动表现</view>
<bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="运动量" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="9" maxProgress="10" canSlide="{{true}}" progressName="体力" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="8" maxProgress="10" canSlide="{{true}}" progressName="完整度" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="6" maxProgress="10" canSlide="{{true}}" progressName="柔韧度" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="8" maxProgress="10" canSlide="{{true}}" progressName="耐力" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="体力" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="完整度" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="柔韧度" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="耐力" slideImg="../../images/ic_slide_button_1.png" />
</view>
<view class="coach">
<view class="title">教练评语</view>
......
......@@ -35,9 +35,9 @@ Page({
canvasId: 'radarCanvas',
type: 'radar',
categories: ['耐力', '体力', '柔韧度', '训练完整度', '运动量' ],
legend: false,
series: [{
name: '运动表现',
data: [90, 110, 125, 95, 87],
data: [90, 80, 70, 90, 60],
}],
width: this.data.windowWidth,
height: this.data.windowHeight,
......@@ -49,14 +49,14 @@ Page({
});
},
getcomment : function () {
const { coach_id,class_id,lesson_id,child_id } = this.data
const { coach_id,class_id,lesson_id,child_id, } = this.data
let params = {
url: 'coach/comment',
data:{
coach_id : 5,
class_id : 16,
lesson_id : 69,
child_id : 14
child_id : 14,
},
callback : (data) => {
console.log(data)
......@@ -70,18 +70,17 @@ Page({
base.newRequest(params)
},
getbadges : function () {
const { user_child_id,class_id,class_single_id } = this.data
let params = {
url: 'badges',
data : {
user_child_id,
class_id,
class_single_id
user_child_id : 303,
class_id : 16 ,
class_single_id : 69,
},
callback : (data) =>{
console.log(data)
this.setData({
awardList : data
})
}
}
......
{
"usingComponents": {},
"navigationBarTitleText": "运动表现"
"navigationBarTitleText": "运动评价"
}
\ No newline at end of file
......@@ -22,7 +22,7 @@
<view class="flex-h">
<image src="/images/default_head.png" wx:if="{{coachcomment.child.wx_user.avatarurl == null}}"></image>
<image src="{{coachcomment.child.wx_user.avatarurl}}" wx:else></image>
<text class="name">{{coachcomment.child.wx_user.nickname ? 'coachcomment.child.wx_user.nickname' : '家长名字'}}</text>
<text class="name">{{coachcomment.child.wx_user.nickname}}</text>
</view>
<view class="comments">{{coachcomment.comment_reply}}</view>
</view>
......@@ -30,8 +30,9 @@
<view class="one">
<view class="title">收获徽章</view>
<view class="flex-h flex-hw flex-vc">
<block wx:for='{{awardList}}' wx:key='index'>
<image class="awardone" src="{{item.src}}"></image>
<block wx:for='{{awardList}}' wx:key='index' wx:for-item="item">
<image class="awardone" src="/images/my/per_pic_02.png" wx:if="{{item.badges.icon == null}}"></image>
<image class="awardone" src="{{item.badges.icon}}" wx:else></image>
</block>
</view>
</view>
\ No newline at end of file
// pages/my/teachingArea/teachingArea.js
const app = getApp()
import { Base } from '../../../utils/base.js';
const base = new Base()
Page({
/**
* 页面的初始数据
*/
data: {
cityShow: false,
cityList: [
{
name: '石家庄市'
},
{
name: '保定市'
},
{
name: '邯郸市'
},
{
name: '秦皇岛市'
},
{
name: '邢台市'
},
{
name: '承德市'
},
]
},
/**
......@@ -14,6 +36,50 @@ Page({
onLoad: function (options) {
},
changeCity: function (e) {
this.setData({
cityShow: true
})
},
closeCityShow: function (e) {
this.setData({
cityShow: false
})
},
chooseCity(e) {
let index = e.currentTarget.dataset.index
let list = this.data.cityList
if (list[index].isChecked) {
list[index].isChecked = false
} else {
list[index].isChecked = true
}
this.setData({
cityList: list
})
// console.log(e.currentTarget.dataset.item)
// if (e.currentTarget.dataset.item.city_name != this.data.cityChecked) {
// this.setData({
// cityList: list
// })
// }
},
cityChangeComfirm() {
for (var i = 0; i < this.data.cityList.length; i++) {
if (this.data.cityChecked == this.data.cityList[i].city_name) {
app.globalData.city_id = this.data.cityList[i].id
app.globalData.city_name = this.data.cityList[i].city_name
}
this.setData({
cityShow: false
})
}
// if (arr.length == 0) {
// base.toast('至少选择一个城市')
// }else {
// console.log(arr)
// }
},
/**
* 生命周期函数--监听页面初次渲染完成
......
<view class="place flex-h flex-vc">
<view class="place flex-h flex-vc" catchtap="changeCity">
<image src="../../../images/location.png"></image>
<view>已选城市:石家庄</view>
</view>
......@@ -30,3 +30,20 @@
</view>
<view class="line"></view>
<view class="cityBox" wx:if="{{cityShow}}" catchtap="closeCityShow">
<view class="cityContent">
<view class="cityTitle">
请选择城市
<text class="iconfont iconguanbi1" catchtap="closeCityShow"></text>
</view>
<view class="cityCenter">
<!-- <view class="cityCenter_title">已开通服务城市</view> -->
<view class="cityCenter_con flex-h flex-hw">
<block wx:for='{{cityList}}' wx:key='index'>
<text class="{{item.isChecked ? 'city_active' : ''}}" catchtap="chooseCity" data-index='{{index}}'>{{item.name}}</text>
</block>
</view>
</view>
<view class="cityConfirm" catchtap="cityChangeComfirm">确定</view>
</view>
</view>
\ No newline at end of file
......@@ -38,3 +38,71 @@
background: #EBEBEB;
margin: 0 auto;
}
/* 切换城市弹出框 */
.cityBox {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
z-index: 20;
}
.cityContent {
width: 580rpx;
height: auto;
background: #FFFFFF;
border-radius: 10rpx;
margin: 40% auto;
padding: 54rpx 0 51rpx 0;
position: relative;
}
.cityTitle {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #1A1A1A;
width: 100%;
text-align: center;
margin-bottom: 58rpx;
}
.cityTitle text{
position: absolute;
right: 39rpx;
top: 43rpx;
color: #CCCCCC;
}
.cityCenter {
padding-left: 40rpx;
}
.cityCenter_title {
font-size: 24rpx;
color: #A6A6A6;
margin-bottom: 34rpx;
}
.cityCenter_con text {
min-width: 156rpx;
height: 56rpx;
border-radius: 28rpx;
text-align: center;
line-height: 56rpx;
font-size: 26rpx;
color: #B4BC4D;
border: 1px solid #B4BC4D;
margin: 0 15rpx 20rpx 0;
}
.city_active {
color: #fff !important;
background: linear-gradient(13deg, #AAB247 0%, #B4BC4D 100%);
}
.cityConfirm {
width: 345rpx;
height: 68rpx;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 34rpx;
text-align: center;
line-height: 68rpx;
margin: 29rpx auto 0 auto;
font-size: 28rpx;
color: #1A1A1A;
}
\ No newline at end of file
......@@ -13,9 +13,11 @@ Page({
onLoad: function (options) {
wx.showLoading({
title: '加载中...',
})
this.getList();
this.getMyclasslist();
this.getList();
},
getList: function () {
wx.showLoading({
......@@ -34,7 +36,6 @@ Page({
datalList: data,
locked:false
})
console.log(data)
}
}
base.newRequest(params)
......
// pages/personal/personal.js
const app = getApp()
import { Base } from '../../..//utils/base.js';
const base = new Base()
Page({
/**
......@@ -8,7 +10,7 @@ Page({
showUserInfo: true, //用户信息是否显示
noticeCount: 9, // 家长回复小红点
show:false,
emailShow: false,
subjectShow: false,
subjectList:[
{
name: '跳绳'
......@@ -51,6 +53,7 @@ Page({
})
}
},
goLogin() {
wx.navigateTo({ // 登录
url: '/pages/sign/login/login',
......@@ -74,7 +77,7 @@ Page({
//教学科目弹窗
tcHold: function (e) {
this.setData({
emailShow: !this.data.emailShow
subjectShow: !this.data.subjectShow
})
},
chooseOne(e) {
......
......@@ -58,7 +58,7 @@
</view>
</view>
<van-popup show="{{ emailShow }}" closeable round bind:close="tcHold">
<van-popup show="{{ subjectShow }}" closeable round bind:close="tcHold">
<view class="tc">
<view class="top">
<view class="til">请选择教学科目</view>
......
......@@ -31,10 +31,10 @@
<text class="title">已上课时</text>
<text class="restclass">剩余<text class="number">{{courseData.left_num_count}}</text>课时</text>
</view>
<view class="item" wx:for="{{lessonList}}" wx:key="index" data-id="{{item.id}}" >
<view class="item" wx:for="{{lessonList}}" wx:key="index" data-id="{{item.id}}" wx:for-index="idx" >
<image src="/images/select_circle.png" wx:if="{{item.lesson_status == 1}}"></image>
<image src="/images/circle.png" wx:else></image>
<view class="line"></view>
<view class="line" wx:if="{{idx != lessonList.length - 1}}"></view>
<view class="{{item.lesson_status == 1 ? 'lesson' : 'unlesson'}}">第{{item.class_index}}节课</view>
<view class="date">日期:{{item.class_date}}</view>
<view class="number">
......
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