Commit 2123babb1e98e640fcf33cbc6ef50d2815a1922b
1 parent
ec9cf534
数据绑定
Showing
3 changed files
with
32 additions
and
16 deletions
src/components/dresserList/dresserList.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <!--标题--> | ||
| 4 | - <textTitleBox :titles="null"></textTitleBox> | ||
| 5 | <div class="item_box"> | 3 | <div class="item_box"> |
| 6 | <img class="head_portrait" v-lazy="dresserList.user_img" src="static/img/1.png" alt="网家家"/> | 4 | <img class="head_portrait" v-lazy="dresserList.user_img" src="static/img/1.png" alt="网家家"/> |
| 7 | <div class="user_info"> | 5 | <div class="user_info"> |
| @@ -19,7 +17,6 @@ | @@ -19,7 +17,6 @@ | ||
| 19 | 17 | ||
| 20 | 18 | ||
| 21 | <script> | 19 | <script> |
| 22 | - import textTitleBox from "@/components/textTitleBox/textTitleBox"; | ||
| 23 | export default { | 20 | export default { |
| 24 | name: 'dresserList', | 21 | name: 'dresserList', |
| 25 | data () { | 22 | data () { |
| @@ -28,9 +25,6 @@ | @@ -28,9 +25,6 @@ | ||
| 28 | } | 25 | } |
| 29 | }, | 26 | }, |
| 30 | props: ["dresserList"], | 27 | props: ["dresserList"], |
| 31 | - components:{ | ||
| 32 | - textTitleBox | ||
| 33 | - }, | ||
| 34 | created(){ | 28 | created(){ |
| 35 | 29 | ||
| 36 | }, | 30 | }, |
src/pages/optimization/optimization.less
| 1 | @charset "UTF-8"; | 1 | @charset "UTF-8"; |
| 2 | 2 | ||
| 3 | .optimization-box { | 3 | .optimization-box { |
| 4 | + margin-top: 30px; | ||
| 4 | .goods-list-box { | 5 | .goods-list-box { |
| 5 | background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(249, 249, 249, 1) 10%, rgba(249, 249, 249, 1) 100%); | 6 | background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(249, 249, 249, 1) 10%, rgba(249, 249, 249, 1) 100%); |
| 6 | padding-top: 50px; | 7 | padding-top: 50px; |
src/pages/optimization/optimization.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="optimization-box"> | 2 | <div class="optimization-box"> |
| 3 | - | 3 | + <!-- 标题 --> |
| 4 | + <text-title-box slot="title-box" @more="h5More()" | ||
| 5 | + :titles="{ | ||
| 6 | + title: '已关注人达人', | ||
| 7 | + more: newGoodsMore | ||
| 8 | + }"> | ||
| 9 | + </text-title-box> | ||
| 4 | <!-- 已关注达人列表(4条) --> | 10 | <!-- 已关注达人列表(4条) --> |
| 5 | - | ||
| 6 | - | ||
| 7 | - | ||
| 8 | - | ||
| 9 | - | 11 | + <div v-for="(item,index) in dresserList" v-if="index<4" :key="index"> |
| 12 | + <dresserList :dresserList="item"></dresserList> | ||
| 13 | + </div> | ||
| 10 | <!-- 商品部分 --> | 14 | <!-- 商品部分 --> |
| 11 | <div class="goods-list-box"> | 15 | <div class="goods-list-box"> |
| 12 | 16 | ||
| @@ -83,11 +87,12 @@ | @@ -83,11 +87,12 @@ | ||
| 83 | import horizList from "@/components/horizList/horizList"; | 87 | import horizList from "@/components/horizList/horizList"; |
| 84 | import horizListFlex from "@/components/horizListFlex/horizListFlex"; | 88 | import horizListFlex from "@/components/horizListFlex/horizListFlex"; |
| 85 | import textTitleBox from "@/components/textTitleBox/textTitleBox"; | 89 | import textTitleBox from "@/components/textTitleBox/textTitleBox"; |
| 86 | - | 90 | + import dresserList from "@/components/dresserList/dresserList"; |
| 87 | export default { | 91 | export default { |
| 88 | data () { | 92 | data () { |
| 89 | return { | 93 | return { |
| 90 | title: "", | 94 | title: "", |
| 95 | + dresserList: null, // 达人列表 | ||
| 91 | hotGoods: null, // 热销商品 | 96 | hotGoods: null, // 热销商品 |
| 92 | hotGoodsMore: null, // 热销商品更多 | 97 | hotGoodsMore: null, // 热销商品更多 |
| 93 | newGoods: null, // 最新上架 | 98 | newGoods: null, // 最新上架 |
| @@ -100,8 +105,7 @@ | @@ -100,8 +105,7 @@ | ||
| 100 | horizList, | 105 | horizList, |
| 101 | horizListFlex, | 106 | horizListFlex, |
| 102 | textTitleBox, | 107 | textTitleBox, |
| 103 | - | ||
| 104 | - | 108 | + dresserList |
| 105 | }, | 109 | }, |
| 106 | created() { | 110 | created() { |
| 107 | 111 | ||
| @@ -112,7 +116,17 @@ | @@ -112,7 +116,17 @@ | ||
| 112 | this.fansShopMessageList(); | 116 | this.fansShopMessageList(); |
| 113 | }, | 117 | }, |
| 114 | methods: { | 118 | methods: { |
| 115 | - | 119 | + /** |
| 120 | + * 跳转到关注人列表数据 | ||
| 121 | + */ | ||
| 122 | + h5More(){ | ||
| 123 | + this.$router.push({ | ||
| 124 | + path:"/fansShopMessageList", | ||
| 125 | + query:{ | ||
| 126 | + uid:this.$route.query.uid | ||
| 127 | + } | ||
| 128 | + }) | ||
| 129 | + }, | ||
| 116 | /** | 130 | /** |
| 117 | * 优选页面接口 | 131 | * 优选页面接口 |
| 118 | */ | 132 | */ |
| @@ -152,6 +166,13 @@ | @@ -152,6 +166,13 @@ | ||
| 152 | 166 | ||
| 153 | /* 获取优选库“优选”数据 开始 */ | 167 | /* 获取优选库“优选”数据 开始 */ |
| 154 | 168 | ||
| 169 | + // 获取“达人列表数据” | ||
| 170 | + if (datas.list && datas.list.length) { | ||
| 171 | + | ||
| 172 | + // 设置“最近购买”数据 | ||
| 173 | + this.$set(this, "dresserList", datas.list); | ||
| 174 | + } | ||
| 175 | + | ||
| 155 | // 获取“热销商品” | 176 | // 获取“热销商品” |
| 156 | if (datas.hotGoods && datas.hotGoods.length) { | 177 | if (datas.hotGoods && datas.hotGoods.length) { |
| 157 | 178 |