Commit 248e29f36b948ca69f1824f8640b08ba88e5ccd3

Authored by zhiyangdu
1 parent e40ba17e

模拟本地数据

src/pages/pointsMall/pointsMall.less
@@ -110,8 +110,8 @@ @@ -110,8 +110,8 @@
110 .tab_item_box{ 110 .tab_item_box{
111 display: flex; 111 display: flex;
112 align-items: center; 112 align-items: center;
113 - justify-content: space-between;  
114 - margin:50px 340px 33px 30px; 113 + // justify-content: space-between;
  114 + margin:50px 30px 33px 30px;
115 .item{ 115 .item{
116 height: 33px; 116 height: 33px;
117 font-size: 24px; 117 font-size: 24px;
@@ -132,4 +132,22 @@ @@ -132,4 +132,22 @@
132 background: #999999; 132 background: #999999;
133 margin: 0 16px; 133 margin: 0 16px;
134 } 134 }
135 - }  
136 \ No newline at end of file 135 \ No newline at end of file
  136 + }
  137 + // 为你推荐
  138 + .list-box {
  139 + display: flex;
  140 + justify-content: space-between;
  141 + align-items: center;
  142 + .discount-flag {
  143 + position: absolute;
  144 + top: 4px;
  145 + left: 22px;
  146 + z-index: 1;
  147 + background: linear-gradient(90deg, #F9EE7A 0%, #FAD844 100%);
  148 + padding: 1px 8px;
  149 + color: #945A08;
  150 + font-size: 20px;
  151 + font-weight: 400;
  152 + border-radius: 6px;
  153 + }
  154 +}
137 \ No newline at end of file 155 \ No newline at end of file
src/pages/pointsMall/pointsMall.vue
@@ -41,23 +41,34 @@ @@ -41,23 +41,34 @@
41 <!-- 分割线 --> 41 <!-- 分割线 -->
42 <div class="line"> </div> 42 <div class="line"> </div>
43 <div class="item">热门商品</div> 43 <div class="item">热门商品</div>
44 - <div class="item">精品推荐</div> 44 + </div>
  45 + <!-- 为你推荐商品列表 -->
  46 + <div class="list-box">
  47 + <!-- 商品展示样式 2 -->
  48 + <goods-item-2 class="item" v-for="(item, index) in goodsLists" :key="index" @jump="toDiscountList(item)"
  49 + :item="item"
  50 + pid="4">
  51 + </goods-item-2>
45 </div> 52 </div>
46 <!-- 实物商品 --> 53 <!-- 实物商品 -->
47 <div class="tab_item_box"> 54 <div class="tab_item_box">
48 <div class="item active">实物商品</div> 55 <div class="item active">实物商品</div>
49 <!-- 分割线 --> 56 <!-- 分割线 -->
50 <div class="line"> </div> 57 <div class="line"> </div>
51 - <div class="item">实物商品</div>  
52 - <div class="item">精品推荐</div> 58 + <div class="item">实物商品实物商品实物商品实物商品</div>
53 </div> 59 </div>
  60 + <!-- 实物商品裂变 -->
  61 + <!-- 商品样式 7 列表 -->
  62 + <column-list-box class="column-list-box" v-if="phyicalGoods && phyicalGoods.list && phyicalGoods.list.length" @jump="toDetail" @primary="primary"
  63 + :lists="phyicalGoods"
  64 + com="7">
  65 + </column-list-box>
54 <!-- 虚拟商品 --> 66 <!-- 虚拟商品 -->
55 <div class="tab_item_box"> 67 <div class="tab_item_box">
56 <div class="item active">虚拟商品</div> 68 <div class="item active">虚拟商品</div>
57 <!-- 分割线 --> 69 <!-- 分割线 -->
58 <div class="line"> </div> 70 <div class="line"> </div>
59 <div class="item">热门商品</div> 71 <div class="item">热门商品</div>
60 - <div class="item">精品推荐</div>  
61 </div> 72 </div>
62 <!-- 满减红包 --> 73 <!-- 满减红包 -->
63 <div class="tab_item_box"> 74 <div class="tab_item_box">
@@ -65,21 +76,27 @@ @@ -65,21 +76,27 @@
65 <!-- 分割线 --> 76 <!-- 分割线 -->
66 <div class="line"> </div> 77 <div class="line"> </div>
67 <div class="item">热门商品</div> 78 <div class="item">热门商品</div>
68 - <div class="item">精品推荐</div>  
69 </div> 79 </div>
70 </div> 80 </div>
71 </div> 81 </div>
72 </template> 82 </template>
73 83
74 <script> 84 <script>
  85 +import goodsItem2 from "@/components/goodsItem_2/goodsItem_2";
  86 +import columnListBox from "@/components/columnListBox/columnListBox";
75 export default { 87 export default {
76 data () { 88 data () {
77 return { 89 return {
78 - 90 + goodsLists: null, // 为你推荐商品
  91 + phyicalGoods: null, // 实物商品
  92 + virtualGoods: null, // 虚拟商品
  93 + redEnvelopeFull: null // 满减红包
79 } 94 }
80 }, 95 },
81 //部件 96 //部件
82 components: { 97 components: {
  98 + goodsItem2,
  99 + columnListBox
83 }, 100 },
84 //静态 101 //静态
85 props: [ 102 props: [
@@ -95,6 +112,101 @@ export default { @@ -95,6 +112,101 @@ export default {
95 }, 112 },
96 //请求数据 113 //请求数据
97 created () { 114 created () {
  115 + // 临时,为你推荐商品数据
  116 + this.$set(this, 'goodsLists', [
  117 + {
  118 + ads: "广告语",
  119 + id: "9519164",
  120 + price: "5.01",
  121 + prices: "6.00",
  122 + shop_type: "1",
  123 + simg: "http://wjjseller.cnlive.com/uploads/05ac5ee31c3bb363d95072559d205bd8.png",
  124 + title: "L'OCCITANE/欧舒丹 芍药花香润手霜 30ML 30ml"
  125 + },
  126 + {
  127 + ads: "广告语",
  128 + id: "9519164",
  129 + price: "5.01",
  130 + prices: "6.00",
  131 + shop_type: "1",
  132 + simg: "http://wjjseller.cnlive.com/uploads/05ac5ee31c3bb363d95072559d205bd8.png",
  133 + title: "L'OCCITANE/欧舒丹 芍药花香润手霜 30ML 30ml"
  134 + },
  135 + {
  136 + ads: "广告语",
  137 + id: "9519164",
  138 + price: "5.01",
  139 + prices: "6.00",
  140 + shop_type: "1",
  141 + simg: "http://wjjseller.cnlive.com/uploads/05ac5ee31c3bb363d95072559d205bd8.png",
  142 + title: "L'OCCITANE/欧舒丹 芍药花香润手霜 30ML 30ml"
  143 + }
  144 + ]);
  145 + // 临时,实物商品列表
  146 + this.$set(this, 'phyicalGoods', {
  147 + list: [
  148 + {
  149 + activity: "0",
  150 + activity_desc: "",
  151 + addtime: "1604544867",
  152 + ads: "23123",
  153 + code: "160454486791776561000",
  154 + id: "9525539",
  155 + price: "0.01",
  156 + prices: "0.00",
  157 + shop_type: "1",
  158 + simg: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/11/05/5fa3695e39ae6.png",
  159 + stock: "0",
  160 + stoptime: "0",
  161 + title: "aabbsdf350ml"
  162 + },
  163 + {
  164 + activity: "0",
  165 + activity_desc: "",
  166 + addtime: "1604544867",
  167 + ads: "23123",
  168 + code: "160454486791776561000",
  169 + id: "9525539",
  170 + price: "0.01",
  171 + prices: "0.00",
  172 + shop_type: "1",
  173 + simg: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/11/05/5fa3695e39ae6.png",
  174 + stock: "0",
  175 + stoptime: "0",
  176 + title: "aabbsdf350ml"
  177 + },
  178 + {
  179 + activity: "0",
  180 + activity_desc: "",
  181 + addtime: "1604544867",
  182 + ads: "23123",
  183 + code: "160454486791776561000",
  184 + id: "9525539",
  185 + price: "0.01",
  186 + prices: "0.00",
  187 + shop_type: "1",
  188 + simg: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/11/05/5fa3695e39ae6.png",
  189 + stock: "0",
  190 + stoptime: "0",
  191 + title: "aabbsdf350ml"
  192 + },
  193 + {
  194 + activity: "0",
  195 + activity_desc: "",
  196 + addtime: "1604544867",
  197 + ads: "23123",
  198 + code: "160454486791776561000",
  199 + id: "9525539",
  200 + price: "0.01",
  201 + prices: "0.00",
  202 + shop_type: "1",
  203 + simg: "https://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/11/05/5fa3695e39ae6.png",
  204 + stock: "0",
  205 + stoptime: "0",
  206 + title: "aabbsdf350ml"
  207 + }
  208 + ]
  209 + });
98 }, 210 },
99 mounted () { 211 mounted () {
100 } 212 }