| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <template>
- <view class="content">
- <scroll-view scroll-x="true" class="class-box flex b-t" :scroll-with-animation="true">
- <view class="navbar">
- <view v-for="(item, index) in navList" :key="index" class="nav-item"
- :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
- </view>
- </scroll-view>
- <view class="top-search flex">
- <view class="search-box flex">
- <image class="search-icon" src="../../static/icon/sousuo.png" mode=""></image>
- <view class="search-font"><input type="text" placeholder="请输入货号搜索" v-model="productname" /></view>
- </view>
- </view>
- <swiper :style="{ height: maxheight }" :current="tabCurrentIndex" class="swiper-box" duration="300"
- @change="changeTab">
- <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
- <scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
- <!-- 空白页 -->
- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
- <!-- 订单列表 -->
- <view v-for="(item,index) in 10">
- <view class="main">
- <view class="main-id">产品货号:9876543211025666</view>
- <view class="main-name">产品名称</view>
- <view class="main-info flex">
- <scroll-view scroll-x="true" class="main-price">
- <view class="image-box">
- <view class="image-item" v-for="(itm,ind) in 10">
- <image src="../../static/img/user-item2.png" mode=""></image>
- </view>
- </view>
- </scroll-view>
- <view class="main-more" @click="navTo('/pages/user/myorderDetail')">
- <view class="mainm-font">
- 查看详细
- </view>
- <image class="mainm-jt" src="../../static/img/jt.png" mode=""></image>
- </view>
- </view>
- <view class="main-num flex">
- <view class="mainnum-item">
- 收益: <text class="red">285</text>
- </view>
- <view class="mainnum-item">
- 提交日期:2022年2月10日
- </view>
- </view>
- <view class="main-num flex start">
- <view class="mainnum-item">
- 规格:
- </view>
- <view class="mainnum-item">
- 【黄色,37码,数量30】【黄色,37码,数量30】<br />
- 【黄色,37码,数量30】【黄色,37码,数量30】<br />
- 【黄色,37码,数量30】【黄色,37码,数量30】
- </view>
- </view>
- </view>
- </view>
- <uni-load-more :status="tabItem.loadingType"></uni-load-more>
- </scroll-view>
- </swiper-item>
- </swiper>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- productname: '',
- maxheight: '',
- tabCurrentIndex: 0,
- navList: [{
- state: 0,
- text: '合格记录',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- },
- {
- state: 1,
- text: '不合格记录',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- },
- ],
- };
- },
- onLoad() {},
- onShow() {},
- onReachBottom() {},
- onReady(res) {
- var _this = this;
- uni.getSystemInfo({
- success: resu => {
- const query = uni.createSelectorQuery();
- query.select('.swiper-box').boundingClientRect();
- query.exec(function(res) {
- _this.maxheight = resu.windowHeight - res[0].top + 'px';
- console.log('打印页面的剩余高度', _this.maxheight);
- });
- },
- fail: res => {}
- });
- },
- methods: {
- tabClick(index) {
- this.tabCurrentIndex = index;
- },
- changeTab(e) {
- this.tabCurrentIndex = e.target.current;
- // this.loadData('tabChange');
- },
- navTo(url) {
- uni.navigateTo({
- url
- })
- }
- }
- };
- </script>
- <style lang="scss">
- page,
- .content {
- min-height: 100%;
- height: auto;
- }
- .navbar {
- display: flex;
- height: 40px;
- padding: 0 5px;
- background: #fff;
- box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
- position: relative;
- z-index: 10;
- .nav-item {
- background: #fff;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 50%;
- flex-shrink: 0;
- height: 100%;
- font-size: 15px;
- color: #9c9c9c;
- position: relative;
- &.current {
- color: #333333;
- &:after {
- content: '';
- position: absolute;
- left: 50%;
- bottom: 0;
- transform: translateX(-50%);
- width: 44px;
- height: 0;
- border-bottom: 2px solid #ff4c4c;
- }
- }
- }
- }
- .top-search {
- width: 750rpx;
- height: 100rpx;
- background: #FFFFFF;
- padding: 20rpx 32rpx 16rpx;
- .search-box {
- justify-content: center;
- width: 100%;
- height: 64rpx;
- background: #F6F6F6;
- border-radius: 34rpx;
- .search-icon {
- width: 32rpx;
- height: 32rpx;
- }
- .search-font {
- margin-left: 20rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- }
- }
- .search {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- }
- }
- .list-scroll-content {
- height: 100%;
- }
- .main {
- width: 700rpx;
- background: #FFFFFF;
- border-radius: 24rpx;
- margin: 20rpx auto 0;
- padding: 0 15rpx;
- line-height: 1;
- .main-id {
- padding: 35rpx 14rpx 30rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- border-bottom: 1px solid #ededed;
- }
- .main-name {
- padding: 20rpx 14rpx 16rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #363636;
- }
- .main-info {
- padding: 0 14rpx;
- .main-price {
- width: 480rpx;
- .image-box {
- display: flex;
- align-items: center;
- .image-item {
- margin-left: 10rpx;
- width: 110rpx;
- height: 110rpx;
- flex-shrink: 0;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- .main-more {
- display: flex;
- align-items: center;
- .mainm-font {
- margin-right: 10rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
- .mainm-jt {
- width: 12rpx;
- height: 22rpx;
- }
- }
- }
- .main-num {
- padding: 24rpx 14rpx 20rpx;
- border-bottom: 1px solid #ededed;
- .mainnum-item {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 1.5;
- .red {
- color: #FF4C4C
- }
- }
- }
- .start {
- align-items: flex-start;
- }
- .btn-box {
- display: flex;
- justify-content: space-around;
- align-items: center;
- padding: 20rpx 0;
- .box1 {
- width: 144rpx;
- height: 55rpx;
- border: 2px solid #EBEBEB;
- border-radius: 28rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
- .box2 {
- width: 144rpx;
- height: 55rpx;
- border: 2px solid #FF2D2D;
- border-radius: 28rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FF2D2D;
- }
- }
- }
- </style>
|