goodsList.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633
  1. <template>
  2. <view>
  3. <view>
  4. <view class="food_all">
  5. <!-- banner -->
  6. <swiper class="swiper" :autoplay="true" interval="2000" duration="500" :circular="true"
  7. style="width: 100%;height: 300rpx;">
  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 class="shop padding">
  13. <view class="flex justify-between">
  14. <view style="width: 500rpx;">
  15. <view class="text-xl text-bold">{{shopDet.shopName}}</view>
  16. <view class="flex align-center margin-top-xs">
  17. <view style="color: #FD6416;font-weight: bold;font-size: 30rpx;">
  18. <u-icon name="star-fill" color="#FD6416" size="28"></u-icon>
  19. {{shopDet.shopScore?shopDet.shopScore:0}}
  20. </view>
  21. <view class="margin-left-xs text-gray">销量 {{shopDet.shopSales?shopDet.shopSales:0}}</view>
  22. <view class="margin-left-xs text-gray" v-if="shopDet.errandTime">约{{shopDet.errandTime}}分钟
  23. </view>
  24. <view class="margin-left-xs text-gray" v-if="shopDet.minimumDelivery">{{shopDet.minimumDelivery}}元起送</view>
  25. </view>
  26. <view class="flex align-center margin-top-xs">
  27. <!-- <view style="color: #FCD202;margin-right: 8rpx;">{{shopDet.autoSendOrder==1?'商家配送':'平台配送'}}</view> -->
  28. <view style="margin-right: 8rpx;">{{shopDet.autoSendOrder==1?'商家配送:':'平台配送:'}}</view>
  29. <view class="text-gray" style="margin-right: 8rpx;">配送费{{shopDet.errandMoney?shopDet.errandMoney:0}}元</view>
  30. <view class="lable text-gray" v-if="shopDet.exemptMinMoney">满{{shopDet.exemptMinMoney}}元免配送费</view>
  31. </view>
  32. </view>
  33. <view>
  34. <image :src="shopDet.shopCover" class="radius" style="width: 110rpx;height: 110rpx;">
  35. </image>
  36. </view>
  37. </view>
  38. <view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice">
  39. <text style="width: 14%;">公告:</text>
  40. <u-notice-bar color="#AAAAAA" :speed="100" border-radius="30" padding="0rpx 0rpx" bg-color="#f5f5f5" style="width: 86%;" type="none" mode="horizontal" :volume-icon="false" :list="shopDet.shopNotice.split(',')"></u-notice-bar>
  41. </view>
  42. <view class="margin-top-xs" style="width: 100%;height: 40rpx;" v-if="couponList.length>0">
  43. <scroll-view scroll-x="true" class="scroll-view_H">
  44. <view class="coupon-item flex align-center" v-for="(item,index) in couponList" :key="index" @click="getcoupons()">
  45. <view>¥</view>
  46. <view class="" style="font-weight: bold;font-size: 24rpx;margin-right: 10rpx;">
  47. {{item.money}}
  48. </view>
  49. <view style="margin-right: 20rpx;">满{{item.minMoney}}可用</view>
  50. <view style="font-weight: bold;">领</view>
  51. </view>
  52. <!-- <view class="flex align-center" style="width: 100%;height: 100%;">
  53. </view> -->
  54. </scroll-view>
  55. </view>
  56. </view>
  57. <!-- 食品 -->
  58. <view class="food">
  59. <!-- 店名地址 -->
  60. <view class="food_address">
  61. <view class="flex flex-sub bg justify-between padding-right-xl">
  62. <view @click="switchTab(1)" :class="current==1? 'select':''" class="tabBtn">
  63. <view class="title">全部商品</view>
  64. <view :class="current==1? 'active1':''"></view>
  65. </view>
  66. <view @click="switchTab(2)" :class="current==2? 'select':''" class="tabBtn">
  67. <view class="title">评价</view>
  68. <view :class="current==2? 'active1':''"></view>
  69. </view>
  70. <view @click="switchTab(3)" :class="current==3? 'select':''" class="tabBtn">
  71. <view class="title">商家</view>
  72. <view :class="current==3? 'active1':''"></view>
  73. </view>
  74. </view>
  75. <!-- <view class="flex Switch">
  76. <view @click="tabSwidth(1)" :class="orderType==1?'selSwitch':''">自取</view>
  77. <view @click="tabSwidth(2)" :class="orderType==2?'selSwitch':''">外卖</view>
  78. </view> -->
  79. <view>
  80. <image @click="goPindan()" src="../../../static/images/index/pindan.png" style="width: 160rpx;height: 64rpx;" mode=""></image>
  81. </view>
  82. </view>
  83. <view class="VerticalBox" v-if="current==1">
  84. <scroll-view class="VerticalNav nav bg-gray" scroll-y scroll-with-animation
  85. :scroll-top="verticalNavTop" style="height:calc(100vh - 590upx)">
  86. <view style="font-size: 28upx;" class="cu-item text-lg"
  87. :class="index==tabCur?'cur':'text-gray'" v-for="(item,index) in dataList" :key="index"
  88. @tap="TabSelect" :data-id="index">
  89. {{item.classifyName}}
  90. </view>
  91. </scroll-view>
  92. <scroll-view class="VerticalMain" scroll-y scroll-with-animation
  93. style="height:calc(100vh - 590rpx)" :scroll-into-view="'main-'+mainCur"
  94. @scroll="VerticalMain">
  95. <view class="bg-white padding-sm margin-bottom-sm" v-if="item.goodsList.length>0" v-for="(item,index) in dataList"
  96. :key="index" :id="'main-'+index">
  97. <view class="flex justify-between padding-bottom-sm" @click="goDet(ite.goodsId)"
  98. v-for="(ite,ind) in item.goodsList" :key='ind'>
  99. <image :src="ite.goodsCover" mode=""
  100. style="width: 184rpx;height: 184rpx;border-radius: 10rpx;"></image>
  101. <view
  102. class="flex-sub margin-left-sm padding-tb-xs flex flex-direction justify-between">
  103. <view class="text-black text-lg text-bold" style="font-size: 30upx;">
  104. {{ite.goodsName}}
  105. </view>
  106. <view class="text-gray text-sm u-line-2"
  107. style="overflow: hidden;line-clamp: 2;-webkit-line-clamp: 2;width: 100%;">
  108. {{ite.goodsSynopsis?ite.goodsSynopsis:''}}
  109. </view>
  110. <view class="flex justify-between">
  111. <view class="text-sm text-red">
  112. ¥ <text class="text-lg">{{ite.goodsMoney}}</text>
  113. </view>
  114. <image @click.stop="selSku(ite)" src="../../../static/images/index/add.png"
  115. mode="" style="width: 40rpx;height: 40rpx"></image>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. </scroll-view>
  121. <empty v-if="!dataList.length"></empty>
  122. </view>
  123. <view class="" v-if="current==2">
  124. <view class="flex margin-lr padding-tb-sm u-border-bottom" v-if="shopDet.shopScore">
  125. <view class="flex padding-right">
  126. <view class="text-sl" style="color: #FD6416;">{{shopDet.shopScore}}</view>
  127. <view class="flex flex-direction justify-around margin-left-sm">
  128. <view>商家评分</view>
  129. <view class="flex">
  130. <u-icon v-for="ite in shopDet.shopScore1" :key='ite' color="#FCD202"
  131. name="star-fill"></u-icon>
  132. </view>
  133. </view>
  134. </view>
  135. <view class="flex-sub flex justify-around u-border-left padding-left">
  136. <view class="flex flex-direction justify-around text-center">
  137. <view>好评</view>
  138. <view>{{EvaluateData.goodReputation}}</view>
  139. </view>
  140. <view class="flex flex-direction justify-around text-center">
  141. <view>中评</view>
  142. <view>{{EvaluateData.mediumReview}}</view>
  143. </view>
  144. <view class="flex flex-direction justify-around text-center">
  145. <view>差评</view>
  146. <view>{{EvaluateData.negativeComment}}</view>
  147. </view>
  148. </view>
  149. </view>
  150. <view class="padding-tb-sm margin-lr">
  151. <u-button hover-class='none' @click="sel(0)" type="primary" shape="circle" size="mini"
  152. :plain="false" :custom-style="count==0?customStyle:customStyle1">全部评论</u-button>
  153. <u-button hover-class='none' @click="sel(1)" type="primary" shape="circle" size="mini"
  154. :plain="false" :custom-style="count==1?customStyle:customStyle1">
  155. 好评({{EvaluateData.goodReputation}})</u-button>
  156. <u-button hover-class='none' @click="sel(2)" type="primary" shape="circle" size="mini"
  157. :plain="false" :custom-style="count==2?customStyle:customStyle1">
  158. 中评({{EvaluateData.mediumReview}})</u-button>
  159. <u-button hover-class='none' @click="sel(3)" type="primary" shape="circle" size="mini"
  160. :plain="false" :custom-style="count==3?customStyle:customStyle1">
  161. 差评({{EvaluateData.negativeComment}})</u-button>
  162. </view>
  163. <view class="padding-tb-sm margin-lr u-border-bottom" v-for="(item, index) in EvaluateList"
  164. :key='index'>
  165. <view class="flex justify-between align-center">
  166. <view class="flex align-center">
  167. <u-avatar :src="item.avatar" size="65"></u-avatar>
  168. <view class=" margin-left-sm" style="line-height: 46upx;">{{item.nickName}}</view>
  169. <view class="flex margin-left-sm">
  170. <u-icon v-for="ite in item.score" :key='ite' color="#FCD202" name="star-fill">
  171. </u-icon>
  172. </view>
  173. </view>
  174. <view>{{item.createTime}}</view>
  175. </view>
  176. <view class="margin-top-sm">{{item.evaluateMessage}}</view>
  177. <view class="pinglunImg" v-if="item.pictures!=undefined && item.pictures">
  178. <view class="pinglunImg-box flex justify-between flex-wrap">
  179. <image style="margin-bottom: 20rpx;" @click="yuanlan(item.pictures==undefined?[]:item.pictures.split(','),index2)" v-for="(item2,index2) in item.pictures==undefined?[]:item.pictures.split(',')" :src="item2" mode=""></image>
  180. <image style="margin-bottom: 20rpx;width: 160rpx;height: 0;" src="" mode=""></image>
  181. <image style="margin-bottom: 20rpx;width: 160rpx;height: 0;" src="" mode=""></image>
  182. </view>
  183. </view>
  184. <view class="margin-top-sm" v-if="item.shopReplyMessage">
  185. <view class="flex align-center">
  186. <view class=" flex align-center text-df" style="color: #999999;">
  187. <view class="text-df">商家回复:</view>{{item.shopReplyMessage}}
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. <empty v-if="!EvaluateList.length"></empty>
  193. </view>
  194. <view class="margin-lr padding-bottom" v-if="current==3">
  195. <view class="flex align-center">
  196. <view class="flex-sub">
  197. <view class="text-black text-lg text-bold">{{shopDet.shopName}}</view>
  198. <view class="margin-top-sm" @click="goMap">
  199. <u-icon name="map" size="28"></u-icon> {{shopDet.detailedAddress}}
  200. </view>
  201. </view>
  202. <image @click="call(shopDet.phone)" src="../../../static/images/index/phone.png"
  203. class="radius" style="width: 38rpx;height: 49rpx;">
  204. </image>
  205. </view>
  206. <image :src="shopDet.shopCover" class="radius margin-top-sm"
  207. style="width: 140rpx;height: 140rpx;">
  208. </image>
  209. <view class="text-black text-lg text-bold margin-top-xs">商家信息</view>
  210. <view class="text-black margin-top-xs text-df">
  211. 营业时间:{{shopDet.businessHours}}-{{shopDet.lockHours}}</view>
  212. <view class="text-black margin-top-xs text-df">商家品类:{{shopDet.shopTypeName}}</view>
  213. <view class="text-black margin-top-xs text-df">配送范围:{{shopDet.distributionDistance}}以内</view>
  214. <view class="text-black margin-top-xs text-df">公告:{{shopDet.shopNotice}}</view>
  215. </view>
  216. </view>
  217. <!-- 结算 -->
  218. <view class="settlement" @click="isPopupShow" v-if="current==1">
  219. <view class="settlement_img">
  220. <image src="../../../static/images/index/diancan.png" mode=""></image>
  221. <view class="settlement_hot">{{goodsNum}}</view>
  222. </view>
  223. <view class="settlement_le">
  224. <text>¥</text>{{totalPrice}}
  225. </view>
  226. <view class="settlement_ri" @click.stop="goConfirm()">去结算</view>
  227. </view>
  228. <!-- 购物车弹窗 -->
  229. <u-popup v-model="popupShow" mode="bottom" border-radius="20">
  230. <view class="padding">
  231. <view class="flex justify-between align-center margin-bottom-sm">
  232. <view class="text-bold text-black text-df">已选餐品</view>
  233. <view class="flex align-center">
  234. <image src="../../../static/images/index/delete.png" style="width: 28rpx;height: 31rpx;"
  235. mode=""></image>
  236. <text class="margin-left-xs" @click="empty">清空购物车</text>
  237. </view>
  238. </view>
  239. <scroll-view scroll-y='true' class="popup">
  240. <view v-for="(item,index) in goodsList.orderGoodsList[0]" :key='inedx'>
  241. <view class="flex align-center margin-tb-sm">
  242. <image :src="item.goodsPicture[0]"
  243. style="width: 96rpx;height: 96rpx;border-radius: 10rpx;">
  244. </image>
  245. <view class="margin-left-sm">
  246. <view>{{item.goodsName}}</view>
  247. <view v-if="item.skuMessage">{{item.skuMessage}}</view>
  248. </view>
  249. </view>
  250. <view class="flex justify-between align-center">
  251. <view class="text-bold text-sm">¥<text class="text-lg">{{item.goodsPrice}}</text>
  252. </view>
  253. <view class="flex align-center justify-between">
  254. <view @click.stop="noAdd(item,index)">
  255. <image src="../../../static/images/index/jian.png"
  256. style="width: 54rpx;height: 54rpx;"></image>
  257. </view>
  258. <view class="text-center margin-lr-xs">{{item.goodsNum}}</view>
  259. <view @click="add(item,index)">
  260. <image src="../../../static/images/index/add.png"
  261. style="width: 50rpx;height: 50rpx;"></image>
  262. </view>
  263. </view>
  264. </view>
  265. </view>
  266. </scroll-view>
  267. </view>
  268. <view class="settlement1 margin-top-lg">
  269. <view class="settlement_img">
  270. <image src="../../../static/images/index/diancan.png" mode=""></image>
  271. <view class="settlement_hot">{{goodsNum}}</view>
  272. </view>
  273. <view class="settlement_le">
  274. <text>¥</text>{{totalPrice}}
  275. </view>
  276. <view class="settlement_ri" @click.stop="goConfirm()">去结算</view>
  277. </view>
  278. </u-popup>
  279. <!-- 选择规格弹窗 -->
  280. <u-popup v-model="skuShow" mode="center" :closeable='true' border-radius="20">
  281. <view style="width: 700rpx;">
  282. <view class="text-center text-lg text-bold padding-tb">{{goodsDet.goodsName}}</view>
  283. <view class="margin-top-sm padding-lr" v-for="(item,index) in attrList" :key="index">
  284. <view class="text-bold text-black">{{item.value}}</view>
  285. <view class="flex margin-tb-sm flex-wrap">
  286. <view v-for="(ite, ind) in item.detail" :key="ind" @click="skuSel(ite,index,ind)"
  287. class="margin-bottom-sm">
  288. <view class="skuBtn"
  289. :class="item.goodsId == index && item.attrId == ind?'active': ''">
  290. {{ite.name}}
  291. </view>
  292. </view>
  293. </view>
  294. </view>
  295. <view class="flex justify-between padding-lr padding-top">
  296. <view>
  297. <view class="text-xl text-bold text-black"><text class="text-sm">¥</text>{{price}}
  298. </view>
  299. <view class="detail_describe_text2">{{checkString}}</view>
  300. </view>
  301. <u-number-box v-model="value" min="1" @change="valChange"></u-number-box>
  302. </view>
  303. <view class="detail_account_bottom padding">
  304. <view class="detail_account_bottom_le" @click="payment()">立即购买</view>
  305. <view class="detail_account_bottom_ri" @click="orderSel(2)">加入购物车</view>
  306. </view>
  307. </view>
  308. </u-popup>
  309. <!-- 优惠券弹窗 -->
  310. <!-- coupons -->
  311. <u-popup v-model="coupons" height="520rpx" mode="bottom" :closeable="true">
  312. <view class="yhq flex justify-center align-center">
  313. <view class="yhq-box">
  314. <view class="yhq-box-title">
  315. 优惠券
  316. </view>
  317. <view class="yhq-box-list">
  318. <scroll-view scroll-y="true" style="width: 100%;height: 100%;padding-bottom: 20rpx;">
  319. <view class="yhq-box-list-item flex justify-center align-center" v-for="(item,index) in couponList" :key="index">
  320. <view class="yhq-box-list-item-c flex justify-between align-center">
  321. <view class="yhq-box-list-item-c-l flex align-center">
  322. <image :src="item.couponPicture?item.couponPicture:'../../../static/logo.png'" style="width: 80rpx;height: 80rpx;border-radius: 20rpx;" mode=""></image>
  323. <view class="" style="margin-left: 20rpx;">
  324. <view class="">
  325. <text style="color: red;margin-right: 10rpx;">¥{{item.money}}</text>
  326. <text style="font-weight: bold;margin-right: 10rpx;">优惠券</text>
  327. (满{{item.minMoney}}元可用)
  328. </view>
  329. <view class="" style="font-size: 20rpx;color: gray;">
  330. 领取后{{item.endDate}}天内有效
  331. </view>
  332. </view>
  333. </view>
  334. <view class="yhq-box-list-item-c-r" style="color: red;" @click="lingqv(item.couponId)">
  335. 领取
  336. </view>
  337. </view>
  338. </view>
  339. </scroll-view>
  340. </view>
  341. </view>
  342. </view>
  343. </u-popup>
  344. </view>
  345. <u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton>
  346. </view>
  347. </view>
  348. </template>
  349. <script>
  350. import empty from '@/components/empty.vue'
  351. export default {
  352. components: {
  353. empty
  354. },
  355. data() {
  356. return {
  357. customStyle: {
  358. color: '#333333',
  359. background: '#FCD202',
  360. marginRight: '20rpx',
  361. border: 0
  362. },
  363. customStyle1: {
  364. color: '#333333',
  365. background: '#F2F2F2',
  366. marginRight: '20rpx',
  367. border: 0
  368. },
  369. current: 1,
  370. loading: false, // 是否显示骨架屏组件
  371. tabCur: 0,
  372. mainCur: 0,
  373. verticalNavTop: 0,
  374. load: true,
  375. dataList: [],
  376. shopDet: {},
  377. shopList: [],
  378. city: '西安',
  379. lat: '',
  380. lng: '',
  381. shopName: '',
  382. page: 1,
  383. limit: 10,
  384. evaluatePage: 1,
  385. evaluateLimit: 10,
  386. show: true,
  387. totalPrice: 0,
  388. goodsNum: 0,
  389. goodsList: [],
  390. popupShow: false,
  391. skuShow: false,
  392. userId: '',
  393. hintShow: false, //
  394. shouquan: 0,
  395. orderType: 2,
  396. value: 1,
  397. goodsDet: {},
  398. skuId: '',
  399. skuMessage: '',
  400. skuList: [],
  401. attrList: [],
  402. checkString: '',
  403. checkStateList: [],
  404. CheckattrValue: false,
  405. price: 0,
  406. echoSkuList: [],
  407. echoSku: [],
  408. isEchoSku: {},
  409. shopId: '',
  410. lng: '',
  411. lat: '',
  412. commentList: [],
  413. EvaluateList: [],
  414. EvaluateData: {},
  415. grade: '',
  416. count: 0,
  417. orderId: '',
  418. couponList:[],//优惠券列表
  419. coupons:false,
  420. }
  421. },
  422. onLoad(option) {
  423. let that = this
  424. that.shopId = option.shopId
  425. that.orderId = uni.getStorageSync('orderId')?uni.getStorageSync('orderId'):''
  426. if (that.orderId) {
  427. that.getOrderDetail();
  428. }
  429. console.log('店铺id', option.shopId)
  430. console.log('订单id', that.orderId)
  431. uni.getLocation({
  432. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  433. success: function(res) {
  434. that.lat = res.latitude;
  435. that.lng = res.longitude;
  436. that.getData()
  437. },fail(e) {
  438. uni.hideLoading();
  439. uni.showModal({
  440. title: '温馨提示',
  441. content: '您的定位权限未开启,请开启后再来操作吧!',
  442. showCancel: true,
  443. cancelText: '取消',
  444. confirmText: '确认',
  445. success: res => {
  446. if(res.confirm){
  447. uni.openSetting({ // 打开设置页
  448. success(rea) {
  449. console.log(rea.authSetting)
  450. }
  451. });
  452. }
  453. }
  454. });
  455. }
  456. });
  457. },
  458. onShow() {
  459. this.userId = uni.getStorageSync('userId')
  460. if (this.orderId) {
  461. this.getOrderDetail();
  462. }
  463. this.getOrderList()
  464. this.getcouponList()
  465. },
  466. onShareAppMessage(res) { //发送给朋友
  467. return {
  468. title: this.shopDet.shopName,
  469. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  470. imageUrl: this.shopDet.shopCover,
  471. }
  472. },
  473. onShareTimeline(res) { //分享到朋友圈
  474. return {
  475. title: this.shopDet.shopName,
  476. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  477. imageUrl: this.shopDet.shopCover,
  478. }
  479. },
  480. methods: {
  481. getOrderDetail() {
  482. this.$Request.getT('/app/order/selectOrderById?orderId=' + this.orderId).then(res => {
  483. if (res.code == 0 && res.data) {
  484. if (res.data.isPay && res.data.isPay == 1) {
  485. this.orderId = '';
  486. uni.removeStorageSync('orderId')
  487. }
  488. }
  489. });
  490. },
  491. getcoupons(){
  492. this.coupons = true
  493. },
  494. //领取优惠券
  495. lingqv(couponId,needIntegral){
  496. let that = this
  497. let data = {
  498. couponId: couponId,
  499. }
  500. that.$Request.postT("/app/coupon/buyCoupon", data).then(res => {
  501. if (res.code == 0) {
  502. uni.showToast({
  503. title:'领取成功'
  504. })
  505. that.coupons = false
  506. }else{
  507. uni.showToast({
  508. title:res.msg,
  509. icon:'none'
  510. })
  511. }
  512. });
  513. },
  514. //获取商家优惠券
  515. getcouponList(){
  516. // couponList
  517. let data = {
  518. shopId: this.shopId,
  519. }
  520. this.$Request.get("/app/coupon/seleteAllCoupon", data).then(res => {
  521. if (res.code == 0 && res.data) {
  522. this.couponList = res.data
  523. }
  524. });
  525. },
  526. // 预览图片
  527. yuanlan(arr,index){
  528. uni.previewImage({
  529. urls:arr,
  530. current:index
  531. })
  532. },
  533. goNav(url) {
  534. uni.navigateTo({
  535. url
  536. })
  537. },
  538. switchTab(e) {
  539. // this.page = 1
  540. this.current = e
  541. if (this.current == 1) {
  542. this.getData()
  543. } else if (this.current == 2) {
  544. this.getEvaluateList()
  545. } else if (this.current == 3) {
  546. }
  547. },
  548. sel(e) {
  549. this.grade = e
  550. this.count = e
  551. this.evaluatePage = 1
  552. this.getEvaluateList()
  553. },
  554. // 获取评论列表
  555. getEvaluateList() {
  556. let data = {
  557. shopId: this.shopId,
  558. page: this.evaluatePage,
  559. limit: this.evaluateLimit,
  560. grade: this.grade
  561. }
  562. this.$Request.get("/app/goods/selectEvaluateByShopId", data).then(res => {
  563. if (res.code == 0 && res.data) {
  564. this.EvaluateData = res.data
  565. if (this.evaluatePage == 1) {
  566. this.EvaluateList = res.data.pageUtils.list
  567. } else {
  568. this.EvaluateList = [...this.EvaluateList, ...res.data.pageUtils.list]
  569. }
  570. }
  571. });
  572. },
  573. // 获取店铺信息
  574. getData() {
  575. let data = {
  576. shopId: this.shopId,
  577. lng: this.lng,
  578. lat: this.lat
  579. }
  580. this.$Request.get("/app/goods/selectGoodsList", data).then(res => {
  581. if (res.code == 0 && res.data) {
  582. this.dataList = res.data.list
  583. this.shopDet = res.data.goodsShop
  584. for (var i = 0; i < this.dataList.length; i++) {
  585. this.dataList[i].id = i
  586. }
  587. this.shopDet.shopScore1 = Math.floor(this.shopDet.shopScore)
  588. this.shopDet.errandTime = Math.round(this.shopDet.errandTime)
  589. this.shopDet.shopBanner = this.shopDet.shopBanner.split(',')
  590. this.shopDet.shopScore = this.shopDet.shopScore.toFixed(2)
  591. if (this.shopDet.distributionDistance < 1000) {
  592. this.shopDet.distributionDistance = '<1000m'
  593. } else {
  594. this.shopDet.distributionDistance = Number(this.shopDet.distributionDistance / 1000) +
  595. 'km'
  596. }
  597. uni.setNavigationBarTitle({
  598. title: this.shopDet.shopName
  599. })
  600. }
  601. });
  602. },
  603. getEchoOrder() {
  604. let data = {
  605. shopId: this.shopId,
  606. goodsId: this.goodsDet.goodsId
  607. }
  608. this.$Request.get("/app/order/echoOrder", data).then(res => {
  609. if (res.code == 0 && res.data.length) {
  610. this.echoSkuList = res.data
  611. this.echoSku = res.data[0].skuMessage.split(',')
  612. }
  613. });
  614. },
  615. // 弹窗展示商品详情
  616. selSku(item) {
  617. console.log(item)
  618. this.checkStateList = []
  619. this.checkString = ''
  620. this.$Request.get("/app/goods/selectGoodsById?goodsId=" + item.goodsId).then(res => {
  621. uni.hideLoading()
  622. if (res.code == 0) {
  623. this.goodsDet = res.data
  624. this.goodsDet.goodsLabel = this.goodsDet.goodsLabel.split(',')
  625. this.goodsDet.goodsPicture = this.goodsDet.goodsPicture.split(',')
  626. console.log(this.goodsDet.goodsPicture)
  627. this.price = this.goodsDet.goodsMoney
  628. this.skuList = this.goodsDet.sku
  629. if (this.goodsDet.attr.length) {
  630. this.attrList = this.goodsDet.attr[0] ? this.goodsDet.attr[0].attrValue : []
  631. } else {
  632. this.skuId = this.goodsDet.sku[0].id
  633. }
  634. console.log(this.attrList)
  635. this.attrList.forEach(res => {
  636. let data = {
  637. name: ''
  638. }
  639. this.checkStateList.push(data);
  640. let detail = [];
  641. res.detail.split(',').forEach(d => {
  642. let data = {
  643. name: '',
  644. state: ''
  645. }
  646. data.name = d;
  647. detail.push(data);
  648. });
  649. res.detail = detail;
  650. })
  651. this.getEchoOrder()
  652. this.skuShow = true
  653. }
  654. });
  655. },
  656. // 选择规格
  657. skuSel(item, index, ind) {
  658. console.log(item, index, ind)
  659. this.attrList[index].goodsId = index
  660. this.attrList[index].attrId = ind
  661. this.checkStateList[index].name = item.name;
  662. this.checkString = '';
  663. this.checkStateList.forEach(d => {
  664. if (d.name) {
  665. if (this.checkString) {
  666. this.checkString = this.checkString + ',' + d.name;
  667. } else {
  668. this.checkString = d.name;
  669. }
  670. }
  671. });
  672. console.log(this.skuList)
  673. for (var i = 0; i < this.skuList.length; i++) {
  674. let d = this.skuList[i];
  675. if (d.detailJson == this.checkString) {
  676. console.log(d.detailJson, this.checkString)
  677. // if (d.stock > 0) {
  678. this.skuId = d.id
  679. this.skuMessage = d.detailJson
  680. this.price = d.skuPrice
  681. this.CheckattrValue = true;
  682. // } else {
  683. // this.$queue.showToast('库存不足请选择其他规格')
  684. // }
  685. break
  686. } else {
  687. this.CheckattrValue = false;
  688. }
  689. }
  690. },
  691. valChange(e) {
  692. console.log('当前值为: ' + e.value)
  693. this.value = e.value
  694. },
  695. // 立即购买
  696. payment() {
  697. if (!this.userId) {
  698. uni.navigateTo({
  699. url: '/pages/public/login'
  700. })
  701. return
  702. }
  703. if (this.attrList.length) {
  704. if (this.checkString == '' || !this.CheckattrValue) {
  705. this.$queue.showToast('请选择正确的商品规格');
  706. return;
  707. }
  708. }
  709. let data = {
  710. goodsId: this.goodsDet.goodsId,
  711. skuMessage: this.skuMessage,
  712. skuId: this.skuId,
  713. num: this.value,
  714. orderType: this.orderType,
  715. shopId: this.shopId,
  716. }
  717. this.$Request.post("/app/order/buyGoods", data).then(res => {
  718. if (res.code == 0) {
  719. this.skuShow = false
  720. uni.navigateTo({
  721. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this
  722. .orderType
  723. })
  724. } else {
  725. this.$queue.showToast(res.msg);
  726. }
  727. })
  728. },
  729. // 加入购物车
  730. orderSel(e) {
  731. if (!this.userId) {
  732. uni.navigateTo({
  733. url: '/pages/public/login'
  734. })
  735. return
  736. }
  737. if (this.attrList.length) {
  738. if (this.checkString == '' || !this.CheckattrValue) {
  739. this.$queue.showToast('请选择正确的商品规格');
  740. return;
  741. }
  742. }
  743. console.log(this.goodsDet)
  744. console.log(this.echoSku, 'echoSku')
  745. if (this.echoSku.length) {
  746. this.echoSkuList.forEach(res => {
  747. if (res.skuMessage == this.skuMessage) {
  748. this.isEchoSku = res
  749. }
  750. })
  751. if (JSON.stringify(this.isEchoSku) != "{}") {
  752. let data = {
  753. orderGoodsId: this.isEchoSku.id,
  754. type: 1,
  755. num: this.value,
  756. shopId: this.shopId,
  757. }
  758. this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
  759. if (res.code == 0) {
  760. // setTimeout(function() {
  761. this.skuShow = false
  762. this.getOrderList()
  763. // },1000)
  764. } else {
  765. this.$queue.showToast(res.msg);
  766. }
  767. });
  768. return
  769. }
  770. }
  771. let data = {
  772. goodsId: this.goodsDet.goodsId,
  773. skuMessage: this.skuMessage,
  774. skuId: this.skuId,
  775. num: this.value,
  776. shopId: this.shopId,
  777. orderId: this.orderId
  778. }
  779. this.$Request.post("/app/order/joinOrder", data).then(res => {
  780. if (res.code == 0) {
  781. this.$queue.showToast('添加成功');
  782. if (e == 1) {
  783. uni.navigateTo({
  784. url: '/pages/diancan/confirmOrder?shopId=' + this.shopId
  785. })
  786. } else {
  787. // setTimeout(function() {
  788. this.skuShow = false
  789. this.getOrderList()
  790. // },1000)
  791. }
  792. } else {
  793. this.$queue.showToast(res.msg);
  794. }
  795. })
  796. },
  797. // 切换外卖/自提
  798. tabSwidth(e) {
  799. this.orderType = e
  800. this.getOrderList()
  801. },
  802. // 展示购物车弹窗
  803. isPopupShow() {
  804. // console.log(this.goodsList.orderGoodsList[0])
  805. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  806. this.popupShow = true
  807. } else {
  808. uni.showToast({
  809. title: '请先添加商品',
  810. icon: "none"
  811. })
  812. }
  813. },
  814. // 添加数量
  815. add(item, index) {
  816. // this.count++;
  817. console.log(item, index)
  818. this.goodsList.orderGoodsList[0][index].goodsNum++
  819. let data = {
  820. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  821. type: 1,
  822. num: 1,
  823. shopId: this.shopId
  824. }
  825. this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
  826. if (res.code == 0) {
  827. this.getOrderList()
  828. } else {
  829. this.$queue.showToast(res.msg);
  830. this.goodsList.orderGoodsList[0][index].goodsNum--
  831. }
  832. });
  833. },
  834. // 减少数量
  835. noAdd(item, index) {
  836. console.log(item, index)
  837. this.goodsList.orderGoodsList[0][index].goodsNum--
  838. // this.count--;
  839. let data = {
  840. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  841. type: 2,
  842. num: 1,
  843. shopId: this.shopId
  844. }
  845. this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
  846. if (res.code == 0) {
  847. this.getOrderList()
  848. }
  849. });
  850. },
  851. // 清空购物车
  852. empty() {
  853. let data = {
  854. shopId: this.shopId,
  855. }
  856. this.$Request.post("/app/order/emptyShoppingTrolley", data).then(res => {
  857. if (res.code == 0) {
  858. this.popupShow = false
  859. this.goodsList = []
  860. this.echoSkuList = []
  861. this.echoSku = []
  862. this.getOrderList()
  863. this.getEchoOrder()
  864. }
  865. });
  866. },
  867. // 获取购物车商品列表
  868. getOrderList() {
  869. let data = {
  870. shopId: this.shopId,
  871. page: 1,
  872. limit: 1000,
  873. status: 1,
  874. // orderType: this.orderType
  875. }
  876. this.$Request.get("/app/order/selectAllOrderList", data).then(res => {
  877. if (res.code == 0) {
  878. this.goodsList = res.data.pageUtils.list[0]
  879. if (this.goodsList) {
  880. console.log(this.goodsList)
  881. this.goodsList.orderGoodsList[0].forEach(res => {
  882. res.goodsPicture = res.goodsPicture.split(',')
  883. })
  884. if (!this.goodsList.orderGoodsList[0].length) {
  885. this.popupShow = false
  886. }
  887. }
  888. this.totalPrice = res.data.money
  889. this.goodsNum = 0
  890. if (this.goodsList && this.goodsList.orderGoodsList[0]) {
  891. this.goodsList.orderGoodsList[0].forEach(res => {
  892. this.goodsNum += res.goodsNum
  893. })
  894. }
  895. }
  896. });
  897. },
  898. // 跳转商品详情
  899. goDet(id) {
  900. uni.navigateTo({
  901. url: '/pages/index/shop/goodsDet?goodsId=' + id + '&shopId=' + this.shopId + '&orderType=' +
  902. this.orderType + '&orderId=' + this.orderId
  903. })
  904. },
  905. // 去结算
  906. goConfirm() {
  907. if (!this.userId) {
  908. uni.navigateTo({
  909. url: '/pages/public/login'
  910. })
  911. return
  912. }
  913. console.log(this.goodsList)
  914. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  915. uni.navigateTo({
  916. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this
  917. .orderType
  918. })
  919. } else {
  920. uni.showToast({
  921. title: '请先添加商品',
  922. icon: "none"
  923. })
  924. }
  925. },
  926. TabSelect(e) {
  927. console.log(e.currentTarget.dataset.id)
  928. this.tabCur = e.currentTarget.dataset.id;
  929. this.mainCur = e.currentTarget.dataset.id;
  930. this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
  931. },
  932. VerticalMain(e) {
  933. let that = this;
  934. let tabHeight = 0;
  935. if (this.load) {
  936. for (let i = 0; i < this.dataList.length; i++) {
  937. let view = uni.createSelectorQuery().select("#main-" + this.dataList[i].id);
  938. view.fields({
  939. size: true
  940. }, data => {
  941. this.dataList[i].top = tabHeight;
  942. tabHeight = tabHeight + data.height;
  943. this.dataList[i].bottom = tabHeight;
  944. }).exec();
  945. }
  946. this.load = false
  947. }
  948. let scrollTop = e.detail.scrollTop;
  949. // console.log(scrollTop,'111')
  950. for (let i = 0; i < this.dataList.length; i++) {
  951. if (scrollTop > this.dataList[i].top && scrollTop < this.dataList[i].bottom) {
  952. this.verticalNavTop = (this.dataList[i].id - 1) * 50
  953. this.tabCur = this.dataList[i].id
  954. console.log(scrollTop) //不能删除
  955. return false
  956. }
  957. }
  958. },
  959. // 打电话
  960. call(e) {
  961. uni.makePhoneCall({
  962. phoneNumber: e
  963. });
  964. },
  965. // 点击调起地图查看位置
  966. goMap() {
  967. //查看位置需要传经纬度才能执行
  968. let that = this
  969. uni.authorize({
  970. scope: 'scope.userLocation',
  971. success(res) {
  972. uni.openLocation({
  973. latitude: that.shopDet.shopLat,
  974. longitude: that.shopDet.shopLng,
  975. success: function() {}
  976. });
  977. },
  978. fail(err) {
  979. }
  980. })
  981. },
  982. goPindan() {
  983. if (!this.userId) {
  984. uni.navigateTo({
  985. url: '/pages/public/login'
  986. })
  987. return
  988. }
  989. if(this.orderId) {
  990. uni.navigateTo({
  991. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId +'&orderId=' + this.orderId
  992. })
  993. } else {
  994. let data = {
  995. shopId: this.shopId,
  996. }
  997. this.$Request.post("/app/order/shareTheBill", data).then(res => {
  998. if (res.code == 0) {
  999. uni.navigateTo({
  1000. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId +'&orderId=' + res.data
  1001. })
  1002. }
  1003. });
  1004. }
  1005. }
  1006. },
  1007. onReachBottom: function() {
  1008. if (this.current == 2) {
  1009. this.evaluatePage = this.evaluatePage + 1;
  1010. this.getEvaluateList()
  1011. }
  1012. },
  1013. }
  1014. </script>
  1015. <style scoped lang="scss">
  1016. page {
  1017. background-color: #FFFFFF;
  1018. }
  1019. .pinglunImg{
  1020. width: 100%;
  1021. margin-top: 10rpx;
  1022. }
  1023. .pinglunImg-box{
  1024. width: 100%;
  1025. image{
  1026. // margin-left: 10rpx;
  1027. width: 160upx;
  1028. height: 160upx;
  1029. border-radius: 10rpx;
  1030. }
  1031. }
  1032. .coupon-item{
  1033. display: inline-block;
  1034. height: 46rpx;
  1035. margin-right: 20rpx;
  1036. border: 1px solid red;
  1037. border-radius: 10rpx;
  1038. padding: 0rpx 10rpx 0rpx 10rpx;
  1039. font-size: 20rpx;
  1040. color: red;
  1041. line-height: 44rpx;
  1042. view{
  1043. display: inline-block;
  1044. }
  1045. }
  1046. .scroll-view_H{
  1047. width: 100%;
  1048. white-space: nowrap;
  1049. }
  1050. .yhq{
  1051. width: 100%;
  1052. height: 520rpx;
  1053. background-color: #F5F5F5;
  1054. overflow-y: hidden;
  1055. .yhq-box{
  1056. width: 686rpx;
  1057. height: 500rpx;
  1058. // background-color: red;
  1059. .yhq-box-title{
  1060. width: 100%;
  1061. text-align: center;
  1062. font-weight: bold;
  1063. }
  1064. .yhq-box-list{
  1065. width: 100%;
  1066. height: auto;
  1067. height: 460rpx;
  1068. margin-top: 30rpx;
  1069. .yhq-box-list-item{
  1070. width: 100%;
  1071. height: 120rpx;
  1072. border-radius: 24rpx;
  1073. background-color: #FFFFFF;
  1074. margin-bottom: 20rpx;
  1075. }
  1076. .yhq-box-list-item-c{
  1077. width: 646rpx;
  1078. height: 100%;
  1079. }
  1080. }
  1081. }
  1082. }
  1083. .bg1 {
  1084. background: #FFFFFF;
  1085. }
  1086. .sticky-tabs {
  1087. z-index: 990;
  1088. position: sticky;
  1089. top: var(--window-top);
  1090. // background-color: #fff;
  1091. }
  1092. /* // 使用mescroll-uni,则top为0 */
  1093. .mescroll-uni,
  1094. /deep/.mescroll-uni {
  1095. .sticky-tabs {
  1096. top: 0;
  1097. }
  1098. }
  1099. .shop {
  1100. position: absolute;
  1101. top: 80rpx;
  1102. left: 0;
  1103. right: 0;
  1104. width: 686rpx;
  1105. margin: auto;
  1106. background: #FFFFFF;
  1107. border-radius: 20rpx;
  1108. box-shadow: 0 0 20rpx #CCCCCC;
  1109. }
  1110. .skuBtn {
  1111. padding: 10rpx 30rpx;
  1112. border-radius: 10rpx;
  1113. text-align: center;
  1114. margin: 10rpx 20rpx;
  1115. font-size: 28rpx;
  1116. color: #333333;
  1117. border: 2px solid #F2F2F2;
  1118. }
  1119. .active {
  1120. background: rgba(252, 210, 2, 0.2) !important;
  1121. border: 2px solid #FCD202 !important;
  1122. opacity: 0.6;
  1123. }
  1124. .active1 {
  1125. /* width: 82rpx; */
  1126. height: 16rpx;
  1127. background: #FCD202;
  1128. position: relative;
  1129. top: -10rpx;
  1130. z-index: 9;
  1131. }
  1132. .popup {
  1133. /* height: 500rpx; */
  1134. max-height: 500rpx;
  1135. /* overflow-y: auto; */
  1136. }
  1137. .tabBtn {
  1138. /* background-color: #f6f6fa; */
  1139. height: 60rpx;
  1140. line-height: 60rpx;
  1141. color: #999999;
  1142. font-size: 38rpx;
  1143. }
  1144. .Switch {
  1145. width: 164rpx;
  1146. height: 62rpx;
  1147. color: #FFFFFF;
  1148. background: #FCD202;
  1149. border-radius: 30rpx;
  1150. display: flex;
  1151. align-items: center;
  1152. padding: 2rpx;
  1153. }
  1154. .Switch>view {
  1155. /* flex: 1; */
  1156. width: 80rpx;
  1157. text-align: center;
  1158. line-height: 62rpx;
  1159. height: 58rpx;
  1160. }
  1161. .selSwitch {
  1162. color: #333333;
  1163. background: #FFFFFF;
  1164. border-radius: 30rpx;
  1165. }
  1166. .hintPopul {
  1167. width: 100%;
  1168. height: 100vh;
  1169. position: absolute;
  1170. top: 0;
  1171. background: rgba(0, 0, 0, .4);
  1172. }
  1173. .content {
  1174. position: absolute;
  1175. left: 0;
  1176. right: 0;
  1177. top: 0;
  1178. bottom: 0;
  1179. margin: auto;
  1180. text-align: center;
  1181. width: 500rpx;
  1182. height: 400rpx;
  1183. border-radius: 20rpx;
  1184. background-color: #fff;
  1185. padding-top: 120rpx;
  1186. }
  1187. .content image {
  1188. position: absolute;
  1189. top: -50rpx;
  1190. left: 0;
  1191. right: 0;
  1192. margin: auto;
  1193. }
  1194. .hintText {
  1195. font-size: 30rpx;
  1196. }
  1197. .VerticalNav.nav {
  1198. width: 200upx;
  1199. white-space: initial;
  1200. }
  1201. .VerticalNav.nav .cu-item {
  1202. width: 100%;
  1203. text-align: center;
  1204. background-color: #f1f1f1;
  1205. margin: 0;
  1206. border: none;
  1207. height: 50px;
  1208. position: relative;
  1209. }
  1210. .VerticalNav.nav .cu-item.cur {
  1211. background-color: #fff;
  1212. }
  1213. .VerticalBox {
  1214. display: flex;
  1215. }
  1216. .VerticalMain {
  1217. background-color: #f1f1f1;
  1218. flex: 1;
  1219. }
  1220. .detail_describe_text2 {
  1221. font-weight: 500;
  1222. margin-top: 2%;
  1223. color: #999999;
  1224. }
  1225. .detail_account_bottom {
  1226. margin-top: 20rpx;
  1227. width: 100%;
  1228. display: flex;
  1229. justify-content: space-between;
  1230. /* margin: 4% 0 3%; */
  1231. }
  1232. .detail_account_bottom_le {
  1233. width: 47.5%;
  1234. /* margin-right: 5%; */
  1235. border-radius: 44rpx;
  1236. text-align: center;
  1237. line-height: 2.8;
  1238. border: 2rpx solid #FCD202;
  1239. }
  1240. .detail_account_bottom_ri {
  1241. width: 47.5%;
  1242. border-radius: 44rpx;
  1243. text-align: center;
  1244. line-height: 2.8;
  1245. background-color: #FCD202;
  1246. }
  1247. .food_all {
  1248. position: relative;
  1249. }
  1250. .text-through {
  1251. text-decoration: line-through
  1252. }
  1253. /* 食物 */
  1254. .food {
  1255. width: 100%;
  1256. overflow: hidden;
  1257. // position: absolute;
  1258. // top: 350rpx;
  1259. background-color: #FFFFFF;
  1260. border-top-left-radius: 18rpx;
  1261. border-top-right-radius: 18rpx;
  1262. }
  1263. .food_address {
  1264. margin: 3%;
  1265. display: flex;
  1266. justify-content: space-between;
  1267. align-items: center;
  1268. margin-top: 120rpx;
  1269. }
  1270. .food_address_le {
  1271. width: 75%;
  1272. }
  1273. .food_address_le_top {
  1274. display: flex;
  1275. align-items: center;
  1276. justify-content: space-between;
  1277. }
  1278. .food_address_le_top_le {
  1279. width: 40rpx;
  1280. height: 37rpx;
  1281. }
  1282. .food_address_le_top_le image {
  1283. width: 40rpx;
  1284. height: 37rpx;
  1285. }
  1286. .food_address_le_top_ce {
  1287. line-height: 1.6;
  1288. font-size: 38rpx;
  1289. font-weight: 600;
  1290. color: #333333;
  1291. }
  1292. .food_address_le_top_ce_ri {
  1293. width: 14rpx;
  1294. /* margin: 1% 0 0 2%; */
  1295. height: 24rpx;
  1296. margin-left: 2%;
  1297. }
  1298. .food_address_le_top_ce_ri image {
  1299. width: 14rpx;
  1300. height: 24rpx;
  1301. }
  1302. .food_address_text {
  1303. font-weight: 500;
  1304. font-size: 24rpx;
  1305. color: #999999;
  1306. }
  1307. .food_address_ri {
  1308. width: 24%;
  1309. height: 55rpx;
  1310. display: flex;
  1311. padding: 0.5% 1%;
  1312. background-color: #FCD202;
  1313. border-radius: 31rpx;
  1314. color: #FFFFFF;
  1315. }
  1316. .food_address_ri_sty {
  1317. flex: 1;
  1318. text-align: center;
  1319. padding-top: 4%;
  1320. font-size: 24rpx;
  1321. }
  1322. .food_address_ri_sty_active {
  1323. width: 100%;
  1324. overflow: hidden;
  1325. background-color: #FFFFFF;
  1326. border-radius: 31rpx;
  1327. color: #333333;
  1328. text-align: center;
  1329. }
  1330. /* 结算 */
  1331. .settlement {
  1332. width: 94%;
  1333. background-color: #000000;
  1334. line-height: 3.4;
  1335. border-radius: 49rpx;
  1336. position: fixed;
  1337. bottom: 10rpx;
  1338. left: 3%;
  1339. display: flex;
  1340. justify-content: space-between;
  1341. }
  1342. .settlement1 {
  1343. width: 94%;
  1344. background-color: #000000;
  1345. line-height: 2.8;
  1346. border-radius: 49rpx;
  1347. position: relative;
  1348. /* bottom: 10rpx; */
  1349. left: 0;
  1350. right: 0;
  1351. /* left: 3%; */
  1352. display: flex;
  1353. justify-content: space-between;
  1354. margin: 20rpx auto;
  1355. }
  1356. .settlement_le {
  1357. width: 45%;
  1358. padding-left: 20%;
  1359. color: #FFFFFF;
  1360. font-size: 30rpx;
  1361. }
  1362. .settlement_le text {
  1363. font-size: 22rpx;
  1364. }
  1365. .settlement_ri {
  1366. width: 35%;
  1367. background-color: #FCD202;
  1368. font-family: PingFang SC;
  1369. font-weight: 800;
  1370. color: #333333;
  1371. text-align: center;
  1372. border-top-right-radius: 49rpx;
  1373. border-bottom-right-radius: 49rpx;
  1374. }
  1375. .settlement_img {
  1376. width: 91rpx;
  1377. height: 96rpx;
  1378. position: absolute;
  1379. // bottom: 30rpx;
  1380. left: 5%;
  1381. }
  1382. .settlement_img image {
  1383. width: 74rpx;
  1384. height: 81rpx;
  1385. }
  1386. .settlement_hot {
  1387. width: 35rpx;
  1388. height: 35rpx;
  1389. line-height: 35rpx;
  1390. text-align: center;
  1391. border-radius: 50%;
  1392. position: absolute;
  1393. top: -10rpx;
  1394. right: 0;
  1395. background-color: #FF130A;
  1396. color: #FFFFFF;
  1397. font-size: 20rpx;
  1398. font-weight: bold;
  1399. color: #FFFFFF;
  1400. }
  1401. .select_all {
  1402. width: 100%;
  1403. position: relative;
  1404. }
  1405. /* 餐厅 */
  1406. .select {
  1407. color: #000000;
  1408. font-weight: bold;
  1409. background-color: #fff;
  1410. z-index: 10;
  1411. }
  1412. .select_line {
  1413. width: 15%;
  1414. height: 6rpx;
  1415. margin: 0 auto 4%;
  1416. background: #E6E6E6;
  1417. border-radius: 4rpx;
  1418. }
  1419. .select_search {
  1420. width: 100%;
  1421. margin: 2% 0;
  1422. display: flex;
  1423. align-items: center;
  1424. }
  1425. .select_search_le {
  1426. /* width: 10%; */
  1427. font-size: 30rpx;
  1428. line-height: 2.5;
  1429. margin-right: 1%;
  1430. }
  1431. .select_search_ce {
  1432. /* width: 5%; */
  1433. /* margin-top: 1%; */
  1434. margin-right: 20rpx;
  1435. margin-left: 6rpx;
  1436. /* margin: 0 20rpx; */
  1437. width: 20rpx;
  1438. height: 10rpx;
  1439. }
  1440. .select_search_ri {
  1441. /* width: 84%; */
  1442. height: 72rpx;
  1443. flex: 1;
  1444. display: flex;
  1445. }
  1446. .select_search_ri input {
  1447. flex: 1;
  1448. /* width: 100%; */
  1449. height: 72rpx;
  1450. background: #F5F5F5;
  1451. color: #999999;
  1452. border-radius: 36rpx;
  1453. text-decoration: 42rpx;
  1454. text-align: center;
  1455. }
  1456. /* 附近 */
  1457. .nearby {
  1458. width: 100%;
  1459. position: relative;
  1460. }
  1461. .nearby_text {
  1462. width: 18%;
  1463. font-size: 30rpx;
  1464. font-weight: 800;
  1465. color: #333333;
  1466. text-align: center;
  1467. border-bottom: 16rpx solid #FCD202;
  1468. /* line-height: 20rpx; */
  1469. margin-top: 10rpx;
  1470. }
  1471. .nearby_address_active {
  1472. border: 2rpx solid #FCD202;
  1473. width: 100%;
  1474. padding: 3%;
  1475. margin-top: 3%;
  1476. border-radius: 10upx;
  1477. display: flex;
  1478. }
  1479. .nearby_address {
  1480. width: 100%;
  1481. padding: 3%;
  1482. margin-top: 3%;
  1483. border-radius: 10upx;
  1484. display: flex;
  1485. }
  1486. .nearby_address_le {
  1487. flex: 1;
  1488. }
  1489. .nearby_address_ri {
  1490. line-height: 2.5;
  1491. text-align: right;
  1492. /* flex: 1; */
  1493. }
  1494. .nearby_text2 {
  1495. /* line-height: 1.5; */
  1496. display: flex;
  1497. justify-content: space-between;
  1498. align-items: center;
  1499. }
  1500. .nearby_text2_ {
  1501. font-size: 30rpx;
  1502. font-weight: 800;
  1503. color: #333333;
  1504. }
  1505. .nearby_text3 {
  1506. font-size: 24rpx;
  1507. font-weight: 500;
  1508. color: #999999;
  1509. margin-top: 2%;
  1510. }
  1511. /* 添加地址 */
  1512. .goorder {
  1513. width: 100%;
  1514. padding: 2% 3%;
  1515. position: fixed;
  1516. bottom: 0;
  1517. background-color: #FFFFFF;
  1518. border-top: 1rpx solid #999999;
  1519. }
  1520. .goorder_but {
  1521. width: 100%;
  1522. line-height: 2.5;
  1523. text-align: center;
  1524. background: #FCD202;
  1525. border-radius: 36rpx;
  1526. }
  1527. </style>