home3.vue 40 KB

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