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.

83 lines
1.3 KiB

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