xzs-mysql/source/wx/xzs-student/pages/my/log/index.js

32 lines
600 B
JavaScript
Raw Normal View History

2020-09-02 00:44:41 +00:00
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')
})
}
})