123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- // component/teacher/teacherFile/teacherFile.ts
- import { httpUtil } from '../../../utils/restful'
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- },
- /**
- * 组件的初始数据
- */
- data: {
- fileList: []
- },
- lifetimes: {
- attached: function () {
- // 在组件实例被从页面节点树添加时执行
- this.getLessAll()
- },
- detached: function () {
- // 在组件实例被从页面节点树移除时执行
- },
- },
- /**
- * 组件的方法列表
- */
- methods: {
- getLessAll: function () {
- let params = {
- pageNo: 1,
- pageSize: 10000
- }
- httpUtil.wxGet(httpUtil.interfaces.createLess, params).then((res: any) => {
- console.log("获取所有文件库成功", res)
- this.setData({
- fileList: res.data.data.list
- })
- }).catch((res) => {
- console.log("获取所有文件库失败:", res)
- })
- },
- showWindow: function (event: any) {
- // console.log("点击了更多的按钮:", event)
- this.triggerEvent("showWindow", { item: event.detail.item })
- },
- realod: function () {
- this.getLessAll()
- }
- }
- })
|