wholesale.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="content">
  3. <image src="" mode="" class="to-bg"></image>
  4. <view class="top-tit">
  5. {{state}}
  6. </view>
  7. <view class="top-time">
  8. {{showTime()}}
  9. </view>
  10. <view class="center-btn flex" @click="navto('/pages/user/myWholesale')">
  11. <image src="" mode="" class="center-logo"></image>
  12. <view class="center-tit">
  13. <view class="tit-top">
  14. 批发订单
  15. </view>
  16. <view class="">
  17. 查看我购买的批发订单
  18. </view>
  19. </view>
  20. <image src="../../static/img/img74.png" mode="" class="look-more"></image>
  21. </view>
  22. <scroll-view scroll-y="true" class="scroll-wrap" :style="{'height': height}">
  23. <view class="good-wrap">
  24. <view class="good" v-for="item in 9" @click="navto('/pages/product/wholesaleDetail')">
  25. <image src="" mode="" class="goo-img"></image>
  26. <view class="good-tit clamp">
  27. 无患子植物家居眼罩无患子植物家居眼罩无患子植物家居眼罩
  28. </view>
  29. <view class="good-price flex">
  30. <view class="new-price">
  31. ¥2690
  32. </view>
  33. <view class="old-price">
  34. ¥3600
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <uni-load-more :status="loadingType"></uni-load-more>
  40. </scroll-view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. height: '',
  48. list: [],
  49. page: 1,
  50. limit: 10,
  51. loadingType: 'more',
  52. loaded: false,
  53. bin: '',
  54. stop: '',
  55. status: 0,
  56. state: ''
  57. }
  58. },
  59. onReady(res) {
  60. var obj = this;
  61. uni.getSystemInfo({
  62. success: resu => {
  63. const query = uni.createSelectorQuery();
  64. query.select('.scroll-wrap').boundingClientRect();
  65. query.exec(function(res) {
  66. obj.height = resu.windowHeight - res[0].top + 'px';
  67. console.log('打印页面的剩余高度', obj.height);
  68. });
  69. },
  70. fail: res => {}
  71. });
  72. },
  73. onLoad(opt) {
  74. let obj = this
  75. obj.bin = decodeURI(opt.bin)
  76. obj.stop = opt.stp
  77. obj.stauts = opt.status
  78. obj.state = opt.state
  79. console.log(obj.bin, obj.stop)
  80. },
  81. methods: {
  82. navto(url) {
  83. uni.navigateTo({
  84. url: url
  85. })
  86. },
  87. showTime() {
  88. let obj =this
  89. console.log(obj.status,'obj.status++++++++')
  90. if(obj.status == 1) {
  91. return '距离结束'
  92. }
  93. if(obj.status == 0) {
  94. return ''
  95. }
  96. if(obj.status == 2) {
  97. return obj.bin + '开始'
  98. }
  99. }
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .to-bg {
  105. width: 750rpx;
  106. height: 427rpx;
  107. background-color: #ff8a57;
  108. }
  109. .top-tit {
  110. position: absolute;
  111. top: 170rpx;
  112. left: 0;
  113. right: 0;
  114. margin: auto;
  115. text-align: center;
  116. font-size: 30rpx;
  117. font-family: PingFang SC;
  118. font-weight: 500;
  119. color: #FFFFFF;
  120. }
  121. .top-time {
  122. position: absolute;
  123. top: 240rpx;
  124. left: 0;
  125. right: 0;
  126. margin: auto;
  127. font-size: 83rpx;
  128. text-align: center;
  129. font-family: PingFang SC;
  130. font-weight: bold;
  131. color: #FFFFFF;
  132. }
  133. .center-btn {
  134. padding: 20rpx 32rpx;
  135. background-color: #fff;
  136. margin-bottom: 20rpx;
  137. .center-logo {
  138. width: 83rpx;
  139. height: 106rpx;
  140. flex-shrink: 0;
  141. background-color: #eee;
  142. }
  143. .center-tit {
  144. padding-left: 30rpx;
  145. flex-grow: 1;
  146. font-size: 24rpx;
  147. font-family: PingFang SC;
  148. font-weight: 500;
  149. color: #999999;
  150. line-height: 1.5;
  151. .tit-top {
  152. font-size: 32rpx;
  153. font-family: PingFang SC;
  154. font-weight: bold;
  155. color: #333333;
  156. }
  157. }
  158. .look-more {
  159. width: 16rpx;
  160. height: 30rpx;
  161. flex-shrink: 0;
  162. }
  163. }
  164. .scroll-wrap {
  165. // background-color: red;
  166. }
  167. .good-wrap {
  168. display: flex;
  169. // padding: 0 0 20rpx 20rpx;
  170. padding-left: 20rpx;
  171. flex-wrap: wrap;
  172. }
  173. .good {
  174. width: 345rpx;
  175. height: 480rpx;
  176. margin-right: 20rpx;
  177. margin-bottom: 20rpx;
  178. background: #FFFFFF;
  179. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  180. border-radius: 10rpx;
  181. .goo-img {
  182. width: 345rpx;
  183. height: 345rpx;
  184. border-radius: 10rpx 10rpx 0 0;
  185. background-color: #bfa;
  186. }
  187. .good-tit {
  188. padding: 15rpx 20rpx;
  189. font-size: 30rpx;
  190. font-family: PingFang SC;
  191. font-weight: bold;
  192. color: #333333;
  193. line-height: 35rpx;
  194. }
  195. .good-price {
  196. padding-left: 20rpx;
  197. justify-content: flex-start;
  198. .new-price {
  199. font-size: 36rpx;
  200. font-family: PingFang SC;
  201. font-weight: bold;
  202. color: #FF4C4C;
  203. }
  204. .old-price {
  205. padding-left: 8rpx;
  206. font-size: 26rpx;
  207. font-family: PingFang SC;
  208. font-weight: bold;
  209. text-decoration: line-through;
  210. color: #999999;
  211. }
  212. }
  213. }
  214. </style>