|
@@ -1,19 +1,25 @@
|
|
|
<template>
|
|
|
<view class="safeArea">
|
|
|
- <nav-bar title="收藏集"></nav-bar>
|
|
|
+ <nav-bar title="收藏集" class="nav"></nav-bar>
|
|
|
<view class="sceenBox">
|
|
|
<view :class="['item', {'active':sceenType===1} ]" @click="showSceen(1)">全部题库记录<u-icon class="icon" :class="sceenType ===1 ? 'animals':''" name="arrow-down"></u-icon></view>
|
|
|
<view :class="['item', {'active':sceenType===2} ]" @click="showSceen(2)">全部试卷类型<u-icon class="icon" :class="sceenType ===2 ? 'animals':''" name="arrow-down"></u-icon></view>
|
|
|
</view>
|
|
|
- <view class="sceenModel" v-if="sceenType">
|
|
|
+ <view class="sceenModel" v-if="sceenType" :style="{top:modalTop+'px'}" >
|
|
|
<view class="sceenModelBg" @click="hideSceen"></view>
|
|
|
- <view class="sceenMain">
|
|
|
- <template v-if="sceenType===1">
|
|
|
- <view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList1" :key="index" @click="choseRecord(index)">{{item.goodsName}}</view>
|
|
|
- </template>
|
|
|
- <template v-if="sceenType===2">
|
|
|
- <view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList2" :key="index" @click="choseType(index)">{{item.paperName}}</view>
|
|
|
- </template>
|
|
|
+ <view class="sceenMain" >
|
|
|
+ <scroll-view scroll-y="true" style="height:100%">
|
|
|
+ <div class="sceenMainContent">
|
|
|
+ <template v-if="sceenType===1">
|
|
|
+ <view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList1" :key="index" @click="choseRecord(index)">{{item.goodsName}}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="sceenType===2">
|
|
|
+ <view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList2" :key="index" @click="choseType(index)">{{item.paperName}}</view>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </scroll-view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="wrap">
|
|
@@ -86,6 +92,7 @@ export default {
|
|
|
],
|
|
|
type:1,
|
|
|
total:0,
|
|
|
+ modalTop:0,
|
|
|
testList:[],
|
|
|
typeList:[],
|
|
|
goodsid:'',
|
|
@@ -98,6 +105,21 @@ export default {
|
|
|
this.listGoodsUserQuestion();
|
|
|
this.examaperList();
|
|
|
this.getData();
|
|
|
+
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success:(e) => {
|
|
|
+ let info = uni.createSelectorQuery().select(".nav");
|
|
|
+ info.boundingClientRect((navData) => { //data - 各种参数
|
|
|
+
|
|
|
+ let info = uni.createSelectorQuery().select(".sceenBox");
|
|
|
+ info.boundingClientRect((tabData) => { //data - 各种参数
|
|
|
+ this.modalTop = navData.height + tabData.height
|
|
|
+ console.log(navData) // 获取元素宽度
|
|
|
+ console.log(tabData) // 获取元素宽度
|
|
|
+ }).exec()
|
|
|
+ }).exec()
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
getData() {
|
|
@@ -151,6 +173,10 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
showSceen(type){
|
|
|
+ if(this.sceenType == type) {
|
|
|
+ this.sceenType = null
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.sceenType = type
|
|
|
},
|
|
|
/**
|
|
@@ -227,8 +253,9 @@ page {
|
|
|
}
|
|
|
}
|
|
|
.sceenModel{
|
|
|
+ left:0;
|
|
|
+ bottom:0;
|
|
|
width:100%;
|
|
|
- height:100%;
|
|
|
position: fixed;
|
|
|
z-index: 998;
|
|
|
.sceenModelBg{
|
|
@@ -242,30 +269,35 @@ page {
|
|
|
position: relative;
|
|
|
z-index: 999;
|
|
|
background: #fff;
|
|
|
- margin-top: 80rpx;
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- padding: 8rpx;
|
|
|
- justify-content: space-between;
|
|
|
- .item{
|
|
|
- width: 350rpx;
|
|
|
- background: #F5F5F5;
|
|
|
- border-radius: 16rpx;
|
|
|
- padding: 25rpx 19rpx;
|
|
|
- margin: 8rpx;
|
|
|
- font-size: 32rpx;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: bold;
|
|
|
- color: #666666;
|
|
|
- &.active{
|
|
|
- background: #007AFF;
|
|
|
- color:#fff;
|
|
|
- }
|
|
|
- &:first-child{
|
|
|
- width:100%;
|
|
|
- text-align: center;
|
|
|
+ height:80%;
|
|
|
+ .sceenMainContent {
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 8rpx;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .item{
|
|
|
+ width: 350rpx;
|
|
|
+ background: #F5F5F5;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ padding: 25rpx 19rpx;
|
|
|
+ margin: 8rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #666666;
|
|
|
+ &.active{
|
|
|
+ background: #007AFF;
|
|
|
+ color:#fff;
|
|
|
+ }
|
|
|
+ &:first-child{
|
|
|
+ width:100%;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
.wrap{
|