index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <view :style="{ minHeight: sys.windowHeight + 'px' }"
  3. :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
  4. <tm-menubars title="详情" :shadow="0" :showback="true"></tm-menubars>
  5. <image class="touimg" src="/static/img/91.png" mode="widthFix"></image>
  6. <view class="qiehuancla">
  7. <view :class="index==0?'border':'border1'" class="da" @click="qiehuan(0)">
  8. <image class="xiaoimg" src="/static/img/92.png"></image>
  9. <image v-if="index==0" class="sanjiao" src="/static/img/93.png" mode="widthFix"></image>
  10. </view>
  11. <view :class="index==1?'border':'border1'" class="da" @click="qiehuan(1)">
  12. <image class="xiaoimg" src="/static/img/92.png"></image>
  13. <image v-if="index==1" class="sanjiao" src="/static/img/93.png" mode="widthFix"></image>
  14. </view>
  15. <view :class="index==2?'border':'border1'" class="da" @click="qiehuan(2)">
  16. <image class="xiaoimg" src="/static/img/92.png"></image>
  17. <image v-if="index==2" class="sanjiao" src="/static/img/93.png" mode="widthFix"></image>
  18. </view>
  19. <view :class="index==3?'border':'border1'" class="da" @click="qiehuan(3)">
  20. <image class="xiaoimg" src="/static/img/92.png"></image>
  21. <image v-if="index==3" class="sanjiao" src="/static/img/93.png" mode="widthFix"></image>
  22. </view>
  23. <view :class="index==4?'border':'border1'" class="da" @click="qiehuan(4)">
  24. <image class="xiaoimg" src="/static/img/92.png"></image>
  25. <image v-if="index==4" class="sanjiao" src="/static/img/93.png" mode="widthFix"></image>
  26. </view>
  27. <view style="clear: both;"></view>
  28. </view>
  29. <tm-sheet class="contzui">
  30. <div class="zhuti">
  31. <view class="text-white">BALENCIAGA / adidas TRIPLE S男士运动鞋</view>
  32. <view class="text-gray text-size-m mt-20">adidas 白色、黑色和灰色双层泡沫和网布 Triple S 运动鞋是与 adidas 携手推出的合作款。</view>
  33. <view class="shoucang mt-30 fr">
  34. <view class="fl di mr-20" @click="shouc">
  35. <tm-translate ref="a_3" :auto="true" :duration="80" animation-name="zoomIn">
  36. <image :src="shoucangsrc?'/static/img/15.png':'/static/img/8.png'" mode="widthFix" style="margin-right: 15px;"></image>
  37. </tm-translate>
  38. </view>
  39. <view class="fl di" @click="zan">
  40. <tm-translate ref="a_2" :auto="true" :duration="80" animation-name="zoomIn">
  41. <image :src="dianzan?'/static/img/16.png':'/static/img/9.png'" mode="widthFix" style="margin-right: 15px;"></image>
  42. </tm-translate>
  43. </view>
  44. </view>
  45. <view style="clear: both;"></view>
  46. </div>
  47. </tm-sheet>
  48. <tm-sheet :padding="[0, 0]" class="jiaoxi">
  49. <view class="zhuti shangpin">
  50. <view class="mb-30 mt-20 text-white">商品</view>
  51. <tm-cartCellListFood v-on:jiaruFun="jiarufuFun" v-for="item in test" :typeclick="typeclick" :mdata="item" :cart-num.sync="item.buy"></tm-cartCellListFood>
  52. </view>
  53. </tm-sheet>
  54. <!-- 弹出层消息 -->
  55. <tm-message ref="toast"></tm-message>
  56. </view>
  57. </template>
  58. <script>
  59. import{myRequest} from '@/api/request.js'
  60. export default {
  61. data() {
  62. return {
  63. index:0,
  64. shoucangsrc:true,
  65. dianzan:true,
  66. test: [{
  67. img: '../../static/img/83.png',
  68. title: '丝缎质感纹理风衣',
  69. label: '黑色 - 6518/320',
  70. id: 3,
  71. buy: 0,
  72. itemId: 0
  73. },{
  74. img: '../../static/img/84.png',
  75. title: '产品3(任选)',
  76. label: '这个产品是只有几个融会',
  77. id: 3,
  78. buy: 0,
  79. itemId: 0
  80. },{
  81. img: '../../static/img/83.png',
  82. title: '产品3(任选)',
  83. label: '这个产品是只有几个融会',
  84. id: 3,
  85. buy: 0,
  86. itemId: 0
  87. }],
  88. typeclick:3,//1加入购物车,2购物车,3详情
  89. };
  90. },
  91. onLoad() {
  92. },
  93. created() {
  94. this.sys = uni.getSystemInfoSync();
  95. },
  96. methods: {
  97. jiarufuFun(data){
  98. uni.navigateTo({
  99. url: "/pages/shopdetail/index",
  100. })
  101. console.log(data)
  102. // this.gouwuche.push(data)
  103. },
  104. shouc(){
  105. this.shoucangsrc=! this.shoucangsrc;
  106. this.$refs.a_3.play()
  107. },
  108. zan(){
  109. this.dianzan=! this.dianzan;
  110. this.$refs.a_2.play()
  111. },
  112. qiehuan(index){
  113. this.index=index;
  114. }
  115. },
  116. }
  117. </script>
  118. <style lang="scss">
  119. /deep/ .tm-menubars .body{
  120. background-color: #1b1b1b !important;
  121. }
  122. /deep/ .zhuti{padding: 10px 10px;}
  123. /deep/ .kuang{margin:0 !important;padding: 0px !important;}
  124. .touimg{width: 100%;display: block;}
  125. .qiehuancla{width: 100%;}
  126. .xiaoimg{width: 100%;height: 55px;display: block;}
  127. .qiehuancla .da{width: 19.4%;float: left;height: 55px;position:relative;}
  128. .border{border: 1px solid #0178FD;}
  129. .border1{border: 1px solid #0D0D0D;}
  130. .sanjiao{width: 18px;height: 18px;position: absolute;top: -10px;left:39%;}
  131. .shoucang image{width: 45px;}
  132. .qiehuan{float: right;}
  133. .qiehuan .a_1{margin-top: 25%;}
  134. .qiehuan .anniu{width: 20px;height: 20px !important;}
  135. .di{background: #0D0D0D;width: 45px;height: 45px;text-align: center;line-height: 50px;border-radius: 30px;}
  136. .di image{width: 22px;margin: 0 !important;height: 20px !important;}
  137. .contzui{margin:0;}
  138. /deep/ .shangpin .white.bk{background-color:#1b1b1b!important;}
  139. /deep/ .shangpin .tm-cartCellListFood{padding: 0px 10px 15px 10px !important;
  140. margin-top: 5px !important;margin-bottom: 20px !important;
  141. border-bottom: 1px solid #303030;}
  142. /deep/ .shangpin .border-t-1.bk{border-top:1px solid #1B1B1B!important;}
  143. /deep/ .shangpin .round-3{width:110px !important;height:110px !important;}
  144. /deep/ .shangpin .tm-cartCellListFood-img{width:110px !important;height:110px !important;}
  145. .fudong{position: fixed;right:30px;bottom:80px;background: #0DABF2;width: 60px;height:60px;
  146. border-radius: 30px;text-align: center;}
  147. /deep/ .shangpin .title{color: white !important;font-size: 16px;}
  148. /deep/ .shangpin .text-red{color: white !important;}
  149. .jiaoxi{margin: 0px;margin-top: 15px;}
  150. /deep/ .shangpin .tm-cartCellListFood-label{font-size: 14px;color: white !important;margin-top: 10px !important;}
  151. </style>