home3.vue 39 KB

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