problemListCont6.js 909 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // pages/problemListCont/problemListCont6.js
  2. var app = getApp();
  3. Page({
  4. data: {
  5. phone: ''
  6. },
  7. onLoad: function (options) {
  8. var that = this
  9. var open_id = getApp().globalData.open_id;
  10. var host = getApp().globalData.servsers;
  11. wx.showNavigationBarLoading()
  12. wx.request({
  13. url: host + "phoneapi/phoneall",
  14. data: {},
  15. method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
  16. header: {
  17. 'Accept': 'application/json'
  18. },
  19. success: function (res) {
  20. that.setData({
  21. phone: res.data.rows[0].phone,
  22. });
  23. if (res == null || res.data == null) {
  24. console.error('网络请求失败');
  25. return;
  26. }
  27. wx: wx.hideNavigationBarLoading(
  28. that.setData({
  29. hidden: ''
  30. })
  31. )
  32. }
  33. })
  34. }
  35. })
  36. var that;
  37. var Util = require('../../utils/util.js');