index.vue 64 KB

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