index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view :style="{ minHeight: sys.windowHeight + 'px' }" :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
  3. <tm-menubars title="" :shadow="0" :showback="false"></tm-menubars>
  4. <view class="C1b1b1b pb-10">
  5. <view class="sousuo">
  6. <tm-pickersCity class="dingwei fl" btn-color="bg-gradient-blue-accent" @confirm="okCity" :default-value="addr">
  7. <view>
  8. <text class="text-size-n">{{addr[1]}}</text>
  9. <tm-icons :size="24" color="white" name="icon-angle-down"></tm-icons>
  10. </view>
  11. </tm-pickersCity>
  12. <view>
  13. <tm-search @confirm="sosoFun" class="fl" v-model="soso" color="white" confirm-text=""></tm-search>
  14. <text class="quxiao fr" @click="goindex()">取消</text>
  15. </view>
  16. </view>
  17. <view style="clear: both;"></view>
  18. <tm-dropDownMenu @change="change" :type="typeclick" un-color="white" :list="list2"></tm-dropDownMenu>
  19. </view>
  20. <div class="zhuti">
  21. <tm-sheet class="kuang" style="padding-bottom: 30px !important;">
  22. <view style="width: 94%;margin:0 auto;" class="remen">
  23. <view v-for="(item,index) in listdata" class="round-5 contone black mt-20" :class="index%2==0?'fl':'fr'">
  24. <image class="logo" :src="item.image" mode="widthFix"></image>
  25. <view class="pa-15 text-size-s">
  26. <view class="text-overflow-2">
  27. <text class="text-size-lg">{{item.text}}</text>
  28. <view class="text-gray mt-6">销量:{{item.xiaol}}</view>
  29. </view>
  30. <view class="mt-2 flex-between flex-center">
  31. <view class="touxiang mt-30">
  32. <text class="text-white text-size-m text-weight-b">{{item.jiage}}</text>
  33. </view>
  34. <view >
  35. <image @click="jiarufuFun(item)" class="remenzan" src="/static/img/86.png" mode="widthFix"></image>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view style="clear: both;"></view>
  41. <view style="clear: both;" class="more ma-40 pt-40" @click="gengmore()">
  42. <image src="/static/img/30.png" mode="widthFix"></image>
  43. <text class="text-size-s">下拉加载更多~</text>
  44. </view>
  45. </view>
  46. </tm-sheet>
  47. <view style="height:60px"></view>
  48. </div>
  49. <!-- 弹出层消息 -->
  50. <tm-message ref="toast"></tm-message>
  51. </view>
  52. </template>
  53. <script>
  54. import{myRequest} from '@/api/request.js'
  55. export default {
  56. data() {
  57. return {
  58. activeIndex:0,
  59. soso:'',
  60. addr:['江西省','南昌市','西湖区'],
  61. value:'',
  62. list2: [{
  63. title: '最近上新',
  64. shang:true
  65. }, {
  66. title: '价格',
  67. shang:false
  68. },{
  69. title: '销量',
  70. shang:true
  71. }],
  72. typeclick:1,
  73. listdata:[]
  74. };
  75. },
  76. onLoad() {
  77. },
  78. created() {
  79. this.sys = uni.getSystemInfoSync();
  80. this.randouh()
  81. },
  82. methods: {
  83. gengmore(){
  84. this.randouh()
  85. },
  86. jiarufuFun(data){
  87. uni.navigateTo({
  88. url: "/pages/gouwuche/index",
  89. })
  90. // console.log(data)
  91. // this.gouwuche.push(data)
  92. },
  93. randouh(){
  94. let list2 = [],that=this;
  95. for(let i=0;i<8;i++){
  96. list2.push({
  97. image:'../../static/img/90.png',
  98. text:'帽子',
  99. jiage:'¥ 359.00',
  100. xiaol:'128'
  101. })
  102. }
  103. this.listdata=this.listdata.concat(list2)
  104. console.log(this.listdata)
  105. },
  106. goindex(){
  107. uni.navigateBack();
  108. },
  109. change(e){
  110. console.log(e)
  111. },
  112. sosoFun(){
  113. }
  114. },
  115. }
  116. </script>
  117. <style lang="scss">
  118. /deep/ .tm-menubars .body{
  119. background-color: #1b1b1b !important;
  120. }
  121. /deep/ .zhuti{padding: 10px 10px;}
  122. /deep/ .kuang{margin:0 !important;padding: 0px !important;}
  123. /deep/ .icon-search{
  124. font-size: 23px !important;
  125. color: #8E8E93 !important;
  126. }
  127. /deep/ .tm-search{
  128. width: 66%;
  129. background-color: #414141 !important;
  130. border-radius: 10px;
  131. }
  132. /deep/ .tm-search .grey-darken-5{
  133. background-color: #414141 !important;
  134. }
  135. .dingwei{width: 21%;margin-top:3%;}
  136. .shuruk{width: 77%;}
  137. .sousuo{width:94%;margin:0 auto;}
  138. .quxiao{color: #707070;line-height: 47px;}
  139. .contone{width: 48%;}
  140. .logo{width: 100%;}
  141. .remenzan{width: 18px !important;margin-top: 10px;}
  142. .more{text-align: center;}
  143. .more image{margin-right: 10px;vertical-align: middle;width: 30px;}
  144. </style>