coupon.vue 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template name="navbars">
  2. <view>
  3. <view class="coupon-content clearfix" @click="navigator('/pages/user/coupon/coupon')">
  4. <image src="https://static.caimei365.com/app/img/icon/icon-coupon-banner@2x.png" mode=""></image>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. import { mapState,mapMutations } from 'vuex'
  10. export default{
  11. name:"navbars",
  12. data() {
  13. return{
  14. }
  15. },
  16. created(){
  17. },
  18. computed: {
  19. ...mapState(['hasLogin','userInfo','isWxAuthorize'])
  20. },
  21. methods:{
  22. navigator(url){
  23. if(this.hasLogin){
  24. this.$api.navigateTo(url)
  25. }else{
  26. this.$api.navigateTo('/pages/login/login?type=0')
  27. }
  28. },
  29. }
  30. }
  31. </script>
  32. <style lang="scss">
  33. .coupon-content{
  34. width: 100%;
  35. height: 254rpx;
  36. box-sizing: border-box;
  37. padding: 32rpx 24rpx 12rpx 24rpx;
  38. background-color: #f7f7f7;
  39. image{
  40. width: 100%;
  41. height: 210rpx;
  42. display: block;
  43. }
  44. }
  45. </style>