合伙人运营小程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. // pages/setuplevel/index.js
  2. const api = require('../../api/index.js');
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. currentSize:''
  9. },
  10. signout(){
  11. wx.showModal({
  12. title: '提示',
  13. content: '确定退出吗?',
  14. success (res) {
  15. if (res.confirm) {
  16. wx.clearStorage({
  17. success: function() {
  18. wx.showToast({
  19. title: '退出成功',
  20. icon: 'success'
  21. });
  22. }
  23. });
  24. wx.navigateTo({
  25. url: '/pages/login/index', // 登录页面的路径,注意路径前面加上 '/' 表示从根目录开始
  26. });
  27. } else if (res.cancel) {
  28. console.log('用户点击取消')
  29. }
  30. }
  31. })
  32. },
  33. clearCache: function() {
  34. wx.showModal({
  35. title: '提示',
  36. content: '确定清理缓存?',
  37. success (res) {
  38. if (res.confirm) {
  39. wx.clearStorage({
  40. success: function() {
  41. wx.showToast({
  42. title: '缓存清除成功',
  43. icon: 'success'
  44. });
  45. wx.navigateTo({
  46. url: '/pages/login/index', // 登录页面的路径,注意路径前面加上 '/' 表示从根目录开始
  47. });
  48. }
  49. });
  50. } else if (res.cancel) {
  51. console.log('用户点击取消')
  52. }
  53. }
  54. })
  55. },
  56. onuser(){
  57. wx.showToast({
  58. title: '暂未开放',
  59. icon: 'none'
  60. });
  61. return
  62. wx.navigateTo({
  63. url: '/pages/user/index', // 登录页面的路径,注意路径前面加上 '/' 表示从根目录开始
  64. });
  65. },
  66. onIconTap(){
  67. },
  68. onprivacy(e){
  69. console.log(e);
  70. wx.navigateTo({
  71. url: `/package-user/pages/privacy/index?name=${e.currentTarget.dataset.name}`,
  72. })
  73. },
  74. onaccountnumber(){
  75. wx.showToast({
  76. title: '暂未开放',
  77. icon: 'none'
  78. });
  79. return
  80. wx.navigateTo({
  81. url: '/pages/account/index', // 登录页面的路径,注意路径前面加上 '/' 表示从根目录开始
  82. });
  83. },
  84. /**
  85. * 生命周期函数--监听页面加载
  86. */
  87. onLoad(options) {
  88. let _this =this
  89. wx.getStorageInfo({
  90. success: function(res) {
  91. _this.setData({
  92. currentSize:res.currentSize
  93. })
  94. // console.log(res.currentSize); // 当前占用的空间大小,单位:字节
  95. // console.log(res.limitSize); // 空间限制的大小,单位:字节
  96. }
  97. })
  98. },
  99. /**
  100. * 生命周期函数--监听页面初次渲染完成
  101. */
  102. onReady() {
  103. },
  104. /**
  105. * 生命周期函数--监听页面显示
  106. */
  107. onShow() {
  108. },
  109. /**
  110. * 生命周期函数--监听页面隐藏
  111. */
  112. onHide() {
  113. },
  114. /**
  115. * 生命周期函数--监听页面卸载
  116. */
  117. onUnload() {
  118. },
  119. /**
  120. * 页面相关事件处理函数--监听用户下拉动作
  121. */
  122. onPullDownRefresh() {
  123. },
  124. /**
  125. * 页面上拉触底事件的处理函数
  126. */
  127. onReachBottom() {
  128. },
  129. /**
  130. * 用户点击右上角分享
  131. */
  132. onShareAppMessage() {
  133. }
  134. })