index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view class="index-body">
  3. <swiper
  4. :autoplay="swiper.autoplay"
  5. :circular="true"
  6. class="swipr-box"
  7. :duration="swiper.duration"
  8. :easingFunction="swiper.easing"
  9. :indicatorActiveColor="swiper.activeColor"
  10. :indicatorColor="swiper.color"
  11. :indicatorDots="swiper.indicatorDots"
  12. :interval="swiper.interval"
  13. :nextMargin="swiper.lrmargin"
  14. :previousMargin="swiper.lrmargin"
  15. >
  16. <swiper-item class="seiper-smbox" v-for="(item, index) in imgUrls" :key="index">
  17. <navigator hoverClass="none" openType="navigate" :url="item.openpath">
  18. <image class="slide-image" :src="item.img"></image>
  19. </navigator>
  20. </swiper-item>
  21. </swiper>
  22. <view class="recommend-box">
  23. <view class="recommend-smbox">
  24. <view class="col-1" v-for="(item, index) in recommend" :key="index">
  25. <navigator hoverClass="none" openType="navigate" :url="item.openpath">
  26. <view class="ta-c">
  27. <image class="listimg" :src="item.img"></image>
  28. </view>
  29. <view class="fs26 fc52 ta-c">
  30. {{ item.text }}
  31. </view>
  32. </navigator>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="ad-index">
  37. <view class="ad-df">
  38. <ad class="ad-df" unitId="adunit-df4f5438f700d506"></ad>
  39. </view>
  40. </view>
  41. <view class="server-box">
  42. <view class="server-smbox">
  43. <view class="server-name">
  44. <view class="server-text fc3d fs30">工具列表</view>
  45. </view>
  46. <view class="list-server">
  47. <view class="listbox" v-for="(item, index) in server" :key="index">
  48. <navigator hoverClass="none" openType="navigate" :url="item.openpath">
  49. <view>
  50. <image class="listimg" :src="item.img"></image>
  51. </view>
  52. <view class="fs26 fc52 ta-c">
  53. {{ item.text }}
  54. </view>
  55. </navigator>
  56. </view>
  57. </view>
  58. <view class="clear"></view>
  59. </view>
  60. </view>
  61. <view class="bottomLine">我是有底线的</view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. data() {
  67. return {
  68. swiper: {
  69. indicatorDots: true,
  70. autoplay: true,
  71. interval: 5000,
  72. duration: 1000,
  73. lrmargin: '40rpx',
  74. easing: 'easeInOutCubic',
  75. activeColor: '#fff',
  76. color: 'rgba(255, 255, 255, .3)'
  77. },
  78. imgUrls: [
  79. {
  80. img: '/static/images/ad/ad1.jpg',
  81. openpath: ''
  82. }
  83. ],
  84. recommend: [
  85. {
  86. img: '/static/images/toolIcon/weather.png',
  87. openpath: '../../pages/weather/weather',
  88. text: '天气'
  89. },
  90. {
  91. img: '/static/images/toolIcon/qrcode.png',
  92. openpath: '../../pages/qrcode/index',
  93. text: '生成二维码'
  94. },
  95. {
  96. img: '/static/images/toolIcon/IP.png',
  97. openpath: '../../pages/IP/IP',
  98. text: 'IP地址查询'
  99. },
  100. {
  101. img: '/static/images/toolIcon/hl.png',
  102. openpath: '../../pages/cand/index',
  103. text: '程序员黄历'
  104. }
  105. ],
  106. server: [
  107. {
  108. img: '/static/images/toolIcon/sdm.png',
  109. openpath: '../../pages/christmasHat/index/index',
  110. text: '圣诞帽'
  111. },
  112. {
  113. img: '/static/images/toolIcon/qrcode.png',
  114. openpath: '../../pages/qrcode/index',
  115. text: '生成二维码'
  116. },
  117. {
  118. img: '/static/images/toolIcon/wsyt.png',
  119. openpath: '../../pages/gojuuonn/gojuuonn',
  120. text: '五十音图'
  121. },
  122. {
  123. img: '/static/images/toolIcon/cha.png',
  124. openpath: '../../pages/pinyin/index',
  125. text: '查拼音'
  126. },
  127. {
  128. img: '/static/images/toolIcon/clac.png',
  129. openpath: '../../pages/calc/index',
  130. text: '计算器'
  131. },
  132. {
  133. img: '/static/images/toolIcon/hl.png',
  134. openpath: '../../pages/cand/index',
  135. text: '程序员黄历'
  136. },
  137. {
  138. img: '/static/images/toolIcon/gz.png',
  139. openpath: '../../pages/game/game',
  140. text: '摇骰子'
  141. },
  142. {
  143. img: '/static/images/toolIcon/sc.png',
  144. openpath: '../../pages/figure/figure',
  145. text: '身材计算'
  146. },
  147. {
  148. img: '/static/images/toolIcon/weather.png',
  149. openpath: '../../pages/weather/weather',
  150. text: '天气'
  151. },
  152. {
  153. img: '/static/images/toolIcon/IP.png',
  154. openpath: '../../pages/IP/IP',
  155. text: 'IP地址查询'
  156. },
  157. {
  158. img: '/static/images/toolIcon/MobileHome.png',
  159. openpath: '../../pages/MobileHome/MobileHome',
  160. text: '手机归属地'
  161. },
  162. {
  163. img: '/static/images/toolIcon/codePars.png',
  164. openpath: '../../pages/codePars/codePars',
  165. text: '电码查询'
  166. },
  167. {
  168. img: '/static/images/toolIcon/historyToday.png',
  169. openpath: '../../pages/historyToday/historyToday',
  170. text: '历史今天'
  171. }
  172. ]
  173. };
  174. },
  175. onLoad: function (e) {
  176. uni.showShareMenu({
  177. menus: ['shareAppMessagewx', 'shareTimeline'],
  178. withShareTicket: true
  179. });
  180. },
  181. onShow: function () {
  182. this.getADList();
  183. },
  184. onShareAppMessage: function () {
  185. return {
  186. title: '康康工具箱-一个多功能工具箱',
  187. path: 'pages/index/index'
  188. };
  189. },
  190. onShareTimeline: function () {
  191. return {
  192. title: '康康工具箱-一个多功能工具箱',
  193. imageUrl: '../../images/share.jpg'
  194. };
  195. },
  196. methods: {
  197. }
  198. };
  199. </script>
  200. <style>
  201. @import './index.css';
  202. </style>