inviteNewPeople.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="Invitation">
  3. <image src="https://s1.ax1x.com/2020/04/07/G2u0DH.png" mode="" style="width: 100%;height: 340px"></image>
  4. <view class="btn" @click="naviageToPage('/pages/parity/parity?type=6&id=49&title=掌柜推荐')">
  5. <!-- -->
  6. 前往购买
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. p: ''
  15. };
  16. },
  17. methods: {
  18. naviageToPage(page) {
  19. if(this.$store.state.userInfo.accessToken){
  20. uni.showModal({
  21. title:"提示",
  22. content:"您已领取过新人优惠",
  23. confirmText:"继续分享",
  24. cancelText:"继续买菜",
  25. success: (res) => {
  26. if(res.confirm){
  27. uni.navigateTo({
  28. url:"../Invitation/Invitation"
  29. })
  30. }else{
  31. uni.switchTab({
  32. url:"../index/index"
  33. })
  34. }
  35. }
  36. })
  37. }else{
  38. uni.navigateTo({
  39. url:"../public/login"
  40. })
  41. }
  42. }
  43. },
  44. onLoad(options) {
  45. if (options.p) {
  46. console.log(options.p)
  47. this.$store.commit('setStorageCode', options.p)
  48. }
  49. wx.hideHomeButton()
  50. }
  51. }
  52. </script>
  53. <style lang="scss">
  54. .Invitation {
  55. background-color: #F4F6FA;
  56. min-height: 100vh;
  57. .btn {
  58. margin: 110px auto 0;
  59. width: 77%;
  60. height: 45px;
  61. background-color: #EF570D;
  62. text-align: center;
  63. line-height: 45px;
  64. color: #fff;
  65. border-radius: 45rpx;
  66. }
  67. }
  68. </style>