liukangdong
2024-07-18 5b219a9694c8d69db42e746a654c779cc6a61bf6
wechat_jiaxuan/pages/store/staffList.js
@@ -1,20 +1,36 @@
// pages/store/staffList.js
import { myUserPage } from '../../api/index'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    dataList: '',
    capacity: 10,
    page: 1,
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.getList()
  },
  handleDetail(e) {
    const id = e.currentTarget.dataset.iamId
    wx.navigateTo({
      url: '/pages/store/staff?id=' + id,
    })
  },
  getList() {
    const { page, capacity } = this.data
    myUserPage({
      model: {},
      page,capacity
    }).then(res => {
      this.setData({ dataList: res.data.records, total: res.data.total })
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */