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