shop.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. <template>
  2. <view class="shop-index iPhone-bottom flex-common-css box-border-box">
  3. <image class="bg-img" src="@/static/img/my/lqzx-bg.png" mode="scaleToFill"></image>
  4. <view class="nav-box">
  5. <Nav :leftShow='false' :customNav='true' bgckgroundBox='transparent'>
  6. <template>
  7. <view slot="custom" class="">
  8. <image class="nav-img" @click="toBack()" src="@/static/img/takeout/bg-back.png" mode="scaleToFill"></image>
  9. </view>
  10. </template>
  11. </Nav>
  12. </view>
  13. <view class="head-box bgc-f box-border-box plr-24" :style="{height:domHeigjt + 'rpx'}">
  14. <view id="shopInfoBox" class="shop-info-box bgc-f box-border-box p-24">
  15. <view class="info-box-top flex-justify-space">
  16. <view class="box-top-left">
  17. <view class="top-left-1 fs-40 fw-600 text-overflow-ellipsis-one">猪油拌猪油拌饭猪油拌猪油拌饭猪油拌饭猪油拌(回兴店)</view>
  18. <view class="align-items-center mb-8">
  19. <image class="img-x mr-12" src="@/static/img/my/wdpj.png" mode=""></image>
  20. <view class="fs-26 fw-600 fc-FF7F00 mr-12">4.5分</view>
  21. <view class="fc-6 fs-24 mr-12">| 预计38分钟 |</view>
  22. <view class="fc-6 fs-24 mr-12">855人购买</view>
  23. </view>
  24. </view>
  25. <image class="box-top-right" src="@/static/img/my/bg.png" mode="scaleToFill"></image>
  26. </view>
  27. <view class="fs-24 fw-400 fc-9 mb-20">
  28. 公告:公告内容公告内容公告内容公告内容公告内11容公公告内容公告内容公告内容公告内容公告内公告内容公告内容公告内容公告内容公告内
  29. </view>
  30. <view class="flex-wrap-wrap">
  31. <view class="info-box-quan-list" v-for="(item,i) in 4" :key="i" @click="openCoupon">
  32. <image src="@/static/img/takeout/quan-bg.png" mode=""></image>
  33. <view class="quan-list-1 fw-b fs-32 fc-f">
  34. <span class="fw-b fs-20 fc-f">¥</span>10</view>
  35. <view class="quan-list-2 fw-400 fs-24 fc-f">领</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="head-box-1 bgc-f box-border-box plr-24">
  41. <view class="align-items-center shop-type-list">
  42. <view class="shop-item fs-32" @click="seletShopType(item)"
  43. :class="shopType === item.id?'s-item':'n-item'"
  44. v-for="(item,i) in shopTypeList" :key="i">
  45. {{item.name}}
  46. <view v-if="item.id == 2" class="pj-num" :class="shopType === item.id?'s-item':'n-item'">999+</view>
  47. </view>
  48. <view class="shop-item-bs" :style="{left:shopTypeBsLeft+'rpx'}"></view>
  49. </view>
  50. </view>
  51. <view class="common-view-css bgc-f" style="overflow: hidden;">
  52. <Menu style="height: 100%;" v-if="shopType === 1"></Menu>
  53. <Evaluate style="height: 100%;" v-else-if="shopType === 2"></Evaluate>
  54. <ShopInfo style="height: 100%;" v-else-if="shopType === 3"></ShopInfo>
  55. </view>
  56. <view class="shop-buttom-money box-border-box" @click="openBuyCrad()">
  57. <view class="shop-buttom-money-1 flex-justify-space align-items-center">
  58. <image src="@/static/img/takeout/buy-icon.png" mode="scaleToFill"></image>
  59. <view class="shop-buttom-num fs-24 fc-f text-align-center">3</view>
  60. <view class="">
  61. <view class="">
  62. <span class="fw-600 fs-24 fc-f">¥</span>
  63. <span class="fw-600 fs-44 fc-f">19.26</span>
  64. </view>
  65. <!-- <view class="fs-24 fc-ADADAD">免配送</view> -->
  66. <view class="fs-24 fc-ff3939">配送费¥10</view>
  67. </view>
  68. <view class="fs-32 fw-600 fc-f mr-30">20元起送</view>
  69. <!-- <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600">去结算</view> -->
  70. </view>
  71. </view>
  72. <uni-popup ref="popupBuy" type="bottom">
  73. <view class="buy-card flex-index-css">
  74. <view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center">
  75. <view class="">
  76. <span class="fs-32 fc-3 mr-12">已选商品</span>
  77. <span class="fs-32 fc-9">(打包费<span class="fs-32 fc-FB3D03">8元</span>)</span>
  78. </view>
  79. <view class="fs-28 fw-400 fc-9 align-items-center">
  80. <view class="">
  81. <uni-icons type="trash" size="18" color="#999"></uni-icons>
  82. </view>
  83. <view class="fs-28 fw-400 fc-9">清空</view>
  84. </view>
  85. </view>
  86. <view class="scroll-view-css box-border-box p-32">
  87. <view class="buy-card-item display-flex" v-for="(item,i) in 5" :key="i">
  88. <image src="@/static/img/my/bg.png" mode="scaleToFill"></image>
  89. <view class="flex-1">
  90. <view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-12">[畅销款]奥尔1良烤肉牛油拌饭拌饭[畅销款]奥尔1良烤肉牛油拌饭拌饭</view>
  91. <view class="w-514 text-overflow-ellipsis-one fs-24 fw-400 fc-9 mb-18">不辣,加辣</view>
  92. <view class="flex-justify-space">
  93. <view class="">
  94. <span class="fs-24 fc-FB3D03 fw-400">¥</span>
  95. <span class="fs-40 fc-FB3D03 fw-b">3.99</span>
  96. </view>
  97. <view class="display-flex align-items-center">
  98. <view class="right-only-right-red fw-500 text-align-center fs-36 fc-f">-</view>
  99. <view class="right-only-right-2 text-align-center fs-28 fw-400">1</view>
  100. <view class="right-only-right-add fw-500 text-align-center fs-36 fc-f">+</view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="shop-buttom-money box-border-box" @click="createOrder()">
  107. <view class="shop-buttom-money-1 flex-justify-space align-items-center">
  108. <image src="@/static/img/takeout/buy-icon.png" mode="scaleToFill"></image>
  109. <view class="shop-buttom-num fs-24 fc-f text-align-center">3</view>
  110. <view class="">
  111. <view class="">
  112. <span class="fw-600 fs-24 fc-f">¥</span>
  113. <span class="fw-600 fs-44 fc-f">19.26</span>
  114. </view>
  115. <!-- <view class="fs-24 fc-ADADAD">免配送</view> -->
  116. <view class="fs-24 fc-ff3939">配送费¥10</view>
  117. </view>
  118. <!-- <view class="fs-32 fw-600 fc-f mr-30">20元起送</view> -->
  119. <view class="shop-buttom-money-2 text-align-center fs-32 fc-f fw-600">去结算</view>
  120. </view>
  121. </view>
  122. </view>
  123. </uni-popup>
  124. <uni-popup ref="popupCoupon" type="bottom">
  125. <view class="pop-coupon box-border-box p-24">
  126. <view class="text-align-center fs-36 fw-600 box-title mb-32">
  127. 本店优惠券
  128. <uni-icons @click="closeCoupon" class="box-close" type="closeempty" size="20"></uni-icons>
  129. </view>
  130. <view class="fs-28 fw-400 mb-24">免费领券</view>
  131. <view class="scroll-view-css">
  132. <view class="item-box display-flex mb-20" v-for="(item,index) in 10" :key="index">
  133. <view class="item-right flex-direction flex-justify-center flex-1 bgc-f">
  134. <view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
  135. 优惠券名称优惠券名称优惠券名称优惠券名称优
  136. </view>
  137. <view class="fs-24 fc-6">
  138. 有效时间:2024.05.08-2024.05.24
  139. </view>
  140. </view>
  141. <view class="item-hr"></view>
  142. <view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
  143. <view class="align-items-center">
  144. <view class="fs-30 fw-600 fc-FB3D03">¥</view>
  145. <view class="fs-48 fw-600 fc-FB3D03">10</view>
  146. </view>
  147. <view class="fs-24 mb-18 fc-6">
  148. 满90元可用
  149. </view>
  150. <view class="but-box fs-28 fc-f">
  151. 立即领取
  152. </view>
  153. <view class="ball"></view>
  154. <view class="ball-two"></view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </uni-popup>
  160. </view>
  161. </template>
  162. <script>
  163. import Menu from './shop-mod/menu.vue';
  164. import Evaluate from './shop-mod/evaluate.vue';
  165. import ShopInfo from './shop-mod/info.vue';
  166. import tools from "@/service/tools";
  167. export default {
  168. components:{Menu,Evaluate,ShopInfo},
  169. data(){
  170. return{
  171. domHeigjt:224,
  172. shopTypeList:[{name:"点菜",id:1},{name:"评价",id:2},{name:"店铺",id:3},],
  173. shopType:1,//组件类型
  174. shopTypeBsLeft:12,
  175. }
  176. },
  177. onLoad(e) {
  178. },
  179. mounted() {
  180. this.getDomH();
  181. },
  182. methods:{
  183. toBack(){
  184. tools.leftClick()
  185. },
  186. getDomH(){
  187. let info = uni.createSelectorQuery().select('#shopInfoBox');
  188. info.boundingClientRect((data)=>{
  189. this.domHeigjt = data.height * 2 - 34
  190. }).exec()
  191. },
  192. scrolltolower(){
  193. console.log('触底');
  194. },
  195. seletShopType(item){
  196. if(this.shopType!=item.id){
  197. this.shopType = item.id;
  198. if(this.shopType == 1){
  199. this.shopTypeBsLeft = 12
  200. }else if(this.shopType == 2){
  201. this.shopTypeBsLeft = 166
  202. }else{
  203. this.shopTypeBsLeft = 160*2
  204. }
  205. }
  206. },
  207. openBuyCrad(){
  208. this.$refs.popupBuy.open()
  209. },
  210. createOrder(){
  211. },
  212. openCoupon(){
  213. this.$refs.popupCoupon.open()
  214. },
  215. closeCoupon(){
  216. this.$refs.popupCoupon.close()
  217. },
  218. },
  219. }
  220. </script>
  221. <style scoped lang="scss">
  222. .pop-coupon{
  223. width: 100%;
  224. height: 40vh;
  225. background-color: #F5F4F9;
  226. border-radius: 24rpx 24rpx 0rpx 0rpx;
  227. padding-top: 32rpx !important;
  228. display: flex;
  229. flex-direction: column;
  230. .box-title{
  231. position: relative;
  232. .box-close{
  233. position: absolute;
  234. right: 22rpx;
  235. }
  236. }
  237. .item-right {
  238. padding: 24rpx;
  239. box-sizing: border-box;
  240. border-radius: 20rpx 0 0 20rpx;
  241. position: relative;
  242. }
  243. .item-hr {
  244. width: 0px;
  245. height: auto;
  246. border-right: 1rpx dashed #FB7850;
  247. }
  248. .item-hr-two {
  249. width: 0px;
  250. height: auto;
  251. border-right: 1rpx dashed #999;
  252. }
  253. .item-left {
  254. width: 200rpx;
  255. height: auto;
  256. padding: 20rpx 24rpx;
  257. box-sizing: border-box;
  258. position: relative;
  259. border-radius: 0 20rpx 20rpx 0;
  260. }
  261. .but-box {
  262. width: 152rpx;
  263. height: 52rpx;
  264. line-height: 52rpx;
  265. text-align: center;
  266. background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
  267. border-radius: 200rpx;
  268. }
  269. .ball {
  270. width: 24rpx;
  271. height: 24rpx;
  272. border-radius: 50%;
  273. position: absolute;
  274. top: -12rpx;
  275. left: -12rpx;
  276. background: #F5F5F5;
  277. z-index: 2;
  278. }
  279. .ball-two {
  280. width: 24rpx;
  281. height: 24rpx;
  282. border-radius: 50%;
  283. position: absolute;
  284. background: #F5F5F5;
  285. z-index: 10;
  286. bottom: -12rpx;
  287. left: -12rpx;
  288. }
  289. }
  290. .shop-index{
  291. position: relative;
  292. .right-only-right-red{
  293. width: 44rpx;
  294. height: 44rpx;
  295. line-height: 40rpx;
  296. border-radius: 12rpx;
  297. border: 1rpx solid #41ABF5;
  298. color: #41ABF5;
  299. }
  300. .right-only-right-add{
  301. width: 44rpx;
  302. height: 44rpx;
  303. line-height: 40rpx;
  304. background: linear-gradient( 117deg, #57CAFF 0%, #41ABF5 100%);
  305. border-radius: 12rpx;
  306. }
  307. .right-only-right-2{
  308. min-width: 50rpx;
  309. }
  310. .w-514{
  311. width: 514rpx;
  312. }
  313. .bg-img{
  314. position: absolute;
  315. top: 0;
  316. left: 0;
  317. width: 100%;
  318. height: 280rpx;
  319. z-index: -1;
  320. }
  321. .nav-box{
  322. margin-bottom: 110rpx;
  323. .nav-img{
  324. width: 56rpx;
  325. height: 56rpx;
  326. }
  327. }
  328. .shop-buttom-money{
  329. width: 100%;
  330. height: 140rpx;
  331. background: rgba(255,255,255,0.8);
  332. padding: 20rpx 24rpx;
  333. .shop-buttom-money-1{
  334. width: 100%;
  335. height: 100%;
  336. background: #333333;
  337. border-radius: 200rpx;
  338. box-sizing: border-box;
  339. padding-left: 136rpx;
  340. // padding-right: 32rpx;
  341. position: relative;
  342. image{
  343. position: absolute;
  344. bottom: 0;
  345. left: 8rpx;
  346. width: 128rpx;
  347. height: 128rpx;
  348. }
  349. .shop-buttom-num{
  350. width: 32rpx;
  351. height: 32rpx;
  352. line-height: 32rpx;
  353. background: #FB3D03;
  354. border-radius: 50%;
  355. position: absolute;
  356. top: 36rpx;
  357. left: 82rpx;
  358. }
  359. .shop-buttom-money-2{
  360. width: 200rpx;
  361. height: 100rpx;
  362. line-height: 100rpx;
  363. background: #41ABF5;
  364. border-radius: 0rpx 200rpx 200rpx 0rpx;
  365. }
  366. }
  367. }
  368. .head-box{
  369. width: 100%;
  370. position: relative;
  371. .shop-info-box{
  372. position: absolute;
  373. top: -50rpx;
  374. left: 24rpx;
  375. width: 702rpx;
  376. min-height: 258rpx;
  377. border-radius: 20rpx;
  378. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0,0,0,0.1);
  379. .info-box-top{
  380. .box-top-left{
  381. .top-left-1{
  382. width: 480rpx;
  383. margin-bottom: 8rpx;
  384. }
  385. .img-x{
  386. width: 24rpx;
  387. height: 24rpx;
  388. }
  389. }
  390. .box-top-right{
  391. width: 100rpx;
  392. height: 100rpx;
  393. border-radius: 12rpx;
  394. }
  395. }
  396. .info-box-quan-list{
  397. width: 124rpx;
  398. height: 48rpx;
  399. margin: 0 8rpx 8rpx 0;
  400. position: relative;
  401. image{
  402. width: 124rpx;
  403. height: 48rpx;
  404. position: absolute;
  405. top: 0;
  406. left: 0;
  407. z-index: 1;
  408. }
  409. .quan-list-1{
  410. position: absolute;
  411. top: 3rpx;
  412. left: 8rpx;
  413. z-index: 2;
  414. }
  415. .quan-list-2{
  416. position: absolute;
  417. top: 8rpx;
  418. right: 12rpx;
  419. z-index: 2;
  420. }
  421. }
  422. }
  423. }
  424. .head-box-1{
  425. width: 100%;
  426. height: 88rpx;
  427. border-bottom: 1rpx solid #eee;
  428. .shop-type-list{
  429. height: 88rpx;
  430. position: relative;
  431. .shop-item-bs{
  432. position: absolute;
  433. bottom: 0;
  434. width: 40rpx;
  435. height: 6rpx;
  436. border-radius: 20rpx;
  437. background-color: #41ABF5;
  438. transition: left 0.5s;
  439. }
  440. .shop-item{
  441. margin-right: 90rpx;
  442. position: relative;
  443. .pj-num{
  444. position: absolute;
  445. right: -80rpx;
  446. top: 0;
  447. text-align: left;
  448. width: 80rpx;
  449. }
  450. }
  451. .s-item{
  452. font-weight: 600;
  453. }
  454. .n-item{
  455. font-weight: 400;
  456. color: #666666;
  457. }
  458. }
  459. }
  460. .buy-card{
  461. height: 828rpx;
  462. background-color: #fff;
  463. border-radius: 24rpx 24rpx 0rpx 0rpx;
  464. .buy-card-top{
  465. width: 100%;
  466. height: 92rpx;
  467. background: #FCF5DB;
  468. border-radius: 24rpx 24rpx 0rpx 0rpx;
  469. }
  470. .buy-card-item{
  471. width: 100%;
  472. height: 176rpx;
  473. margin-bottom: 32rpx;
  474. image{
  475. width: 152rpx;
  476. height: 152rpx;
  477. border-radius: 12rpx;
  478. margin-right: 20rpx;
  479. }
  480. }
  481. }
  482. }
  483. </style>