C端集团版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
1.5 KiB

  1. // pages/users/users.js
  2. const imgurl = require("../../utils/imgurl");
  3. const Http = require("../../utils/HttpBasics");
  4. var config = require("../../config/config.js");
  5. let app = getApp();
  6. Page({
  7. /**
  8. * 页面的初始数据
  9. */
  10. data: {
  11. aboutUs: imgurl.aboutUs.url,
  12. banneColor: "linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%)",
  13. // levelName:
  14. },
  15. /* 判断是否授权*/
  16. checkUserStatus() {
  17. Http.get({
  18. url: config.api.checkUserStatus,
  19. data: {
  20. token: app.globalData.token
  21. }
  22. }).then(res => {
  23. // wx.navigateTo({
  24. // url: '/pages/edit/edit',
  25. // })
  26. console.log("111")
  27. }).catch(err => {
  28. wx.navigateTo({
  29. url: `/pages/getuserinfo/index`,
  30. })
  31. })
  32. },
  33. /**
  34. * 生命周期函数--监听页面加载
  35. */
  36. onLoad: function (options) {
  37. this.checkUserStatus()
  38. },
  39. /**
  40. * 生命周期函数--监听页面初次渲染完成
  41. */
  42. onReady: function () {
  43. },
  44. /**
  45. * 生命周期函数--监听页面显示
  46. */
  47. onShow: function () {
  48. },
  49. /**
  50. * 生命周期函数--监听页面隐藏
  51. */
  52. onHide: function () {
  53. },
  54. /**
  55. * 生命周期函数--监听页面卸载
  56. */
  57. onUnload: function () {
  58. },
  59. /**
  60. * 页面相关事件处理函数--监听用户下拉动作
  61. */
  62. onPullDownRefresh: function () {
  63. },
  64. /**
  65. * 页面上拉触底事件的处理函数
  66. */
  67. onReachBottom: function () {
  68. },
  69. /**
  70. * 用户点击右上角分享
  71. */
  72. onShareAppMessage: function () {
  73. }
  74. })