C端小程序
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

93 linhas
1.4 KiB

  1. const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
  2. var config = require("../../config/config.js");
  3. const Http = require("../../utils/HttpBasics");
  4. var app = getApp();
  5. Page({
  6. /**
  7. * 页面的初始数据
  8. */
  9. data: {
  10. name: "",
  11. companyName: "",
  12. },
  13. getInfo() {
  14. wx.showLoading({
  15. title: '加载中,请稍后',
  16. })
  17. const that = this
  18. Http.get({
  19. url: config.api.appInfoDetail,
  20. data: {
  21. appId: config.weapp.AppId
  22. }
  23. }).then(res => {
  24. wx.hideLoading()
  25. console.log(res, 'res');
  26. that.setData({
  27. name: res.data.name,
  28. companyName: res.data.companyName,
  29. })
  30. }).catch(err => {
  31. console.log(err, 'err');
  32. })
  33. },
  34. /**
  35. * 生命周期函数--监听页面加载
  36. */
  37. onLoad(options) {
  38. },
  39. /**
  40. * 生命周期函数--监听页面初次渲染完成
  41. */
  42. onReady() {
  43. },
  44. /**
  45. * 生命周期函数--监听页面显示
  46. */
  47. onShow() {
  48. this.getInfo()
  49. },
  50. /**
  51. * 生命周期函数--监听页面隐藏
  52. */
  53. onHide() {
  54. },
  55. /**
  56. * 生命周期函数--监听页面卸载
  57. */
  58. onUnload() {
  59. },
  60. /**
  61. * 页面相关事件处理函数--监听用户下拉动作
  62. */
  63. onPullDownRefresh() {
  64. },
  65. /**
  66. * 页面上拉触底事件的处理函数
  67. */
  68. onReachBottom() {
  69. },
  70. /**
  71. * 用户点击右上角分享
  72. */
  73. onShareAppMessage() {
  74. }
  75. })