goodsList.vue 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617
  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">
  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. console.log('店铺id', option.shopId)
  427. console.log('订单id', that.orderId)
  428. uni.getLocation({
  429. type: 'gcj02', //返回可以用于uni.openLocation的经纬度
  430. success: function(res) {
  431. that.lat = res.latitude;
  432. that.lng = res.longitude;
  433. that.getData()
  434. },fail(e) {
  435. uni.hideLoading();
  436. uni.showModal({
  437. title: '温馨提示',
  438. content: '您的定位权限未开启,请开启后再来操作吧!',
  439. showCancel: true,
  440. cancelText: '取消',
  441. confirmText: '确认',
  442. success: res => {
  443. if(res.confirm){
  444. uni.openSetting({ // 打开设置页
  445. success(rea) {
  446. console.log(rea.authSetting)
  447. }
  448. });
  449. }
  450. }
  451. });
  452. }
  453. });
  454. },
  455. onShow() {
  456. this.userId = uni.getStorageSync('userId')
  457. this.getOrderList()
  458. this.getcouponList()
  459. },
  460. onShareAppMessage(res) { //发送给朋友
  461. return {
  462. title: this.shopDet.shopName,
  463. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  464. imageUrl: this.shopDet.shopCover,
  465. }
  466. },
  467. onShareTimeline(res) { //分享到朋友圈
  468. return {
  469. title: this.shopDet.shopName,
  470. path: '/pages/index/index?shopId=' + this.shopDet.shopId,
  471. imageUrl: this.shopDet.shopCover,
  472. }
  473. },
  474. methods: {
  475. getcoupons(){
  476. this.coupons = true
  477. },
  478. //领取优惠券
  479. lingqv(couponId,needIntegral){
  480. let that = this
  481. let data = {
  482. couponId: couponId,
  483. }
  484. that.$Request.postT("/app/coupon/buyCoupon", data).then(res => {
  485. if (res.code == 0) {
  486. uni.showToast({
  487. title:'领取成功'
  488. })
  489. that.coupons = false
  490. }else{
  491. uni.showToast({
  492. title:res.msg,
  493. icon:'none'
  494. })
  495. }
  496. });
  497. },
  498. //获取商家优惠券
  499. getcouponList(){
  500. // couponList
  501. let data = {
  502. shopId: this.shopId,
  503. }
  504. this.$Request.get("/app/coupon/seleteAllCoupon", data).then(res => {
  505. if (res.code == 0 && res.data) {
  506. this.couponList = res.data
  507. }
  508. });
  509. },
  510. // 预览图片
  511. yuanlan(arr,index){
  512. uni.previewImage({
  513. urls:arr,
  514. current:index
  515. })
  516. },
  517. goNav(url) {
  518. uni.navigateTo({
  519. url
  520. })
  521. },
  522. switchTab(e) {
  523. // this.page = 1
  524. this.current = e
  525. if (this.current == 1) {
  526. this.getData()
  527. } else if (this.current == 2) {
  528. this.getEvaluateList()
  529. } else if (this.current == 3) {
  530. }
  531. },
  532. sel(e) {
  533. this.grade = e
  534. this.count = e
  535. this.evaluatePage = 1
  536. this.getEvaluateList()
  537. },
  538. // 获取评论列表
  539. getEvaluateList() {
  540. let data = {
  541. shopId: this.shopId,
  542. page: this.evaluatePage,
  543. limit: this.evaluateLimit,
  544. grade: this.grade
  545. }
  546. this.$Request.get("/app/goods/selectEvaluateByShopId", data).then(res => {
  547. if (res.code == 0 && res.data) {
  548. this.EvaluateData = res.data
  549. if (this.evaluatePage == 1) {
  550. this.EvaluateList = res.data.pageUtils.list
  551. } else {
  552. this.EvaluateList = [...this.EvaluateList, ...res.data.pageUtils.list]
  553. }
  554. }
  555. });
  556. },
  557. // 获取店铺信息
  558. getData() {
  559. let data = {
  560. shopId: this.shopId,
  561. lng: this.lng,
  562. lat: this.lat
  563. }
  564. this.$Request.get("/app/goods/selectGoodsList", data).then(res => {
  565. if (res.code == 0 && res.data) {
  566. this.dataList = res.data.list
  567. this.shopDet = res.data.goodsShop
  568. for (var i = 0; i < this.dataList.length; i++) {
  569. this.dataList[i].id = i
  570. }
  571. this.shopDet.shopScore1 = Math.floor(this.shopDet.shopScore)
  572. this.shopDet.errandTime = Math.round(this.shopDet.errandTime)
  573. this.shopDet.shopBanner = this.shopDet.shopBanner.split(',')
  574. this.shopDet.shopScore = this.shopDet.shopScore.toFixed(2)
  575. if (this.shopDet.distributionDistance < 1000) {
  576. this.shopDet.distributionDistance = '<1000m'
  577. } else {
  578. this.shopDet.distributionDistance = Number(this.shopDet.distributionDistance / 1000) +
  579. 'km'
  580. }
  581. uni.setNavigationBarTitle({
  582. title: this.shopDet.shopName
  583. })
  584. }
  585. });
  586. },
  587. getEchoOrder() {
  588. let data = {
  589. shopId: this.shopId,
  590. goodsId: this.goodsDet.goodsId
  591. }
  592. this.$Request.get("/app/order/echoOrder", data).then(res => {
  593. if (res.code == 0 && res.data.length) {
  594. this.echoSkuList = res.data
  595. this.echoSku = res.data[0].skuMessage.split(',')
  596. }
  597. });
  598. },
  599. // 弹窗展示商品详情
  600. selSku(item) {
  601. console.log(item)
  602. this.checkStateList = []
  603. this.checkString = ''
  604. this.$Request.get("/app/goods/selectGoodsById?goodsId=" + item.goodsId).then(res => {
  605. uni.hideLoading()
  606. if (res.code == 0) {
  607. this.goodsDet = res.data
  608. this.goodsDet.goodsLabel = this.goodsDet.goodsLabel.split(',')
  609. this.goodsDet.goodsPicture = this.goodsDet.goodsPicture.split(',')
  610. console.log(this.goodsDet.goodsPicture)
  611. this.price = this.goodsDet.goodsMoney
  612. this.skuList = this.goodsDet.sku
  613. if (this.goodsDet.attr.length) {
  614. this.attrList = this.goodsDet.attr[0] ? this.goodsDet.attr[0].attrValue : []
  615. } else {
  616. this.skuId = this.goodsDet.sku[0].id
  617. }
  618. console.log(this.attrList)
  619. this.attrList.forEach(res => {
  620. let data = {
  621. name: ''
  622. }
  623. this.checkStateList.push(data);
  624. let detail = [];
  625. res.detail.split(',').forEach(d => {
  626. let data = {
  627. name: '',
  628. state: ''
  629. }
  630. data.name = d;
  631. detail.push(data);
  632. });
  633. res.detail = detail;
  634. })
  635. this.getEchoOrder()
  636. this.skuShow = true
  637. }
  638. });
  639. },
  640. // 选择规格
  641. skuSel(item, index, ind) {
  642. console.log(item, index, ind)
  643. this.attrList[index].goodsId = index
  644. this.attrList[index].attrId = ind
  645. this.checkStateList[index].name = item.name;
  646. this.checkString = '';
  647. this.checkStateList.forEach(d => {
  648. if (d.name) {
  649. if (this.checkString) {
  650. this.checkString = this.checkString + ',' + d.name;
  651. } else {
  652. this.checkString = d.name;
  653. }
  654. }
  655. });
  656. console.log(this.skuList)
  657. for (var i = 0; i < this.skuList.length; i++) {
  658. let d = this.skuList[i];
  659. if (d.detailJson == this.checkString) {
  660. console.log(d.detailJson, this.checkString)
  661. // if (d.stock > 0) {
  662. this.skuId = d.id
  663. this.skuMessage = d.detailJson
  664. this.price = d.skuPrice
  665. this.CheckattrValue = true;
  666. // } else {
  667. // this.$queue.showToast('库存不足请选择其他规格')
  668. // }
  669. break
  670. } else {
  671. this.CheckattrValue = false;
  672. }
  673. }
  674. },
  675. valChange(e) {
  676. console.log('当前值为: ' + e.value)
  677. this.value = e.value
  678. },
  679. // 立即购买
  680. payment() {
  681. if (!this.userId) {
  682. uni.navigateTo({
  683. url: '/pages/public/login'
  684. })
  685. return
  686. }
  687. if (this.attrList.length) {
  688. if (this.checkString == '' || !this.CheckattrValue) {
  689. this.$queue.showToast('请选择正确的商品规格');
  690. return;
  691. }
  692. }
  693. let data = {
  694. goodsId: this.goodsDet.goodsId,
  695. skuMessage: this.skuMessage,
  696. skuId: this.skuId,
  697. num: this.value,
  698. orderType: this.orderType,
  699. shopId: this.shopId,
  700. }
  701. this.$Request.post("/app/order/buyGoods", data).then(res => {
  702. if (res.code == 0) {
  703. this.skuShow = false
  704. uni.navigateTo({
  705. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this
  706. .orderType
  707. })
  708. } else {
  709. this.$queue.showToast(res.msg);
  710. }
  711. })
  712. },
  713. // 加入购物车
  714. orderSel(e) {
  715. if (!this.userId) {
  716. uni.navigateTo({
  717. url: '/pages/public/login'
  718. })
  719. return
  720. }
  721. if (this.attrList.length) {
  722. if (this.checkString == '' || !this.CheckattrValue) {
  723. this.$queue.showToast('请选择正确的商品规格');
  724. return;
  725. }
  726. }
  727. console.log(this.goodsDet)
  728. console.log(this.echoSku, 'echoSku')
  729. if (this.echoSku.length) {
  730. this.echoSkuList.forEach(res => {
  731. if (res.skuMessage == this.skuMessage) {
  732. this.isEchoSku = res
  733. }
  734. })
  735. if (JSON.stringify(this.isEchoSku) != "{}") {
  736. let data = {
  737. orderGoodsId: this.isEchoSku.id,
  738. type: 1,
  739. num: this.value,
  740. shopId: this.shopId,
  741. }
  742. this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
  743. if (res.code == 0) {
  744. // setTimeout(function() {
  745. this.skuShow = false
  746. this.getOrderList()
  747. // },1000)
  748. } else {
  749. this.$queue.showToast(res.msg);
  750. }
  751. });
  752. return
  753. }
  754. }
  755. let data = {
  756. goodsId: this.goodsDet.goodsId,
  757. skuMessage: this.skuMessage,
  758. skuId: this.skuId,
  759. num: this.value,
  760. shopId: this.shopId,
  761. orderId: this.orderId
  762. }
  763. this.$Request.post("/app/order/joinOrder", data).then(res => {
  764. if (res.code == 0) {
  765. this.$queue.showToast('添加成功');
  766. if (e == 1) {
  767. uni.navigateTo({
  768. url: '/pages/diancan/confirmOrder?shopId=' + this.shopId
  769. })
  770. } else {
  771. // setTimeout(function() {
  772. this.skuShow = false
  773. this.getOrderList()
  774. // },1000)
  775. }
  776. } else {
  777. this.$queue.showToast(res.msg);
  778. }
  779. })
  780. },
  781. // 切换外卖/自提
  782. tabSwidth(e) {
  783. this.orderType = e
  784. this.getOrderList()
  785. },
  786. // 展示购物车弹窗
  787. isPopupShow() {
  788. // console.log(this.goodsList.orderGoodsList[0])
  789. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  790. this.popupShow = true
  791. } else {
  792. uni.showToast({
  793. title: '请先添加商品',
  794. icon: "none"
  795. })
  796. }
  797. },
  798. // 添加数量
  799. add(item, index) {
  800. // this.count++;
  801. console.log(item, index)
  802. this.goodsList.orderGoodsList[0][index].goodsNum++
  803. let data = {
  804. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  805. type: 1,
  806. num: 1,
  807. shopId: this.shopId
  808. }
  809. this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
  810. if (res.code == 0) {
  811. this.getOrderList()
  812. } else {
  813. this.$queue.showToast(res.msg);
  814. this.goodsList.orderGoodsList[0][index].goodsNum--
  815. }
  816. });
  817. },
  818. // 减少数量
  819. noAdd(item, index) {
  820. console.log(item, index)
  821. this.goodsList.orderGoodsList[0][index].goodsNum--
  822. // this.count--;
  823. let data = {
  824. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  825. type: 2,
  826. num: 1,
  827. shopId: this.shopId
  828. }
  829. this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
  830. if (res.code == 0) {
  831. this.getOrderList()
  832. }
  833. });
  834. },
  835. // 清空购物车
  836. empty() {
  837. let data = {
  838. shopId: this.shopId,
  839. }
  840. this.$Request.post("/app/order/emptyShoppingTrolley", data).then(res => {
  841. if (res.code == 0) {
  842. this.popupShow = false
  843. this.goodsList = []
  844. this.echoSkuList = []
  845. this.echoSku = []
  846. this.getOrderList()
  847. this.getEchoOrder()
  848. }
  849. });
  850. },
  851. // 获取购物车商品列表
  852. getOrderList() {
  853. let data = {
  854. shopId: this.shopId,
  855. page: 1,
  856. limit: 1000,
  857. status: 1,
  858. // orderType: this.orderType
  859. }
  860. this.$Request.get("/app/order/selectAllOrderList", data).then(res => {
  861. if (res.code == 0) {
  862. this.goodsList = res.data.pageUtils.list[0]
  863. if (this.goodsList) {
  864. console.log(this.goodsList)
  865. this.goodsList.orderGoodsList[0].forEach(res => {
  866. res.goodsPicture = res.goodsPicture.split(',')
  867. })
  868. if (!this.goodsList.orderGoodsList[0].length) {
  869. this.popupShow = false
  870. }
  871. }
  872. this.totalPrice = res.data.money
  873. this.goodsNum = 0
  874. if (this.goodsList && this.goodsList.orderGoodsList[0]) {
  875. this.goodsList.orderGoodsList[0].forEach(res => {
  876. this.goodsNum += res.goodsNum
  877. })
  878. }
  879. }
  880. });
  881. },
  882. // 跳转商品详情
  883. goDet(id) {
  884. uni.navigateTo({
  885. url: '/pages/index/shop/goodsDet?goodsId=' + id + '&shopId=' + this.shopId + '&orderType=' +
  886. this.orderType + '&orderId=' + this.orderId
  887. })
  888. },
  889. // 去结算
  890. goConfirm() {
  891. if (!this.userId) {
  892. uni.navigateTo({
  893. url: '/pages/public/login'
  894. })
  895. return
  896. }
  897. console.log(this.goodsList)
  898. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  899. uni.navigateTo({
  900. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this
  901. .orderType
  902. })
  903. } else {
  904. uni.showToast({
  905. title: '请先添加商品',
  906. icon: "none"
  907. })
  908. }
  909. },
  910. TabSelect(e) {
  911. console.log(e.currentTarget.dataset.id)
  912. this.tabCur = e.currentTarget.dataset.id;
  913. this.mainCur = e.currentTarget.dataset.id;
  914. this.verticalNavTop = (e.currentTarget.dataset.id - 1) * 50
  915. },
  916. VerticalMain(e) {
  917. let that = this;
  918. let tabHeight = 0;
  919. if (this.load) {
  920. for (let i = 0; i < this.dataList.length; i++) {
  921. let view = uni.createSelectorQuery().select("#main-" + this.dataList[i].id);
  922. view.fields({
  923. size: true
  924. }, data => {
  925. this.dataList[i].top = tabHeight;
  926. tabHeight = tabHeight + data.height;
  927. this.dataList[i].bottom = tabHeight;
  928. }).exec();
  929. }
  930. this.load = false
  931. }
  932. let scrollTop = e.detail.scrollTop;
  933. // console.log(scrollTop,'111')
  934. for (let i = 0; i < this.dataList.length; i++) {
  935. if (scrollTop > this.dataList[i].top && scrollTop < this.dataList[i].bottom) {
  936. this.verticalNavTop = (this.dataList[i].id - 1) * 50
  937. this.tabCur = this.dataList[i].id
  938. console.log(scrollTop) //不能删除
  939. return false
  940. }
  941. }
  942. },
  943. // 打电话
  944. call(e) {
  945. uni.makePhoneCall({
  946. phoneNumber: e
  947. });
  948. },
  949. // 点击调起地图查看位置
  950. goMap() {
  951. //查看位置需要传经纬度才能执行
  952. let that = this
  953. uni.authorize({
  954. scope: 'scope.userLocation',
  955. success(res) {
  956. uni.openLocation({
  957. latitude: that.shopDet.shopLat,
  958. longitude: that.shopDet.shopLng,
  959. success: function() {}
  960. });
  961. },
  962. fail(err) {
  963. }
  964. })
  965. },
  966. goPindan() {
  967. if (!this.userId) {
  968. uni.navigateTo({
  969. url: '/pages/public/login'
  970. })
  971. return
  972. }
  973. if(this.orderId) {
  974. uni.navigateTo({
  975. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId +'&orderId=' + this.orderId
  976. })
  977. } else {
  978. let data = {
  979. shopId: this.shopId,
  980. }
  981. this.$Request.post("/app/order/shareTheBill", data).then(res => {
  982. if (res.code == 0) {
  983. uni.navigateTo({
  984. url: '/pages/index/shop/pindanDet?shopId=' + this.shopId +'&orderId=' + res.data
  985. })
  986. }
  987. });
  988. }
  989. }
  990. },
  991. onReachBottom: function() {
  992. if (this.current == 2) {
  993. this.evaluatePage = this.evaluatePage + 1;
  994. this.getEvaluateList()
  995. }
  996. },
  997. }
  998. </script>
  999. <style scoped lang="scss">
  1000. page {
  1001. background-color: #FFFFFF;
  1002. }
  1003. .pinglunImg{
  1004. width: 100%;
  1005. margin-top: 10rpx;
  1006. }
  1007. .pinglunImg-box{
  1008. width: 100%;
  1009. image{
  1010. // margin-left: 10rpx;
  1011. width: 160upx;
  1012. height: 160upx;
  1013. border-radius: 10rpx;
  1014. }
  1015. }
  1016. .coupon-item{
  1017. display: inline-block;
  1018. height: 46rpx;
  1019. margin-right: 20rpx;
  1020. border: 1px solid red;
  1021. border-radius: 10rpx;
  1022. padding: 0rpx 10rpx 0rpx 10rpx;
  1023. font-size: 20rpx;
  1024. color: red;
  1025. line-height: 44rpx;
  1026. view{
  1027. display: inline-block;
  1028. }
  1029. }
  1030. .scroll-view_H{
  1031. width: 100%;
  1032. white-space: nowrap;
  1033. }
  1034. .yhq{
  1035. width: 100%;
  1036. height: 520rpx;
  1037. background-color: #F5F5F5;
  1038. overflow-y: hidden;
  1039. .yhq-box{
  1040. width: 686rpx;
  1041. height: 500rpx;
  1042. // background-color: red;
  1043. .yhq-box-title{
  1044. width: 100%;
  1045. text-align: center;
  1046. font-weight: bold;
  1047. }
  1048. .yhq-box-list{
  1049. width: 100%;
  1050. height: auto;
  1051. height: 460rpx;
  1052. margin-top: 30rpx;
  1053. .yhq-box-list-item{
  1054. width: 100%;
  1055. height: 120rpx;
  1056. border-radius: 24rpx;
  1057. background-color: #FFFFFF;
  1058. margin-bottom: 20rpx;
  1059. }
  1060. .yhq-box-list-item-c{
  1061. width: 646rpx;
  1062. height: 100%;
  1063. }
  1064. }
  1065. }
  1066. }
  1067. .bg1 {
  1068. background: #FFFFFF;
  1069. }
  1070. .sticky-tabs {
  1071. z-index: 990;
  1072. position: sticky;
  1073. top: var(--window-top);
  1074. // background-color: #fff;
  1075. }
  1076. /* // 使用mescroll-uni,则top为0 */
  1077. .mescroll-uni,
  1078. /deep/.mescroll-uni {
  1079. .sticky-tabs {
  1080. top: 0;
  1081. }
  1082. }
  1083. .shop {
  1084. position: absolute;
  1085. top: 80rpx;
  1086. left: 0;
  1087. right: 0;
  1088. width: 686rpx;
  1089. margin: auto;
  1090. background: #FFFFFF;
  1091. border-radius: 20rpx;
  1092. box-shadow: 0 0 20rpx #CCCCCC;
  1093. }
  1094. .skuBtn {
  1095. padding: 10rpx 30rpx;
  1096. border-radius: 10rpx;
  1097. text-align: center;
  1098. margin: 10rpx 20rpx;
  1099. font-size: 28rpx;
  1100. color: #333333;
  1101. border: 2px solid #F2F2F2;
  1102. }
  1103. .active {
  1104. background: rgba(252, 210, 2, 0.2) !important;
  1105. border: 2px solid #FCD202 !important;
  1106. opacity: 0.6;
  1107. }
  1108. .active1 {
  1109. /* width: 82rpx; */
  1110. height: 16rpx;
  1111. background: #FCD202;
  1112. position: relative;
  1113. top: -10rpx;
  1114. z-index: 9;
  1115. }
  1116. .popup {
  1117. /* height: 500rpx; */
  1118. max-height: 500rpx;
  1119. /* overflow-y: auto; */
  1120. }
  1121. .tabBtn {
  1122. /* background-color: #f6f6fa; */
  1123. height: 60rpx;
  1124. line-height: 60rpx;
  1125. color: #999999;
  1126. font-size: 38rpx;
  1127. }
  1128. .Switch {
  1129. width: 164rpx;
  1130. height: 62rpx;
  1131. color: #FFFFFF;
  1132. background: #FCD202;
  1133. border-radius: 30rpx;
  1134. display: flex;
  1135. align-items: center;
  1136. padding: 2rpx;
  1137. }
  1138. .Switch>view {
  1139. /* flex: 1; */
  1140. width: 80rpx;
  1141. text-align: center;
  1142. line-height: 62rpx;
  1143. height: 58rpx;
  1144. }
  1145. .selSwitch {
  1146. color: #333333;
  1147. background: #FFFFFF;
  1148. border-radius: 30rpx;
  1149. }
  1150. .hintPopul {
  1151. width: 100%;
  1152. height: 100vh;
  1153. position: absolute;
  1154. top: 0;
  1155. background: rgba(0, 0, 0, .4);
  1156. }
  1157. .content {
  1158. position: absolute;
  1159. left: 0;
  1160. right: 0;
  1161. top: 0;
  1162. bottom: 0;
  1163. margin: auto;
  1164. text-align: center;
  1165. width: 500rpx;
  1166. height: 400rpx;
  1167. border-radius: 20rpx;
  1168. background-color: #fff;
  1169. padding-top: 120rpx;
  1170. }
  1171. .content image {
  1172. position: absolute;
  1173. top: -50rpx;
  1174. left: 0;
  1175. right: 0;
  1176. margin: auto;
  1177. }
  1178. .hintText {
  1179. font-size: 30rpx;
  1180. }
  1181. .VerticalNav.nav {
  1182. width: 200upx;
  1183. white-space: initial;
  1184. }
  1185. .VerticalNav.nav .cu-item {
  1186. width: 100%;
  1187. text-align: center;
  1188. background-color: #f1f1f1;
  1189. margin: 0;
  1190. border: none;
  1191. height: 50px;
  1192. position: relative;
  1193. }
  1194. .VerticalNav.nav .cu-item.cur {
  1195. background-color: #fff;
  1196. }
  1197. .VerticalBox {
  1198. display: flex;
  1199. }
  1200. .VerticalMain {
  1201. background-color: #f1f1f1;
  1202. flex: 1;
  1203. }
  1204. .detail_describe_text2 {
  1205. font-weight: 500;
  1206. margin-top: 2%;
  1207. color: #999999;
  1208. }
  1209. .detail_account_bottom {
  1210. margin-top: 20rpx;
  1211. width: 100%;
  1212. display: flex;
  1213. justify-content: space-between;
  1214. /* margin: 4% 0 3%; */
  1215. }
  1216. .detail_account_bottom_le {
  1217. width: 47.5%;
  1218. /* margin-right: 5%; */
  1219. border-radius: 44rpx;
  1220. text-align: center;
  1221. line-height: 2.8;
  1222. border: 2rpx solid #FCD202;
  1223. }
  1224. .detail_account_bottom_ri {
  1225. width: 47.5%;
  1226. border-radius: 44rpx;
  1227. text-align: center;
  1228. line-height: 2.8;
  1229. background-color: #FCD202;
  1230. }
  1231. .food_all {
  1232. position: relative;
  1233. }
  1234. .text-through {
  1235. text-decoration: line-through
  1236. }
  1237. /* 食物 */
  1238. .food {
  1239. width: 100%;
  1240. overflow: hidden;
  1241. // position: absolute;
  1242. // top: 350rpx;
  1243. background-color: #FFFFFF;
  1244. border-top-left-radius: 18rpx;
  1245. border-top-right-radius: 18rpx;
  1246. }
  1247. .food_address {
  1248. margin: 3%;
  1249. display: flex;
  1250. justify-content: space-between;
  1251. align-items: center;
  1252. margin-top: 120rpx;
  1253. }
  1254. .food_address_le {
  1255. width: 75%;
  1256. }
  1257. .food_address_le_top {
  1258. display: flex;
  1259. align-items: center;
  1260. justify-content: space-between;
  1261. }
  1262. .food_address_le_top_le {
  1263. width: 40rpx;
  1264. height: 37rpx;
  1265. }
  1266. .food_address_le_top_le image {
  1267. width: 40rpx;
  1268. height: 37rpx;
  1269. }
  1270. .food_address_le_top_ce {
  1271. line-height: 1.6;
  1272. font-size: 38rpx;
  1273. font-weight: 600;
  1274. color: #333333;
  1275. }
  1276. .food_address_le_top_ce_ri {
  1277. width: 14rpx;
  1278. /* margin: 1% 0 0 2%; */
  1279. height: 24rpx;
  1280. margin-left: 2%;
  1281. }
  1282. .food_address_le_top_ce_ri image {
  1283. width: 14rpx;
  1284. height: 24rpx;
  1285. }
  1286. .food_address_text {
  1287. font-weight: 500;
  1288. font-size: 24rpx;
  1289. color: #999999;
  1290. }
  1291. .food_address_ri {
  1292. width: 24%;
  1293. height: 55rpx;
  1294. display: flex;
  1295. padding: 0.5% 1%;
  1296. background-color: #FCD202;
  1297. border-radius: 31rpx;
  1298. color: #FFFFFF;
  1299. }
  1300. .food_address_ri_sty {
  1301. flex: 1;
  1302. text-align: center;
  1303. padding-top: 4%;
  1304. font-size: 24rpx;
  1305. }
  1306. .food_address_ri_sty_active {
  1307. width: 100%;
  1308. overflow: hidden;
  1309. background-color: #FFFFFF;
  1310. border-radius: 31rpx;
  1311. color: #333333;
  1312. text-align: center;
  1313. }
  1314. /* 结算 */
  1315. .settlement {
  1316. width: 94%;
  1317. background-color: #000000;
  1318. line-height: 3.4;
  1319. border-radius: 49rpx;
  1320. position: fixed;
  1321. bottom: 10rpx;
  1322. left: 3%;
  1323. display: flex;
  1324. justify-content: space-between;
  1325. }
  1326. .settlement1 {
  1327. width: 94%;
  1328. background-color: #000000;
  1329. line-height: 2.8;
  1330. border-radius: 49rpx;
  1331. position: relative;
  1332. /* bottom: 10rpx; */
  1333. left: 0;
  1334. right: 0;
  1335. /* left: 3%; */
  1336. display: flex;
  1337. justify-content: space-between;
  1338. margin: 20rpx auto;
  1339. }
  1340. .settlement_le {
  1341. width: 45%;
  1342. padding-left: 20%;
  1343. color: #FFFFFF;
  1344. font-size: 30rpx;
  1345. }
  1346. .settlement_le text {
  1347. font-size: 22rpx;
  1348. }
  1349. .settlement_ri {
  1350. width: 35%;
  1351. background-color: #FCD202;
  1352. font-family: PingFang SC;
  1353. font-weight: 800;
  1354. color: #333333;
  1355. text-align: center;
  1356. border-top-right-radius: 49rpx;
  1357. border-bottom-right-radius: 49rpx;
  1358. }
  1359. .settlement_img {
  1360. width: 91rpx;
  1361. height: 96rpx;
  1362. position: absolute;
  1363. // bottom: 30rpx;
  1364. left: 5%;
  1365. }
  1366. .settlement_img image {
  1367. width: 74rpx;
  1368. height: 81rpx;
  1369. }
  1370. .settlement_hot {
  1371. width: 35rpx;
  1372. height: 35rpx;
  1373. line-height: 35rpx;
  1374. text-align: center;
  1375. border-radius: 50%;
  1376. position: absolute;
  1377. top: -10rpx;
  1378. right: 0;
  1379. background-color: #FF130A;
  1380. color: #FFFFFF;
  1381. font-size: 20rpx;
  1382. font-weight: bold;
  1383. color: #FFFFFF;
  1384. }
  1385. .select_all {
  1386. width: 100%;
  1387. position: relative;
  1388. }
  1389. /* 餐厅 */
  1390. .select {
  1391. color: #000000;
  1392. font-weight: bold;
  1393. background-color: #fff;
  1394. z-index: 10;
  1395. }
  1396. .select_line {
  1397. width: 15%;
  1398. height: 6rpx;
  1399. margin: 0 auto 4%;
  1400. background: #E6E6E6;
  1401. border-radius: 4rpx;
  1402. }
  1403. .select_search {
  1404. width: 100%;
  1405. margin: 2% 0;
  1406. display: flex;
  1407. align-items: center;
  1408. }
  1409. .select_search_le {
  1410. /* width: 10%; */
  1411. font-size: 30rpx;
  1412. line-height: 2.5;
  1413. margin-right: 1%;
  1414. }
  1415. .select_search_ce {
  1416. /* width: 5%; */
  1417. /* margin-top: 1%; */
  1418. margin-right: 20rpx;
  1419. margin-left: 6rpx;
  1420. /* margin: 0 20rpx; */
  1421. width: 20rpx;
  1422. height: 10rpx;
  1423. }
  1424. .select_search_ri {
  1425. /* width: 84%; */
  1426. height: 72rpx;
  1427. flex: 1;
  1428. display: flex;
  1429. }
  1430. .select_search_ri input {
  1431. flex: 1;
  1432. /* width: 100%; */
  1433. height: 72rpx;
  1434. background: #F5F5F5;
  1435. color: #999999;
  1436. border-radius: 36rpx;
  1437. text-decoration: 42rpx;
  1438. text-align: center;
  1439. }
  1440. /* 附近 */
  1441. .nearby {
  1442. width: 100%;
  1443. position: relative;
  1444. }
  1445. .nearby_text {
  1446. width: 18%;
  1447. font-size: 30rpx;
  1448. font-weight: 800;
  1449. color: #333333;
  1450. text-align: center;
  1451. border-bottom: 16rpx solid #FCD202;
  1452. /* line-height: 20rpx; */
  1453. margin-top: 10rpx;
  1454. }
  1455. .nearby_address_active {
  1456. border: 2rpx solid #FCD202;
  1457. width: 100%;
  1458. padding: 3%;
  1459. margin-top: 3%;
  1460. border-radius: 10upx;
  1461. display: flex;
  1462. }
  1463. .nearby_address {
  1464. width: 100%;
  1465. padding: 3%;
  1466. margin-top: 3%;
  1467. border-radius: 10upx;
  1468. display: flex;
  1469. }
  1470. .nearby_address_le {
  1471. flex: 1;
  1472. }
  1473. .nearby_address_ri {
  1474. line-height: 2.5;
  1475. text-align: right;
  1476. /* flex: 1; */
  1477. }
  1478. .nearby_text2 {
  1479. /* line-height: 1.5; */
  1480. display: flex;
  1481. justify-content: space-between;
  1482. align-items: center;
  1483. }
  1484. .nearby_text2_ {
  1485. font-size: 30rpx;
  1486. font-weight: 800;
  1487. color: #333333;
  1488. }
  1489. .nearby_text3 {
  1490. font-size: 24rpx;
  1491. font-weight: 500;
  1492. color: #999999;
  1493. margin-top: 2%;
  1494. }
  1495. /* 添加地址 */
  1496. .goorder {
  1497. width: 100%;
  1498. padding: 2% 3%;
  1499. position: fixed;
  1500. bottom: 0;
  1501. background-color: #FFFFFF;
  1502. border-top: 1rpx solid #999999;
  1503. }
  1504. .goorder_but {
  1505. width: 100%;
  1506. line-height: 2.5;
  1507. text-align: center;
  1508. background: #FCD202;
  1509. border-radius: 36rpx;
  1510. }
  1511. </style>