index.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // pages/tabber/home/index.js
  2. const api = require('../../../utils/api');
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. menuList:[
  9. {
  10. icon:'/image/home/icon_ruchangqianshou.png',
  11. tit:'入厂签收',
  12. url:"/pages/signIn/siginIn"
  13. },
  14. {
  15. icon:'/image/home/icon_fenjianluru.png',
  16. tit:'分拣录入',
  17. url:"/pages/sorting/choice/choice"
  18. },
  19. {
  20. icon:'/image/home/icon_zhijian.png',
  21. tit:'质检上挂',
  22. url:"/pages/control/choice/choice"
  23. },
  24. {
  25. icon:'/image/home//icon_yichang.png',
  26. tit:'异常单'
  27. },
  28. {
  29. icon:'/image/home/icon_yiwupandian.png',
  30. tit:'衣物盘点',
  31. url:'/pages/record/record'
  32. },
  33. ]
  34. },
  35. /**
  36. * 生命周期函数--监听页面加载
  37. */
  38. onLoad: function (options) {
  39. // api.getBanner().then(res=>{
  40. // console.log(res);
  41. // })
  42. },
  43. toUrl(e){
  44. let {url} = e.currentTarget.dataset
  45. wx.navigateTo({
  46. url,
  47. })
  48. },
  49. loginOut(){
  50. wx.removeStorageSync('token')
  51. wx.reLaunch({
  52. url: '/pages/login/login',
  53. })
  54. }
  55. })