success.js 794 B

123456789101112131415161718192021222324252627282930313233
  1. import {whetherFollowGzh} from "../../api/home"
  2. Page({
  3. data: {
  4. iconSize: [20, 30, 40, 50, 60, 70],
  5. iconColor: [
  6. 'red', 'orange', 'yellow', 'green', 'rgb(0,255,255)', 'blue', 'purple'
  7. ],
  8. iconType: [
  9. 'success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear'
  10. ],
  11. showOfficial:true
  12. },
  13. /**
  14. * 生命周期函数--监听页面加载
  15. */
  16. onLoad: function (options) {
  17. var app = getApp();
  18. whetherFollowGzh({
  19. unionId:app.globalData.unionId,
  20. stationId:app.globalData.stationId,
  21. }).then((res)=>{
  22. // res.retCode
  23. //-5 无信息
  24. //-4 没关注
  25. // 0 关注了
  26. if(res.retCode === 0 ){
  27. this.setData({
  28. showOfficial:false
  29. })
  30. }
  31. })
  32. }
  33. })