index1.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <template>
  2. <view class="width-100 height-100 view-page">
  3. <view class="p-10 dis-flex flex-y-center flex-x-between">
  4. <view class="search-left-btn">
  5. <u-image width="35px" height="35px" mode="aspectFit" src="@/static/images/home/logo.png"></u-image>
  6. </view>
  7. <view class="width-100">
  8. <u-search :clearabled="true" height="35px" placeholder="请输入搜索关键字" v-model="keyword" shape="round"
  9. search="doSearch" @custom="doSearch" :showAction="false" bg-color="#e9f0f8"
  10. placeholder-color="#65371b"></u-search>
  11. </view>
  12. </view>
  13. <!-- <u-swiper height="185" :list="bannerList" @click="clickInfo" keyName="cover"></u-swiper> -->
  14. <view style="width: 100%;height: 250px;">
  15. <qiun-data-charts type="map" :opts="mapOpts" :chartData="mapDataColumn" @getIndex="clickMap" />
  16. </view>
  17. <u-tabs ref="tabs" :list="tabList" :scrollable="false" :current="currentTab" @change="tabChange" lineColor="#65371b"
  18. :activeStyle="{color:'#65371b'}" inactiveStyle="{color:'#65371b'}"></u-tabs>
  19. <view class="info-list">
  20. <view class="info-item" v-for="(item, index) in 10" :key="index">
  21. <view class="info-pic"></view>
  22. <view class="info-title">
  23. 标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import themeMixins from '@/pages/yuecai/mixins/themeMixins.js';
  31. import mapdata from '@/mockdata/mapdata.json';
  32. export default {
  33. mixins: [themeMixins],
  34. data() {
  35. return {
  36. mapOpts: {
  37. timing: "easeOut",
  38. duration: 1000,
  39. rotate: false,
  40. rotateLock: false,
  41. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
  42. padding: [0, 0, 0, 0],
  43. fontSize: 13,
  44. fontColor: "#666666",
  45. dataLabel: false,
  46. dataPointShape: true,
  47. dataPointShapeType: "solid",
  48. touchMoveLimit: 60,
  49. enableScroll: false,
  50. enableMarkLine: false,
  51. extra: {
  52. map: {
  53. border: true,
  54. borderWidth: 1,
  55. borderColor: "#666666",
  56. fillOpacity: 0.6,
  57. activeBorderColor: "#F04864",
  58. activeFillColor: "#FACC14",
  59. activeFillOpacity: 1,
  60. mercator: false,
  61. active: true,
  62. activeTextColor: "#FFFFFF"
  63. },
  64. tooltip: {
  65. showBox: true,
  66. showArrow: true,
  67. showCategory: false,
  68. borderWidth: 0,
  69. borderRadius: 0,
  70. borderColor: "#000000",
  71. borderOpacity: 0.7,
  72. bgColor: "#000000",
  73. bgOpacity: 0.7,
  74. gridType: "solid",
  75. dashLength: 4,
  76. gridColor: "#CCCCCC",
  77. boxPadding: 3,
  78. fontSize: 13,
  79. lineHeight: 20,
  80. fontColor: "#FFFFFF",
  81. legendShow: true,
  82. legendShape: "auto",
  83. splitLine: true,
  84. horizentalLine: false,
  85. xAxisLabel: false,
  86. yAxisLabel: false,
  87. labelBgColor: "#FFFFFF",
  88. labelBgOpacity: 0.7,
  89. labelFontColor: "#666666"
  90. }
  91. }
  92. },
  93. mapDataColumn: {},
  94. //
  95. chartOption: {
  96. },
  97. keyword: '',
  98. bannerList: [],
  99. page: {},
  100. list: [],
  101. tabList: [{
  102. name: '专业风采'
  103. }, {
  104. name: '名菜'
  105. }, {
  106. name: '名店',
  107. }, {
  108. name: '名点',
  109. }],
  110. currentTab: 0
  111. }
  112. },
  113. onReady() {
  114. setTimeout(() => {
  115. let md = {
  116. visualMap: {
  117. min: 800,
  118. max: 50000,
  119. text: ['High', 'Low'],
  120. realtime: false,
  121. calculable: true,
  122. inRange: {
  123. color: ['lightskyblue', 'yellow', 'orangered']
  124. }
  125. },
  126. series: mapdata.features
  127. };
  128. this.mapDataColumn = JSON.parse(JSON.stringify(md));
  129. }, 5000);
  130. },
  131. onLoad(options) {},
  132. onShow() {
  133. this.getBanners()
  134. },
  135. methods: {
  136. clickMap(e) {
  137. debugger
  138. },
  139. tabChange(index) {
  140. this.current = index;
  141. },
  142. getBanners() {
  143. this.$u.api.getInformationList(0, 6, {}).then(res => {
  144. this.bannerList = res.data.records || []
  145. })
  146. },
  147. clickInfo(index) {
  148. if (index < 0) {
  149. return;
  150. }
  151. uni.navigateTo({
  152. url: "/pages/yuecai/information/detail/index?id=" + this.bannerList[index].id,
  153. })
  154. },
  155. doSearch() {
  156. }
  157. },
  158. }
  159. </script>
  160. <style scoped lang="scss">
  161. .search-left-btn {
  162. width: 35px;
  163. min-width: 35px;
  164. height: 35px;
  165. margin-right: 5px;
  166. box-sizing: border-box;
  167. }
  168. .icon-circle {
  169. border-radius: 50%;
  170. border: 4rpx solid #65371b;
  171. display: flex;
  172. justify-content: center;
  173. align-items: center;
  174. }
  175. .nav-btns {
  176. border-bottom: 1rpx solid #65371b;
  177. margin-bottom: 20rpx;
  178. padding-bottom: 50rpx;
  179. .nav-btn {
  180. width: 150rpx;
  181. .nav-btn-icon {
  182. margin: auto;
  183. width: 110rpx;
  184. height: 110rpx;
  185. }
  186. .nav-btn-text {
  187. width: 100%;
  188. color: #65371b;
  189. margin-top: 5rpx;
  190. font-weight: bolder;
  191. text-align: center;
  192. }
  193. }
  194. }
  195. .info-list {
  196. display: flex;
  197. flex-wrap: wrap;
  198. .info-item {
  199. padding: 20rpx;
  200. width: 33%;
  201. box-sizing: border-box;
  202. .info-pic {
  203. margin: auto;
  204. width: 175rpx;
  205. height: 175rpx;
  206. background: bisque;
  207. }
  208. .info-title {
  209. text-align: center;
  210. color: #65371b;
  211. font-size: 24rpx;
  212. font-weight: 300;
  213. line-height: 47rpx;
  214. word-spacing: 2rpx;
  215. overflow: hidden;
  216. text-overflow: -o-ellipsis-lastline;
  217. overflow: hidden;
  218. text-overflow: ellipsis;
  219. display: -webkit-box;
  220. -webkit-line-clamp: 1;
  221. line-clamp: 3;
  222. -webkit-box-orient: vertical;
  223. }
  224. }
  225. }
  226. </style>