index.vue 58 KB

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