index.vue 59 KB

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