result.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const app = getApp();
  2. const util = require("../../../utils/util");
  3. Page({
  4. data: {
  5. status: 0,
  6. vid: '',
  7. articleType: 0
  8. },
  9. onLoad: function (options) {
  10. this.setData({ status: options.status, vid: options.vid, articleType: options.articleType })
  11. },
  12. seeCard() {
  13. if (app.globalData.userInfo) {
  14. wx.navigateTo({
  15. url: '/pages/account/safe/index'
  16. })
  17. } else {
  18. // 静默登录
  19. util.silentLogin().then(res => {
  20. wx.navigateTo({
  21. url: '/pages/account/safe/index'
  22. })
  23. })
  24. }
  25. },
  26. goUse() {
  27. if (app.globalData.userInfo) {
  28. wx.navigateTo({
  29. url: this.data.articleType == 1 ? '/pages/product/goods/index' : ('/pages/growthCard/activity?vid=' + this.data.vid)
  30. })
  31. } else {
  32. // 静默登录
  33. let that =this
  34. util.silentLogin().then(res => {
  35. wx.navigateTo({
  36. url: that.data.articleType == 1 ? '/pages/product/goods/index' : ('/pages/growthCard/activity?vid=' + that.data.vid)
  37. })
  38. })
  39. }
  40. }
  41. })