userinfo.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. FileUrl: app.globalData.imageUrl,
  7. Version: app.globalData.Version,
  8. ProgramName: app.globalData.ProgramName,
  9. },
  10. onLoad: function (options) {
  11. this.setData({
  12. Containnerheight: common.getSystemHeight(),
  13. ProgramList: server.getProgramList(),
  14. ProgramID:app.globalData.ProgramID,
  15. IsShow: app.globalData.userInfo.IsShow,
  16. IsLocked: app.globalData.IsLocked,
  17. IsIOS:app.globalData.IsIOS,
  18. });
  19. },
  20. goto:function(e){
  21. var url=e.currentTarget.dataset.url;
  22. wx.navigateTo({
  23. url: url,
  24. })
  25. },
  26. switchProgram: function (e) {
  27. wx.navigateToMiniProgram({
  28. appId: e.currentTarget.dataset.appid,
  29. path: e.currentTarget.dataset.path,
  30. extraData: {
  31. },
  32. success(res) {
  33. // 打开成功
  34. }
  35. });
  36. },
  37. gotoFeedback: function () {
  38. server.gotoFeedback();
  39. },
  40. updateMember: function () {
  41. if (app.globalData.userInfo.UserID == 1) {
  42. if (app.globalData.userInfo.IsMember == 1) {
  43. app.globalData.userInfo.IsMember = 0;
  44. this.setData({
  45. IsMember: 0,
  46. });
  47. }
  48. else {
  49. app.globalData.userInfo.IsMember = 1;
  50. this.setData({
  51. IsMember: 1,
  52. });
  53. }
  54. }
  55. },
  56. });