index2.vue 60 KB

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