index.vue 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213
  1. <template>
  2. <view v-if="XCXIsSelect == '是'">
  3. <view>
  4. <view class="food_all">
  5. <!-- banner -->
  6. <view style="width: 100%; padding-bottom: 20rpx; background-color: #fff">
  7. <!-- <swiper class="swiper" :autoplay="true" interval="2000" duration="500" :circular="true" style="width: 100%; z-index: 1; height: 128px">
  8. <swiper-item v-for="(item, index) in shopDet.shopBanner" :key="index">
  9. <image :src="item" mode="scaleToFill" style="width: 100%"></image>
  10. </swiper-item>
  11. </swiper>
  12. <view style="position: relative; height: 34px; z-index: 1; margin-top: -50px"></view> -->
  13. <view class="shop" style="padding: 26rpx">
  14. <image style="width: 184rpx; height: 184rpx; border-radius: 32rpx" :src="shopDet.shopCover" mode="aspectFill"></image>
  15. <view style="margin-left: 34rpx; width: 490rpx; display: flex; flex-direction: column">
  16. <view class="text-bold">{{ shopDet.shopName }}</view>
  17. <view style="display: flex; margin: 10rpx 0 20rpx">
  18. <view style="border-right: 2rpx solid #707070; padding-right: 28rpx; display: flex; flex-direction: column; justify-content: space-between">
  19. <span style="color: #707070; font-size: 24rpx">评分</span>
  20. <view class="text-bold">{{ shopDet.shopScore ? shopDet.shopScore : 0 }}分</view>
  21. </view>
  22. <view style="border-right: 2rpx solid #707070; padding: 0 28rpx 0 20rpx; display: flex; flex-direction: column; justify-content: space-between">
  23. <span style="color: #707070; font-size: 24rpx">销量</span>
  24. <view class="text-bold">{{ shopDet.shopSales ? shopDet.shopSales : 0 }}</view>
  25. </view>
  26. <view style="padding-left: 20rpx; display: flex; flex-direction: column; justify-content: space-between">
  27. <span style="color: #707070; font-size: 24rpx">平台配送</span>
  28. <view class="text-bold">{{ shopDet.errandTime }}分钟</view>
  29. </view>
  30. </view>
  31. <view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice">
  32. <text style="width: 90rpx; color: #707070">公告:</text>
  33. <view style="width: 400rpx">
  34. <u-notice-bar
  35. color="#707070"
  36. :speed="100"
  37. type="none"
  38. padding="0rpx 0rpx"
  39. mode="horizontal"
  40. :volume-icon="false"
  41. :list="shopDet.shopNotice.split(',')"
  42. ></u-notice-bar>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- <view class="flex justify-between">
  47. <view style="width: 500rpx">
  48. <view class="text-xl text-bold u-line-1">{{ shopDet.shopName }}</view>
  49. <view class="flex align-center margin-top-xs">
  50. <view style="color: #fd6416; font-weight: bold; font-size: 30rpx">
  51. <u-icon name="star-fill" color="#FD6416" size="28"></u-icon>
  52. {{ shopDet.shopScore ? shopDet.shopScore : 0 }}
  53. </view>
  54. <view class="margin-left-xs">销量 {{ shopDet.shopSales ? shopDet.shopSales : 0 }}</view>
  55. <view class="margin-left-xs" v-if="shopDet.errandTime">约{{ shopDet.errandTime }}分钟</view>
  56. <view class="margin-left-xs" v-if="shopDet.minimumDelivery">{{ shopDet.minimumDelivery }}元起送</view>
  57. </view>
  58. <view class="flex align-center margin-top-xs">
  59. <view style="margin-right: 8rpx">{{ shopDet.autoSendOrder == 1 ? '商家配送:' : '平台配送:' }}</view>
  60. <view style="margin-right: 8rpx">配送费{{ shopDet.errandMoney ? shopDet.errandMoney : 0 }}元</view>
  61. <view class="lable" v-if="shopDet.enableFullReductionFlag == 0 && shopDet.exemptMinMoney">满{{ shopDet.exemptMinMoney }}元免配送费</view>
  62. </view>
  63. </view>
  64. <view>
  65. <image mode="aspectFill" :src="shopDet.shopCover" class="radius" style="width: 110rpx; height: 110rpx; margin-top: 30rpx"></image>
  66. </view>
  67. </view>
  68. <view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice">
  69. <text style="width: 14%">公告:</text>
  70. <u-notice-bar
  71. color="#AAAAAA"
  72. :speed="100"
  73. border-radius="30"
  74. padding="0rpx 0rpx"
  75. bg-color="#f5f5f5"
  76. style="width: 86%"
  77. type="none"
  78. mode="horizontal"
  79. :volume-icon="false"
  80. :list="shopDet.shopNotice.split(',')"
  81. ></u-notice-bar>
  82. </view>
  83. <view style="display: flex; margin-top: 3px" class="flex flex-wrap align-center" @click="clickGong">
  84. <view v-for="(ite, ind) in huoListss" :key="ind" v-if="huoListss && ite.activityType != '1'">
  85. <view class="lable flex justify-center align-center" style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box">
  86. <text v-if="ite.activityType == '2'">时段</text>
  87. <text v-if="ite.activityType == '3'">满额</text>
  88. <text v-if="ite.activityType == '4'">全场</text>
  89. <text style="margin-left: 3px">|</text>
  90. <text style="margin-left: 3px">{{ ite.activityName }}</text>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="margin-top-xs" style="width: 100%; height: 40rpx" v-if="couponList.length > 0">
  95. <scroll-view scroll-x="true" class="scroll-view_H">
  96. <view class="coupon-item flex align-center" v-for="(item, index) in couponList" :key="index" @click="coupons = true">
  97. <text>优惠券</text>
  98. <text style="margin-left: 3px">|</text>
  99. <view style="margin-left: 3px">¥</view>
  100. <view class="" style="font-weight: bold; font-size: 24rpx; margin-right: 10rpx">
  101. {{ item.money }}
  102. </view>
  103. <view style="margin-right: 20rpx">满{{ item.minMoney }}可用</view>
  104. <view style="font-weight: bold">领</view>
  105. </view>
  106. </scroll-view>
  107. </view> -->
  108. </view>
  109. </view>
  110. <!-- 食品 -->
  111. <view class="food">
  112. <!-- 店名地址 -->
  113. <view class="food_address">
  114. <view class="flex flex-sub bg justify-between padding-right-xl">
  115. <view @click="switchTab(1)" :class="current == 1 ? 'select' : ''" class="tabBtn">
  116. <view class="title">全部商品</view>
  117. <view :class="current == 1 ? 'active1' : ''"></view>
  118. </view>
  119. <view @click="switchTab(2)" :class="current == 2 ? 'select' : ''" class="tabBtn">
  120. <view class="title">评价</view>
  121. <view :class="current == 2 ? 'active1' : ''"></view>
  122. </view>
  123. <view @click="switchTab(3)" :class="current == 3 ? 'select' : ''" class="tabBtn">
  124. <view class="title">商家</view>
  125. <view :class="current == 3 ? 'active1' : ''"></view>
  126. </view>
  127. </view>
  128. <!-- <view class="flex Switch">
  129. <view @click="tabSwidth(1)" :class="orderType==1?'selSwitch':''">自取</view>
  130. <view @click="tabSwidth(2)" :class="orderType==2?'selSwitch':''">外卖</view>
  131. </view> -->
  132. <view>
  133. <!-- #ifdef MP-WEIXIN -->
  134. <!-- <image @click="goPindan()" src="../../../static/images/index/pindan.png"
  135. style="width: 160rpx;height: 64rpx;" mode=""></image> -->
  136. <!-- #endif -->
  137. </view>
  138. </view>
  139. <view class="VerticalBox" v-if="current == 1">
  140. <scroll-view class="VerticalNav nav bg-gray" scroll-y scroll-with-animation :scroll-top="verticalNavTop">
  141. <view
  142. style="font-size: 28upx"
  143. class="cu-item text-lg"
  144. :class="index == tabCur ? 'cur' : 'text-gray'"
  145. v-for="(item, index) in dataList"
  146. :key="index"
  147. @tap="TabSelect"
  148. :data-id="index"
  149. >
  150. {{ item.classifyName }}
  151. </view>
  152. </scroll-view>
  153. <scroll-view class="VerticalMain" scroll-y scroll-with-animation :scroll-into-view="'main-' + mainCur" @scroll="VerticalMain">
  154. <view class="bg-white padding-sm margin-bottom-sm" v-for="(item, index) in dataList" v-if="item.goodsList.length" :key="index" :id="'main-' + index">
  155. <view class="flex justify-between padding-bottom-sm" @click="goDet(ite.goodsId)" v-for="(ite, ind) in item.goodsList" :key="ind">
  156. <image :src="ite.goodsCover" mode="aspectFill" style="width: 184rpx; height: 184rpx; border-radius: 10rpx"></image>
  157. <view class="flex-sub margin-left-sm padding-tb-xs flex flex-direction justify-between">
  158. <view class="text-black text-lg text-bold" style="font-size: 30upx">
  159. {{ ite.goodsName }}
  160. </view>
  161. <view class="text-gray">已售 {{ ite.sales ? ite.sales : 0 }}</view>
  162. <view class="text-gray text-sm u-line-2" style="overflow: hidden; line-clamp: 2; -webkit-line-clamp: 2; width: 100%">
  163. {{ ite.goodsDescribe ? ite.goodsDescribe : '' }}
  164. </view>
  165. <view class="flex justify-between" style="position: relative">
  166. <view class="text-sm" style="color: #ff0303">
  167. ¥
  168. <text class="text-lg">{{ ite.goodsMoney }}</text>
  169. </view>
  170. <view
  171. style="width: 80rpx; height: 80rpx; line-height: 80rpx; position: absolute; right: 0; top: -10rpx; text-align: center"
  172. @click.stop="selSku(ite)"
  173. >
  174. <image src="../../../static/images/index/add.png" style="width: 40rpx; height: 40rpx"></image>
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. <view style="height: 30px"></view>
  180. </view>
  181. </scroll-view>
  182. <empty v-if="!dataList.length"></empty>
  183. </view>
  184. <view style="background-color: #fff9ed" v-if="current == 2">
  185. <view class="flex margin-lr padding-tb-sm u-border-bottom" v-if="shopDet.shopScore">
  186. <view class="flex padding-right">
  187. <view class="text-sl" style="color: #fd6416">{{ shopDet.shopScore }}</view>
  188. <view class="flex flex-direction justify-around margin-left-sm">
  189. <view>商家评分</view>
  190. <view class="flex">
  191. <u-icon v-for="ite in shopDet.shopScore1" :key="ite" color="#F2CB51" name="star-fill"></u-icon>
  192. </view>
  193. </view>
  194. </view>
  195. <view class="flex-sub flex justify-around u-border-left padding-left">
  196. <view class="flex flex-direction justify-around text-center">
  197. <view>好评</view>
  198. <view>{{ EvaluateData.goodReputation ? EvaluateData.goodReputation : 0 }}</view>
  199. </view>
  200. <view class="flex flex-direction justify-around text-center">
  201. <view>中评</view>
  202. <view>{{ EvaluateData.mediumReview ? EvaluateData.mediumReview : 0 }}</view>
  203. </view>
  204. <view class="flex flex-direction justify-around text-center">
  205. <view>差评</view>
  206. <view>{{ EvaluateData.negativeComment ? EvaluateData.negativeComment : 0 }}</view>
  207. </view>
  208. </view>
  209. </view>
  210. <view class="padding-tb-sm margin-lr">
  211. <u-button
  212. hover-class="none"
  213. @click="sel(0)"
  214. type="primary"
  215. shape="circle"
  216. size="mini"
  217. :plain="false"
  218. :custom-style="count == 0 ? customStyle : customStyle1"
  219. >
  220. 全部评论
  221. </u-button>
  222. <u-button
  223. hover-class="none"
  224. @click="sel(1)"
  225. type="primary"
  226. shape="circle"
  227. size="mini"
  228. :plain="false"
  229. :custom-style="count == 1 ? customStyle : customStyle1"
  230. >
  231. 好评({{ EvaluateData.goodReputation ? EvaluateData.goodReputation : 0 }})
  232. </u-button>
  233. <u-button
  234. hover-class="none"
  235. @click="sel(2)"
  236. type="primary"
  237. shape="circle"
  238. size="mini"
  239. :plain="false"
  240. :custom-style="count == 2 ? customStyle : customStyle1"
  241. >
  242. 中评({{ EvaluateData.mediumReview ? EvaluateData.mediumReview : 0 }})
  243. </u-button>
  244. <u-button
  245. hover-class="none"
  246. @click="sel(3)"
  247. type="primary"
  248. shape="circle"
  249. size="mini"
  250. :plain="false"
  251. :custom-style="count == 3 ? customStyle : customStyle1"
  252. >
  253. 差评({{ EvaluateData.negativeComment ? EvaluateData.negativeComment : 0 }})
  254. </u-button>
  255. </view>
  256. <view class="padding-tb-sm margin-lr u-border-bottom" v-for="(item, index) in EvaluateList" :key="index">
  257. <view class="flex justify-between align-center">
  258. <view class="flex align-center">
  259. <u-avatar :src="item.avatar" size="65"></u-avatar>
  260. <view class="margin-left-sm" style="line-height: 46upx">
  261. {{ item.userName ? item.userName : '匿名' }}
  262. </view>
  263. <view class="flex margin-left-sm">
  264. <u-icon v-for="ite in item.score" :key="ite" color="#FCD202" name="star-fill"></u-icon>
  265. </view>
  266. </view>
  267. <view>{{ item.createTime }}</view>
  268. </view>
  269. <view class="margin-top-sm">{{ item.evaluateMessage }}</view>
  270. <view class="pinglunImg" v-if="item.pictures != undefined && item.pictures">
  271. <view class="pinglunImg-box flex justify-between flex-wrap">
  272. <image
  273. style="margin-bottom: 20rpx"
  274. @click="yuanlan(item.pictures == undefined ? [] : item.pictures.split(','), index2)"
  275. v-for="(item2, index2) in item.pictures == undefined ? [] : item.pictures.split(',')"
  276. :src="item2"
  277. mode=""
  278. ></image>
  279. <image style="margin-bottom: 20rpx; width: 160rpx; height: 0" src="" mode=""></image>
  280. <image style="margin-bottom: 20rpx; width: 160rpx; height: 0" src="" mode=""></image>
  281. </view>
  282. </view>
  283. <view class="margin-top-sm" v-if="item.shopReplyMessage">
  284. <view class="flex align-center">
  285. <view class="flex align-center text-df" style="color: #999999">
  286. <view class="text-df">商家回复:</view>
  287. {{ item.shopReplyMessage }}
  288. </view>
  289. </view>
  290. </view>
  291. </view>
  292. <empty v-if="!EvaluateList.length"></empty>
  293. </view>
  294. <view style="background-color: #fff9ed" class="padding-bottom" v-if="current == 3">
  295. <view class="shop_xiang">
  296. <view class="shopDizhi margin-lr">
  297. <image :src="Tupian('/shopXiang/address.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  298. <text style="margin-left: 5px">{{ shopDet.detailedAddress }}</text>
  299. <image
  300. @click="call(shopDet.phone)"
  301. :src="Tupian('/shopXiang/phone.png')"
  302. class="radius"
  303. style="width: 44rpx; height: 44rpx; float: right; margin-top: 20rpx"
  304. ></image>
  305. </view>
  306. <view class="shopLine margin-lr"></view>
  307. <view class="shopDizhi margin-lr">
  308. <image :src="Tupian('/shopXiang/22.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  309. <text style="margin-left: 5px">营业时间:{{ shopDet.businessHours }}-{{ shopDet.lockHours }}</text>
  310. </view>
  311. <view class="shopLine margin-lr"></view>
  312. <view class="shopDizhi margin-lr">
  313. <image :src="Tupian('/shopXiang/33.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  314. <text style="margin-left: 5px">商家品类:{{ shopDet.shopTypeName }}</text>
  315. </view>
  316. <view class="shopLine margin-lr"></view>
  317. <view class="shopDizhi margin-lr">
  318. <image :src="Tupian('/shopXiang/44.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  319. <text style="margin-left: 5px">配送范围:{{ shopDet.distributionDistance }}以内</text>
  320. </view>
  321. </view>
  322. <view class="shop_zheng">
  323. <view class="shopDizhi margin-lr">
  324. <image :src="Tupian('/shopXiang/55.png')" class="radius" style="width: 44rpx; height: 44rpx; float: left; margin-top: 20rpx"></image>
  325. <text style="margin-left: 5px">营业执照,食品经营许可和健康证</text>
  326. </view>
  327. <view class="image-container" v-if="shop_zhizhao.length > 0">
  328. <image
  329. v-for="(item, index) in shop_zhizhao"
  330. :key="index"
  331. class="image"
  332. :src="item"
  333. mode="aspectFill"
  334. style="margin-left: 10px"
  335. @click="clickImg(item)"
  336. ></image>
  337. </view>
  338. </view>
  339. <!-- <view class="flex align-center margin-top-sm">
  340. <view class="flex-sub">
  341. <view class="text-black text-lg text-bold">{{shopDet.shopName}}</view>
  342. <view class="margin-top-sm" @click="goMap">
  343. <u-icon name="map" size="28"></u-icon> {{shopDet.detailedAddress}}
  344. </view>
  345. </view>
  346. <image @click="call(shopDet.phone)" src="../../../static/images/index/phone.png"
  347. class="radius" style="width: 38rpx;height: 49rpx;">
  348. </image>
  349. </view>
  350. <image :src="shopDet.shopCover" class="radius margin-top-sm"
  351. style="width: 140rpx;height: 140rpx;">
  352. </image>
  353. <view class="text-black text-lg text-bold margin-top-xs">商家信息</view>
  354. <view class="text-black margin-top-xs text-df">
  355. 营业时间:{{shopDet.businessHours}}-{{shopDet.lockHours}}</view>
  356. <view class="text-black margin-top-xs text-df">商家品类:{{shopDet.shopTypeName}}</view>
  357. <view class="text-black margin-top-xs text-df">配送范围:{{shopDet.distributionDistance}}以内</view>
  358. <view class="text-black margin-top-xs text-df" v-if="shopDet.shopNotice">
  359. 公告:{{shopDet.shopNotice}}</view>
  360. <view class="text-black margin-top-xs text-df" v-else>公告:店铺开业啦!</view> -->
  361. </view>
  362. </view>
  363. <!-- 结算 -->
  364. <view class="settlement" @click="isPopupShow" v-if="current == 1">
  365. <view class="settlement_img">
  366. <image src="../../../static/images/index/diancan.png" mode=""></image>
  367. <view class="settlement_hot">{{ goodsNum }}</view>
  368. </view>
  369. <view class="settlement_le">
  370. <text>¥</text>
  371. {{ totalPrice }}
  372. <text v-if="shopDet.minimumDelivery" style="margin-left: 10rpx">{{ shopDet.minimumDelivery }}元起送</text>
  373. </view>
  374. <view v-if="totalPrice >= shopDet.minimumDelivery" class="settlement_ri" @click.stop="goConfirm_throttle()">去结算</view>
  375. <view v-else class="settlement_ri1">去结算</view>
  376. </view>
  377. <!-- 购物车弹窗 -->
  378. <u-popup v-model="popupShow" mode="bottom" border-radius="20">
  379. <view style="padding: 0 0 30rpx">
  380. <view class="flex justify-between align-center margin-bottom-sm" style="height: 90rpx; background-color: #b2d5c6; padding: 0 30rpx">
  381. <view class="text-bold text-black text-df">已选餐品</view>
  382. <view class="flex align-center">
  383. <image src="../../../static/images/index/delete.png" style="width: 28rpx; height: 31rpx" mode=""></image>
  384. <text class="margin-left-xs" @click="empty">清空购物车</text>
  385. </view>
  386. </view>
  387. <scroll-view scroll-y="true" class="popup">
  388. <view v-for="(item, ind) in goodsList.orderGoodsList[0]" :key="ind">
  389. <view class="flex margin-tb-sm">
  390. <image mode="aspectFill" :src="item.goodsPicture[0]" style="width: 96rpx; height: 96rpx; border-radius: 10rpx"></image>
  391. <view class="margin-left-sm" style="display: flex; flex-direction: column; justify-content: space-between">
  392. <view>{{ item.goodsName }}</view>
  393. <view v-if="item.skuMessage">{{ item.skuMessage }}</view>
  394. <view class="text-bold text-sm" style="color: #ff0303">
  395. ¥
  396. <text class="text-lg">{{ item.goodsPrice }}</text>
  397. </view>
  398. </view>
  399. <view class="flex justify-between align-center" style="margin-left: auto">
  400. <view class="flex align-center justify-between">
  401. <view @click.stop="noAdd(item, ind)">
  402. <image src="../../../static/images/index/jian.png" style="width: 54rpx; height: 54rpx"></image>
  403. </view>
  404. <view class="text-center margin-lr-xs">{{ item.goodsNum }}</view>
  405. <view @click.stop="add(item, ind)">
  406. <image src="../../../static/images/index/add.png" style="width: 50rpx; height: 50rpx"></image>
  407. </view>
  408. </view>
  409. </view>
  410. </view>
  411. </view>
  412. </scroll-view>
  413. </view>
  414. <view class="settlement1 margin-top-lg">
  415. <view class="settlement_img">
  416. <image src="../../../static/images/index/diancan.png" mode=""></image>
  417. <view class="settlement_hot">{{ goodsNum }}</view>
  418. </view>
  419. <view class="settlement_le">
  420. <text>¥</text>
  421. {{ totalPrice }}
  422. <text v-if="shopDet.minimumDelivery" style="margin-left: 10rpx">{{ shopDet.minimumDelivery }}元起送</text>
  423. </view>
  424. <view v-if="totalPrice >= shopDet.minimumDelivery" class="settlement_ri" @click.stop="goConfirm_throttle()">去结算</view>
  425. <view v-else class="settlement_ri1">去结算</view>
  426. </view>
  427. </u-popup>
  428. <!-- 选择规格弹窗 -->
  429. <u-popup v-model="skuShow" mode="center" :closeable="true" border-radius="20">
  430. <view style="width: 700rpx">
  431. <view class="text-center text-lg text-bold padding-tb">{{ goodsDet.goodsName }}</view>
  432. <view class="margin-top-sm padding-lr" v-for="(item, index) in attrList" :key="index">
  433. <view class="text-bold text-black">{{ item.value }}</view>
  434. <view class="flex margin-tb-sm flex-wrap">
  435. <view v-for="(ite, ind) in item.detail" :key="ind" @click="skuSel(ite, index, ind)" class="margin-bottom-sm">
  436. <view class="skuBtn" :class="item.goodsId == index && item.attrId == ind ? 'active' : ''">
  437. {{ ite.name }}
  438. </view>
  439. </view>
  440. </view>
  441. </view>
  442. <view class="flex justify-between padding-lr padding-top">
  443. <view>
  444. <view class="text-xl text-bold" style="color: #ff0303">
  445. <text class="text-sm">¥</text>
  446. {{ price }}
  447. </view>
  448. <view class="detail_describe_text2">{{ checkString }}</view>
  449. </view>
  450. <u-number-box v-model="value" :min="1" @change="valChange"></u-number-box>
  451. </view>
  452. <view class="detail_account_bottom padding">
  453. <view class="detail_account_bottom_le" @click="payment()">立即购买</view>
  454. <view class="detail_account_bottom_ri" @click="orderSel(2)">加入购物车</view>
  455. </view>
  456. </view>
  457. </u-popup>
  458. <!-- 优惠券弹窗 -->
  459. <!-- coupons -->
  460. <u-popup v-model="coupons" height="520rpx" mode="bottom" :closeable="true">
  461. <view class="yhq flex justify-center align-center">
  462. <view class="yhq-box">
  463. <view class="yhq-box-title">优惠券</view>
  464. <view class="yhq-box-list">
  465. <scroll-view scroll-y="true" style="width: 100%; height: 100%; padding-bottom: 20rpx">
  466. <view class="yhq-box-list-item flex justify-center align-center" v-for="(item, index) in couponList" :key="index">
  467. <view class="yhq-box-list-item-c flex justify-between align-center">
  468. <view class="yhq-box-list-item-c-l flex align-center">
  469. <image
  470. :src="
  471. item.couponPicture
  472. ? item.couponPicture
  473. : 'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'
  474. "
  475. style="width: 80rpx; height: 80rpx; border-radius: 20rpx"
  476. mode=""
  477. ></image>
  478. <view class="" style="margin-left: 20rpx">
  479. <view class="">
  480. <text style="color: red; margin-right: 10rpx">¥{{ item.money }}</text>
  481. <text style="font-weight: bold; margin-right: 10rpx">优惠券</text>
  482. (满{{ item.minMoney }}元可用)
  483. </view>
  484. <view class="" style="font-size: 20rpx; color: gray">领取后{{ item.endDate }}天内有效</view>
  485. </view>
  486. </view>
  487. <view class="yhq-box-list-item-c-r" style="color: red" @click="lingqv(item.couponId)">领取</view>
  488. </view>
  489. </view>
  490. </scroll-view>
  491. </view>
  492. </view>
  493. </view>
  494. </u-popup>
  495. <!-- 点击店铺公告栏弹框 -->
  496. <u-popup v-model="popupGong" mode="center" border-radius="20">
  497. <view style="width: 700rpx; height: 592rpx">
  498. <view style="width: 500rpx; display: flex">
  499. <view class="gong_img">
  500. <image :src="shopDet.shopCover" class="radius" style="width: 110rpx; height: 110rpx"></image>
  501. </view>
  502. <view class="gong_name">{{ shopDet.shopName }}</view>
  503. <view class="flex align-center margin-top-xs gong_pei">
  504. <!-- <view style="color: #FCD202;margin-right: 8rpx;">{{shopDet.autoSendOrder==1?'商家配送':'平台配送'}}</view> -->
  505. <view style="margin-right: 8rpx">{{ shopDet.autoSendOrder == 1 ? '商家配送:' : '平台配送:' }}</view>
  506. <view class="text-gray" style="margin-right: 8rpx">配送费{{ shopDet.errandMoney ? shopDet.errandMoney : 0 }}元</view>
  507. <!-- <view class="lable text-gray" v-if="shopDet.enableFullReductionFlag==1">
  508. 不参与配送费满减</view> -->
  509. <view class="lable text-gray" v-if="shopDet.enableFullReductionFlag == 0 && shopDet.exemptMinMoney">满{{ shopDet.exemptMinMoney }}元免配送费</view>
  510. </view>
  511. <view class="gong_line"></view>
  512. </view>
  513. <view class="align-center margin-top-xs" style="margin-top: 35rpx">
  514. <view v-for="(ite, ind) in gongHuo" :key="ind">
  515. <view class="flex align-center" style="margin-left: 40rpx; margin-top: 4px" v-for="(ite2, ind2) in ite.activityInGroups" :key="ind2">
  516. <text
  517. style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box; border: 1px solid rgba(215, 55, 49, 1)"
  518. v-if="ite.activityType == '2'"
  519. >
  520. 时段
  521. </text>
  522. <text
  523. style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box; border: 1px solid rgba(215, 55, 49, 1)"
  524. v-if="ite.activityType == '3'"
  525. >
  526. 满额
  527. </text>
  528. <text
  529. style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box; border: 1px solid rgba(215, 55, 49, 1)"
  530. v-if="ite.activityType == '4'"
  531. >
  532. 全场
  533. </text>
  534. <text style="margin-left: 6px">{{ ite2.activityTitle }}</text>
  535. <view class="gong_huo" style="margin-left: 6px">
  536. <text v-if="ite2.suitType == '1'">皆适用</text>
  537. <text v-if="ite2.suitType == '2'">仅针对第一次下单</text>
  538. <text v-if="ite2.limitType == '1'">无数量限制</text>
  539. <text v-if="ite2.limitType == '2'">每天限使用{{ ite2.limitValue }}次</text>
  540. </view>
  541. </view>
  542. </view>
  543. <!-- <view v-for="(ite,ind) in gongHuo" :key='ind' v-if="ite.activityType=='3'">
  544. <view class=" flex align-center" style="margin-left: 40rpx;margin-top: 4px;" v-for="(ite2,ind2) in ite2.activityInGroups" :key='ind2'>
  545. <text style="border-radius: 4rpx;background-color: #ffffff;color: red;box-sizing: border-box;border: 1px solid rgba(215, 55, 49, 1);">时段</text>
  546. <text style="margin-left: 6px;">{{ite2.activityTitle}}</text>
  547. <view class="gong_huo" style="margin-left: 6px;">
  548. <text v-if="ite2.suitType=='1'">无限制</text>
  549. <text v-if="ite2.suitType=='2'">仅针对第一次下单</text>
  550. </view>
  551. </view>
  552. </view>
  553. <view v-for="(ite,ind) in gongHuo" :key='ind' v-if="ite.activityType=='4'">
  554. <view class=" flex align-center" style="margin-left: 40rpx;margin-top: 4px;" v-for="(ite2,ind2) in ite2.activityInGroups" :key='ind2'>
  555. <text style="border-radius: 4rpx;background-color: #ffffff;color: red;box-sizing: border-box;border: 1px solid rgba(215, 55, 49, 1);">时段</text>
  556. <text style="margin-left: 6px;">{{ite2.activityTitle}}</text>
  557. <view class="gong_huo" style="margin-left: 6px;">
  558. <text v-if="ite2.suitType=='1'">无限制</text>
  559. <text v-if="ite2.suitType=='2'">仅针对第一次下单</text>
  560. </view>
  561. </view>
  562. </view> -->
  563. </view>
  564. <view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice" style="margin-top: 35rpx; margin-left: 40rpx">
  565. <text style="width: 14%">公告:</text>
  566. <view>{{ shopDet.shopNotice }}</view>
  567. </view>
  568. </view>
  569. </u-popup>
  570. </view>
  571. <view class="hintPopul" v-if="shopDet && shopDet.putawayFlag == 1">
  572. <view class="content_">
  573. <image src="../../../static/images/index/shop.png" style="width: 200rpx; height: 180rpx"></image>
  574. <view class="text-xl text-bold">店铺打烊啦</view>
  575. <view class="hintText margin-top-sm text-gray">现在店铺已经打烊了,营业时间</view>
  576. <view class="margin-top-xs text-gray margin-bottom">{{ shopDet.businessHours }}-{{ shopDet.lockHours }}</view>
  577. <view class="Btns" @click="goBack()">知道了</view>
  578. </view>
  579. </view>
  580. </view>
  581. </view>
  582. </template>
  583. <script>
  584. import empty from '@/components/empty.vue'
  585. import { throttle } from '@/utils/throttle.js'
  586. export default {
  587. components: {
  588. empty
  589. },
  590. data() {
  591. return {
  592. maskCustomStyle: {
  593. background: 'rgba(0,0,0,0.1)'
  594. },
  595. hdStyle: {
  596. background: '#F5F5F5'
  597. },
  598. customStyle: {
  599. color: '#333333',
  600. background: '#568D84',
  601. marginRight: '20rpx',
  602. border: 0
  603. },
  604. customStyle1: {
  605. color: '#333333',
  606. background: '#fff',
  607. marginRight: '20rpx',
  608. border: 0
  609. },
  610. current: 1,
  611. loading: false, // 是否显示骨架屏组件
  612. tabCur: 0,
  613. mainCur: 0,
  614. verticalNavTop: 0,
  615. load: true,
  616. dataList: [],
  617. shopDet: {},
  618. shopList: [],
  619. city: '西安',
  620. lat: '',
  621. lng: '',
  622. shopName: '',
  623. page: 1,
  624. limit: 10,
  625. evaluatePage: 1,
  626. evaluateLimit: 10,
  627. show: true,
  628. totalPrice: 0,
  629. goodsNum: 0,
  630. goodsList: {
  631. orderGoodsList: [[]]
  632. },
  633. popupShow: false,
  634. skuShow: false,
  635. popupGong: false, //店铺公告弹框
  636. gongHuo: [], //店铺公告活动
  637. userId: '',
  638. hintShow: true, //
  639. shouquan: 0,
  640. orderType: 2,
  641. value: 1,
  642. goodsDet: {},
  643. skuId: '',
  644. skuMessage: '',
  645. skuList: [],
  646. attrList: [],
  647. checkString: '',
  648. checkStateList: [],
  649. CheckattrValue: false,
  650. price: 0,
  651. echoSkuList: [],
  652. echoSku: [],
  653. isEchoSku: {},
  654. shopId: '',
  655. lng: '',
  656. lat: '',
  657. commentList: [],
  658. EvaluateList: [],
  659. EvaluateData: {},
  660. grade: '',
  661. count: 0,
  662. orderId: '',
  663. isTrue: false,
  664. XCXIsSelect: '否',
  665. couponList: [], //优惠券列表
  666. coupons: false,
  667. huoListss: [], //活动
  668. shop_zhizhao: []
  669. }
  670. },
  671. onLoad(option) {
  672. if (option.huoListss) {
  673. this.huoListss = JSON.parse(decodeURIComponent(option.huoListss))
  674. }
  675. this.XCXIsSelect = this.$queue.getData('XCXIsSelect')
  676. if (this.XCXIsSelect == '否') {
  677. // this.getGuize()
  678. uni.setNavigationBarTitle({
  679. title: '隐私政策'
  680. })
  681. } else {
  682. uni.setNavigationBarTitle({
  683. title: '店铺详情'
  684. })
  685. }
  686. let that = this
  687. that.shopId = option.shopId
  688. uni.showLoading({
  689. title: '加载中',
  690. mask: true // 是否显示透明蒙层,防止触摸穿透
  691. })
  692. // #ifndef H5
  693. uni.getLocation({
  694. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  695. success: function (res) {
  696. that.lat = res.latitude
  697. that.lng = res.longitude
  698. }
  699. })
  700. that.getData()
  701. // #endif
  702. // #ifdef H5
  703. uni.getLocation({
  704. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  705. success: function (res) {
  706. console.log(res, '经纬度')
  707. that.lat = res.latitude
  708. that.lng = res.longitude
  709. that.getData()
  710. }
  711. })
  712. that.getData()
  713. // #endif
  714. that.orderId = uni.getStorageSync('orderId') ? uni.getStorageSync('orderId') : ''
  715. },
  716. onHide() {
  717. uni.removeStorageSync('types')
  718. },
  719. onShow() {
  720. // 清空购物车
  721. let isClear = uni.getStorageSync('isClear')
  722. if (isClear) {
  723. uni.setStorageSync('isClear', false)
  724. this.empty()
  725. } else {
  726. this.getOrderList()
  727. }
  728. this.orderId = uni.getStorageSync('orderId') ? uni.getStorageSync('orderId') : ''
  729. if (this.orderId) {
  730. this.getOrderDetail()
  731. }
  732. this.userId = uni.getStorageSync('userId')
  733. // this.getOrderList()
  734. this.getcouponList()
  735. },
  736. onShareAppMessage(res) {
  737. //发送给朋友
  738. return {
  739. title: this.shopDet.shopName,
  740. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  741. imageUrl: this.shopDet.shopCover
  742. }
  743. },
  744. onShareTimeline(res) {
  745. //分享到朋友圈
  746. return {
  747. title: this.shopDet.shopName,
  748. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  749. imageUrl: this.shopDet.shopCover
  750. }
  751. },
  752. methods: {
  753. //营业执照点击放大
  754. clickImg(img) {
  755. uni.previewImage({
  756. urls: [img], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  757. current: '', // 当前显示图片的http链接,默认是第一个
  758. success: function (res) {},
  759. fail: function (res) {},
  760. complete: function (res) {}
  761. })
  762. },
  763. //点击店铺公告弹框
  764. clickGong() {
  765. this.getHuoList()
  766. this.popupGong = true
  767. },
  768. //获取店铺活动信息
  769. getHuoList() {
  770. let data = {
  771. shopId: this.shopId
  772. }
  773. this.$Request.get(`/app/activity-shop/shop-activity-group/${this.shopId}`, data).then((res) => {
  774. if (res.code == 0) {
  775. this.gongHuo = res.data.activityTypeGroups
  776. }
  777. })
  778. },
  779. //领取优惠券
  780. lingqv(couponId, needIntegral) {
  781. let that = this
  782. let data = {
  783. couponId: couponId
  784. }
  785. that.$Request.postT('/app/coupon/buyCoupon', data).then((res) => {
  786. if (res.code == 0) {
  787. uni.showToast({
  788. title: '领取成功'
  789. })
  790. that.coupons = false
  791. } else {
  792. uni.showToast({
  793. title: res.msg,
  794. icon: 'none'
  795. })
  796. }
  797. })
  798. },
  799. //获取商家优惠券
  800. getcouponList() {
  801. // couponList
  802. let data = {
  803. shopId: this.shopId
  804. }
  805. this.$Request.get('/app/coupon/seleteAllCoupon', data).then((res) => {
  806. if (res.code == 0 && res.data) {
  807. this.couponList = res.data
  808. }
  809. })
  810. },
  811. // 预览图片
  812. yuanlan(arr, index) {
  813. uni.previewImage({
  814. urls: arr,
  815. current: index
  816. })
  817. },
  818. goBack() {
  819. uni.navigateBack({})
  820. },
  821. goNav(url) {
  822. uni.navigateTo({
  823. url
  824. })
  825. },
  826. switchTab(e) {
  827. // this.page = 1
  828. this.current = e
  829. if (this.current == 1) {
  830. this.getData()
  831. } else if (this.current == 2) {
  832. this.evaluatePage = 1
  833. this.getEvaluateList()
  834. } else if (this.current == 3) {
  835. }
  836. },
  837. sel(e) {
  838. this.grade = e
  839. this.count = e
  840. this.evaluatePage = 1
  841. this.getEvaluateList()
  842. },
  843. // 获取评论列表
  844. getEvaluateList() {
  845. let data = {
  846. shopId: this.shopId,
  847. page: this.evaluatePage,
  848. limit: this.evaluateLimit,
  849. grade: this.grade
  850. }
  851. this.$Request.get('/app/goods/selectEvaluateByShopId', data).then((res) => {
  852. if (res.code == 0 && res.data) {
  853. this.EvaluateData = res.data
  854. if (this.evaluatePage == 1) {
  855. this.EvaluateList = res.data.pageUtils.list
  856. } else {
  857. this.EvaluateList = [...this.EvaluateList, ...res.data.pageUtils.list]
  858. }
  859. }
  860. })
  861. },
  862. // 获取店铺信息
  863. getData() {
  864. let data = {
  865. shopId: this.shopId,
  866. lng: this.lng,
  867. lat: this.lat
  868. }
  869. this.$Request.get('/app/goods/selectGoodsList', data).then((res) => {
  870. console.log(res, '999')
  871. if (res.code == 0 && res.data) {
  872. this.dataList = res.data.list
  873. this.shopDet = res.data.goodsShop
  874. for (var i = 0; i < this.dataList.length; i++) {
  875. this.dataList[i].id = i
  876. }
  877. this.shopDet.shopScore1 = Math.floor(this.shopDet.shopScore)
  878. this.shopDet.errandTime = Math.round(this.shopDet.errandTime)
  879. if (this.shopDet.shopBanner) {
  880. this.shopDet.shopBanner = this.shopDet.shopBanner.split(',')
  881. }
  882. console.log(this.shopDet, 'kkkkkk')
  883. if (this.shopDet.businessLicense) {
  884. this.shop_zhizhao = this.shopDet.businessLicense.split(',')
  885. }
  886. this.shopDet.shopScore = this.shopDet.shopScore.toFixed(2)
  887. if (this.shopDet.distributionDistance < 1000) {
  888. this.shopDet.distributionDistance = '<1000m'
  889. } else {
  890. this.shopDet.distributionDistance = Number(this.shopDet.distributionDistance / 1000) + 'km'
  891. }
  892. uni.setNavigationBarTitle({
  893. title: this.shopDet.shopName
  894. })
  895. }
  896. uni.hideLoading()
  897. })
  898. },
  899. getEchoOrder() {
  900. let data = {
  901. shopId: this.shopId,
  902. goodsId: this.goodsDet.goodsId
  903. }
  904. this.$Request.get('/app/order/echoOrder', data).then((res) => {
  905. if (res.code == 0 && res.data.length) {
  906. this.echoSkuList = res.data
  907. if (res.data[0].skuMessage) {
  908. this.echoSku = res.data[0].skuMessage.split(',')
  909. }
  910. }
  911. })
  912. },
  913. // 弹窗展示商品详情
  914. selSku(item) {
  915. this.value = 1
  916. this.checkStateList = []
  917. this.checkString = ''
  918. this.attrList = []
  919. this.skuId = ''
  920. this.skuMessage = ''
  921. let data = {
  922. goodsId: item.goodsId
  923. }
  924. console.log(data)
  925. this.$Request.get('/app/goods/selectGoodsById', data).then((res) => {
  926. uni.hideLoading()
  927. if (res.code == 0) {
  928. this.goodsDet = res.data
  929. if (this.goodsDet.goodsLabel) {
  930. this.goodsDet.goodsLabel = this.goodsDet.goodsLabel.split(',')
  931. }
  932. if (this.goodsDet.goodsPicture) {
  933. this.goodsDet.goodsPicture = this.goodsDet.goodsPicture.split(',')
  934. }
  935. console.log(this.goodsDet, '商品')
  936. this.price = this.goodsDet.goodsMoney
  937. this.skuList = this.goodsDet.sku
  938. this.getEchoOrder()
  939. if (!this.skuList.length) {
  940. let that = this
  941. setTimeout(function () {
  942. that.orderSel(2)
  943. }, 500)
  944. } else {
  945. if (this.goodsDet.attr.length) {
  946. this.attrList = this.goodsDet.attr[0] ? this.goodsDet.attr[0].attrValue : []
  947. } else {
  948. this.skuId = this.goodsDet.sku[0].id
  949. }
  950. this.attrList.forEach((res) => {
  951. let data = {
  952. name: ''
  953. }
  954. this.checkStateList.push(data)
  955. let detail = []
  956. if (res.detail.length > 0) {
  957. res.detail.split(',').forEach((d) => {
  958. let data = {
  959. name: '',
  960. state: ''
  961. }
  962. data.name = d
  963. detail.push(data)
  964. })
  965. res.detail = detail
  966. }
  967. })
  968. this.skuShow = true
  969. }
  970. }
  971. })
  972. },
  973. // 选择规格
  974. skuSel(item, index, ind) {
  975. this.attrList[index].goodsId = index
  976. this.attrList[index].attrId = ind
  977. this.checkStateList[index].name = item.name
  978. this.checkString = ''
  979. this.checkStateList.forEach((d) => {
  980. if (d.name) {
  981. if (this.checkString) {
  982. this.checkString = this.checkString + ',' + d.name
  983. } else {
  984. this.checkString = d.name
  985. }
  986. }
  987. })
  988. console.log(this.checkString)
  989. console.log(this.skuList)
  990. for (var i = 0; i < this.skuList.length; i++) {
  991. let d = this.skuList[i]
  992. // console.log(this.skuList[i], 'l')
  993. if (d.detailJson == this.checkString) {
  994. console.log(d.detailJson, this.checkString)
  995. // if (d.stock > 0) {
  996. this.skuId = d.id
  997. this.skuMessage = d.detailJson
  998. this.price = d.skuPrice
  999. this.CheckattrValue = true
  1000. // } else {
  1001. // this.$queue.showToast('库存不足请选择其他规格')
  1002. // }
  1003. break
  1004. } else {
  1005. this.CheckattrValue = false
  1006. }
  1007. }
  1008. },
  1009. valChange(e) {
  1010. console.log('当前值为: ' + e.value)
  1011. this.value = e.value
  1012. },
  1013. // 立即购买
  1014. payment() {
  1015. if (!this.userId) {
  1016. uni.navigateTo({
  1017. url: '/pages/public/login'
  1018. })
  1019. return
  1020. }
  1021. if (this.attrList.length) {
  1022. if (this.checkString == '' || !this.CheckattrValue) {
  1023. this.$queue.showToast('请选择正确的商品规格')
  1024. return
  1025. }
  1026. }
  1027. let goodstr1 = 0 //商品库的 必须次数
  1028. let goodstr2 = 0 //购物车的 必须次数
  1029. let regex = new RegExp('必选', 'g')
  1030. let dataList = JSON.stringify(this.dataList)
  1031. if (dataList.match(regex)) {
  1032. goodstr1 = dataList.match(regex).length
  1033. if (dataList.indexOf('必选') != -1) {
  1034. //检测商品是否存在必选
  1035. let goodsList = JSON.stringify(this.goodsDet)
  1036. if (goodsList.match(regex)) {
  1037. goodstr2 = goodsList.match(regex).length
  1038. if (goodstr1 == goodstr2) {
  1039. //检查购物车商品是否存在必须
  1040. let data = {
  1041. goodsId: this.goodsDet.goodsId,
  1042. skuMessage: this.skuMessage,
  1043. skuId: this.skuId,
  1044. num: this.value,
  1045. orderType: this.orderType,
  1046. shopId: this.shopId
  1047. }
  1048. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1049. if (res.code == 0) {
  1050. this.skuShow = false
  1051. uni.navigateTo({
  1052. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1053. })
  1054. } else {
  1055. this.$queue.showToast(res.msg)
  1056. }
  1057. })
  1058. } else {
  1059. uni.showToast({
  1060. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1061. icon: 'none'
  1062. })
  1063. return
  1064. }
  1065. } else {
  1066. uni.showToast({
  1067. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1068. icon: 'none'
  1069. })
  1070. return
  1071. }
  1072. }
  1073. } else {
  1074. let data = {
  1075. goodsId: this.goodsDet.goodsId,
  1076. skuMessage: this.skuMessage,
  1077. skuId: this.skuId,
  1078. num: this.value,
  1079. orderType: this.orderType,
  1080. shopId: this.shopId
  1081. }
  1082. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  1083. if (res.code == 0) {
  1084. this.skuShow = false
  1085. uni.navigateTo({
  1086. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  1087. })
  1088. } else {
  1089. this.$queue.showToast(res.msg)
  1090. }
  1091. })
  1092. }
  1093. },
  1094. // 加入购物车
  1095. orderSel(e) {
  1096. if (this.value < 1) {
  1097. uni.showToast({
  1098. title: '数量不能小于1',
  1099. icon: 'none'
  1100. })
  1101. return
  1102. }
  1103. if (!this.userId) {
  1104. uni.navigateTo({
  1105. url: '/pages/public/login'
  1106. })
  1107. return
  1108. }
  1109. if (this.attrList.length) {
  1110. if (this.checkString == '' || !this.CheckattrValue) {
  1111. this.$queue.showToast('请选择正确的商品规格')
  1112. return
  1113. }
  1114. }
  1115. let data = {
  1116. goodsId: this.goodsDet.goodsId,
  1117. skuMessage: this.skuMessage,
  1118. skuId: this.skuId,
  1119. num: this.value,
  1120. shopId: this.shopId
  1121. }
  1122. // let url = ''
  1123. // if (this.types == 1) {
  1124. // url = '/app/order/joinOrder'
  1125. // } else {
  1126. // url = '/app/order/insertOrder'
  1127. // }
  1128. // console.log(data, '参数')
  1129. this.$Request.post('/app/order/insertOrder', data).then((res) => {
  1130. if (res.code == 0) {
  1131. this.$queue.showToast('添加成功')
  1132. this.skuShow = false
  1133. this.getOrderList()
  1134. } else {
  1135. this.$queue.showToast(res.msg)
  1136. }
  1137. })
  1138. },
  1139. // 切换外卖/自提
  1140. tabSwidth(e) {
  1141. this.orderType = e
  1142. this.getOrderList()
  1143. },
  1144. // 展示购物车弹窗
  1145. isPopupShow() {
  1146. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1147. this.popupShow = true
  1148. } else {
  1149. uni.showToast({
  1150. title: '请先添加商品',
  1151. icon: 'none'
  1152. })
  1153. }
  1154. },
  1155. // 添加数量
  1156. add(item, index) {
  1157. // this.count++;
  1158. this.goodsList.orderGoodsList[0][index].goodsNum++
  1159. let data = {
  1160. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1161. type: 1,
  1162. num: 1,
  1163. shopId: this.shopId
  1164. }
  1165. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1166. if (res.code == 0) {
  1167. this.getOrderList()
  1168. } else {
  1169. this.$queue.showToast(res.msg)
  1170. this.goodsList.orderGoodsList[0][index].goodsNum--
  1171. }
  1172. })
  1173. },
  1174. // 减少数量
  1175. noAdd(item, index) {
  1176. this.goodsList.orderGoodsList[0][index].goodsNum--
  1177. // this.count--;
  1178. let data = {
  1179. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  1180. type: 2,
  1181. num: 1,
  1182. shopId: this.shopId
  1183. }
  1184. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  1185. if (res.code == 0) {
  1186. this.getOrderList()
  1187. }
  1188. })
  1189. },
  1190. // 清空购物车
  1191. empty() {
  1192. let data = {
  1193. shopId: this.shopId
  1194. }
  1195. this.$Request.post('/app/order/emptyShoppingTrolley', data).then((res) => {
  1196. console.log(res)
  1197. if (res.code == 0) {
  1198. this.totalPrice = 0
  1199. this.goodsNum = 0
  1200. this.goodsList = {
  1201. orderGoodsList: [[]]
  1202. }
  1203. this.echoSkuList = []
  1204. this.echoSku = []
  1205. this.getOrderList()
  1206. this.popupShow = false
  1207. this.getEchoOrder()
  1208. }
  1209. })
  1210. },
  1211. // 获取购物车商品列表
  1212. getOrderList() {
  1213. // 显示加载提示
  1214. uni.showLoading({
  1215. title: '加载中', // 加载提示文本
  1216. mask: true // 是否显示透明蒙层,防止触摸穿透
  1217. })
  1218. let data = {
  1219. shopId: this.shopId,
  1220. page: 1,
  1221. limit: 1000,
  1222. status: 1
  1223. // orderType: this.orderType
  1224. }
  1225. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  1226. if (res.code == 0 && res.data.pageUtils.list.length) {
  1227. this.goodsList = res.data.pageUtils.list[0]
  1228. console.log(this.goodsList, '888')
  1229. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0]) {
  1230. this.totalPrice = res.data.money
  1231. this.goodsNum = 0
  1232. this.goodsList.orderGoodsList[0].forEach((res) => {
  1233. if (res.goodsPicture) {
  1234. res.goodsPicture = res.goodsPicture.split(',')
  1235. }
  1236. this.goodsNum += res.goodsNum
  1237. })
  1238. if (!this.goodsList.orderGoodsList[0].length) {
  1239. this.popupShow = false
  1240. }
  1241. }
  1242. }
  1243. // 加载提示关闭
  1244. uni.hideLoading()
  1245. })
  1246. },
  1247. // 跳转商品详情
  1248. goDet(id) {
  1249. uni.navigateTo({
  1250. url: '/pages/index/shop/goodsDet?goodsId=' + id + '&shopId=' + this.shopId + '&orderType=' + this.orderType
  1251. })
  1252. },
  1253. goConfirm_throttle: throttle(function () {
  1254. this.goConfirm()
  1255. }, 1000),
  1256. // 去结算
  1257. goConfirm() {
  1258. if (!this.userId) {
  1259. uni.navigateTo({
  1260. url: '/pages/public/login'
  1261. })
  1262. return
  1263. }
  1264. let goodstr1 = 0 //商品库的 必须次数
  1265. let goodstr2 = 0 //购物车的 必须次数
  1266. // let aa=[]
  1267. // let bb=[]
  1268. let regex = new RegExp('必选', 'g')
  1269. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  1270. // aa=this.dataList.map(item => item.goodsList)
  1271. // bb=aa.map(item => item)
  1272. let dataList = JSON.stringify(this.dataList)
  1273. if (dataList.match(regex)) {
  1274. goodstr1 = dataList.match(regex).length
  1275. if (dataList.indexOf('必选') != -1) {
  1276. //检测商品是否存在必选
  1277. let goodsList = JSON.stringify(this.goodsList.orderGoodsList)
  1278. if (goodsList.match(regex)) {
  1279. goodstr2 = goodsList.match(regex).length
  1280. if (goodstr1 == goodstr2) {
  1281. //检查购物车商品是否存在必须
  1282. uni.navigateTo({
  1283. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType + '&shopTypeName=' + this.shopDet.shopTypeName
  1284. })
  1285. } else {
  1286. uni.showToast({
  1287. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1288. icon: 'none'
  1289. })
  1290. return
  1291. }
  1292. } else {
  1293. uni.showToast({
  1294. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  1295. icon: 'none'
  1296. })
  1297. return
  1298. }
  1299. }
  1300. } else {
  1301. console.log('3333fd', this.shopDet)
  1302. uni.navigateTo({
  1303. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType + '&shopTypeName=' + this.shopDet.shopTypeName
  1304. })
  1305. }
  1306. } else {
  1307. uni.showToast({
  1308. title: '请先添加商品',
  1309. icon: 'none'
  1310. })
  1311. }
  1312. },
  1313. TabSelect(e) {
  1314. this.tabCur = e.currentTarget.dataset.id
  1315. this.mainCur = e.currentTarget.dataset.id
  1316. this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
  1317. },
  1318. VerticalMain(e) {
  1319. let that = this
  1320. let tabHeight = 0
  1321. if (this.load) {
  1322. for (let i = 0; i < this.dataList.length; i++) {
  1323. let view = uni.createSelectorQuery().select('#main-' + this.dataList[i].id)
  1324. view.fields(
  1325. {
  1326. size: true
  1327. },
  1328. (data) => {
  1329. this.dataList[i].top = tabHeight
  1330. tabHeight = tabHeight + data.height
  1331. this.dataList[i].bottom = tabHeight
  1332. }
  1333. ).exec()
  1334. }
  1335. this.load = false
  1336. }
  1337. let scrollTop = e.detail.scrollTop
  1338. for (let i = 0; i < this.dataList.length; i++) {
  1339. if (scrollTop > this.dataList[i].top && scrollTop < this.dataList[i].bottom) {
  1340. this.verticalNavTop = (this.dataList[i].id - 1) * 50
  1341. this.tabCur = this.dataList[i].id
  1342. return false
  1343. }
  1344. }
  1345. },
  1346. // 打电话
  1347. call(e) {
  1348. uni.makePhoneCall({
  1349. phoneNumber: e
  1350. })
  1351. },
  1352. // 点击调起地图查看位置
  1353. goMap() {
  1354. //查看位置需要传经纬度才能执行
  1355. let that = this
  1356. uni.authorize({
  1357. scope: 'scope.userLocation',
  1358. success(res) {
  1359. uni.openLocation({
  1360. latitude: that.shopDet.shopLat,
  1361. longitude: that.shopDet.shopLng,
  1362. success: function () {}
  1363. })
  1364. },
  1365. fail(err) {}
  1366. })
  1367. },
  1368. getOrderDetail() {
  1369. let data = {
  1370. orderId: this.orderId
  1371. }
  1372. this.$Request.getT('/app/order/selectOrderById', data).then((res) => {
  1373. if (res.code == 0 && res.data) {
  1374. if (res.data.isPay && res.data.isPay == 1) {
  1375. this.orderId = ''
  1376. uni.removeStorageSync('orderId')
  1377. }
  1378. }
  1379. })
  1380. },
  1381. goPindan() {
  1382. if (!this.userId) {
  1383. uni.navigateTo({
  1384. url: '/pages/public/login'
  1385. })
  1386. return
  1387. }
  1388. if (uni.getStorageSync('orderId')) {
  1389. uni.navigateTo({
  1390. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + uni.getStorageSync('orderId')
  1391. })
  1392. } else {
  1393. let data = {
  1394. shopId: this.shopId
  1395. }
  1396. this.$Request.post('/app/order/shareTheBill', data).then((res) => {
  1397. if (res.code == 0) {
  1398. uni.navigateTo({
  1399. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId + '&orderId=' + res.data
  1400. })
  1401. }
  1402. })
  1403. }
  1404. }
  1405. },
  1406. onReachBottom: function () {
  1407. if (this.current == 2) {
  1408. this.evaluatePage = this.evaluatePage + 1
  1409. this.getEvaluateList()
  1410. }
  1411. }
  1412. }
  1413. </script>
  1414. <style scoped lang="scss">
  1415. page {
  1416. background-color: #ffffff;
  1417. }
  1418. .yhq {
  1419. width: 100%;
  1420. height: 520rpx;
  1421. background-color: #f5f5f5;
  1422. overflow-y: hidden;
  1423. .yhq-box {
  1424. width: 686rpx;
  1425. height: 500rpx;
  1426. // background-color: red;
  1427. .yhq-box-title {
  1428. width: 100%;
  1429. text-align: center;
  1430. font-weight: bold;
  1431. }
  1432. .yhq-box-list {
  1433. width: 100%;
  1434. height: auto;
  1435. height: 460rpx;
  1436. margin-top: 30rpx;
  1437. .yhq-box-list-item {
  1438. width: 100%;
  1439. height: 120rpx;
  1440. border-radius: 24rpx;
  1441. background-color: #ffffff;
  1442. margin-bottom: 20rpx;
  1443. }
  1444. .yhq-box-list-item-c {
  1445. width: 646rpx;
  1446. height: 100%;
  1447. }
  1448. }
  1449. }
  1450. }
  1451. .scroll-view_H {
  1452. width: 100%;
  1453. white-space: nowrap;
  1454. }
  1455. .coupon-item {
  1456. display: inline-block;
  1457. height: 46rpx;
  1458. margin-right: 20rpx;
  1459. border: 1px solid red;
  1460. border-radius: 10rpx;
  1461. padding: 0rpx 10rpx 0rpx 10rpx;
  1462. font-size: 20rpx;
  1463. color: red;
  1464. line-height: 44rpx;
  1465. view {
  1466. display: inline-block;
  1467. }
  1468. }
  1469. .pinglunImg {
  1470. width: 100%;
  1471. margin-top: 10rpx;
  1472. }
  1473. .pinglunImg-box {
  1474. width: 100%;
  1475. image {
  1476. // margin-left: 10rpx;
  1477. width: 160upx;
  1478. height: 160upx;
  1479. border-radius: 10rpx;
  1480. }
  1481. }
  1482. .hintPopul {
  1483. width: 100%;
  1484. height: 100vh;
  1485. position: fixed;
  1486. top: 0;
  1487. background: rgba(0, 0, 0, 0.4);
  1488. z-index: 999;
  1489. }
  1490. .content_ {
  1491. position: absolute;
  1492. left: 0;
  1493. right: 0;
  1494. top: 0;
  1495. bottom: 0;
  1496. margin: auto;
  1497. text-align: center;
  1498. width: 500rpx;
  1499. height: 400rpx;
  1500. border-radius: 20rpx;
  1501. background-color: #fff;
  1502. padding-top: 120rpx;
  1503. }
  1504. .content_ image {
  1505. position: absolute;
  1506. top: -50rpx;
  1507. left: 0;
  1508. right: 0;
  1509. margin: auto;
  1510. }
  1511. .hintText {
  1512. font-size: 30rpx;
  1513. }
  1514. .Btns {
  1515. width: 460rpx;
  1516. height: 60rpx;
  1517. line-height: 60rpx;
  1518. text-align: center;
  1519. background: #fcd202;
  1520. font-size: 28rpx;
  1521. border: 2rpx solid #fcd202;
  1522. color: #333333;
  1523. border-radius: 50rpx;
  1524. font-weight: 700;
  1525. margin: auto;
  1526. }
  1527. .bg1 {
  1528. background: #ffffff;
  1529. }
  1530. .sticky-tabs {
  1531. z-index: 990;
  1532. position: sticky;
  1533. top: var(--window-top);
  1534. // background-color: #fff;
  1535. }
  1536. /* // 使用mescroll-uni,则top为0 */
  1537. .mescroll-uni,
  1538. /deep/.mescroll-uni {
  1539. .sticky-tabs {
  1540. top: 0;
  1541. }
  1542. }
  1543. .shop {
  1544. // position: relative;
  1545. // z-index: 2;
  1546. // margin-top: -80rpx;
  1547. // left: 0;
  1548. // right: 0;
  1549. display: flex;
  1550. width: 100%;
  1551. margin: auto;
  1552. border-radius: 40rpx;
  1553. box-shadow: 0 0 20rpx #cccccc;
  1554. background: linear-gradient(135deg, #81bdb3 0%, #ecf6ce 100%);
  1555. }
  1556. .skuBtn {
  1557. padding: 10rpx 30rpx;
  1558. border-radius: 10rpx;
  1559. text-align: center;
  1560. margin: 10rpx 20rpx;
  1561. font-size: 28rpx;
  1562. color: #333333;
  1563. border: 2px solid #f2f2f2;
  1564. }
  1565. .active {
  1566. background: rgba(129, 189, 179, 0.2) !important;
  1567. border: 2px solid rgba(129, 189, 179, 1) !important;
  1568. opacity: 0.6;
  1569. }
  1570. .active1 {
  1571. /* width: 82rpx; */
  1572. height: 6rpx;
  1573. background: #568d84;
  1574. position: relative;
  1575. top: -10rpx;
  1576. z-index: 9;
  1577. }
  1578. .popup {
  1579. /* height: 500rpx; */
  1580. max-height: 500rpx;
  1581. padding: 0 30rpx;
  1582. /* overflow-y: auto; */
  1583. }
  1584. .tabBtn {
  1585. height: 60rpx;
  1586. line-height: 60rpx;
  1587. color: #999999;
  1588. font-size: 38rpx;
  1589. .title {
  1590. background-color: #fff9ed;
  1591. }
  1592. }
  1593. .Switch {
  1594. width: 164rpx;
  1595. height: 62rpx;
  1596. color: #ffffff;
  1597. background: #fcd202;
  1598. border-radius: 30rpx;
  1599. display: flex;
  1600. align-items: center;
  1601. padding: 2rpx;
  1602. }
  1603. .Switch > view {
  1604. /* flex: 1; */
  1605. width: 80rpx;
  1606. text-align: center;
  1607. line-height: 62rpx;
  1608. height: 58rpx;
  1609. }
  1610. .selSwitch {
  1611. color: #333333;
  1612. background: #ffffff;
  1613. border-radius: 30rpx;
  1614. }
  1615. .hintPopul {
  1616. width: 100%;
  1617. height: 100vh;
  1618. position: absolute;
  1619. top: 0;
  1620. background: rgba(0, 0, 0, 0.4);
  1621. }
  1622. .content {
  1623. position: absolute;
  1624. left: 0;
  1625. right: 0;
  1626. top: 0;
  1627. bottom: 0;
  1628. margin: auto;
  1629. text-align: center;
  1630. width: 500rpx;
  1631. height: 400rpx;
  1632. border-radius: 20rpx;
  1633. background-color: #fff;
  1634. padding-top: 120rpx;
  1635. }
  1636. .content image {
  1637. position: absolute;
  1638. top: -50rpx;
  1639. left: 0;
  1640. right: 0;
  1641. margin: auto;
  1642. }
  1643. .hintText {
  1644. font-size: 30rpx;
  1645. }
  1646. .VerticalNav.nav {
  1647. width: 200upx;
  1648. height: calc(100% - 120rpx);
  1649. white-space: initial;
  1650. background-color: #fff;
  1651. }
  1652. .VerticalNav.nav .cu-item {
  1653. width: 100%;
  1654. text-align: center;
  1655. background-color: #fff;
  1656. margin: 0;
  1657. border: none;
  1658. height: 50px;
  1659. line-height: 25px;
  1660. position: relative;
  1661. }
  1662. .VerticalNav.nav .cu-item.cur {
  1663. background-color: #fff9ed;
  1664. line-height: 25px;
  1665. }
  1666. .VerticalBox {
  1667. display: flex;
  1668. height: calc(100% - 120rpx);
  1669. background-color: #fff9ed;
  1670. }
  1671. .VerticalMain {
  1672. height: calc(100% - 120rpx);
  1673. background-color: #fff9ed;
  1674. flex: 1;
  1675. }
  1676. .detail_describe_text2 {
  1677. font-weight: 500;
  1678. margin-top: 2%;
  1679. color: #999999;
  1680. }
  1681. .detail_account_bottom {
  1682. margin-top: 20rpx;
  1683. width: 100%;
  1684. display: flex;
  1685. justify-content: space-between;
  1686. /* margin: 4% 0 3%; */
  1687. }
  1688. .detail_account_bottom_le {
  1689. width: 47.5%;
  1690. /* margin-right: 5%; */
  1691. border-radius: 44rpx;
  1692. text-align: center;
  1693. line-height: 2.8;
  1694. border: 2rpx solid rgba(129, 189, 179, 1);
  1695. background-color: rgba(129, 189, 179, 0.4);
  1696. }
  1697. .detail_account_bottom_ri {
  1698. width: 47.5%;
  1699. border-radius: 44rpx;
  1700. text-align: center;
  1701. line-height: 2.8;
  1702. background-color: rgba(129, 189, 179, 1);
  1703. }
  1704. .food_all {
  1705. position: relative;
  1706. }
  1707. .text-through {
  1708. text-decoration: line-through;
  1709. }
  1710. /* 食物 */
  1711. .food {
  1712. width: 100%;
  1713. height: calc(100vh - 260rpx);
  1714. overflow: hidden;
  1715. // position: absolute;
  1716. // top: 350rpx;
  1717. background-color: #fff9ed;
  1718. border-top-left-radius: 18rpx;
  1719. border-top-right-radius: 18rpx;
  1720. }
  1721. .food_address {
  1722. // margin: 3% 3% 0 3%;
  1723. // margin: 3%;
  1724. display: flex;
  1725. justify-content: space-between;
  1726. align-items: center;
  1727. // margin-top: 190rpx;
  1728. background-color: #fff9ed;
  1729. // padding-bottom: 3%;
  1730. padding: 3%;
  1731. }
  1732. .food_address_le {
  1733. width: 75%;
  1734. }
  1735. .food_address_le_top {
  1736. display: flex;
  1737. align-items: center;
  1738. justify-content: space-between;
  1739. }
  1740. .food_address_le_top_le {
  1741. width: 40rpx;
  1742. height: 37rpx;
  1743. }
  1744. .food_address_le_top_le image {
  1745. width: 40rpx;
  1746. height: 37rpx;
  1747. }
  1748. .food_address_le_top_ce {
  1749. line-height: 1.6;
  1750. font-size: 38rpx;
  1751. font-weight: 600;
  1752. color: #333333;
  1753. }
  1754. .food_address_le_top_ce_ri {
  1755. width: 14rpx;
  1756. /* margin: 1% 0 0 2%; */
  1757. height: 24rpx;
  1758. margin-left: 2%;
  1759. }
  1760. .food_address_le_top_ce_ri image {
  1761. width: 14rpx;
  1762. height: 24rpx;
  1763. }
  1764. .food_address_text {
  1765. font-weight: 500;
  1766. font-size: 24rpx;
  1767. color: #999999;
  1768. }
  1769. .food_address_ri {
  1770. width: 24%;
  1771. height: 55rpx;
  1772. display: flex;
  1773. padding: 0.5% 1%;
  1774. background-color: #fcd202;
  1775. border-radius: 31rpx;
  1776. color: #ffffff;
  1777. }
  1778. .food_address_ri_sty {
  1779. flex: 1;
  1780. text-align: center;
  1781. padding-top: 4%;
  1782. font-size: 24rpx;
  1783. }
  1784. .food_address_ri_sty_active {
  1785. width: 100%;
  1786. overflow: hidden;
  1787. background-color: #ffffff;
  1788. border-radius: 31rpx;
  1789. color: #333333;
  1790. text-align: center;
  1791. }
  1792. /* 结算 */
  1793. .settlement {
  1794. width: 94%;
  1795. background-color: rgba(129, 189, 179, 0.4);
  1796. line-height: 3.4;
  1797. border-radius: 49rpx;
  1798. position: fixed;
  1799. bottom: 10rpx;
  1800. left: 3%;
  1801. display: flex;
  1802. justify-content: space-between;
  1803. border: 2rpx solid #568d84;
  1804. }
  1805. .settlement1 {
  1806. width: 94%;
  1807. background-color: rgba(129, 189, 179, 0.4);
  1808. line-height: 2.8;
  1809. border-radius: 49rpx;
  1810. position: relative;
  1811. /* bottom: 10rpx; */
  1812. left: 0;
  1813. right: 0;
  1814. /* left: 3%; */
  1815. display: flex;
  1816. justify-content: space-between;
  1817. margin: 20rpx auto;
  1818. }
  1819. .settlement_le {
  1820. width: 48%;
  1821. padding-left: 18%;
  1822. color: #000;
  1823. font-size: 30rpx;
  1824. }
  1825. .settlement_le text {
  1826. font-size: 22rpx;
  1827. }
  1828. .settlement_ri {
  1829. width: 35%;
  1830. background-color: #75a599;
  1831. font-family: PingFang SC;
  1832. font-weight: 800;
  1833. color: #333333;
  1834. text-align: center;
  1835. border-top-right-radius: 49rpx;
  1836. border-bottom-right-radius: 49rpx;
  1837. }
  1838. .settlement_ri1 {
  1839. width: 35%;
  1840. background-color: #75a599;
  1841. font-family: PingFang SC;
  1842. font-weight: 800;
  1843. color: #333333;
  1844. text-align: center;
  1845. border-top-right-radius: 49rpx;
  1846. border-bottom-right-radius: 49rpx;
  1847. }
  1848. .settlement_img {
  1849. width: 91rpx;
  1850. height: 96rpx;
  1851. position: absolute;
  1852. // bottom: 30rpx;
  1853. left: 5%;
  1854. }
  1855. .settlement_img image {
  1856. margin-top: 10rpx;
  1857. width: 74rpx;
  1858. height: 81rpx;
  1859. }
  1860. .settlement_hot {
  1861. width: 35rpx;
  1862. height: 35rpx;
  1863. line-height: 35rpx;
  1864. text-align: center;
  1865. border-radius: 50%;
  1866. position: absolute;
  1867. top: 5rpx;
  1868. right: 0;
  1869. background-color: #ff130a;
  1870. color: #ffffff;
  1871. font-size: 20rpx;
  1872. font-weight: bold;
  1873. color: #ffffff;
  1874. }
  1875. .select_all {
  1876. width: 100%;
  1877. position: relative;
  1878. }
  1879. /* 餐厅 */
  1880. .select {
  1881. color: #000000;
  1882. font-weight: bold;
  1883. background-color: #fff;
  1884. z-index: 10;
  1885. }
  1886. .select_line {
  1887. width: 15%;
  1888. height: 6rpx;
  1889. margin: 0 auto 4%;
  1890. background: #e6e6e6;
  1891. border-radius: 4rpx;
  1892. }
  1893. .select_search {
  1894. width: 100%;
  1895. margin: 2% 0;
  1896. display: flex;
  1897. align-items: center;
  1898. }
  1899. .select_search_le {
  1900. /* width: 10%; */
  1901. font-size: 30rpx;
  1902. line-height: 2.5;
  1903. margin-right: 1%;
  1904. }
  1905. .select_search_ce {
  1906. /* width: 5%; */
  1907. /* margin-top: 1%; */
  1908. margin-right: 20rpx;
  1909. margin-left: 6rpx;
  1910. /* margin: 0 20rpx; */
  1911. width: 20rpx;
  1912. height: 10rpx;
  1913. }
  1914. .select_search_ri {
  1915. /* width: 84%; */
  1916. height: 72rpx;
  1917. flex: 1;
  1918. display: flex;
  1919. }
  1920. .select_search_ri input {
  1921. flex: 1;
  1922. /* width: 100%; */
  1923. height: 72rpx;
  1924. background: #f5f5f5;
  1925. color: #999999;
  1926. border-radius: 36rpx;
  1927. text-decoration: 42rpx;
  1928. text-align: center;
  1929. }
  1930. /* 附近 */
  1931. .nearby {
  1932. width: 100%;
  1933. position: relative;
  1934. }
  1935. .nearby_text {
  1936. width: 18%;
  1937. font-size: 30rpx;
  1938. font-weight: 800;
  1939. color: #333333;
  1940. text-align: center;
  1941. border-bottom: 16rpx solid #fcd202;
  1942. /* line-height: 20rpx; */
  1943. margin-top: 10rpx;
  1944. }
  1945. .nearby_address_active {
  1946. border: 2rpx solid #fcd202;
  1947. width: 100%;
  1948. padding: 3%;
  1949. margin-top: 3%;
  1950. border-radius: 10upx;
  1951. display: flex;
  1952. }
  1953. .nearby_address {
  1954. width: 100%;
  1955. padding: 3%;
  1956. margin-top: 3%;
  1957. border-radius: 10upx;
  1958. display: flex;
  1959. }
  1960. .nearby_address_le {
  1961. flex: 1;
  1962. }
  1963. .nearby_address_ri {
  1964. line-height: 2.5;
  1965. text-align: right;
  1966. /* flex: 1; */
  1967. }
  1968. .nearby_text2 {
  1969. /* line-height: 1.5; */
  1970. display: flex;
  1971. justify-content: space-between;
  1972. align-items: center;
  1973. }
  1974. .nearby_text2_ {
  1975. font-size: 30rpx;
  1976. font-weight: 800;
  1977. color: #333333;
  1978. }
  1979. .nearby_text3 {
  1980. font-size: 24rpx;
  1981. font-weight: 500;
  1982. color: #999999;
  1983. margin-top: 2%;
  1984. }
  1985. /* 添加地址 */
  1986. .goorder {
  1987. width: 100%;
  1988. padding: 2% 3%;
  1989. position: fixed;
  1990. bottom: 0;
  1991. background-color: #ffffff;
  1992. border-top: 1rpx solid #999999;
  1993. }
  1994. .goorder_but {
  1995. width: 100%;
  1996. line-height: 2.5;
  1997. text-align: center;
  1998. background: #fcd202;
  1999. border-radius: 36rpx;
  2000. }
  2001. .lable {
  2002. border: 1rpx solid #ffe6d9;
  2003. height: 40rpx;
  2004. padding: 0 14rpx;
  2005. background: #ffe6d9;
  2006. border-radius: 4rpx;
  2007. font-weight: 500;
  2008. color: #fd6416;
  2009. font-size: 20rpx;
  2010. margin-right: 10rpx;
  2011. margin-bottom: 10rpx;
  2012. }
  2013. //店铺公告弹框
  2014. .gong_img {
  2015. margin: 40rpx 0 0 40rpx;
  2016. width: 46px;
  2017. height: 46px;
  2018. }
  2019. .gong_name {
  2020. position: absolute;
  2021. margin: 41rpx 0 0 163rpx;
  2022. font-size: 28rpx;
  2023. font-weight: 700;
  2024. color: rgba(0, 0, 0, 1);
  2025. }
  2026. .gong_pei {
  2027. position: absolute;
  2028. margin: 87rpx 0 0 163rpx;
  2029. font-size: 20rpx;
  2030. font-weight: 400;
  2031. color: rgba(0, 0, 0, 1);
  2032. }
  2033. .gong_line {
  2034. position: absolute;
  2035. margin: 161rpx 0 0 1rpx;
  2036. width: 635.5rpx;
  2037. border: 1rpx solid rgba(230, 230, 230, 1);
  2038. }
  2039. .gong_huo {
  2040. width: 151rpx;
  2041. height: 34rpx;
  2042. border-radius: 5rpx;
  2043. background: rgba(230, 74, 69, 1);
  2044. font-size: 16rpx;
  2045. font-weight: 400;
  2046. line-height: 34rpx;
  2047. color: rgba(255, 255, 255, 1);
  2048. text-align: center;
  2049. }
  2050. //下方店铺详情
  2051. .shop_xiang {
  2052. width: 100%;
  2053. margin-top: 8px;
  2054. }
  2055. .shopDizhi {
  2056. // height: 80rpx;
  2057. font-size: 34rpx;
  2058. color: #000;
  2059. line-height: 80rpx;
  2060. }
  2061. .shopLine {
  2062. width: 100%;
  2063. height: 1rpx;
  2064. background-color: rgba(242, 242, 242, 1);
  2065. // border: 1rpx solid rgba(242,242,242,0.5);
  2066. }
  2067. .shop_zheng {
  2068. width: 100%;
  2069. margin-top: 8px;
  2070. height: 100%;
  2071. overflow: hidden;
  2072. }
  2073. .image-container {
  2074. width: 350px;
  2075. overflow-x: auto;
  2076. padding: 10rpx 0 10rpx 0;
  2077. white-space: nowrap;
  2078. // transition: transform 0.3s; /* 可以添加平滑滑动的效果 */
  2079. }
  2080. .image {
  2081. display: inline-block;
  2082. width: 180rpx; /* 三张图片平分宽度 */
  2083. height: 135rpx;
  2084. }
  2085. </style>