index.vue 58 KB

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