selectSite.js 658 B

12345678910111213141516171819202122232425262728293031
  1. Page({
  2. /**
  3. * 页面的初始数据
  4. */
  5. data: {
  6. account_list: ""
  7. },
  8. /**
  9. * 生命周期函数--监听页面加载
  10. */
  11. onLoad(options) {},
  12. toHome(e) {
  13. const {
  14. item
  15. } = e.currentTarget.dataset;
  16. wx.setStorageSync('userrole', item.usertype == 1 ? '业务员' : '经销商');
  17. wx.setStorageSync('userMsg', item);
  18. require('./modules/login').init();
  19. },
  20. /**
  21. * 生命周期函数--监听页面显示
  22. */
  23. onShow() {
  24. this.setData({
  25. account_list: wx.getStorageSync('account_list')
  26. })
  27. },
  28. onShareAppMessage() {}
  29. })