index.vue 58 KB

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