userinfo.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. IsPromotion:false,
  7. },
  8. onLoad: function (options) {
  9. var that = this;
  10. var isPromotion=false;
  11. var title="大使";
  12. var backColor="#FFB808";
  13. var frontColor="#2E2E2E";
  14. var frontColor2="#000000";
  15. if (options.AgentCategory=="promotion"){
  16. isPromotion=true;
  17. title="推广";
  18. backColor="#FC7406";
  19. frontColor="#ffffff";
  20. frontColor2="#000000";
  21. }
  22. that.setData({
  23. Containnerheight: main.getWindowHeight(),
  24. IsPromotion:isPromotion,
  25. BackColor:backColor,
  26. FrontColor:frontColor,
  27. Title:title,
  28. User:app.globalData.userInfo,
  29. });
  30. wx.setBackgroundColor({
  31. backgroundColor: backColor,
  32. });
  33. wx.setNavigationBarColor({
  34. backgroundColor: backColor,
  35. backgroundColorTop:backColor,
  36. backgroundColorBottom:backColor,
  37. frontColor: frontColor2,
  38. })
  39. },
  40. onPullDownRefresh: function () {
  41. wx.stopPullDownRefresh();
  42. },
  43. onShareAppMessage: function () {
  44. return {
  45. title: app.globalData.ShareTitle,
  46. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  47. imageUrl: app.globalData.ShareImage,
  48. }
  49. },
  50. })