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