index.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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-40">
  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. <tm-search v-model="soso" class="fr shuruk" color="white" confirm-text="" @click="sosoFun"></tm-search>
  13. </view>
  14. <view style="clear: both;"></view>
  15. </view>
  16. <view class="lunbo">
  17. <tm-swiper :previmage="false" @change="lunboFun" :list="list" :height="400" :current="current"></tm-swiper>
  18. <tm-translate class="anniu1 fl" :auto="true" ref="a_1" :duration="80" animation-name="zoomIn">
  19. <image v-if="current!=0" @click="xia()" class="qiehuan" src="/static/img/68.png" mode="widthFix"></image>
  20. </tm-translate>
  21. <tm-translate class="anniu2 fr" :auto="true" ref="a_5" :duration="80" animation-name="zoomIn">
  22. <image v-if="current<(list.length-1)" @click="shang()" class="qiehuan" src="/static/img/67.png" mode="widthFix"></image>
  23. </tm-translate>
  24. </view>
  25. <view class="zhuti">
  26. <tm-sheet :shadow="24" class="jiaoxi">
  27. <tm-grid @change="zhonglei" class="mt-20 mb-20" :grid="5" :list="list3" :icon-size="120" font-color="white"></tm-grid>
  28. </tm-sheet>
  29. <tm-sheet :shadow="24" class="jiaoxi xiao">
  30. <view class="yifu1 fl">
  31. <image src="/static/img/78.png" mode="widthFix"></image>
  32. </view>
  33. <view class="yifu2 fr">
  34. <image class="yifu21" src="/static/img/77.png" mode="widthFix"></image>
  35. <view>
  36. <image style="width:50%;" src="/static/img/75.png" mode="widthFix"></image>
  37. <image style="width:50%;" class="yifu21" src="/static/img/76.png" mode="widthFix"></image>
  38. </view>
  39. </view>
  40. <view style="clear: both;"></view>
  41. </tm-sheet>
  42. <tm-sheet :shadow="24" class="jiaoxi xiao">
  43. <tm-tabs align="center" class="qiehuan1" v-model="activeIndex" :list="list2" range-key="title"></tm-tabs>
  44. </tm-sheet>
  45. <tm-sheet :shadow="24" class="jiaoxi xiao" style="height:160px;">
  46. <tm-dragGrid :list="list1" :col="3" disabled="false" class="mt-40 mb-40 remen" :icon-size="160">
  47. <template v-slot:default="{item}">
  48. <view class="flex-center flex-col">
  49. <tm-icons :size="160" :name="item.icon" :color="item.color"></tm-icons>
  50. <text class="text-size-m text-white pt-10">{{item.text}}</text>
  51. <text class="text-size-m text-white pt-10">{{item.jie}}</text>
  52. </view>
  53. </template>
  54. </tm-dragGrid>
  55. </tm-sheet>
  56. </view>
  57. <view class="guanggao">
  58. <image style="width:100%;" src="/static/img/82.png" mode="widthFix"></image>
  59. <view class="wenzi">
  60. <view class="mt-10">额外打九折</view>
  61. <view>高达75%的折扣!</view>
  62. </view>
  63. </view>
  64. <view style="height:160px;" class="mt-40 jiage pt-40">
  65. <tm-dragGrid :list="list4" :col="3" disabled="false" class="remen" :icon-size="160">
  66. <template v-slot:default="{item}">
  67. <view class="flex-center flex-col">
  68. <tm-icons :size="200" :name="item.icon" :color="item.color"></tm-icons>
  69. <text class="text-size-m text-white pt-10">{{item.text}}</text>
  70. <text class="text-size-m text-white pt-10">{{item.jie}}</text>
  71. </view>
  72. </template>
  73. </tm-dragGrid>
  74. </view>
  75. <tm-sheet :shadow="24" class="jiaoxi xiao">
  76. <tm-tabs align="center" class="qiehuan1" v-model="activeIndex" :list="list5" range-key="title"></tm-tabs>
  77. </tm-sheet>
  78. <!-- 单品 -->
  79. <view class="zhuti shangpin">
  80. <tm-sheet :padding="[0, 0]" class="jiaoxi xiao">
  81. <tm-cartCellListFood v-on:jiaruFun="jiarufuFun" v-for="item in test" :typeclick="typeclick" :mdata="item" :cart-num.sync="item.buy"></tm-cartCellListFood>
  82. </tm-sheet>
  83. </view>
  84. <!-- <view v-if="gouwuche.length!=0" class="fudong" @click="qugowuche">
  85. <image src="../../static/img/87.png" mode="widthFix"></image>
  86. <view class="shuzigwc">{{gouwuche.length}}</view>
  87. </view> -->
  88. <view style="width:100%;height:60px;"></view>
  89. </view>
  90. </template>
  91. <script>
  92. import{myRequest} from '@/api/request.js'
  93. export default {
  94. data() {
  95. return {
  96. current:1,
  97. activeIndex:0,
  98. soso:'',
  99. addr:['江西省','南昌市','西湖区'],
  100. value:'',
  101. list:[
  102. '/static/img/66.png',
  103. '/static/img/66.png',
  104. '/static/img/66.png',
  105. '/static/img/66.png'
  106. ],
  107. list1:[
  108. {icon:'/static/img/79.png',text:'服装',jie:'Accessories'},
  109. {icon:'/static/img/80.png',text:'家具',jie:'Sunglasses'},
  110. {icon:'/static/img/81.png',text:'箱包',jie:'Suitcases'},
  111. ],
  112. list2:[ '热门','折扣'],
  113. list3:[
  114. {icon:'/static/img/69.png',text:'服装'},
  115. {icon:'/static/img/70.png',text:'家具'},
  116. {icon:'/static/img/71.png',text:'箱包'},
  117. {icon:'/static/img/72.png',text:'配饰'},
  118. {icon:'/static/img/74.png',text:'更多'},
  119. ],
  120. list4:[
  121. {icon:'/static/img/83.png',text:'双面穿千鸟格风衣',jie:'¥ 899.00'},
  122. {icon:'/static/img/84.png',text:'休闲版型风衣',jie:'¥ 899.00'},
  123. {icon:'/static/img/85.png',text:'防水双面穿风衣',jie:'¥ 899.00'},
  124. ],
  125. list5:[ '推荐单品'],
  126. test: [{
  127. img: '../../static/img/83.png',
  128. title: '丝缎质感纹理风衣',
  129. label: '黑色 - 6518/320',
  130. price: '1299',
  131. id: 3,
  132. buy: 0,
  133. itemId: 0
  134. },{
  135. img: '../../static/img/84.png',
  136. title: '产品3(任选)',
  137. label: '这个产品是只有几个融会',
  138. price: 36.2,
  139. id: 3,
  140. buy: 0,
  141. itemId: 0
  142. },{
  143. img: '../../static/img/83.png',
  144. title: '产品3(任选)',
  145. label: '这个产品是只有几个融会',
  146. price: 36.2,
  147. id: 3,
  148. buy: 0,
  149. itemId: 0
  150. }],
  151. typeclick:1,//1加入购物车,2购物车
  152. gouwuche:[],
  153. };
  154. },
  155. onLoad() {
  156. },
  157. created() {
  158. this.sys = uni.getSystemInfoSync();
  159. },
  160. methods: {
  161. lunboFun(e){
  162. this.current=e;
  163. },
  164. okCity(e){
  165. console.log(e);
  166. this.addr = e;
  167. },
  168. qugowuche(){
  169. },
  170. sosoFun(){
  171. uni.navigateTo({
  172. url: "/pages/shopsoso/index",
  173. })
  174. },
  175. shang(){
  176. this.$refs.a_5.play()
  177. this.current=this.current+1;
  178. console.log(this.current)
  179. },
  180. xia(){
  181. this.$refs.a_1.play()
  182. this.current=this.current-1;
  183. console.log(this.current)
  184. },
  185. jiarufuFun(data){
  186. uni.navigateTo({
  187. url: "/pages/gouwuche/index",
  188. })
  189. // console.log(data)
  190. // this.gouwuche.push(data)
  191. },
  192. zhonglei(e){
  193. if(e.index==4){
  194. uni.navigateTo({
  195. url: "/pages/gengduo/index",
  196. })
  197. }
  198. }
  199. },
  200. }
  201. </script>
  202. <style lang="scss">
  203. /deep/ .tm-menubars .body{
  204. background-color: #1b1b1b !important;
  205. }
  206. /deep/ .icon-search{
  207. font-size: 23px !important;
  208. color: #8E8E93 !important;
  209. }
  210. /deep/ .tm-search{
  211. width: 80%;
  212. background-color: #414141 !important;
  213. border-radius: 10px;
  214. }
  215. /deep/ .tm-search .grey-darken-5{
  216. background-color: #414141 !important;
  217. }
  218. .dingwei{width: 21%;margin-top:3%;}
  219. .shuruk{width: 77%;}
  220. .sousuo{width:94%;margin:0 auto;}
  221. .qiehuan{width:40px;height:40px;}
  222. .lunbo{position: relative;}
  223. .anniu1{position: absolute;top:0px;z-index: 9999;top:43%;left:0;}
  224. .anniu2{position: absolute;top:0px;z-index: 9999;top:43%;right:0;}
  225. /deep/ .jiaoxi{margin:0 !important;padding: 8px !important;}
  226. /deep/ .tm-col{width: 20% !important;}
  227. .yifu1{width: 40%;}
  228. .yifu2{width: 58%;}
  229. .yifu1 image,.yifu21{width: 100%;}
  230. .xiao{margin-top:15px !important;}
  231. /deep/ .qiehuan1 .text-primary{color: white !important;}
  232. .guanggao{position: relative;}
  233. .wenzi{position: absolute;bottom:1px;right:0px;background: #000000;
  234. width: 140px;
  235. height: 55px;
  236. font-size: 14px;
  237. text-align: center;
  238. }
  239. /deep/ .jiage{background: #1b1b1b;}
  240. /deep/ .shangpin .white.bk{background-color:#1b1b1b!important;}
  241. /deep/ .shangpin .tm-cartCellListFood{ padding: 0px 0px 15px 0px !important;
  242. margin-top: 5px !important;margin-bottom: 20px !important;
  243. border-bottom: 1px solid #303030;}
  244. /deep/ .shangpin .border-t-1.bk{border-top:1px solid #1b1b1b!important;}
  245. /deep/ .shangpin .round-3{width:90px !important;height:90px !important;}
  246. /deep/ .shangpin .tm-cartCellListFood-img{width:90px !important;height:90px !important;}
  247. .fudong{position: fixed;right:30px;bottom:80px;background: #0DABF2;width: 60px;height:60px;
  248. border-radius: 30px;text-align: center;}
  249. .fudong image{width:40px;margin-top: 6px;}
  250. .shuzigwc{color: white;font-weight: 700;position: absolute;right:5px;background: red;
  251. padding:2px;border-radius: 30px;top:2px;width:15px;height:15px;font-size: 12px;}
  252. /deep/ .shangpin .title{color: white !important;}
  253. /deep/ .shangpin .text-red{color: white !important;}
  254. </style>