index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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">
  5. <tm-search v-model="soso" color="white" confirm-text="">
  6. <!-- <template #right>
  7. <view class="xiangji">
  8. <image src="/static/img/xiangji.png" mode="widthFix"></image>
  9. </view>
  10. </template> -->
  11. </tm-search>
  12. <view class="dingwei">
  13. <image style="vertical-align: middle;" src="/static/img/dingwei.png" mode="widthFix"></image>
  14. <text style="vertical-align: middle;" class="text-size-g">北京Beijing</text>
  15. </view>
  16. </view>
  17. <view class="zhuti mt-50">
  18. <tm-grid :grid="5" :list="list3" :icon-size="140" font-color="white"></tm-grid>
  19. <!-- 今日穿搭 -->
  20. <tm-sheet class="lunbo">
  21. <view class="py-10 text-size-g dianz">
  22. <image src="/static/img/6.png" mode="widthFix"></image>
  23. <text class="text-white">今日穿搭推荐</text>
  24. </view>
  25. <view class="mt-20 text-size-g">
  26. <view class="text-white">
  27. 西装夹克高级感穿搭 | 彰显
  28. <view class="qiehuan">
  29. <tm-translate class="fl a_1" :auto="true" ref="a_1" :duration="80" animation-name="zoomIn">
  30. <image v-if="current==0" class="anniu mr-10" src="/static/img/14.png" mode="widthFix"></image>
  31. <image v-if="current!=0" @click="xia()" class="anniu mr-10" src="/static/img/12.png" mode="widthFix"></image>
  32. </tm-translate>
  33. <tm-swiper class="tu fl" :previmage="false" :noSwiping="true" :height="220" :width="250" :current="current" :margin="8" :autoplay="false" :list="list"></tm-swiper>
  34. <tm-translate class="fl a_1" :auto="true" ref="a_5" :duration="80" animation-name="zoomIn">
  35. <image v-if="current<(list.length-1)" @click="shang()" class="anniu fl ml-10" src="/static/img/13.png" mode="widthFix"></image>
  36. <image v-if="current>(list.length-2)" class="anniu fl ml-10" src="/static/img/11.png" mode="widthFix"></image>
  37. </tm-translate>
  38. </view>
  39. </view>
  40. <view class="text-white">秋冬复古型男典范</view>
  41. </view>
  42. <view class="touxiang mt-30">
  43. <image src="/static/img/7.png" mode="widthFix"></image>
  44. <text class="text-white text-size-m">可樂crys</text>
  45. </view>
  46. <view class="shoucang mt-30">
  47. <view class="fl di mr-20" @click="shouc">
  48. <tm-translate ref="a_3" :auto="true" :duration="80" animation-name="zoomIn">
  49. <image :src="shoucangsrc?'/static/img/15.png':'/static/img/8.png'" mode="widthFix" style="margin-right: 15px;"></image>
  50. </tm-translate>
  51. </view>
  52. <view class="fl di" @click="zan">
  53. <tm-translate ref="a_2" :auto="true" :duration="80" animation-name="zoomIn">
  54. <image :src="dianzan?'/static/img/16.png':'/static/img/9.png'" mode="widthFix" style="margin-right: 15px;"></image>
  55. </tm-translate>
  56. </view>
  57. <view style="clear: both;"></view>
  58. </view>
  59. </tm-sheet>
  60. <!-- 明日计划 -->
  61. <tm-sheet class="lunbo1">
  62. <view class="py-10 text-size-g dianz mingri">
  63. <image src="/static/img/17.png" mode="widthFix"></image>
  64. <text class="text-white">明日计划</text>
  65. </view>
  66. <view class="mt-20 text-size-g jihua">
  67. <tm-translate class="a_1" ref="a_6" :auto="true" :duration="80" animation-name="zoomIn">
  68. <image @click="jihuashang()" class="anniu mr-10" src="/static/img/18.png" mode="widthFix"></image>
  69. </tm-translate>
  70. <view class="bbb">
  71. <tm-swiper class="aaa" :previmage="false" :noSwiping="true" :current="current1" :autoplay="false" :list="list1"></tm-swiper>
  72. </view>
  73. <tm-translate class="a_1" ref="a_4" :auto="true" :duration="80" animation-name="zoomIn" style="right: 0px;">
  74. <image @click="jihuaxia()" class="anniu mr-10" src="/static/img/19.png" mode="widthFix"></image>
  75. </tm-translate>
  76. <view style="clear: both;"></view>
  77. </view>
  78. </tm-sheet>
  79. <!-- 热门穿搭 -->
  80. <tm-sheet class="lunbo1" style="margin-bottom: 70px !important;">
  81. <view class="py-10 text-size-g dianz mingri">
  82. <image src="/static/img/24.png" mode="widthFix"></image>
  83. <text class="text-white">热门穿搭</text>
  84. </view>
  85. <view class="text-size-g jihua remen">
  86. <view style="width: 48%;" class="fl">
  87. <view v-for="(item,index) in listdata" v-if="index%2==0" class="round-3 shadow-2 overflow pa-10 mt-20" :class="[$tm.vx.state().tmVuetify.black ? 'black' : 'white']">
  88. <image class="logo" :src="item.image" mode="widthFix"></image>
  89. <view class="pa-10 text-size-s">
  90. <view class="text-overflow-2">
  91. <text>{{item.text}}</text>
  92. </view>
  93. <view class="mt-24 flex-between flex-center">
  94. <view class="touxiang mt-30">
  95. <image src="/static/img/7.png" mode="widthFix"></image>
  96. <text class="text-white text-size-m">可樂crys</text>
  97. </view>
  98. <view >
  99. <!-- <tm-translate ref="a_2" :duration="80" animation-name="fadeIn"> -->
  100. <image class="remenzan" :src="dianzan1?'/static/img/29.png':'/static/img/9.png'" mode="widthFix"></image>
  101. <!-- </tm-translate> -->
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view style="width: 46%;" class="fr">
  108. <view style="width: 100%;" class="fr round-3 shadow-2 overflow pa-10 mt-20" :class="[$tm.vx.state().tmVuetify.black ? 'black' : 'white']">
  109. <view class="py-10 text-size-m dianz mingri">
  110. <text style="vertical-align: middle;" class="text-white">销量飙升榜</text>
  111. <image style="width: 25px;margin-left: 8px;" src="/static/img/36.png" mode="widthFix"></image>
  112. </view>
  113. <view class="py-10 text-size-s dianz mingri">
  114. <text class="text-white">亿万新品趋势洞察</text>
  115. </view>
  116. <view class="mt-10" v-for="item in list2">
  117. <image class="chuandaimg fl" :src="item.img" mode="widthFix"></image>
  118. <view class="chuandazi fr">
  119. <view class="text-size-m text-weight-b text-overflow-2">{{item.title}}</view>
  120. <view class="tm-cartCellListFood-label text-size-s text-grey py-8">{{item.text}}</view>
  121. <image class="gengduo fr" src="/static/img/40.png" mode="widthFix"></image>
  122. </view>
  123. <view style="clear: both;"></view>
  124. </view>
  125. </view>
  126. <view style="clear: both;"></view>
  127. <view v-for="(item,index) in listdata" v-if="index%2==1" class="round-3 shadow-2 overflow pa-10 mt-20" :class="[$tm.vx.state().tmVuetify.black ? 'black' : 'white']">
  128. <image class="logo" :src="item.image" mode="widthFix"></image>
  129. <view class="pa-10 text-size-s">
  130. <view class="text-overflow-2">
  131. <text>{{item.text}}</text>
  132. </view>
  133. <view class="mt-24 flex-between flex-center">
  134. <view class="touxiang mt-30">
  135. <image src="/static/img/7.png" mode="widthFix"></image>
  136. <text class="text-white text-size-m">可樂crys</text>
  137. </view>
  138. <view >
  139. <!-- <tm-translate ref="a_7" :duration="80" animation-name="fadeIn"> -->
  140. <image class="remenzan" :src="dianzan1?'/static/img/29.png':'/static/img/9.png'" mode="widthFix"></image>
  141. <!-- </tm-translate> -->
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. <view style="clear: both;" class="more ma-40 pt-40" @click="gengmore()">
  148. <image src="/static/img/30.png" mode="widthFix"></image>
  149. <text class="text-size-s">下拉加载更多~</text>
  150. </view>
  151. </view>
  152. </tm-sheet>
  153. </view>
  154. </view>
  155. </template>
  156. <script>
  157. import{myRequest} from '@/api/request.js'
  158. export default {
  159. data() {
  160. return {
  161. soso:'',
  162. aab:false,
  163. shoucangsrc:true,
  164. dianzan:true,
  165. dianzan1:true,
  166. list3:[
  167. {icon:'/static/img/1.png',text:'预约家政'},
  168. {icon:'/static/img/2.png',text:'预约服务'},
  169. {icon:'/static/img/3.png',text:'自助录入'},
  170. {icon:'/static/img/4.png',text:'鞋服洗护'},
  171. {icon:'/static/img/5.png',text:'闲置交换'},
  172. ],
  173. top: 60,
  174. sys: null,
  175. list2:[{
  176. img:'/static/img/39.png',
  177. title:'单品推荐',
  178. text:'3.9万人追捧'
  179. },{
  180. img:'/static/img/37.png',
  181. title:'单品推荐',
  182. text:'3.9万人追捧'
  183. },{
  184. img:'/static/img/38.png',
  185. title:'单品推荐',
  186. text:'3.9万人追捧'
  187. }],
  188. list:[
  189. '/static/img/10.png',
  190. '/static/img/10.png',
  191. '/static/img/10.png',
  192. '/static/img/10.png',
  193. '/static/img/10.png',
  194. '/static/img/10.png',
  195. ],
  196. list1:[
  197. {src:'/static/img/20.png',title:'开会'},
  198. {src:'/static/img/21.png',title:'聚餐'},
  199. {src:'/static/img/22.png',title:'运动'},
  200. {src:'/static/img/23.png',title:'娱乐'},
  201. {src:'/static/img/20.png',title:'开会'},
  202. {src:'/static/img/21.png',title:'聚餐'},
  203. {src:'/static/img/22.png',title:'运动'},
  204. ],
  205. current:0,
  206. current1:0,
  207. listdata:[]
  208. };
  209. },
  210. onLoad() {
  211. // #ifdef MP
  212. this.top = uni.upx2px(150);
  213. // #endif
  214. },
  215. created() {
  216. var that=this;
  217. setTimeout(function(){
  218. console.log(1111)
  219. // if(uni.getStorageSync("token")==""){
  220. // uni.redirectTo({
  221. // url:"/pages/login/index"
  222. // })
  223. // }
  224. // that.$refs.a_2.play();
  225. // that.$refs.a_3.play();
  226. // that.$refs.a_1.play();
  227. // that.$refs.a_5.play();
  228. },1000)
  229. this.sys = uni.getSystemInfoSync();
  230. this.randouh()
  231. },
  232. methods: {
  233. gengmore(){
  234. this.randouh()
  235. },
  236. itemClick(e){
  237. console.log(e);
  238. uni.$tm.toast(e.dirIndex+':'+e.childrenIndex)
  239. },
  240. randouh(){
  241. let list2 = [],that=this;
  242. for(let i=0;i<8;i++){
  243. list2.push({
  244. image:'../../static/img/25.png',
  245. text:'西装穿搭 | 韩系又A又飒休闲西装 高级感'
  246. })
  247. }
  248. this.listdata=this.listdata.concat(list2)
  249. console.log(this.listdata)
  250. },
  251. jihuashang(){
  252. if(this.current1 ==0){
  253. return
  254. }
  255. this.$refs.a_6.play()
  256. this.current1=this.current1-1;
  257. },
  258. jihuaxia(){
  259. if(this.current1 > (this.list1.length-5)){
  260. return
  261. }
  262. this.$refs.a_4.play()
  263. this.current1=this.current1+1;
  264. },
  265. shouc(){
  266. this.shoucangsrc=! this.shoucangsrc;
  267. this.$refs.a_3.play()
  268. },
  269. zan(){
  270. this.dianzan=! this.dianzan;
  271. this.$refs.a_2.play()
  272. },
  273. shang(){
  274. this.$refs.a_5.play()
  275. this.current=this.current+1;
  276. },
  277. xia(){
  278. this.$refs.a_1.play()
  279. this.current=this.current-1;
  280. }
  281. },
  282. }
  283. </script>
  284. <style lang="scss">
  285. /deep/ .tm-menubars .body{
  286. background-color: #1b1b1b !important;
  287. }
  288. /deep/ .aaa uni-image{
  289. width: 52px !important;
  290. height: 52px !important;
  291. }
  292. /deep/ .aaa uni-swiper-item{
  293. width: 55px !important;
  294. height: 80px !important;
  295. padding: 0 5px !important;
  296. }
  297. .xiangji image{
  298. width: 30px;
  299. height: 22px;
  300. }
  301. .suosou image{
  302. width: 40px;
  303. }
  304. /deep/ .icon-search{
  305. font-size: 23px !important;
  306. color: #8E8E93 !important;
  307. }
  308. /deep/ .tm-search{
  309. width: 94%;
  310. margin: 0 auto;
  311. background-color: #414141 !important;
  312. border-radius: 10px;
  313. }
  314. /deep/ .tm-search .grey-darken-5{
  315. background-color: #414141 !important;
  316. }
  317. .dingwei{width: 92%;margin: 0 auto;margin-top: 20px;padding-bottom: 20px;}
  318. .dingwei image{width: 25px;margin-right: 10px; }
  319. /deep/ .tm-col{width: 20% !important;}
  320. .zhuti{padding: 10px 10px;}
  321. /deep/ .lunbo{margin:0 !important;padding: 8px !important;margin-top: 50px !important;}
  322. .dianz image{width: 35px;vertical-align: middle;margin-right: 10px;}
  323. /deep/ .text-size-s span,/deep/ .text-size-g{font-size: 15px;}
  324. .touxiang image{width: 40px;margin-right: 10px;vertical-align: middle;}
  325. .shoucang image{width: 45px;}
  326. .qiehuan{float: right;}
  327. .qiehuan .a_1{margin-top: 25%;}
  328. .qiehuan .anniu{width: 20px;height: 20px !important;}
  329. .di{background: #0D0D0D;width: 45px;height: 45px;text-align: center;line-height: 50px;border-radius: 30px;}
  330. .mingri image{width: 30px;margin-right: 12px;}
  331. .di image{width: 22px;margin: 0 !important;height: 20px !important;}
  332. .jihua image{width: 30px;height: 30px;}
  333. .jihua{position: relative;}
  334. .jihua .a_1{position: absolute;top: 10%;}
  335. .bbb{width: 75% !important;margin: 0 auto !important;}
  336. /deep/ .bbb uni-swiper{width: 100% !important;height: 90px !important;}
  337. /deep/ .bbb .flex-start{background:rgba(0, 0, 0, 0) !important;padding: 0 !important;width: 100% !important;text-align: center;margin-top: 30px;}
  338. /deep/ .lunbo1{margin:0 !important;padding: 8px !important;margin-top: 20px !important;}
  339. .remenzan{width: 18px !important;margin-top: 10px;}
  340. .remen .logo{width: 100%;}
  341. .more{text-align: center;}
  342. .more image{margin-right: 10px;vertical-align: middle;}
  343. .chuandaimg{width: 50% !important;}
  344. .chuandazi{width: 48% !important;}
  345. /deep/ .lunbo1 .fulled{width: 100% !important;}
  346. /deep/ .gengduo{width: 30px !important;margin-top: 10px !important;}
  347. </style>