index.vue 59 KB

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