|
@@ -1,16 +1,29 @@
|
|
|
<template>
|
|
|
<My_listbox ref="List" @getlist="getList" :isShowEmpty="false" :bottomHeight="70">
|
|
|
+ <slideshow ref="slideshow" />
|
|
|
+
|
|
|
<view class="box">
|
|
|
- <navigator class="nav-box" v-for="item in appList" :key="item.name" :url="item.path"
|
|
|
+ <view class="head" />
|
|
|
+ <navigator class="nav-box" v-for="item in appList " :key="item.name" :url="item.path"
|
|
|
hover-class="navigator-hover">
|
|
|
- <image v-if="item.cover" class="image" :src="item.cover" mode="aspectFill" lazy-load="false" />
|
|
|
- <text v-else>{{ item.remark }}</text>
|
|
|
+ <view class="classname u-line-1">
|
|
|
+ {{ item.classname || '' }}
|
|
|
+ </view>
|
|
|
+ <view class="remark u-line-3">
|
|
|
+ {{ item.remarks || '' }}
|
|
|
+ </view>
|
|
|
+ <view class="line" :style="{ background: item.color }" />
|
|
|
</navigator>
|
|
|
- <navigator class="nav-box" v-for="item in list"
|
|
|
+ <navigator class="nav-box" v-for="item in list"
|
|
|
:url="'/packageA/resourceLibrary/index?id=' + item.sat_sharematerial_classid + '&name=' + item.classname"
|
|
|
:key="item.sat_sharematerial_classid" hover-class="navigator-hover">
|
|
|
- <image v-if="item.cover" class="image" :src="item.cover" mode="aspectFill" lazy-load="false" />
|
|
|
- <text v-else>{{ item.classname }}</text>
|
|
|
+ <view class="classname u-line-1">
|
|
|
+ {{ item.classname || '' }}
|
|
|
+ </view>
|
|
|
+ <view class="remark u-line-3">
|
|
|
+ {{ item.remarks || '' }}
|
|
|
+ </view>
|
|
|
+ <view class="line" :style="{ background: item.color }" />
|
|
|
</navigator>
|
|
|
</view>
|
|
|
</My_listbox>
|
|
@@ -28,19 +41,31 @@ export default {
|
|
|
"where": {
|
|
|
"isenable": 1
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ colors: ['#F9E3FF', "#FFE6E8", "#DDF3FD"],
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
init(callBack) {
|
|
|
try {
|
|
|
- this.appList = this.getApps('资料库')
|
|
|
+ this.appList = this.dye(this.getApps('资料库').map(v => {
|
|
|
+ v.classname = v.remark;
|
|
|
+ switch (v.name) {
|
|
|
+ case "affiche":
|
|
|
+ v.remarks = '新品上市 / 停产 / 变更类 / 事件类'
|
|
|
+ break;
|
|
|
+ case "dailyYttendance":
|
|
|
+ v.remarks = '效果图 / 实景图 / 产品图\n励志海报等'
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return v
|
|
|
+ }), this.colors, 1)
|
|
|
} catch (error) {
|
|
|
console.log("未获取到授权")
|
|
|
}
|
|
|
- this.getList(true).then(res => {
|
|
|
- this.updatePage = false
|
|
|
+ Promise.all([this.getList(true), this.$refs.slideshow.getBanners(['databaseTop'])]).then(res => {
|
|
|
callBack()
|
|
|
+ this.updatePage = false;
|
|
|
})
|
|
|
},
|
|
|
getList(init = false) {
|
|
@@ -54,36 +79,71 @@ export default {
|
|
|
this.$refs.List.RefreshToComplete()
|
|
|
resolve()
|
|
|
if (this.cutoff(res.msg)) return;
|
|
|
- res.data = res.data.map(v => {
|
|
|
- console.log("avatar", v.attinfos.find(s => s.usetype == "avatar"))
|
|
|
- v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "avatar")) : (uni.getStorageSync("site").logo || '');
|
|
|
- return v
|
|
|
- });
|
|
|
- this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
|
|
|
+ this.list = this.dye(res.pageNumber == 1 ? res.data : this.list.concat(res.data), this.colors, 1);
|
|
|
this.content = this.$refs.List.paging(this.content, res)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
.box {
|
|
|
+ position: relative;
|
|
|
padding: 0 10px;
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
+ .head {
|
|
|
+ position: absolute;
|
|
|
+ height: 10px;
|
|
|
+ width: 100vw;
|
|
|
+ border-radius: 8px 8px 0 0;
|
|
|
+ background: #F7F7F7;
|
|
|
+ top: -10px;
|
|
|
+ left: 0;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+
|
|
|
.nav-box {
|
|
|
+ position: relative;
|
|
|
+ padding: 15px;
|
|
|
+ padding-right: 3px;
|
|
|
width: 172.5px;
|
|
|
height: 104px;
|
|
|
flex-shrink: 0;
|
|
|
- margin-top: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ .classname {
|
|
|
+ height: 24px;
|
|
|
+ font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .remark {
|
|
|
+ margin-top: 10px;
|
|
|
+ line-height: 17px;
|
|
|
+ font-family: Source Han Sans SC, Source Han Sans SC;
|
|
|
+ font-size: 10px;
|
|
|
+ color: #999999;
|
|
|
+ white-space: pre-wrap;
|
|
|
+ }
|
|
|
|
|
|
- .image {
|
|
|
- width: 100%;
|
|
|
+ .line {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 4px;
|
|
|
height: 100%;
|
|
|
}
|
|
|
}
|