index.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view class="">
  3. <navBar title="商城" :back="false" color="black" flex="cen" background="#fff" />
  4. <view class="searchAndTab">
  5. <view class="searchBox">
  6. <u-search shape="round" :showAction="false"></u-search>
  7. </view>
  8. <u-sticky bgColor="#fff">
  9. <u-tabs :list="list1" :scrollable="true" :activeStyle='activeStyle'
  10. :inactiveStyle="inactiveStyle"></u-tabs>
  11. </u-sticky>
  12. </view>
  13. <view class="content">
  14. <view class="leftMenu">
  15. <view class="item" v-for="i in 20" :class="[i==currBrandIndex?'act':'']" @click="currBrandIndex=i">
  16. <text style="position: relative;z-index: 1;">品牌{{i+1}}</text>
  17. <!-- <image src="/static/index/more.png" mode="" style="width: 30rpx;height: 30rpx;"></image> -->
  18. <view class="halfCircle" v-if="i==currBrandIndex">
  19. </view>
  20. </view>
  21. </view>
  22. <view class="rightDes">
  23. <view class="item" v-for="i in 10" :style="{marginTop:i>0?'22rpx':''}" @click="toDetail">
  24. <view class="top">
  25. <view class="name">
  26. 筒灯
  27. </view>
  28. <image src="/static/index/more.png" mode=""
  29. style="width: 40rpx;height: 40rpx;margin-right: 4rpx;">
  30. </image>
  31. </view>
  32. <view class="bottom">
  33. <image src="/static/index/img1.png" mode="" style="" class="img" v-for="i in 5"></image>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import classifyData from '@/common/classify.data.js';
  42. export default {
  43. data() {
  44. return {
  45. currBrandIndex: 0,
  46. list1: [{
  47. name: '无主灯',
  48. },
  49. {
  50. name: '主灯',
  51. }, {
  52. name: '开关插座'
  53. },
  54. {
  55. name: '智能家装',
  56. }, {
  57. name: '智能锁'
  58. },
  59. ],
  60. activeStyle: {
  61. color: '#F7790C'
  62. },
  63. inactiveStyle: {
  64. color: '#080F18'
  65. }
  66. };
  67. },
  68. created() {
  69. },
  70. onLoad: function() {
  71. },
  72. onReady() {
  73. },
  74. methods: {
  75. toDetail() {
  76. uni.navigateTo({
  77. url: '/pages/mall/goodsList/index'
  78. })
  79. }
  80. },
  81. components: {}
  82. };
  83. </script>
  84. <style lang="scss" scoped>
  85. @import "./index.scss";
  86. </style>