index2.vue 64 KB

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