main.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="layout-shop flex" @click="goDetail">
  3. <view class="layout-shop-image relative">
  4. <image src="/static/images/shop-background.png" class="layout-shop-background relative"></image>
  5. <view class="absolute row aCenter shop-logo-warp">
  6. <image src="/static/images/logo.jpg" class="layout-shop-logo"></image>
  7. <text>{{config.name}}</text>
  8. </view>
  9. <view class="absolute shop-image">
  10. <image mode="aspectFill" :src="item.image" class="screen_all"></image>
  11. </view>
  12. </view>
  13. <view class="flex-all-1 shop-content">
  14. <view class="shop-title line-2">{{item.title}}</view>
  15. <view class="line-1 shop-price-color" v-if="item.id"><text class="shop-price"><text>¥</text><text class="shop-price-target">{{item.sales_price}}</text></text></view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import {
  21. mapState
  22. } from 'vuex';
  23. import props from './props';
  24. import shop from '@/utils/controls/shop';
  25. export default {
  26. name: "layout-shop",
  27. computed:{
  28. ...mapState(['config'])
  29. },
  30. props,
  31. methods:{
  32. goDetail(){
  33. shop.goShopDetail(this.item);
  34. }
  35. }
  36. }
  37. </script>
  38. <style scoped lang="scss" src="./style.scss"></style>