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.

58 lines
1.1 KiB

  1. const Http = require("../../utils/HttpBasics");
  2. const config = require("../../config/config");
  3. let app = getApp();
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. src:'./../../../assets/img/grade.png'
  10. },
  11. /**
  12. * 生命周期函数--监听页面加载
  13. */
  14. onLoad: function(options) {
  15. },
  16. /**
  17. * 生命周期函数--监听页面初次渲染完成
  18. */
  19. onReady: function() {
  20. },
  21. /**
  22. * 生命周期函数--监听页面显示
  23. */
  24. onShow: function() {
  25. let that = this;
  26. Http.get({
  27. url: config.api.scoreLevelInfo,
  28. data: {
  29. appId: config.weapp.AppId,
  30. }
  31. })
  32. .then(res=>{
  33. that.setData({
  34. flags: 'have',
  35. rules: JSON.parse(res.data.score.rules).concat(JSON.parse(res.data.score.rules)[1].childs),
  36. levelList: res.data.levelList
  37. })
  38. })
  39. .catch(res=>{
  40. that.setData({
  41. flags: 'nothave'
  42. })
  43. })
  44. },
  45. // 点击跳转到我的特享优惠
  46. gotospecialcourtesy:function(){
  47. wx.navigateTo({
  48. url: '/pages/specialcourtesy/specialcourtesy',
  49. })
  50. }
  51. })