goodsList.vue 47 KB

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