index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { imgServerUrl } from '../../config/config.js'
  2. Page({
  3. data: {
  4. imgServerUrl: imgServerUrl,
  5. type: '',
  6. status: '',
  7. from: ''
  8. },
  9. onLoad: function (options) {
  10. let { type = 'auth', status = 0 } = options
  11. let { hpPositionGroupId = "" } = options//拼团成功 拼团id
  12. let { from } = options
  13. /**
  14. * Region:
  15. *
  16. * 类型:
  17. * type: pt:拼团 auth:认证
  18. *
  19. * 状态:
  20. * status: 0:失败 1:成功 2:进行中
  21. *
  22. * 组合:
  23. * 1、开团成功 type:pt status: 1
  24. * 2、身份认证中 type:auth status: 2
  25. * 3、身份认证失败 type:auth status: 0
  26. *
  27. * */
  28. this.setData({
  29. type,
  30. status,
  31. from
  32. })
  33. //拼团成功跳转参团详情
  34. if (type == 'pt' && status == 1) {
  35. setTimeout(() => {
  36. wx.redirectTo({
  37. url: '../pt-detail/index?hpPositionGroupId=' + hpPositionGroupId,
  38. })
  39. }, 2000)
  40. }
  41. },
  42. //身份认证失败重新认证
  43. toAuth() {
  44. wx.redirectTo({
  45. url: '../identification/index',
  46. })
  47. }
  48. })