hallinfo.vue 5.0 KB

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