index.vue 59 KB

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