systemsetting.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. },
  9. onLoad: function (options) {
  10. var that = this;
  11. that.setData({
  12. Containnerheight: main.getWindowHeight(),
  13. ProgramName: app.globalData.ProgramName,
  14. Version: app.globalData.Version,
  15. IsShow: app.globalData.userInfo.IsShow,
  16. });
  17. common.getStorageValue(this, "HasSound", true, function () {
  18. wx.setStorageSync("HasSound", that.data.HasSound);
  19. });
  20. },
  21. updateMember: function () {
  22. wx.reLaunch({
  23. url: '../index/index',
  24. })
  25. },
  26. gotoSymbol: function (e) {
  27. wx.navigateTo({
  28. url: '../main/symbolsetting',
  29. });
  30. },
  31. gotoPayCustom:function(){
  32. if (app.globalData.userInfo.UserID<=7){
  33. wx.navigateTo({
  34. url: '../other/paycustom',
  35. });
  36. }
  37. },
  38. switch1Change(e) {
  39. var that = this;
  40. that.data.HasSound = e.detail.value;
  41. that.setData({
  42. HasSound: that.data.HasSound,
  43. });
  44. wx.setStorageSync("HasSound", that.data.HasSound);
  45. },
  46. onShareAppMessage: function () {
  47. return {
  48. title: app.globalData.ShareTitle,
  49. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  50. imageUrl: app.globalData.ShareImage,
  51. }
  52. },
  53. })