index.vue 63 KB

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