storeData.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <view class="content">
  3. <view class="headr">
  4. <view class="month">
  5. <image src="../../static/icon/sdata.png" mode=""></image>
  6. <view class="store-data">
  7. <view class="data">
  8. 3000
  9. </view>
  10. <view class="tit">
  11. 本月订单
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="search-wrapper" @click="showInput" v-if="!is_show">
  17. <image src="../../static/icon/sousuo.png" mode=""></image>
  18. <view class="">
  19. 输入关键字
  20. </view>
  21. </view>
  22. <view class="search-wrapper" v-if="is_show">
  23. <input type="text" value="" v-model="keyword" focus/>
  24. <view class="btn" @click="search">
  25. 搜索
  26. </view>
  27. </view>
  28. <view class="list-wrapper">
  29. <scroll-view scroll-y="true" :style="{'height': height}" class="swiper-box" @scrolltolower="loadData">
  30. <!-- 空白页 -->
  31. <empty v-if=" loaded && dataList.length == 0"></empty>
  32. <view v-for="(item,index) in dataList" class="item">
  33. <view class="item-top flex">
  34. <view class="user-name clamp">
  35. 用户ID:{{'hello wordhello wordhellhello wordhello wordhellhello wordhello '}}
  36. </view>
  37. <view class="top-status">
  38. 待发货
  39. </view>
  40. </view>
  41. <view class="item-body flex">
  42. <image src="" mode=""></image>
  43. <view class="goods-info">
  44. <view class="good-name clamp">
  45. 满园春无患子跨店联盟洗护满园春无患子跨店联盟洗护
  46. </view>
  47. <view class="good-id">
  48. 订单编号:{{'55648785545'}}
  49. </view>
  50. <view class="tag">
  51. 本店订单
  52. </view>
  53. <view class="good-price">
  54. ¥24000.9
  55. </view>
  56. <view class="good-num">
  57. x 1
  58. </view>
  59. </view>
  60. </view>
  61. <view class="item-btm">
  62. 共一件商品 合计:¥24.9
  63. </view>
  64. </view>
  65. <uni-load-more :status="loadingType"></uni-load-more>
  66. </scroll-view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  72. import empty from '@/components/empty';
  73. export default {
  74. data() {
  75. let arr = []
  76. for(let i = 0; i< 10 ; i++) {
  77. arr.push(i)
  78. }
  79. return {
  80. is_show: false,//搜索是否显示
  81. keyword: '',//搜索关键字
  82. height: '',//滚动区域高度
  83. dataList: arr,//月订单
  84. loaded: true,
  85. loadingType: 'more',
  86. page: 1,
  87. limit: 10,
  88. }
  89. },
  90. components: {
  91. empty,
  92. uniLoadMore
  93. },
  94. onReady(res) {
  95. var _this = this;
  96. uni.getSystemInfo({
  97. success: resu => {
  98. const query = uni.createSelectorQuery();
  99. query.select('.list-wrapper').boundingClientRect();
  100. query.exec(function(res) {
  101. console.log(res, 'ddddddddddddd');
  102. _this.height = resu.windowHeight - res[0].top + 'px';
  103. console.log('打印页面的剩余高度', _this.height);
  104. });
  105. },
  106. fail: res => {}
  107. });
  108. },
  109. methods: {
  110. showInput() {
  111. this.is_show = true
  112. },
  113. search() {
  114. console.log('search')
  115. // if(this.keyword == '') {
  116. // this
  117. // }
  118. },
  119. loadData() {
  120. let obj = this
  121. console.log('加载数据')
  122. if(obj.loadingType == 'noMore' || obj.loadingType == 'loading' ) {
  123. return
  124. }
  125. }
  126. }
  127. }
  128. </script>
  129. <style lang="scss" scoped>
  130. page {
  131. background-color: #f5f5f5;
  132. }
  133. .headr {
  134. height: 357rpx;
  135. background-color: #72E3B4;
  136. position: relative;
  137. .month {
  138. position: absolute;
  139. top: 0;
  140. bottom: 0;
  141. left: 0;
  142. right: 0;
  143. margin: auto;
  144. height: 275rpx;
  145. width: 275rpx;
  146. image {
  147. width: 100%;
  148. height: 100%;
  149. }
  150. .store-data {
  151. position: absolute;
  152. height: 275rpx;
  153. width: 275rpx;
  154. text-align: center;
  155. color: #fff;
  156. top: 0;
  157. display: flex;
  158. flex-direction: column;
  159. align-items: center;
  160. justify-content: center;
  161. .data {
  162. font-size: 50rpx;
  163. font-family: PingFang SC;
  164. font-weight: bold;
  165. color: #FFFFFF;
  166. padding-bottom: 20rpx;
  167. }
  168. .tit {
  169. font-size: 30rpx;
  170. font-family: PingFang SC;
  171. font-weight: 500;
  172. color: #FFFFFF;
  173. }
  174. }
  175. }
  176. }
  177. .search-wrapper {
  178. width: 702rpx;
  179. height: 66rpx;
  180. background: #FFFFFF;
  181. box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
  182. border-radius: 33px;
  183. margin: 20rpx auto;
  184. display: flex;
  185. justify-content: center;
  186. align-items: center;
  187. font-size: 28rpx;
  188. font-family: PingFang SC;
  189. font-weight: 500;
  190. color: #999999;
  191. // line-height: 35px;
  192. image {
  193. height: 33rpx;
  194. width: 33rpx;
  195. margin-right: 22rpx;
  196. }
  197. input {
  198. width: auto;
  199. flex-grow: 1;
  200. padding-left: 30rpx;
  201. }
  202. .btn {
  203. width: 150rpx;
  204. text-align: center;
  205. //background-color: red;
  206. color: #72E3B4;
  207. }
  208. }
  209. .list-wrapper {
  210. .swiper-box {
  211. // background-color: #bfa;
  212. .item {
  213. width: 702rpx;
  214. height: 304rpx;
  215. padding: 0 28rpx;
  216. background: #FFFFFF;
  217. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  218. border-radius: 10rpx;
  219. margin: 0 auto 15rpx;
  220. &:last-of-type {
  221. margin: 0 auto;
  222. }
  223. .item-top {
  224. line-height: 83rpx;
  225. max-height: 83rpx;
  226. .user-name {
  227. flex-grow: 1;
  228. height: 83rpx;
  229. font-size: 24rpx;
  230. font-family: PingFang SC;
  231. font-weight: 400;
  232. color: #666666;
  233. padding-right: 30rpx;
  234. }
  235. .top-status {
  236. width: 100rpx;
  237. flex-shrink: 0;
  238. font-size: 28rpx;
  239. font-family: PingFang SC;
  240. font-weight: 500;
  241. color: #52C696;
  242. }
  243. }
  244. .item-body {
  245. justify-content: flex-start;
  246. image {
  247. width: 160rpx;
  248. height: 160rpx;
  249. border-radius: 15rpx;
  250. background-color: #eee;
  251. flex-shrink: 0;
  252. margin-right: 9rpx;
  253. }
  254. .goods-info {
  255. width: 100%;
  256. height: 160rpx;
  257. position: relative;
  258. .good-name {
  259. width: 311rpx;
  260. line-height: 37rpx;
  261. font-size: 26rpx;
  262. font-family: PingFang SC;
  263. font-weight: 500;
  264. color: #3F454B;
  265. }
  266. .good-id {
  267. // width: 273px;
  268. line-height: 40rpx;
  269. font-size: 24rpx;
  270. font-family: PingFang SC;
  271. font-weight: 400;
  272. color: #666666;
  273. }
  274. .tag {
  275. margin-top: 6rpx;
  276. width: 102rpx;
  277. line-height: 34rpx;
  278. background: #DBF3E9;
  279. border-radius: 5rpx;
  280. text-align: center;
  281. font-size: 20rpx;
  282. font-family: PingFang SC;
  283. font-weight: 500;
  284. color: #52C696;
  285. }
  286. .good-price, .good-num {
  287. position: absolute;
  288. top: 0;
  289. right: 0;
  290. line-height: 1.5;
  291. text-align: right;
  292. font-size: 26rpx;
  293. font-family: PingFang SC;
  294. font-weight: 500;
  295. color: #333333;
  296. }
  297. .good-num {
  298. color: #666666;
  299. top: 39rpx;
  300. }
  301. }
  302. }
  303. .item-btm {
  304. text-align: right;
  305. font-size: 26rpx;
  306. font-family: PingFang SC;
  307. font-weight: 500;
  308. color: #333333;
  309. }
  310. }
  311. }
  312. }
  313. </style>