index-副本.vue 13 KB

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