123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <template>
- <view class="content">
- <view class="headr">
- <view class="month">
- <image src="../../static/icon/sdata.png" mode=""></image>
- <view class="store-data">
- <view class="data">
- 3000
- </view>
- <view class="tit">
- 本月订单
- </view>
- </view>
- </view>
- </view>
- <view class="search-wrapper" @click="showInput" v-if="!is_show">
- <image src="../../static/icon/sousuo.png" mode=""></image>
- <view class="">
- 输入关键字
- </view>
- </view>
- <view class="search-wrapper" v-if="is_show">
- <input type="text" value="" v-model="keyword" focus/>
- <view class="btn" @click="search">
- 搜索
- </view>
- </view>
- <view class="list-wrapper">
- <scroll-view scroll-y="true" :style="{'height': height}" class="swiper-box" @scrolltolower="loadData">
- <!-- 空白页 -->
- <empty v-if=" loaded && dataList.length == 0"></empty>
- <view v-for="(item,index) in dataList" class="item">
- <view class="item-top flex">
- <view class="user-name clamp">
- 用户ID:{{'hello wordhello wordhellhello wordhello wordhellhello wordhello '}}
- </view>
- <view class="top-status">
- 待发货
- </view>
- </view>
- <view class="item-body flex">
- <image src="" mode=""></image>
- <view class="goods-info">
- <view class="good-name clamp">
- 满园春无患子跨店联盟洗护满园春无患子跨店联盟洗护
- </view>
- <view class="good-id">
- 订单编号:{{'55648785545'}}
- </view>
- <view class="tag">
- 本店订单
- </view>
- <view class="good-price">
- ¥24000.9
- </view>
- <view class="good-num">
- x 1
- </view>
- </view>
- </view>
- <view class="item-btm">
- 共一件商品 合计:¥24.9
- </view>
- </view>
- <uni-load-more :status="loadingType"></uni-load-more>
- </scroll-view>
- </view>
- </view>
- </template>
- <script>
- import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
- import empty from '@/components/empty';
- export default {
- data() {
- let arr = []
- for(let i = 0; i< 10 ; i++) {
- arr.push(i)
- }
- return {
- is_show: false,//搜索是否显示
- keyword: '',//搜索关键字
- height: '',//滚动区域高度
- dataList: arr,//月订单
- loaded: true,
- loadingType: 'more',
- page: 1,
- limit: 10,
- }
- },
- components: {
- empty,
- uniLoadMore
- },
- onReady(res) {
- var _this = this;
- uni.getSystemInfo({
- success: resu => {
- const query = uni.createSelectorQuery();
- query.select('.list-wrapper').boundingClientRect();
- query.exec(function(res) {
- console.log(res, 'ddddddddddddd');
- _this.height = resu.windowHeight - res[0].top + 'px';
- console.log('打印页面的剩余高度', _this.height);
- });
- },
- fail: res => {}
- });
- },
- methods: {
- showInput() {
- this.is_show = true
- },
- search() {
- console.log('search')
- // if(this.keyword == '') {
- // this
- // }
- },
- loadData() {
- let obj = this
- console.log('加载数据')
- if(obj.loadingType == 'noMore' || obj.loadingType == 'loading' ) {
- return
- }
-
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- background-color:
- }
- .headr {
- height: 357rpx;
- background-color:
- position: relative;
- .month {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: auto;
- height: 275rpx;
- width: 275rpx;
- image {
- width: 100%;
- height: 100%;
- }
- .store-data {
- position: absolute;
- height: 275rpx;
- width: 275rpx;
- text-align: center;
- color:
- top: 0;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- .data {
- font-size: 50rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color:
- padding-bottom: 20rpx;
- }
- .tit {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color:
- }
- }
- }
- }
- .search-wrapper {
- width: 702rpx;
- height: 66rpx;
- background:
- box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
- border-radius: 33px;
- margin: 20rpx auto;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color:
- // line-height: 35px;
- image {
- height: 33rpx;
- width: 33rpx;
- margin-right: 22rpx;
- }
- input {
- width: auto;
- flex-grow: 1;
- padding-left: 30rpx;
- }
- .btn {
- width: 150rpx;
- text-align: center;
- //background-color: red;
- color:
- }
- }
- .list-wrapper {
- .swiper-box {
- // background-color:
- .item {
- width: 702rpx;
- height: 304rpx;
- padding: 0 28rpx;
- background:
- box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
- border-radius: 10rpx;
- margin: 0 auto 15rpx;
- &:last-of-type {
- margin: 0 auto;
- }
- .item-top {
- line-height: 83rpx;
- max-height: 83rpx;
- .user-name {
- flex-grow: 1;
- height: 83rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 400;
- color:
- padding-right: 30rpx;
- }
- .top-status {
- width: 100rpx;
- flex-shrink: 0;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color:
- }
- }
- .item-body {
- justify-content: flex-start;
- image {
- width: 160rpx;
- height: 160rpx;
- border-radius: 15rpx;
- background-color:
- flex-shrink: 0;
- margin-right: 9rpx;
- }
- .goods-info {
- width: 100%;
- height: 160rpx;
- position: relative;
- .good-name {
- width: 311rpx;
- line-height: 37rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color:
- }
- .good-id {
- // width: 273px;
- line-height: 40rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 400;
- color:
- }
- .tag {
- margin-top: 6rpx;
- width: 102rpx;
- line-height: 34rpx;
- background:
- border-radius: 5rpx;
- text-align: center;
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color:
- }
- .good-price, .good-num {
- position: absolute;
- top: 0;
- right: 0;
- line-height: 1.5;
- text-align: right;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color:
- }
- .good-num {
- color:
- top: 39rpx;
- }
- }
- }
- .item-btm {
- text-align: right;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color:
- }
- }
- }
- }
- </style>
|