index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. onMounted(()=>{
  44. console.log('eeee 启动。。')
  45. })
  46. // #ifdef QUICKAPP-WEBVIEW-UNION
  47. qa.connectWifi({
  48. SSID: '',
  49. password: '',
  50. success(res) {
  51. console.log(res.errMsg)
  52. },
  53. fail(err){
  54. console.log(err)
  55. }
  56. })
  57. // #endif
  58. const title = ref('Hello33')
  59. const funtions = reactive([
  60. {
  61. title:'基础功能',
  62. list:[
  63. {name:'一键省电',icon:'fa-battery',bg:'#cfffcd',color:'#60b956',path:'yiJianShengDian'},
  64. {name:'声波除尘',icon:'fa-volume-control-phone',bg:'#ffd8db',color:'#fb5e53',path:'shengBoChuChen'},
  65. {name:'网络信息',icon:'fa-rss-square',bg:'#ccccfe',color:'#8370ee',path:'wangLuoXinXi'},
  66. {name:'手机测距',icon:'fa-hard-of-hearing',bg:'#80fafb',color:'#02cfdf',path:'shouJiCeJu'},
  67. {name:'WiFi管理',icon:'fa-wifi',bg:'#9ed1fe',color:'#3d9aee',path:'wifiGuanLi'},
  68. {name:'手机清理',icon:'fa-rocket',bg:'#fad2ec',color:'#ff4bb9',path:'shouJiQingLi'},
  69. {name:'精选壁纸',icon:'fa-image',bg:'#fec2f8',color:'#c95884',path:'jingXuanBiZhi'},
  70. ],
  71. },
  72. {
  73. title:'趣味测评',
  74. list:[
  75. {name:'趣味测评',icon:'fa-search',bg:'#e8ffc4',color:'#98ec05',path:'quWeiCePing'},
  76. ],
  77. },
  78. {
  79. title:'知识课堂',
  80. list:[
  81. {name:'养生课堂',icon:'fa-wheelchair',bg:'#fdd1c0',color:'#fc7f43',path:'yangShengKeTang'},
  82. {name:'运动计步',icon:'fa-wheelchair-alt',bg:'#9ce4fd',color:'#3d9afb',path:'yunDongJiBu'},
  83. {name:'字体大小',icon:'fa-text-width',bg:'#edcbfd',color:'#d617d1',path:'ziTiDaXiao'},
  84. ],
  85. }
  86. ])
  87. const goPage = ((url)=>{
  88. uni.navigateTo({
  89. url:'/pages/tools/' + url
  90. })
  91. })
  92. </script>
  93. <style lang="scss" scoped>
  94. .fnBox{
  95. padding: 20rpx;
  96. .title{
  97. font-size: 32rpx;
  98. margin: 0rpx 0 30rpx 0;
  99. font-weight: 500;
  100. }
  101. .itemBox{
  102. display: flex;
  103. white-space: pre-wrap;
  104. flex-wrap: wrap;
  105. gap: 20rpx 40rpx;
  106. .item{
  107. width: 330rpx;
  108. height: 200rpx;
  109. border: 1rpx solid #eee;
  110. border-radius: 20rpx;
  111. position: relative;
  112. .icon{
  113. }
  114. .name{
  115. position: absolute;
  116. font-size: 30rpx;
  117. font-weight: 600;
  118. letter-spacing: 2rpx;
  119. right: 50rpx;
  120. top: 40rpx;
  121. }
  122. .btn{
  123. position: absolute;
  124. background-color: skyblue;
  125. cursor: pointer;
  126. padding: 8rpx 10rpx;
  127. border-radius: 30rpx;
  128. color: #fff;
  129. font-size: 24rpx;
  130. right: 40rpx;
  131. bottom: 30rpx;
  132. }
  133. }
  134. }
  135. }
  136. </style>