index.vue 64 KB

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