小程序源码
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')
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user