index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view :style="{ minHeight: sys.windowHeight + 'px' }" :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
  3. <tm-menubars title="消息列表" :shadow="0" :showback="true"></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.goods_name}}</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.sale_price}}</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. typeclick:1,
  59. listdata:[],
  60. soId:'',
  61. page:1,
  62. pagesize:8
  63. };
  64. },
  65. onLoad(op) {
  66. console.log(op);
  67. this.soId=op.id
  68. },
  69. created() {
  70. this.sys = uni.getSystemInfoSync();
  71. this.randouh()
  72. this.getSort()
  73. },
  74. methods: {
  75. gengmore(){
  76. // this.randouh()
  77. },
  78. jiarufuFun(data){
  79. uni.navigateTo({
  80. url: "/pages/gouwuche/index",
  81. })
  82. // console.log(data)
  83. // this.gouwuche.push(data)
  84. },
  85. getSort(){
  86. let that=this;
  87. myRequest({
  88. url:'/api/ShopGoods/childrenClassificationList',
  89. method:'post',
  90. data:{id:that.soId,page:that.page,pagesize:that.pagesize}
  91. }).then(res=>{
  92. if(res.data.code==200){
  93. console.log(res.data.data.data,'liebiao');
  94. that.listdata=res.data.data.data;
  95. }else{
  96. that.$refs.toast.show({
  97. model: 'error',
  98. label: res.data.msg
  99. })
  100. }
  101. })
  102. },
  103. randouh(){
  104. // let list2 = [],that=this;
  105. // for(let i=0;i<8;i++){
  106. // list2.push({
  107. // image:'../../static/img/90.png',
  108. // text:'帽子',
  109. // jiage:'¥ 359.00',
  110. // xiaol:'128'
  111. // })
  112. // }
  113. // this.listdata=this.listdata.concat(list2)
  114. // console.log(this.listdata)
  115. },
  116. goindex(){
  117. uni.navigateBack();
  118. },
  119. change(e){
  120. console.log(e)
  121. },
  122. sosoFun(){
  123. }
  124. },
  125. }
  126. </script>
  127. <style lang="scss">
  128. /deep/ .tm-menubars .body{
  129. background-color: #1b1b1b !important;
  130. }
  131. /deep/ .zhuti{padding: 10px 10px;}
  132. /deep/ .kuang{margin:0 !important;padding: 0px !important;}
  133. /deep/ .icon-search{
  134. font-size: 23px !important;
  135. color: #8E8E93 !important;
  136. }
  137. /deep/ .tm-search{
  138. width: 66%;
  139. background-color: #414141 !important;
  140. border-radius: 10px;
  141. }
  142. /deep/ .tm-search .grey-darken-5{
  143. background-color: #414141 !important;
  144. }
  145. .dingwei{width: 21%;margin-top:3%;}
  146. .shuruk{width: 77%;}
  147. .sousuo{width:94%;margin:0 auto;}
  148. .quxiao{color: #707070;line-height: 47px;}
  149. .contone{width: 48%;}
  150. .logo{width: 100%;}
  151. .remenzan{width: 18px !important;margin-top: 10px;}
  152. .more{text-align: center;}
  153. .more image{margin-right: 10px;vertical-align: middle;width: 30px;}
  154. </style>