systemsetting.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. gotoPayCustom:function(){
  34. if (app.globalData.userInfo.UserID<=7){
  35. wx.navigateTo({
  36. url: '../other/paycustom',
  37. });
  38. }
  39. },
  40. switch1Change(e) {
  41. var that = this;
  42. that.data.HasSound = e.detail.value;
  43. that.setData({
  44. HasSound: that.data.HasSound,
  45. });
  46. wx.setStorageSync("HasSound", that.data.HasSound);
  47. },
  48. onShareAppMessage: function () {
  49. return {
  50. title: app.globalData.ShareTitle,
  51. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  52. imageUrl: app.globalData.ShareImage,
  53. }
  54. },
  55. })