index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <view class="content">
  3. <view class="p-rel">
  4. <image class="h-350 bg-999 mgb-20 w" mode="scaleToFill"
  5. src="/static/image/index_banner.jpg"></image>
  6. <view class="p-abs left-40 bottom-100 text-52 text-b text-2283ee">发现无限可能</view>
  7. <view class="p-abs left-40 bottom-60 text-20">尽在功能广场 享受更多可能性</view>
  8. </view>
  9. <view class="fnBox" v-for="(item,index) in funtions">
  10. <view class="title">
  11. {{ item.title }}
  12. </view>
  13. <view class="itemBox">
  14. <view class="item p-rel"
  15. :style="{ background:`linear-gradient(to bottom, ${items.bg}, #fff)`, }"
  16. v-for="(items,indexs) in item.list">
  17. <view class="icon">
  18. <!-- <image class="w-100 h-100 p-abs left-20 radio-10"
  19. style="top: -14rpx;" src="../../static/logo.png"></image> -->
  20. <i :class="`fas ${items.icon} p-abs left-20 radio-10`"
  21. :style="`font-size: 46px;color:${ items.color };top:-7px;`"></i>
  22. </view>
  23. <view class="shadow p-abs bottom-90 left-10 w-60"
  24. :style="`box-shadow: 15px 15px 15px 2px ${items.color}90;height: 2px;border-radius: 30rpx;`"
  25. >
  26. </view>
  27. <view class="name"
  28. :style="{ color:`${items.color}`, }">
  29. {{ items.name }}
  30. </view>
  31. <view class="btn flex" @click="goPage(items.path)"
  32. :style="{ background:`${items.color}`, }"
  33. >
  34. 立即使用<text style="transform: scale(0.6);">▶</text>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script setup>
  42. import { ref, reactive, onMounted } from "vue";
  43. const title = ref('Hello33')
  44. const funtions = reactive([
  45. {
  46. title:'基础功能',
  47. list:[
  48. {name:'一键省电',icon:'fa-battery',bg:'#cfffcd',color:'#60b956',path:'yiJianShengDian'},
  49. {name:'声波除尘',icon:'fa-volume-control-phone',bg:'#ffd8db',color:'#fb5e53',path:'shengBoChuChen'},
  50. {name:'网络信息',icon:'fa-rss-square',bg:'#ccccfe',color:'#8370ee',path:'wangLuoXinXi'},
  51. {name:'手机测距',icon:'fa-hard-of-hearing',bg:'#80fafb',color:'#02cfdf',path:'shouJiCeJu'},
  52. {name:'WiFi管理',icon:'fa-wifi',bg:'#9ed1fe',color:'#3d9aee',path:'wifiGuanLi'},
  53. {name:'手机清理',icon:'fa-rocket',bg:'#fad2ec',color:'#ff4bb9',path:'shouJiQingLi'},
  54. {name:'精选壁纸',icon:'fa-image',bg:'#fec2f8',color:'#c95884',path:'jingXuanBiZhi'},
  55. ],
  56. },
  57. {
  58. title:'趣味测评',
  59. list:[
  60. {name:'趣味测评',icon:'fa-search',bg:'#e8ffc4',color:'#98ec05',path:'quWeiCePing'},
  61. ],
  62. },
  63. {
  64. title:'知识课堂',
  65. list:[
  66. {name:'养生课堂',icon:'fa-wheelchair',bg:'#fdd1c0',color:'#fc7f43',path:'yangShengKeTang'},
  67. {name:'运动计步',icon:'fa-wheelchair-alt',bg:'#9ce4fd',color:'#3d9afb',path:'yunDongJiBu'},
  68. {name:'字体大小',icon:'fa-text-width',bg:'#edcbfd',color:'#d617d1',path:'ziTiDaXiao'},
  69. ],
  70. }
  71. ])
  72. const goPage = ((url)=>{
  73. uni.navigateTo({
  74. url:'/pages/tools/' + url
  75. })
  76. })
  77. </script>
  78. <style lang="scss" scoped>
  79. .fnBox{
  80. padding: 20rpx;
  81. .title{
  82. font-size: 32rpx;
  83. margin: 0rpx 0 30rpx 0;
  84. font-weight: 500;
  85. }
  86. .itemBox{
  87. display: flex;
  88. white-space: pre-wrap;
  89. flex-wrap: wrap;
  90. gap: 20rpx 40rpx;
  91. .item{
  92. width: 330rpx;
  93. height: 200rpx;
  94. border: 1rpx solid #eee;
  95. border-radius: 20rpx;
  96. position: relative;
  97. .icon{
  98. }
  99. .name{
  100. position: absolute;
  101. font-size: 30rpx;
  102. font-weight: 600;
  103. letter-spacing: 2rpx;
  104. right: 50rpx;
  105. top: 40rpx;
  106. }
  107. .btn{
  108. position: absolute;
  109. background-color: skyblue;
  110. cursor: pointer;
  111. padding: 8rpx 10rpx;
  112. border-radius: 30rpx;
  113. color: #fff;
  114. font-size: 24rpx;
  115. right: 40rpx;
  116. bottom: 30rpx;
  117. }
  118. }
  119. }
  120. }
  121. </style>