hallinfo.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="center">
  3. <view class="content-money">
  4. <view class="money-box">
  5. <view class="status_bar"><!-- 这里是状态栏 --></view>
  6. <image class="money_bg" src="../../static/img/hinfo-bg.png"></image>
  7. <view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
  8. <view class="header">浙江馆</view>
  9. <view class="message flex">潮奢馆馆长:李丹丹</view>
  10. </view>
  11. </view>
  12. <view class="search">
  13. <view class="search-left" @click="test()">订单</view>
  14. <view class="search-right">
  15. <view class="input-box flex">
  16. <view class="input"><input type="text" placeholder="输入关键字" /></view>
  17. <image class="search-inco" src="../../static/img/search.png" mode=""></image>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="hotgoods" v-if="firstList.length != 0">
  22. <view class="hotgoods-item" v-for="item in firstList" :key="item.id" @click="navToDetailPage(item)">
  23. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  24. <view class="title clamp margin-c-20">{{ item.name }}</view>
  25. <view class="hot-price">
  26. <view class="price">
  27. <text class="font-size-sm">¥</text>
  28. {{ item.price }}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import { auction_product } from '@/api/hall.js'
  37. export default {
  38. data() {
  39. return {
  40. firstList: [],
  41. id:'',//场次id
  42. page: 1,
  43. limit: 10,
  44. loadingType: 'more',
  45. };
  46. },
  47. onLoad(option) {
  48. this.id = option.id
  49. this.loadData();
  50. },
  51. methods: {
  52. loadData(){
  53. const obj = this;
  54. if (obj.loadingType == 'nomore' || obj.loadingType == 'loading') {
  55. return;
  56. }
  57. obj.loadingType = 'loading';
  58. auction_product({
  59. page: obj.page,
  60. limit: obj.limit,
  61. id: obj.id
  62. }).then(({data}) => {
  63. obj.firstList = obj.firstList.concat(data);
  64. if (data.length != obj.limit) {
  65. obj.loadingType = 'more';
  66. obj.page++;
  67. } else {
  68. obj.loadingType = 'nomore';
  69. }
  70. }).catch(e =>{
  71. console.log(e);
  72. })
  73. },
  74. toBack() {
  75. uni.navigateBack({});
  76. },
  77. nav(url) {
  78. uni.navigateTo({
  79. url
  80. });
  81. },
  82. test() {
  83. uni.navigateTo({
  84. url:'/pages/hall/porducthall'
  85. })
  86. }
  87. }
  88. };
  89. </script>
  90. <style lang="scss">
  91. .center,
  92. page {
  93. height: auto;
  94. min-height: 100%;
  95. background-color: #ffffff;
  96. }
  97. .money-box {
  98. color: #ffffff;
  99. text-align: center;
  100. position: relative;
  101. padding-top: 250rpx;
  102. .money_bg {
  103. position: absolute;
  104. width: 750rpx;
  105. height: 412rpx;
  106. top: 0;
  107. left: 0;
  108. right: 0;
  109. }
  110. .header {
  111. position: absolute;
  112. left: 0;
  113. top: 0;
  114. width: 100%;
  115. height: 80rpx;
  116. font-size: 32rpx;
  117. font-weight: 700;
  118. z-index: 99;
  119. display: flex;
  120. justify-content: center;
  121. align-items: center;
  122. }
  123. .goback-box {
  124. position: absolute;
  125. left: 18rpx;
  126. top: 0;
  127. height: 80rpx;
  128. display: flex;
  129. align-items: center;
  130. }
  131. .goback {
  132. z-index: 100;
  133. width: 34rpx;
  134. height: 34rpx;
  135. }
  136. .message {
  137. display: inline-block;
  138. position: relative;
  139. z-index: 2;
  140. margin: 0 auto;
  141. padding: 20rpx 40rpx;
  142. background: rgba(253, 59, 57, 0.4);
  143. border-radius: 25rpx;
  144. font-size: 30rpx;
  145. font-family: PingFang SC;
  146. font-weight: 500;
  147. color: #ffffff;
  148. }
  149. }
  150. .search {
  151. margin-top: 120rpx;
  152. padding: 0 30rpx 0 20rpx;
  153. display: flex;
  154. align-items: center;
  155. .search-left {
  156. width: 112rpx;
  157. height: 70rpx;
  158. background: #fd3b39;
  159. border-radius: 25rpx;
  160. font-size: 30rpx;
  161. font-family: PingFang SC;
  162. font-weight: 500;
  163. color: #ffffff;
  164. line-height: 70rpx;
  165. text-align: center;
  166. }
  167. .search-right {
  168. width: 570rpx;
  169. background: #dcdcdc;
  170. border-radius: 35rpx;
  171. margin-left: 20rpx;
  172. padding: 18rpx 50rpx 18rpx 36rpx;
  173. .search-inco {
  174. width: 34rpx;
  175. height: 34rpx;
  176. }
  177. }
  178. }
  179. .hotgoods {
  180. margin-top: 38rpx;
  181. width: 100%;
  182. display: flex;
  183. flex-wrap: wrap;
  184. padding: 0 32rpx 108rpx;
  185. .hotgoods-item {
  186. width: 48%;
  187. background-color: #ffffff;
  188. border-radius: 12rpx;
  189. margin-bottom: 24rpx;
  190. &:nth-child(2n + 1) {
  191. margin-right: 24rpx;
  192. }
  193. .image-wrapper {
  194. width: 100%;
  195. height: 330rpx;
  196. background: red;
  197. border-radius: 3px;
  198. overflow: hidden;
  199. image {
  200. width: 100%;
  201. height: 100%;
  202. opacity: 1;
  203. border-radius: 12rpx 12rpx 0 0;
  204. }
  205. }
  206. .title {
  207. font-size: $font-base;
  208. color: $font-color-dark;
  209. font-weight: bold;
  210. line-height: 80rpx;
  211. }
  212. .hot-price {
  213. display: flex;
  214. justify-content: space-between;
  215. padding: 0 16rpx 12rpx;
  216. .price {
  217. font-size: 40rpx;
  218. color: #ff0000;
  219. font-weight: 500;
  220. }
  221. .cart-icon {
  222. image {
  223. width: 44rpx;
  224. height: 44rpx;
  225. }
  226. }
  227. }
  228. }
  229. }
  230. </style>