index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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"
  15. :style="{ background:`linear-gradient(to bottom, ${items.bg}, #fff)`, }"
  16. v-for="(items,indexs) in item.list">
  17. <view class="icon">
  18. </view>
  19. <view class="name"
  20. :style="{ color:`${items.color}`, }">
  21. {{ items.name }}
  22. </view>
  23. <view class="btn flex" @click="goPage(items.path)"
  24. :style="{ background:`${items.color}`, }"
  25. >
  26. 立即使用<text style="transform: scale(0.6);">▶</text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script setup>
  34. import { ref, reactive, onMounted } from "vue";
  35. const title = ref('Hello33')
  36. const funtions = reactive([
  37. {
  38. title:'基础功能',
  39. list:[
  40. {name:'一键省电',icon:'',bg:'#cfffcd',color:'#60b956',path:'yiJianShengDian'},
  41. {name:'声波除尘',icon:'',bg:'#ffd8db',color:'#fb5e53',path:'shengBoChuChen'},
  42. {name:'网络信息',icon:'',bg:'#ccccfe',color:'#8370ee',path:'wangLuoXinXi'},
  43. {name:'手机测距',icon:'',bg:'#80fafb',color:'#02cfdf',path:'shouJiCeJu'},
  44. {name:'WiFi管理',icon:'',bg:'#9ed1fe',color:'#3d9aee',path:'wifiGuanLi'},
  45. {name:'手机清理',icon:'',bg:'#fad2ec',color:'#ff4bb9',path:'shouJiQingLi'},
  46. {name:'精选壁纸',icon:'',bg:'#fec2f8',color:'#c95884',path:'jingXuanBiZhi'},
  47. ],
  48. },
  49. {
  50. title:'趣味测评',
  51. list:[
  52. {name:'趣味测评',icon:'',bg:'#e8ffc4',color:'#98ec05',path:'quWeiCePing'},
  53. ],
  54. },
  55. {
  56. title:'知识课堂',
  57. list:[
  58. {name:'养生课堂',icon:'',bg:'#fdd1c0',color:'#fc7f43',path:'yangShengKeTang'},
  59. {name:'运动计步',icon:'',bg:'#9ce4fd',color:'#3d9afb',path:'yunDongJiBu'},
  60. {name:'字体大小',icon:'',bg:'#edcbfd',color:'#d617d1',path:'ziTiDaXiao'},
  61. ],
  62. }
  63. ])
  64. const goPage = ((url)=>{
  65. uni.navigateTo({
  66. url:'/pages/tools/' + url
  67. })
  68. })
  69. </script>
  70. <style lang="scss" scoped>
  71. .fnBox{
  72. padding: 20rpx;
  73. .title{
  74. font-size: 32rpx;
  75. margin: 0rpx 0 30rpx 0;
  76. font-weight: 500;
  77. }
  78. .itemBox{
  79. display: flex;
  80. white-space: pre-wrap;
  81. flex-wrap: wrap;
  82. gap: 20rpx 40rpx;
  83. .item{
  84. width: 330rpx;
  85. height: 200rpx;
  86. border: 1rpx solid #eee;
  87. border-radius: 20rpx;
  88. position: relative;
  89. .icon{
  90. }
  91. .name{
  92. position: absolute;
  93. font-size: 30rpx;
  94. font-weight: 600;
  95. letter-spacing: 2rpx;
  96. right: 50rpx;
  97. top: 40rpx;
  98. }
  99. .btn{
  100. position: absolute;
  101. background-color: skyblue;
  102. cursor: pointer;
  103. padding: 8rpx 10rpx;
  104. border-radius: 30rpx;
  105. color: #fff;
  106. font-size: 24rpx;
  107. right: 40rpx;
  108. bottom: 30rpx;
  109. }
  110. }
  111. }
  112. }
  113. </style>