systemsetting.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. IsShow: 0,
  7. HasSound: true,
  8. ShowUserID:"000000000"
  9. },
  10. onLoad: function (options) {
  11. var that = this;
  12. that.setData({
  13. Containnerheight: main.getWindowHeight(),
  14. ProgramName: app.globalData.ProgramName,
  15. Version: app.globalData.Version,
  16. IsShow: app.globalData.userInfo.IsShow,
  17. ShowUserID:app.globalData.userInfo.ShowUserID,
  18. });
  19. common.getStorageValue(this, "HasSound", true, function () {
  20. wx.setStorageSync("HasSound", that.data.HasSound);
  21. });
  22. },
  23. updateMember: function () {
  24. wx.navigateTo({
  25. url: '../index/accredit',
  26. });
  27. },
  28. gotoSymbol: function (e) {
  29. wx.navigateTo({
  30. url: '../main/symbolsetting',
  31. });
  32. },
  33. gotoAbout: function (e) {
  34. wx.navigateTo({
  35. url: '../other/newuser?nobutton=true',
  36. });
  37. },
  38. gotoPayCustom:function(){
  39. if (app.globalData.userInfo.UserID<=7){
  40. wx.navigateTo({
  41. url: '../other/paycustom',
  42. });
  43. }
  44. },
  45. switch1Change(e) {
  46. var that = this;
  47. that.data.HasSound = e.detail.value;
  48. that.setData({
  49. HasSound: that.data.HasSound,
  50. });
  51. wx.setStorageSync("HasSound", that.data.HasSound);
  52. },
  53. onShareAppMessage: function () {
  54. return {
  55. title: app.globalData.ShareTitle,
  56. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  57. imageUrl: app.globalData.ShareImage,
  58. }
  59. },
  60. })