home3.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512
  1. <template>
  2. <view class="container">
  3. <view class="header2" :style="{ height: customBarH * 2 + 'rpx', paddingTop: statusBarH * 2 + 'rpx' }" v-if="headerType">
  4. <view class="title">靖安乡村民宿</view>
  5. </view>
  6. <!-- 顶部图片区域 -->
  7. <view class="header">
  8. <swiper class="header_swiper" circular :interval="3000">
  9. <swiper-item v-for="banner in headerImgList" :key="banner.id" @click="handleClickBanner(banner)">
  10. <img mode="aspectFill" class="img" :src="banner.imageUrl" />
  11. <img mode="aspectFill" class="img2" :src="banner.logoUrl" />
  12. </swiper-item>
  13. </swiper>
  14. </view>
  15. <!-- 主体内容区域 -->
  16. <view class="content">
  17. <!-- 条件筛选区域 -->
  18. <view class="search">
  19. <!-- 选择乡镇区域 -->
  20. <view class="search_town" :class="{ active: town }" @click="handleOpen">
  21. {{ town ? town : '请选择乡镇' }}
  22. <img src="../../static/index/right2.png" />
  23. </view>
  24. <!-- 关键词搜索和民宿级别区域 -->
  25. <view class="search_center">
  26. <view class="center_input">
  27. <input type="text" v-model="keywords" placeholder="民宿/地名/关键词" placeholder-style="color:#A6A6A6;font-weight:400;" />
  28. </view>
  29. <img class="img" src="../../static/index/right2.png" />
  30. |
  31. <view class="center_level" :class="{ active: level }" @click="handleChooseLv">{{ level ? level : '请选择民宿级别' }}</view>
  32. <img class="img2" src="../../static/index/right2.png" @click="handleChooseLv" />
  33. </view>
  34. <!-- 查找按钮区域 -->
  35. <view class="search_btn" @click="handleSearch">查找</view>
  36. </view>
  37. <!-- 轮播图区域 -->
  38. <swiper class="swiper" indicator-dots circular indicator-color="#BBD8FE" indicator-active-color="#1E7DFB" autoplay interval="3000" v-if="townList.length">
  39. <swiper-item v-for="(ele, index) in townList" :key="index">
  40. <view class="swiper_item">
  41. <view class="item_box" v-for="(swi, index2) in ele" :key="index2" @click="handleChooseTown2(swi.name)">
  42. <img v-if="index === 0 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/1.png" mode="aspectFill" />
  43. <img v-if="index === 0 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/2.png" mode="aspectFill" />
  44. <img v-if="index === 0 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/3.png" mode="aspectFill" />
  45. <img v-if="index === 1 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/4.png" mode="aspectFill" />
  46. <img v-if="index === 1 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/5.png" mode="aspectFill" />
  47. <img v-if="index === 1 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/6.png" mode="aspectFill" />
  48. <img v-if="index === 2 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/7.png" mode="aspectFill" />
  49. <img v-if="index === 2 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/8.png" mode="aspectFill" />
  50. <img v-if="index === 2 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/9.png" mode="aspectFill" />
  51. <img v-if="index === 3 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/10.png" mode="aspectFill" />
  52. <img v-if="index === 3 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/11.png" mode="aspectFill" />
  53. <img v-if="index === 3 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/12.png" mode="aspectFill" />
  54. <view class="box_town">{{ swi.name }}</view>
  55. <view class="box_count">剩{{ swi.residueNumber }}间</view>
  56. </view>
  57. </view>
  58. </swiper-item>
  59. </swiper>
  60. <view class="body">
  61. <!-- 优选民宿区域 -->
  62. <uv-skeletons :loading="loading" :skeleton="skeleton">
  63. <view class="body_top" v-if="hotelList_you.length">
  64. <view class="circle"></view>
  65. <view class="circle color"></view>
  66. <view class="top_title">优选民宿 .</view>
  67. <view class="top_msg">特色优选民宿,让旅途充满乐趣</view>
  68. <view class="top_more" @click="handleGoHome">
  69. 更多
  70. <img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
  71. </view>
  72. </view>
  73. <view class="body_list">
  74. <!-- 每一个民宿区域 -->
  75. <view class="list_item" v-for="(item, index) in hotelList_you" :key="index" @click="goPageDetail(item)">
  76. <image class="item-img" :src="item.coverImg" mode="scaleToFill"></image>
  77. <view class="descrition">
  78. <text class="title">{{ item.hotel_name }}</text>
  79. <text class="type">
  80. {{ item.hTypeName }} &nbsp;&nbsp;
  81. <text class="type_level" v-if="item.type == 1">银宿级</text>
  82. <text class="type_level" v-if="item.type == 2">金宿级</text>
  83. <text class="type_level" v-if="item.type == 3">白金级</text>
  84. </text>
  85. <text class="distance" v-if="showdDistance">距您直线{{ item.distance }}公里</text>
  86. <view class="detail">
  87. <img class="img" src="../../static/index/hotel.png" />
  88. <view class="price_home">
  89. <text class="txt1">¥{{ item.min_price }}</text>
  90. <text class="txt2">起</text>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </uv-skeletons>
  97. <!-- 精选攻略区域 -->
  98. <view class="body_top" v-if="bestNewsInfo">
  99. <view class="circle"></view>
  100. <view class="circle color"></view>
  101. <view class="top_title">精选攻略 .</view>
  102. <view class="top_msg">宝藏分享社区</view>
  103. <view class="top_more" @click="handleGoPage">
  104. 更多
  105. <img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
  106. </view>
  107. </view>
  108. <view v-if="bestNewsInfo" class="body_strategy" @click="handleGoDetail(bestNewsInfo)">
  109. <img v-if="bestNewsInfo.image" class="strategy_cover" mode="aspectFill" :src="bestNewsInfo.image" />
  110. <video
  111. v-if="bestNewsInfo.video"
  112. class="strategy_cover"
  113. :src="bestNewsInfo.video"
  114. :show-center-play-btn="false"
  115. :show-fullscreen-btn="false"
  116. :show-play-btn="false"
  117. ></video>
  118. <view class="strategy_info">
  119. <view class="info_title">{{ bestNewsInfo.title }}</view>
  120. <view class="info_tags">
  121. <view class="tag">{{ bestNewsInfo.townName }}</view>
  122. </view>
  123. <view class="info_desc">
  124. {{ bestNewsInfo.content }}
  125. </view>
  126. </view>
  127. </view>
  128. <!-- 招商资讯区域 -->
  129. <view class="body_top" v-if="newsList.length">
  130. <view class="circle"></view>
  131. <view class="circle color"></view>
  132. <view class="top_title">招商资讯 .</view>
  133. <view class="top_msg">以招商引资,推动镇域经济</view>
  134. <view class="top_more" @click="handleGoNewsList">
  135. 更多
  136. <img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
  137. </view>
  138. </view>
  139. <!-- 招商资讯轮播图 -->
  140. <uni-swiper-dot :info="newsList" mode="round" :dotsStyles="dotsStyles" :current="current">
  141. <swiper circular autoplay interval="3000" class="body_news" @change="changeDot">
  142. <swiper-item v-for="item in newsList" :key="item.id" @click="handleGoNews(item)">
  143. <uv-image width="633rpx" height="332rpx" radius="8rpx" mode="aspectFill" :src="item.url" />
  144. <view class="news_title">
  145. {{ item.title ? item.title : '无标题' }}
  146. </view>
  147. <view class="news_desc">
  148. {{ item.desc }}
  149. </view>
  150. <mp-html v-if="item.showHtml" @load="htmlLoad(item)" :ref="item.id + 'html'" :content="item.content" />
  151. </swiper-item>
  152. </swiper>
  153. </uni-swiper-dot>
  154. <!-- 特产甄选区域 -->
  155. <view class="body_top" v-if="goodsList.length">
  156. <view class="circle"></view>
  157. <view class="circle color"></view>
  158. <view class="top_title">特产甄选 .</view>
  159. <view class="top_msg">明优推荐,土的自然,购的放心</view>
  160. <view class="top_more" @click="clickGoods">
  161. 更多
  162. <img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
  163. </view>
  164. </view>
  165. <view class="body_list">
  166. <!-- 每一个特产区域 -->
  167. <view class="item_goods" v-for="item in goodsList" :key="item.id" @click="to_detail(item)">
  168. <img class="goods_img" mode="aspectFill" :src="item.imgs.split(',')[0]" />
  169. <view class="goods_name">{{ item.name }}</view>
  170. <view class="goods_detail">
  171. <img class="img" src="../../static/index/goods.png" />
  172. <view class="price_good">
  173. <text class="txt1">¥{{ item.price }}</text>
  174. <text class="txt2">起</text>
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. <!-- 精选推荐区域 -->
  180. <view class="body_top" v-if="hotelList.length">
  181. <view class="circle"></view>
  182. <view class="circle color"></view>
  183. <view class="top_title">精选推荐 .</view>
  184. <view class="top_msg">线上订民宿,住着玩个遍</view>
  185. <view class="top_more" @click="handleGoHome">
  186. 更多
  187. <img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
  188. </view>
  189. </view>
  190. <view class="body_list">
  191. <!-- 每一个民宿区域 -->
  192. <view class="list_item" v-for="item in hotelList" :key="item.id" @click="goPageDetail(item)">
  193. <image class="item-img" :src="item.coverImg" mode="scaleToFill"></image>
  194. <view class="descrition">
  195. <text class="title">{{ item.hotel_name }}</text>
  196. <text class="type">
  197. {{ item.hTypeName }}
  198. <text class="type_level" v-if="item.type == 1">银宿级</text>
  199. <text class="type_level" v-if="item.type == 2">金宿级</text>
  200. <text class="type_level" v-if="item.type == 3">白金级</text>
  201. </text>
  202. <text class="distance" v-if="showdDistance">距您直线{{ item.distance }}公里</text>
  203. <view class="detail">
  204. <img class="img" src="../../static/index/hotel.png" />
  205. <view class="price_home">
  206. <text class="txt1">¥{{ item.min_price }}</text>
  207. <text class="txt2">起</text>
  208. </view>
  209. </view>
  210. </view>
  211. </view>
  212. </view>
  213. <!-- 没有数据时展示的页面 -->
  214. <view class="noData" v-if="!hotelList.length">
  215. <img src="../../static/images/noData.png" />
  216. 暂无推荐数据
  217. </view>
  218. </view>
  219. </view>
  220. <!-- 选择乡镇弹窗区域 -->
  221. <uni-popup ref="popup" type="center">
  222. <view class="popup_body">
  223. <view class="body_header">
  224. <img src="../../static/my/popup_title.png" />
  225. <view class="header_title">请选择乡镇</view>
  226. <img src="../../static/my/popup_title.png" />
  227. </view>
  228. <view class="body_content">
  229. <view class="content_box" v-for="(item, index) in popList" :key="index" @click="handleChooseTown(item.name)">
  230. <img v-if="index === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/1.png" mode="aspectFill" />
  231. <img v-if="index === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/2.png" mode="aspectFill" />
  232. <img v-if="index === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/3.png" mode="aspectFill" />
  233. <img v-if="index === 3" src="https://chtech.ncjti.edu.cn/hotelReservation/image/4.png" mode="aspectFill" />
  234. <img v-if="index === 4" src="https://chtech.ncjti.edu.cn/hotelReservation/image/5.png" mode="aspectFill" />
  235. <img v-if="index === 5" src="https://chtech.ncjti.edu.cn/hotelReservation/image/6.png" mode="aspectFill" />
  236. <img v-if="index === 6" src="https://chtech.ncjti.edu.cn/hotelReservation/image/7.png" mode="aspectFill" />
  237. <img v-if="index === 7" src="https://chtech.ncjti.edu.cn/hotelReservation/image/8.png" mode="aspectFill" />
  238. <img v-if="index === 8" src="https://chtech.ncjti.edu.cn/hotelReservation/image/9.png" mode="aspectFill" />
  239. <img v-if="index === 9" src="https://chtech.ncjti.edu.cn/hotelReservation/image/10.png" mode="aspectFill" />
  240. <img v-if="index === 10" src="https://chtech.ncjti.edu.cn/hotelReservation/image/11.png" mode="aspectFill" />
  241. <img v-if="index === 11" src="https://chtech.ncjti.edu.cn/hotelReservation/image/12.png" mode="aspectFill" />
  242. <view class="box_town">{{ item.name }}</view>
  243. <view class="box_count">剩{{ item.residueNumber }}间</view>
  244. </view>
  245. </view>
  246. </view>
  247. </uni-popup>
  248. <!-- 公告弹窗区域 -->
  249. <uv-popup ref="popup_sale" mode="center" :closeOnClickOverlay="false" bgColor="none">
  250. <view class="popupClass">
  251. <img src="../../static/index/popup_bg.png" />
  252. <!-- 立即前往区域 -->
  253. <view class="btn_text">系统处于迭代试用状态,请勿下单预订酒店,如需预订请电联店家老板确认预订渠道。</view>
  254. <!-- 关闭按钮区域 -->
  255. <view class="btn_close" @click="handleClose"></view>
  256. </view>
  257. </uv-popup>
  258. <!-- 等级介绍弹窗区域 -->
  259. <uv-popup ref="popup_level" mode="center" :closeOnClickOverlay="false" bgColor="none">
  260. <view class="popupLevel">
  261. <view class="level_header">
  262. <view class="">民宿等级</view>
  263. <view class="header_text" @click="handleCloseLevelPop">×</view>
  264. </view>
  265. <view class="level_body">
  266. 江西省民宿评定严格按照《民宿基本要求与评价(江西省省地方标准)》进行。民宿等级从高到低分为白金级、金宿级、银宿级三个等级,等级越高表示接待设施与服务品质越高。其中,白金级、金宿级由省里评定,银宿级由设区市评定。
  267. </view>
  268. <view class="level_btn">
  269. <view class="btn notip" @click="handleNoTip">不再提示</view>
  270. <view class="btn read" @click="handleCloseLevelPop">已读</view>
  271. </view>
  272. </view>
  273. </uv-popup>
  274. </view>
  275. </template>
  276. <script>
  277. export default {
  278. data() {
  279. return {
  280. // 用户定位经度
  281. myLng: 0,
  282. // 用户定位纬度
  283. myLat: 0,
  284. // 是否显示距离差
  285. showdDistance: false,
  286. // 搜索框绑定数据
  287. keywords: '',
  288. // 当前页
  289. page: 1,
  290. // 每页多少条
  291. rows: 6,
  292. // 总条数
  293. total: null,
  294. // 地区数组
  295. placeList: [
  296. {
  297. name: '靖安县'
  298. }
  299. ],
  300. // 当前选择地区索引
  301. placeIndex: 0,
  302. // 选择乡镇弹窗数据
  303. popList: [],
  304. // 精选民宿列表数组
  305. hotelList: [],
  306. // 优选民宿列表数组
  307. hotelList_you: [],
  308. // 当前乡镇
  309. town: '',
  310. // 民宿级别
  311. level: '',
  312. // 乡镇列表
  313. townList: [],
  314. // 顶部导航栏显示隐藏控制
  315. headerType: false,
  316. // 状态栏高度
  317. statusBarH: 0,
  318. // 胶囊按钮栏高度
  319. customBarH: 0,
  320. // 招商资讯列表
  321. newsList: [],
  322. // 精选攻略数据
  323. bestNewsInfo: null,
  324. // 招商资讯轮播图指示点样式
  325. dotsStyles: {
  326. backgroundColor: '#BBD8FE',
  327. selectedBackgroundColor: '#1E7DFB',
  328. border: 'none',
  329. selectedBorder: 'none'
  330. },
  331. // 招商资讯轮播图当前索引值
  332. current: 0,
  333. // 特产甄选列表
  334. goodsList: [],
  335. // 是否显示骨架屏
  336. loading: true,
  337. // 骨架屏参数
  338. skeleton: [
  339. {
  340. type: 'line',
  341. style: { height: '90rpx', marginTop: '10rpx' }
  342. },
  343. 30,
  344. {
  345. type: 'flex',
  346. num: 2,
  347. children: [
  348. {
  349. type: 'custom',
  350. style: 'width:335rpx;height:460rpx;borderRadius:18rpx'
  351. },
  352. {
  353. type: 'custom',
  354. style: 'width:335rpx;height:460rpx;borderRadius:18rpx;marginLeft:50rpx;'
  355. }
  356. ]
  357. }
  358. ],
  359. // 顶部轮播图图片数组
  360. headerImgList: []
  361. }
  362. },
  363. created() {
  364. // 获取系统信息
  365. uni.getSystemInfo({
  366. success: (e) => {
  367. // 获取状态栏高度
  368. this.statusBarH = e.statusBarHeight + 10
  369. // // 获取菜单按钮栏高度
  370. let custom = uni.getMenuButtonBoundingClientRect()
  371. this.customBarH = custom.height + 10
  372. }
  373. })
  374. },
  375. mounted() {
  376. // 开启转发功能
  377. uni.showShareMenu({
  378. withShareTicket: true,
  379. menus: ['shareAppMessage', 'shareTimeline']
  380. })
  381. },
  382. onReachBottom() {
  383. if (this.hotelList.length < this.total) {
  384. this.page++
  385. this.getHotelList_jing()
  386. } else {
  387. uni.showToast({
  388. title: '没有更多数据了',
  389. icon: 'none'
  390. })
  391. }
  392. },
  393. onPageScroll(e) {
  394. if (e.scrollTop > 100) {
  395. this.headerType = true
  396. } else {
  397. this.headerType = false
  398. }
  399. },
  400. onPullDownRefresh() {
  401. this.loading = true
  402. this.hotelList_you = []
  403. this.hotelList = []
  404. this.page = 1
  405. this.getLocation()
  406. this.getHeaderImgList()
  407. this.getResidueCount()
  408. this.getBestNews()
  409. this.getNews()
  410. this.getGoodsList()
  411. setTimeout(() => {
  412. uni.stopPullDownRefresh()
  413. }, 1000)
  414. },
  415. onLoad() {
  416. // 获取顶部轮播图数据
  417. this.getHeaderImgList()
  418. // 获取乡镇列表
  419. this.getResidueCount()
  420. // 获取定位
  421. this.getLocation()
  422. // 获取精选攻略
  423. this.getBestNews()
  424. // 获取招商资讯列表
  425. this.getNews()
  426. // 获取特产列表
  427. this.getGoodsList()
  428. let isTip = uni.getStorageSync('isTip')
  429. !isTip && this.$refs.popup_level.open()
  430. },
  431. methods: {
  432. async getHeaderImgList() {
  433. const res = await this.$myRequest({
  434. url: '/mhotel/advertiseopenList.action'
  435. })
  436. // console.log(res)
  437. if (res.code == 200) {
  438. this.headerImgList = res.data
  439. }
  440. },
  441. async getBestNews() {
  442. const res = await this.$myRequest({
  443. url: '/mhotel/articlequeryMaxArticleLike.action'
  444. })
  445. // console.log(res)
  446. if (res.code == 200) {
  447. this.bestNewsInfo = res.data
  448. }
  449. },
  450. async getNews() {
  451. const res = await this.$myRequest({
  452. url: '/mhotel/appnewlist.action',
  453. data: {
  454. page: 1,
  455. rows: 3
  456. }
  457. })
  458. // console.log(res)
  459. if (res.code === 200) {
  460. this.newsList = res.rows
  461. this.newsList.forEach((ele) => {
  462. this.$set(ele, 'showHtml', true)
  463. })
  464. }
  465. },
  466. async getGoodsList() {
  467. const res = await this.$myRequest_shop({
  468. url: '/goods/open/page',
  469. data: {
  470. curPage: 1,
  471. pageSize: 4,
  472. hot: 1,
  473. state: 1
  474. }
  475. })
  476. // console.log(res)
  477. if (res.code === '1') {
  478. this.goodsList = res.data.list
  479. }
  480. },
  481. //跳转到商城总类
  482. to_detail(options) {
  483. let userInfo = uni.getStorageSync('userInfo')
  484. let tokenId = uni.getStorageSync('tokenId')
  485. if (!userInfo || !tokenId) {
  486. uni.showModal({
  487. title: '提示',
  488. content: '您当前未登录,请授权登录查看社区信息',
  489. showCancel: false,
  490. success: (res) => {
  491. if (res.confirm) {
  492. uni.navigateTo({
  493. url: '/pages/login/login'
  494. })
  495. }
  496. }
  497. })
  498. } else {
  499. this.$api.togoods({ id: options.id })
  500. }
  501. },
  502. //跳转到特产商城
  503. clickGoods() {
  504. let userInfo = uni.getStorageSync('userInfo')
  505. let tokenId = uni.getStorageSync('tokenId')
  506. if (!userInfo || !tokenId) {
  507. uni.showModal({
  508. title: '提示',
  509. content: '您当前未登录,请授权登录查看社区信息',
  510. showCancel: false,
  511. success: (res) => {
  512. if (res.confirm) {
  513. uni.navigateTo({
  514. url: '/pages/login/login'
  515. })
  516. }
  517. }
  518. })
  519. } else {
  520. uni.navigateTo({
  521. url: '/packageShang/pages/tabbar/home'
  522. })
  523. }
  524. },
  525. // 获取用户当前位置
  526. getLocation() {
  527. uni.getSetting({
  528. success: (res) => {
  529. if (!res.authSetting['scope.userLocation']) {
  530. uni.authorize({
  531. scope: 'scope.userLocation',
  532. success: (res) => {
  533. // 授权成功
  534. uni.getLocation({
  535. type: 'gcj02',
  536. success: (res) => {
  537. this.myLat = res.latitude
  538. this.myLng = res.longitude
  539. this.showdDistance = true
  540. this.getHotelList_you()
  541. this.getHotelList_jing()
  542. }
  543. })
  544. },
  545. fail: () => {
  546. uni.showModal({
  547. content: '获取定位权限失败将会影响使用部分功能,是否去设置打开?',
  548. confirmText: '确认',
  549. cancelText: '取消',
  550. success: (res) => {
  551. if (res.confirm) {
  552. uni.openSetting({
  553. success: (res) => {
  554. console.log(res)
  555. this.getLocation()
  556. }
  557. })
  558. } else {
  559. this.showdDistance = false
  560. this.getHotelList_you()
  561. this.getHotelList_jing()
  562. uni.showToast({
  563. title: '获取定位权限失败',
  564. icon: 'none'
  565. })
  566. }
  567. }
  568. })
  569. }
  570. })
  571. } else {
  572. uni.getLocation({
  573. type: 'gcj02',
  574. success: (res) => {
  575. this.myLat = res.latitude
  576. this.myLng = res.longitude
  577. this.showdDistance = true
  578. this.getHotelList_you()
  579. this.getHotelList_jing()
  580. }
  581. })
  582. }
  583. },
  584. fail: () => {
  585. uni.showToast({
  586. title: '获取用户设置权限失败',
  587. icon: 'none',
  588. mask: true
  589. })
  590. }
  591. })
  592. },
  593. handleGoDetail(info) {
  594. let openid = uni.getStorageSync('openid')
  595. if (openid) {
  596. uni.navigateTo({
  597. url: `/pagesSub/tweetDetail/tweetDetail?id=${info.id}&townId=${info.townId}`
  598. })
  599. } else {
  600. uni.showToast({
  601. title: '请先登录',
  602. icon: 'none',
  603. mask: true
  604. })
  605. setTimeout(() => {
  606. uni.navigateTo({
  607. url: '/pages/login/login'
  608. })
  609. }, 1500)
  610. }
  611. },
  612. // 获取民宿列表 优选
  613. async getHotelList_you() {
  614. const res = await this.$myRequest({
  615. url: '/mhotel/ahppreferredPage.action',
  616. data: {
  617. page: 1,
  618. rows: 4,
  619. type: 3,
  620. userId: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo').id : ''
  621. }
  622. })
  623. // console.log(res)
  624. if (res.code === 200) {
  625. this.hotelList_you = res.data.pageList
  626. // 如果定位成功则获取和民宿之间的距离
  627. if (this.showdDistance && this.hotelList_you.length) {
  628. this.hotelList_you.forEach((ele) => {
  629. let lat = ele.hpositionWens.split(',')[0]
  630. let lng = ele.hpositionWens.split(',')[1]
  631. ele.distance = this.calculateDistance(lat, lng)
  632. })
  633. }
  634. this.loading = false
  635. }
  636. },
  637. // 获取民宿列表 精选
  638. async getHotelList_jing() {
  639. const res = await this.$myRequest({
  640. url: '/mhotel/ahpselectedPage.action',
  641. data: {
  642. page: this.page,
  643. rows: this.rows,
  644. type: 3,
  645. userId: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo').id : ''
  646. }
  647. })
  648. // console.log(res)
  649. if (res.code === 200) {
  650. this.hotelList = [...this.hotelList, ...res.data.pageList]
  651. this.total = res.data.total
  652. // 如果定位成功则获取和民宿之间的距离
  653. if (this.showdDistance && this.hotelList.length) {
  654. this.hotelList.forEach((ele) => {
  655. let lat = ele.hpositionWens.split(',')[0]
  656. let lng = ele.hpositionWens.split(',')[1]
  657. ele.distance = this.calculateDistance(lat, lng)
  658. })
  659. }
  660. }
  661. },
  662. handleOpen() {
  663. this.$refs.popup.open()
  664. },
  665. // 获取乡镇
  666. async getResidueCount() {
  667. const res = await this.$myRequest({
  668. url: '/mhotel/ahpgetResidueCount.action'
  669. })
  670. // console.log(res)
  671. if (res.code === 200) {
  672. let temNum = 0
  673. res.data.forEach((ele) => {
  674. temNum += ele.residueNumber
  675. })
  676. res.data.unshift({
  677. name: '靖安县',
  678. residueNumber: temNum
  679. })
  680. this.popList = res.data
  681. this.townList = this.changeList(this.popList, 3)
  682. }
  683. },
  684. // 变成二维数组
  685. changeList(arr, num) {
  686. let newArr = []
  687. const total = Math.ceil(arr.length / num)
  688. for (let i = 0; i < total; i++) {
  689. let a = arr.slice(i * num, (i + 1) * num)
  690. newArr.push(a)
  691. }
  692. return newArr
  693. },
  694. // 弹窗点击选择乡镇地址回调
  695. handleChooseTown(name) {
  696. this.town = name
  697. this.$refs.popup.close()
  698. },
  699. handleChooseTown2(name) {
  700. // this.town = name
  701. uni.navigateTo({
  702. url: `/pagesSub/home/home?town=${name}&keywords=${this.keywords}&level=${this.level}`
  703. })
  704. },
  705. handleChooseLv() {
  706. uni.showActionSheet({
  707. itemList: ['白金', '金宿', '银宿'],
  708. success: (res) => {
  709. if (res.tapIndex === 0) {
  710. this.level = '白金'
  711. } else if (res.tapIndex === 1) {
  712. this.level = '金宿'
  713. } else if (res.tapIndex === 2) {
  714. this.level = '银宿'
  715. }
  716. }
  717. })
  718. },
  719. handleSearch() {
  720. uni.navigateTo({
  721. url: `/pagesSub/home/home?town=${this.town}&keywords=${this.keywords}&level=${this.level}`
  722. })
  723. },
  724. goPageDetail(item) {
  725. uni.navigateTo({
  726. url: `/pages/detail/detail?id=${item.id}&distance=${item.distance}&town=${item.hotelTownshipName}`
  727. })
  728. },
  729. // 弹窗关闭按钮回调
  730. handleClose() {
  731. this.$refs.popup_sale.close()
  732. },
  733. // 计算两个点之间的距离
  734. calculateDistance(lat, lng) {
  735. let centerLat = lat
  736. let centerLng = lng
  737. let red1 = (this.myLat * Math.PI) / 180.0
  738. let red2 = (centerLat * Math.PI) / 180.0
  739. let a = red1 - red2
  740. let b = (this.myLng * Math.PI) / 180.0 - (centerLng * Math.PI) / 180.0
  741. let R = 6378137
  742. let distance = R * 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(red1) * Math.cos(red2) * Math.pow(Math.sin(b / 2), 2)))
  743. let res = (distance / 1000).toFixed(2) * 1
  744. return res
  745. },
  746. handleGoPage() {
  747. uni.switchTab({
  748. url: '/pages/community/community'
  749. })
  750. },
  751. handleGoNews(item) {
  752. let info = encodeURIComponent(JSON.stringify(item))
  753. uni.navigateTo({
  754. url: `/pagesSub/newsDetail/newsDetail?info=${info}`
  755. })
  756. },
  757. handleGoNewsList() {
  758. uni.navigateTo({
  759. url: '/pagesSub/newsList/newsList'
  760. })
  761. },
  762. htmlLoad(item) {
  763. let id = item.id + 'html'
  764. let ctx = this.$refs[id][0]
  765. let text = ctx.getText()
  766. let imgs = ctx.imgList[0]
  767. item.showHtml = false
  768. item.desc = text
  769. item.url = imgs
  770. },
  771. handleGoHome() {
  772. uni.navigateTo({
  773. url: '/pagesSub/home/home'
  774. })
  775. },
  776. changeDot(e) {
  777. this.current = e.detail.current
  778. },
  779. handleCloseLevelPop() {
  780. this.$refs.popup_level.close()
  781. },
  782. handleNoTip() {
  783. uni.setStorageSync('isTip', true)
  784. this.$refs.popup_level.close()
  785. },
  786. // 点击顶部轮播图广告回调
  787. handleClickBanner(banner) {
  788. // console.log(banner)
  789. switch (banner.jumpWay) {
  790. case '网页':
  791. uni.navigateTo({
  792. url: `/pagesSub/web/web?url=${banner.jumpPoint}`
  793. })
  794. break
  795. case '小程序':
  796. if (banner.jumpDirection == '民宿') {
  797. uni.navigateTo({
  798. url: `/pages/detail/detail?id=${banner.jumpPoint}&distance=&town=${banner.townId}`
  799. })
  800. } else if (banner.jumpDirection == '商品') {
  801. if (banner.jumpPoint == '首页') {
  802. uni.navigateTo({
  803. url: '/packageShang/pages/tabbar/home'
  804. })
  805. } else {
  806. uni.navigateTo({
  807. url: `/packageShang/pages/goods/goods?id=${banner.jumpPoint}`
  808. })
  809. }
  810. } else if (banner.jumpDirection == '攻略') {
  811. if (banner.jumpPoint == '首页') {
  812. uni.navigateTo({
  813. url: '/pages/community/community'
  814. })
  815. } else {
  816. uni.navigateTo({
  817. url: `/pagesSub/tweetDetail/tweetDetail?id=${banner.jumpPoint}&townId=${banner.townId}`
  818. })
  819. }
  820. } else if (banner.jumpDirection == '优惠券') {
  821. uni.navigateTo({
  822. url: `/pagesSub/couponCenter/couponCenter?id=${banner.jumpPoint}`
  823. })
  824. }
  825. break
  826. default:
  827. uni.previewImage({
  828. urls: [banner.imageUrl]
  829. })
  830. break
  831. }
  832. }
  833. }
  834. }
  835. </script>
  836. <style lang="scss" scoped>
  837. .container {
  838. display: flex;
  839. flex-direction: column;
  840. min-height: 100vh;
  841. overflow-y: auto;
  842. background-color: #f2f2f2;
  843. .header {
  844. position: relative;
  845. height: 505rpx;
  846. .header_swiper {
  847. width: 100%;
  848. height: 100%;
  849. .img {
  850. width: 100%;
  851. height: 100%;
  852. border-radius: 0 0 20rpx 20rpx;
  853. }
  854. .img2 {
  855. position: absolute;
  856. top: 175rpx;
  857. left: 38rpx;
  858. width: 200rpx;
  859. height: 200rpx;
  860. border: 1rpx solid skyblue;
  861. }
  862. }
  863. }
  864. .header2 {
  865. z-index: 999;
  866. position: fixed;
  867. top: 0;
  868. left: 0;
  869. right: 0;
  870. box-sizing: content-box;
  871. text-align: center;
  872. background-color: #fff;
  873. .title {
  874. font-size: 34rpx;
  875. }
  876. }
  877. .content {
  878. z-index: 1;
  879. margin: -102rpx auto 0;
  880. width: 690rpx;
  881. border-radius: 12rpx 12rpx 0 0;
  882. background-color: #f2f2f2;
  883. .search {
  884. box-sizing: border-box;
  885. padding: 0 28rpx;
  886. width: 690rpx;
  887. height: 353rpx;
  888. border-radius: 12rpx;
  889. background-color: #fff;
  890. .search_town {
  891. display: flex;
  892. justify-content: space-between;
  893. align-items: center;
  894. height: 89rpx;
  895. color: #a6a6a6;
  896. font-size: 32rpx;
  897. border-bottom: 1rpx solid #e6e6e6;
  898. img {
  899. width: 40rpx;
  900. height: 40rpx;
  901. }
  902. }
  903. .active {
  904. font-weight: bold;
  905. color: #000;
  906. }
  907. .search_center {
  908. display: flex;
  909. align-items: center;
  910. height: 89rpx;
  911. color: #a6a6a6;
  912. font-size: 28rpx;
  913. img {
  914. width: 40rpx;
  915. height: 40rpx;
  916. }
  917. .center_input {
  918. margin-right: 12rpx;
  919. width: 250rpx;
  920. color: #000;
  921. font-weight: bold;
  922. }
  923. .img {
  924. margin-right: 12rpx;
  925. }
  926. .center_level {
  927. flex: 1;
  928. margin-left: 24rpx;
  929. font-weight: 400;
  930. }
  931. .active {
  932. font-weight: bold;
  933. color: #000;
  934. }
  935. .img2 {
  936. margin-left: auto;
  937. }
  938. }
  939. .search_btn {
  940. display: flex;
  941. justify-content: center;
  942. align-items: center;
  943. margin-top: 23rpx;
  944. width: 623rpx;
  945. height: 100rpx;
  946. border-radius: 57rpx;
  947. color: #fff;
  948. font-size: 32rpx;
  949. background: linear-gradient(90deg, #2697ef 0%, #5e35eb 100%);
  950. }
  951. }
  952. .swiper {
  953. margin: 20rpx auto 0;
  954. width: 690rpx;
  955. height: 214rpx;
  956. border-radius: 12rpx;
  957. background-color: #fff;
  958. .swiper_item {
  959. display: flex;
  960. justify-content: space-around;
  961. align-items: center;
  962. width: 100%;
  963. height: 100%;
  964. .item_box {
  965. position: relative;
  966. width: 195rpx;
  967. height: 128rpx;
  968. border-radius: 12rpx;
  969. color: #fff;
  970. img {
  971. width: 195rpx;
  972. height: 128rpx;
  973. border-radius: 12rpx;
  974. }
  975. .box_town {
  976. position: absolute;
  977. top: 30rpx;
  978. left: 0;
  979. right: 0;
  980. text-align: center;
  981. font-size: 28rpx;
  982. font-weight: bold;
  983. }
  984. .box_count {
  985. position: absolute;
  986. top: 75rpx;
  987. left: 0;
  988. right: 0;
  989. text-align: center;
  990. font-size: 18rpx;
  991. }
  992. }
  993. }
  994. }
  995. .body {
  996. margin: 0 auto;
  997. width: 690rpx;
  998. .body_top {
  999. display: flex;
  1000. align-items: center;
  1001. height: 89rpx;
  1002. .circle {
  1003. width: 30rpx;
  1004. height: 30rpx;
  1005. border-radius: 50%;
  1006. background-color: #485bed;
  1007. }
  1008. .color {
  1009. margin-left: -15rpx;
  1010. opacity: 0.5;
  1011. background-color: #fff;
  1012. }
  1013. .top_title {
  1014. margin-left: 15rpx;
  1015. font-size: 32rpx;
  1016. font-weight: bold;
  1017. }
  1018. .top_msg {
  1019. margin-top: 5rpx;
  1020. margin-left: 12rpx;
  1021. color: #666666;
  1022. font-size: 24rpx;
  1023. }
  1024. .top_more {
  1025. display: flex;
  1026. align-items: center;
  1027. margin-left: auto;
  1028. color: #a6a6a6;
  1029. font-size: 24rpx;
  1030. img {
  1031. width: 32rpx;
  1032. height: 32rpx;
  1033. }
  1034. }
  1035. }
  1036. .body_strategy {
  1037. display: flex;
  1038. box-sizing: border-box;
  1039. padding: 20rpx;
  1040. margin-bottom: 10rpx;
  1041. width: 690rpx;
  1042. height: 235rpx;
  1043. border-radius: 12rpx;
  1044. background-color: #fff;
  1045. .strategy_cover {
  1046. width: 253rpx;
  1047. height: 190rpx;
  1048. border-radius: 7rpx;
  1049. }
  1050. .strategy_info {
  1051. flex: 1;
  1052. display: flex;
  1053. flex-direction: column;
  1054. justify-content: space-between;
  1055. margin-left: 20rpx;
  1056. width: 500rpx;
  1057. height: 170rpx;
  1058. font-size: 24rpx;
  1059. color: #666666;
  1060. overflow: hidden;
  1061. .info_title {
  1062. font-size: 32rpx;
  1063. font-weight: bold;
  1064. color: #000;
  1065. overflow: hidden;
  1066. text-overflow: ellipsis;
  1067. white-space: nowrap;
  1068. }
  1069. .info_title2 {
  1070. font-size: 32rpx;
  1071. font-weight: bold;
  1072. color: #000;
  1073. display: -webkit-box;
  1074. -webkit-box-orient: vertical;
  1075. -webkit-line-clamp: 2;
  1076. overflow: hidden;
  1077. }
  1078. .info_tags {
  1079. display: flex;
  1080. .tag {
  1081. margin-right: 10rpx;
  1082. box-sizing: border-box;
  1083. padding: 0 12rpx;
  1084. height: 35rpx;
  1085. color: #1e7dfb;
  1086. font-size: 20rpx;
  1087. border-radius: 30rpx;
  1088. border: 1rpx solid #1e7dfb;
  1089. }
  1090. }
  1091. .info_desc {
  1092. display: -webkit-box;
  1093. -webkit-box-orient: vertical;
  1094. -webkit-line-clamp: 2;
  1095. overflow: hidden;
  1096. }
  1097. }
  1098. }
  1099. .body_list {
  1100. display: flex;
  1101. flex-wrap: wrap;
  1102. justify-content: space-between;
  1103. .list_item {
  1104. width: 335rpx;
  1105. box-sizing: border-box;
  1106. margin-bottom: 20rpx;
  1107. .item-img {
  1108. width: 100%;
  1109. height: 223rpx;
  1110. border-radius: 18rpx 18rpx 0 0;
  1111. box-sizing: border-box;
  1112. }
  1113. .descrition {
  1114. display: flex;
  1115. flex-direction: column;
  1116. width: 100%;
  1117. border-radius: 0 0 18rpx 18rpx;
  1118. box-sizing: border-box;
  1119. background: rgba(255, 255, 255, 1);
  1120. margin-top: -10rpx;
  1121. .title {
  1122. font-size: 28rpx;
  1123. font-weight: 600;
  1124. padding: 20rpx 20rpx 10rpx;
  1125. color: rgba(0, 0, 0, 1);
  1126. overflow: hidden;
  1127. white-space: nowrap;
  1128. text-overflow: ellipsis;
  1129. }
  1130. .type {
  1131. padding: 5rpx 20rpx;
  1132. height: 40rpx;
  1133. font-size: 24rpx;
  1134. color: #a6a6a6;
  1135. .type_level {
  1136. margin-left: 20rpx;
  1137. }
  1138. }
  1139. .distance {
  1140. padding: 10rpx 20rpx;
  1141. font-size: 24rpx;
  1142. color: #a6a6a6;
  1143. }
  1144. .detail {
  1145. display: flex;
  1146. flex-direction: row;
  1147. justify-content: space-between;
  1148. align-items: center;
  1149. padding: 0 20rpx 20rpx 20rpx;
  1150. color: rgba(0, 0, 0, 1);
  1151. .img {
  1152. width: 40rpx;
  1153. height: 40rpx;
  1154. }
  1155. .price_home {
  1156. .txt1 {
  1157. font-size: 36rpx;
  1158. font-weight: 600;
  1159. color: rgba(255, 87, 51, 1);
  1160. }
  1161. .txt2 {
  1162. font-size: 24rpx;
  1163. font-weight: 400;
  1164. color: #a6a6a6;
  1165. }
  1166. }
  1167. .score {
  1168. font-size: 24rpx;
  1169. font-weight: 400;
  1170. padding-top: 10rpx;
  1171. color: rgba(166, 166, 166, 1);
  1172. }
  1173. }
  1174. }
  1175. }
  1176. .item_goods {
  1177. margin-bottom: 20rpx;
  1178. width: 335rpx;
  1179. height: 367rpx;
  1180. border-radius: 10rpx;
  1181. background-color: #fff;
  1182. overflow: hidden;
  1183. .goods_img {
  1184. width: 335rpx;
  1185. height: 223rpx;
  1186. border-bottom: 1rpx solid #eee;
  1187. }
  1188. .goods_name {
  1189. margin: 18rpx 5rpx 18rpx 30rpx;
  1190. font-size: 28rpx;
  1191. font-weight: bold;
  1192. overflow: hidden;
  1193. white-space: nowrap;
  1194. text-overflow: ellipsis;
  1195. }
  1196. .goods_detail {
  1197. display: flex;
  1198. flex-direction: row;
  1199. justify-content: space-between;
  1200. align-items: center;
  1201. padding: 0 20rpx 20rpx 20rpx;
  1202. color: rgba(0, 0, 0, 1);
  1203. .img {
  1204. width: 40rpx;
  1205. height: 40rpx;
  1206. }
  1207. .price_good {
  1208. .txt1 {
  1209. font-size: 36rpx;
  1210. font-weight: 600;
  1211. color: rgba(255, 87, 51, 1);
  1212. }
  1213. .txt2 {
  1214. font-size: 24rpx;
  1215. font-weight: 400;
  1216. color: #a6a6a6;
  1217. }
  1218. }
  1219. .score {
  1220. font-size: 24rpx;
  1221. font-weight: 400;
  1222. padding-top: 10rpx;
  1223. color: rgba(166, 166, 166, 1);
  1224. }
  1225. }
  1226. }
  1227. }
  1228. .body_news {
  1229. box-sizing: border-box;
  1230. padding: 25rpx;
  1231. width: 690rpx;
  1232. height: 566rpx;
  1233. border-radius: 12rpx;
  1234. background-color: #fff;
  1235. .news_title {
  1236. margin: 20rpx 0;
  1237. font-size: 32rpx;
  1238. font-weight: bold;
  1239. overflow: hidden;
  1240. text-overflow: ellipsis;
  1241. white-space: nowrap;
  1242. }
  1243. .news_desc {
  1244. font-size: 24rpx;
  1245. color: #666666;
  1246. display: -webkit-box;
  1247. -webkit-box-orient: vertical;
  1248. -webkit-line-clamp: 2;
  1249. overflow: hidden;
  1250. }
  1251. }
  1252. .noData {
  1253. display: flex;
  1254. flex-direction: column;
  1255. justify-content: center;
  1256. align-items: center;
  1257. padding-bottom: 65rpx;
  1258. img {
  1259. margin-top: 80rpx;
  1260. width: 600rpx;
  1261. height: 600rpx;
  1262. }
  1263. }
  1264. }
  1265. }
  1266. .popup_body {
  1267. width: 618rpx;
  1268. height: 687rpx;
  1269. border-radius: 21rpx;
  1270. background-color: #fff;
  1271. .body_header {
  1272. display: flex;
  1273. justify-content: center;
  1274. align-items: center;
  1275. position: relative;
  1276. height: 113rpx;
  1277. border-bottom: 1rpx solid #e6e6e6;
  1278. img {
  1279. width: 16rpx;
  1280. height: 16rpx;
  1281. }
  1282. .header_title {
  1283. margin: 0 10rpx;
  1284. font-size: 34rpx;
  1285. font-weight: bold;
  1286. color: #0f194d;
  1287. }
  1288. }
  1289. .body_content {
  1290. display: grid;
  1291. grid-template-columns: repeat(auto-fill, 160rpx);
  1292. gap: 28rpx;
  1293. box-sizing: border-box;
  1294. padding: 26rpx 40rpx 50rpx;
  1295. .content_box {
  1296. position: relative;
  1297. width: 160rpx;
  1298. height: 105rpx;
  1299. color: #fff;
  1300. border-radius: 10rpx;
  1301. img {
  1302. width: 160rpx;
  1303. height: 105rpx;
  1304. border-radius: 10rpx;
  1305. }
  1306. .box_town {
  1307. position: absolute;
  1308. top: 20rpx;
  1309. left: 0;
  1310. right: 0;
  1311. text-align: center;
  1312. font-size: 28rpx;
  1313. font-weight: bold;
  1314. }
  1315. .box_count {
  1316. position: absolute;
  1317. top: 62rpx;
  1318. left: 0;
  1319. right: 0;
  1320. text-align: center;
  1321. font-size: 18rpx;
  1322. }
  1323. }
  1324. }
  1325. }
  1326. .popupClass {
  1327. position: relative;
  1328. width: 481rpx;
  1329. height: 764rpx;
  1330. img {
  1331. width: 100%;
  1332. height: 665rpx;
  1333. }
  1334. .btn_text {
  1335. position: absolute;
  1336. top: 265rpx;
  1337. left: 40rpx;
  1338. display: flex;
  1339. justify-content: center;
  1340. align-items: center;
  1341. width: 400rpx;
  1342. height: 260rpx;
  1343. color: #0f194d;
  1344. font-size: 28rpx;
  1345. border-radius: 43rpx;
  1346. background-color: #fff;
  1347. }
  1348. .btn_close {
  1349. position: absolute;
  1350. top: 586rpx;
  1351. left: 212rpx;
  1352. width: 58rpx;
  1353. height: 58rpx;
  1354. border-radius: 50%;
  1355. }
  1356. }
  1357. .popupLevel {
  1358. box-sizing: border-box;
  1359. padding: 20rpx;
  1360. width: 580rpx;
  1361. height: 495rpx;
  1362. border-radius: 20rpx;
  1363. background-color: #fff;
  1364. .level_header {
  1365. display: flex;
  1366. justify-content: space-between;
  1367. height: 70rpx;
  1368. .header_text {
  1369. color: #c5c5c0;
  1370. }
  1371. }
  1372. .level_body {
  1373. font-size: 26rpx;
  1374. }
  1375. .level_btn {
  1376. margin-top: 80rpx;
  1377. display: flex;
  1378. justify-content: flex-end;
  1379. align-items: center;
  1380. height: 80rpx;
  1381. .btn {
  1382. display: flex;
  1383. justify-content: center;
  1384. align-items: center;
  1385. width: 150rpx;
  1386. height: 60rpx;
  1387. font-size: 26rpx;
  1388. border-radius: 10rpx;
  1389. }
  1390. .notip {
  1391. margin-right: 20rpx;
  1392. border: 1rpx solid #e7e7e7;
  1393. }
  1394. .read {
  1395. color: #fff;
  1396. background-color: #1890ff;
  1397. }
  1398. }
  1399. }
  1400. }
  1401. </style>