index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <view class="content">
  3. <view class="store-header">
  4. <view class="home-store">
  5. <view class="store-logo"><image src="/static/logo.jpg"></image></view>
  6. <view class="store-info">
  7. <view class="name">桃奢妍商业广场</view>
  8. <view class="desc">广东省/广州市/增城区</view>
  9. </view>
  10. <view class="store-kf" @click="kfPop">联系客服</view>
  11. </view>
  12. <view class="store-address">
  13. <view class="address-info">
  14. <image src="/static/image/location.svg"></image>
  15. <view class="address">天乐社区服务中心蜀山新产业园区海亮九玺海亮九玺南区</view>
  16. </view>
  17. <view class="store-time">营业 08:00–22:30</view>
  18. </view>
  19. </view>
  20. <scroll-view class="home-goods" scroll-y scroll-with-animation>
  21. <view class="goods-title">
  22. <view class="title-left">
  23. <text>HOT DEALS</text>
  24. <view class="name">正在抢购</view>
  25. </view>
  26. <view class="title-more">全部商品 <image src="/static/image/right.svg"></image> </view>
  27. </view>
  28. <view class="goods-list">
  29. <view class="list-item" v-for="(item,index) in 10" :key="index" @click="test">
  30. <view class="image">
  31. <image src="https://washmy.oss-cn-guangzhou.aliyuncs.com/storage/20260727/2e9fd491e2def96b0dd0677f43d7a31913cf959e.png"></image>
  32. <text>2.7折</text>
  33. </view>
  34. <view class="info">
  35. <view class="title">赫莲娜/HR黑绷带50ml小露珠200ml两件套 线下兑换券</view>
  36. <view class="tags"></view>
  37. <view class="tags">已售0</view>
  38. <view class="price-btn">
  39. <view class="price">¥799.00</view>
  40. <view class="price-line">¥2,999.00</view>
  41. <view class="buy-btn">立即抢购</view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </scroll-view>
  47. <halfLogin ref="loginCom"></halfLogin>
  48. <kfService ref="kfService"></kfService>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. data() {
  54. return {
  55. title: 'Hello'
  56. }
  57. },
  58. onLoad() {
  59. },
  60. methods: {
  61. test(){
  62. this.$refs.loginCom.open();
  63. this.loginState = true;
  64. },
  65. kfPop(){
  66. this.$refs.kfService.open();
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .content{
  73. position: fixed;
  74. z-index: 1;
  75. top: 0;
  76. left: 0;
  77. bottom: 0;
  78. right: 0;
  79. background-color: #ededed;
  80. display: flex;
  81. flex-direction: column;
  82. }
  83. .home-store{
  84. background-color: $main-color;
  85. padding: 20rpx;
  86. display: flex;
  87. align-items: center;
  88. gap: 20rpx;
  89. image {
  90. width: 92rpx;
  91. height: 92rpx;
  92. border: 2rpx solid #fff;
  93. border-radius: 20rpx;
  94. }
  95. .store-info{
  96. flex: 1;
  97. .name {
  98. color: #fff;
  99. font-weight: bold;
  100. font-size: 32rpx;
  101. }
  102. .desc {
  103. color: $main-sub-color;
  104. font-size: 28rpx;
  105. margin-top: 10rpx;
  106. }
  107. }
  108. .store-kf{
  109. background-color: #fff;
  110. color: $main-color;
  111. font-size: 24rpx;
  112. padding: 20rpx 30rpx;
  113. border-radius: 40rpx;
  114. }
  115. }
  116. .store-address {
  117. display: flex;
  118. align-self: center;
  119. width: calc(100% - 40rpx);
  120. margin: 0 auto;
  121. box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgb(0 0 0 / 0.05);
  122. background-color: #fff;
  123. border-bottom-right-radius:20rpx;
  124. border-bottom-left-radius:20rpx;
  125. padding: 20rpx 20rpx;
  126. gap: 20rpx;
  127. color: #475569;
  128. .address-info {
  129. flex: 1 1 0%;
  130. display: flex;
  131. align-items: center;
  132. gap: 10rpx;
  133. overflow: hidden;
  134. image {
  135. width: 40rpx;
  136. height: 40rpx;
  137. }
  138. .address{
  139. flex: 1;
  140. overflow: hidden;
  141. text-overflow: ellipsis;
  142. white-space: nowrap;
  143. }
  144. }
  145. .store-time{
  146. color: #94a3b8;
  147. }
  148. }
  149. .home-goods{
  150. height: 0;
  151. flex: 1;
  152. width: 95%;
  153. margin: 20rpx auto;
  154. .list-item{
  155. display: flex;
  156. align-items: center;
  157. gap: 20rpx;
  158. background-color: #fff;
  159. padding: 20rpx;
  160. margin-top: 20rpx;
  161. border-radius: 20rpx;
  162. .info{
  163. flex: 1 1 0%;
  164. overflow: hidden;
  165. .title{
  166. overflow: hidden;
  167. text-overflow: ellipsis;
  168. white-space: nowrap;
  169. font-size: 32rpx;
  170. color: #333;
  171. font-weight: 900;
  172. }
  173. .tags {
  174. color: #94a3b8;
  175. font-size: 24rpx;
  176. margin: 10rpx 0;
  177. }
  178. .price-btn{
  179. display: flex;
  180. align-items: center;
  181. gap: 20rpx;
  182. align-items: flex-end;
  183. .price{
  184. font-size: 30rpx;
  185. color: $main-color;
  186. font-weight: 900;
  187. }
  188. .price-line {
  189. color: #999999;font-size: 24rpx;text-decoration-line: line-through;
  190. }
  191. .buy-btn{
  192. margin-left: auto;
  193. margin-right: 0;
  194. background-color: $main-color;
  195. color: #fff;
  196. border-radius: 30rpx;
  197. font-size: 28rpx;
  198. padding: 10rpx 20rpx;
  199. }
  200. }
  201. }
  202. .image {
  203. height: 180rpx;
  204. overflow: hidden;display: flex;align-items: center;min-width: 180rpx;
  205. position: relative;
  206. text {
  207. background-color: $main-color;
  208. color: #fff;
  209. position: absolute;
  210. top: 10rpx;
  211. left: 10rpx;
  212. font-size: 24rpx;
  213. border-radius: 30rpx;
  214. padding: 10rpx 15rpx;
  215. }
  216. image {
  217. width: 180rpx;
  218. border-radius: 10upx;
  219. height: 100%;
  220. }
  221. }
  222. }
  223. .goods-title{
  224. display: flex;
  225. align-items: center;
  226. justify-content: space-between;
  227. .title-left{
  228. .name {
  229. font-size: 34rpx;
  230. color: #333;
  231. font-weight: 900;
  232. }
  233. text {
  234. color: $main-color;
  235. font-weight: 700;
  236. font-size: 24rpx;
  237. }
  238. }
  239. .title-more{
  240. display: flex;
  241. align-items: center;
  242. color: #94a3b8;
  243. font-size: 28rpx;
  244. image {
  245. width: 28rpx;
  246. height: 28rpx;
  247. }
  248. }
  249. }
  250. }
  251. </style>