index.vue 60 KB

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