index.vue 58 KB

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