coupon-product.vue 717 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view class="container clearfix">
  3. </view>
  4. </template>
  5. <script>
  6. import { mapState,mapMutations} from 'vuex';
  7. export default {
  8. components:{
  9. },
  10. data() {
  11. return {
  12. userName:'',
  13. userIdentity:0
  14. }
  15. },
  16. onLoad() {
  17. if(!this.hasLogin){
  18. uni.redirectTo({
  19. url:'../../login/login'
  20. })
  21. }
  22. },
  23. computed: {
  24. ...mapState(['hasLogin','userInfo','identity','isActivity'])
  25. },
  26. methods: {
  27. },
  28. onShow(){
  29. this.$api.getComStorage('userInfo').then((resolve) =>{
  30. this.userName = resolve.name;
  31. this.userIdentity = resolve.userIdentity
  32. }).catch(error =>{
  33. })
  34. }
  35. }
  36. </script>
  37. <style lang="scss">
  38. .container{
  39. width: 100%;
  40. height: auto;
  41. }
  42. </style>