index.vue 61 KB

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