培训文档,文档资料代码优化

This commit is contained in:
2023-08-30 13:38:24 +08:00
parent adcb7151e9
commit 41684dd18e
5 changed files with 111 additions and 175 deletions

View File

@ -44,8 +44,8 @@
</div>
</van-pull-refresh>
</div>
<div class="empty" style="display: flex;justify-content: center;align-items: center;height:calc(100% - 46px);background-color: #FAFAFA" v-show="showEmpty">
<img src="@/assets/empty.png" style="width: 100%"/>
<div class="empty" v-show="showEmpty">
<img src="@/assets/empty.png" />
</div>
</div>
</template>
@ -67,32 +67,12 @@ export default {
show:false,
showEmpty:false,
isLoading:false,
userId:'',
supplierId:''
}
},
mounted() {
const urlParams = new URLSearchParams(window.location.search);
this.supplierId = urlParams.get('supplierId');
this.userId = urlParams.get('userId');
this.getList();
},
methods:{
goH5Detail(item){
let data = {
"action": "goTraining",
"params": {
"id": item.id,
}
};
let u = navigator.userAgent;
let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if(isiOS){
window.webkit.messageHandlers.nativeObject.postMessage(data);
}else {
window.android.sendMessage("articleId=" + item.id);
}
},
onRefresh() {
this.getList()
setTimeout(() => {
@ -113,81 +93,16 @@ export default {
}else {
this.showEmpty = false
}
console.log(res)
},
initShow(){
this.keyword= '',
this.getList()
this.getList()
}
}
}
</script>
<style scoped lang="scss">
@import "@/styles/common.scss";
@import "@/styles/mixin.scss";
.wrap{
width: 100%;
height: 100%;
background-color: #F4F5F7;
overflow-y: auto;
}
.navBar{
margin-bottom: 46px;
}
.rightWrap {
@include flexCenter;
.img2 {
@include wh(17px, 17px)
}
}
.contentWrap{
padding: 0 8px;
width: 100%;
box-sizing: border-box;
margin-top: 20px;
.itemWrap{
margin-bottom: 16px;
@include wh(100%, 300px);
background: #FFFFFF;
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
border-radius: 3px;
box-sizing: border-box;
@include flexColumn;
justify-content: space-around;
padding: 6px 0;
@include fontWeightSize(400, 12px);
.flexBetween{
@include flexColBet;
}
.common{
margin: 0 15px ;
}
.imgWrap{
width: 100%;
height: 200px;
position: relative;
//background-color: #6C81CD;
img{
width: 100%;
height: 200px;
}
.name{
position: absolute;
left: 30px;
bottom: 30px;
font-size: 14px;
font-weight: 500;
color: #FFFFFF;
}
}
.left{
color: red;
font-size: 15px;
font-weight: 500;
}
}
}
@import "@/styles/docment.scss";
</style>