上传文件至 'pages/chengjiliebiao'

This commit is contained in:
a 2022-05-07 12:46:43 +08:00
parent 8b7fd8fef4
commit e24dd3b2b7
4 changed files with 247 additions and 0 deletions

View File

@ -0,0 +1,83 @@
// pages/chengjiliebiao.js
Page({
/**
* 页面的初始数据
*/
data: {
forumList:[
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.getStorage({
key:"data",
success:(res)=>{
var uid = res.data.uid
wx.request({
url: 'http://10.0.100.100:8000/u/'+uid+'/achievement',
method:"GET",
success:(res)=>{
this.setData({forumList:res.data.data})
console.log(this.data.forumList)
}
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
chance1:function(value){
console.log(value)
}
})

View File

@ -0,0 +1,9 @@
{
"usingComponents": {
"van-tab": "../../../components/vant/dist/tab/index",
"van-tabs": "../../../components/vant/dist/tabs/index",
"van-cell": "../../../components/vant/dist/cell/index",
"van-cell-group": "../../../components/vant/dist/cell-group/index"
},
"navigationBarTitleText": "成绩"
}

View File

@ -0,0 +1,12 @@
<view class="policyList">
<view class="policy-item" wx:for="{{forumList}}" wx:key="item" data-id="{{item.id}}" bindtap="bindPolicyList">
<van-cell-group>
<van-cell title="课程" value="{{item.classes}}" />
<van-cell title="成绩" value="{{item.grade}}" />
<van-cell title="学分" value="{{item.credits}}" />
<van-cell title="绩点" value="{{item.point}}" />
</van-cell-group>
</view>
<!-- 到底提示 -->
<view class="noMore" wx:if="{{noMore}}">到底了哟~~~</view>
</view>

View File

@ -0,0 +1,143 @@
/* pages/mine/policy/policy.wxss */
page{
width:100vw;
/* height:100vh; */
/* overflow-y: auto; */
background:#f8f8f8;
overflow-x: hidden;
}
::-webkit-scrollbar {display:none!important;}
::scrollbar {display:none!important;}
/* 搜索 */
.searchBox{
width:97vw;
background:#f8f8f8;
padding:4vw 3vw 0vw 2vw;
/* margin-bottom:3vw; */
}
.search{
width:96vw;
height: 9vw;
background-color: #ffffff;
box-shadow: 0vw 0vw 1.2vw 0vw
rgba(0, 0, 0, 0.3);
border-radius: 1.33vw;
overflow: hidden;
}
.search>view{
float:left;
}
.search .input input{
width:79vw;
height:9vw;
font-size:3.2vw;
border-top-left-radius: 1.33vw;
border-bottom-left-radius: 1.33vw;
padding:0 4vw;
}
.search .img image{
width:9vw;
height:9vw;
}
/* 列表 */
.policyList{
margin-top: 4vw;
padding:0 2.4vw;
}
.policy-item{
background: #fff;
padding:4vw;
/* border-top:1px solid #eee; */
margin-bottom:4vw;
box-shadow: 0vw 0vw 1.2vw 0vw
rgba(0, 0, 0, 0.3);
border-radius: 1.33vw;
display: flex;
flex-direction: column;
align-content: space-between;
}
.policy-item:last-child{
border-bottom:1px solid #eee;
margin: 0;
}
.policy-item>view{
margin-bottom:3vw;
}
.policy-item>view:last-child{
margin: 0;
}
.item-title{
width:86vw;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 4vw;
color: #333333;
}
.item-time{
font-size: 3vw;
color: #999999;
}
.noMore{
height: 10vw;
line-height: 10vw;
text-align: center;
color:#999;
font-size:3.2vw;
}
/* 暂无数据 */
.popupNone{
width:100vw;
height:64vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.popupNone .img image{
width: 31.2vw;
height: 31.87vw;
margin-bottom:3.2vw;
}
.popupNone .noneTxt{
font-size: 3.73vw;
color: #999999;
}
.pubMessage{
width: 110rpx;
height: 110rpx;
background: #206fff;
border-radius: 50%;
color: #fff;
position: fixed;
right: 5vw;
bottom: 5vw;
display: flex;
flex-wrap: wrap;
}
.pubMessage>text{
flex: 1 0 100%;
text-align: center;
font-size: 100rpx;
line-height: 10vw;
height: 12vw;
}
.author{
display: flex;
justify-content: space-between;
}
.author>text{
color:#206fff
}
.author>view{
display: flex;
align-items: center;
}
.gray_msg{
width: 40rpx;
height: auto;
}