小程序源码
This commit is contained in:
32
source/wx/xzs-student/pages/my/log/index.js
Normal file
32
source/wx/xzs-student/pages/my/log/index.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
logList: null,
|
||||
len: 0
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.search();
|
||||
},
|
||||
search: function() {
|
||||
let _this = this
|
||||
_this.setData({
|
||||
spinShow: true
|
||||
});
|
||||
app.formPost('/api/wx/student/user/log', null).then(res => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
if (res.code === 1) {
|
||||
_this.setData({
|
||||
logList: res.response,
|
||||
len: res.response.length
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
_this.setData({
|
||||
spinShow: false
|
||||
});
|
||||
app.message(e, 'error')
|
||||
})
|
||||
}
|
||||
})
|
||||
9
source/wx/xzs-student/pages/my/log/index.json
Normal file
9
source/wx/xzs-student/pages/my/log/index.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"i-steps": "/component/iView/steps/index",
|
||||
"i-step": "/component/iView/step/index",
|
||||
"i-message": "/component/iView/message/index",
|
||||
"i-spin": "/component/iView/spin/index",
|
||||
"i-panel": "/component/iView/panel/index"
|
||||
}
|
||||
}
|
||||
18
source/wx/xzs-student/pages/my/log/index.wxml
Normal file
18
source/wx/xzs-student/pages/my/log/index.wxml
Normal file
@@ -0,0 +1,18 @@
|
||||
<view class="user-log-page">
|
||||
<view wx:for="{{logList}}" data-item="item" wx:key="{{item.id}}" class="i-step-item i-step-process i-step-vertical" style="width : 100%;">
|
||||
<view class="i-step-item-ico">
|
||||
<view class="i-step-ico"></view>
|
||||
<view class="i-step-line" wx:if="{{ index !== len - 1 }}"></view>
|
||||
</view>
|
||||
<view class="i-step-item-main">
|
||||
<view class="i-step-item-title">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
<view class="i-step-item-content">
|
||||
{{item.content}}
|
||||
</view>
|
||||
</view>
|
||||
<i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
|
||||
<i-message id="message" />
|
||||
</view>
|
||||
</view>
|
||||
24
source/wx/xzs-student/pages/my/log/index.wxss
Normal file
24
source/wx/xzs-student/pages/my/log/index.wxss
Normal file
@@ -0,0 +1,24 @@
|
||||
/* pages/user/log/index.wxss */
|
||||
@import '/component/iView/steps/index.wxss';
|
||||
@import '/component/iView/step/index.wxss';
|
||||
|
||||
.i-step-ico {
|
||||
background: #fff !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.i-step-item-title {
|
||||
font-size: 12px;
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
.i-step-item-content {
|
||||
font-size: 12px;
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
.user-log-page {
|
||||
background: #fff;
|
||||
padding: 5px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
Reference in New Issue
Block a user