后端:增加 H5 需要的商品推荐接口

This commit is contained in:
YunaiV
2019-03-31 18:43:40 +08:00
parent b333340c20
commit 6699bd34a8
10 changed files with 207 additions and 23 deletions

View File

@@ -19,8 +19,8 @@ if (process.env.NODE_ENV == 'development') {
// baseUrl = 'http://127.0.0.1';
// baseUrl = 'http://180.167.213.26:18099';
dataSources = 'remote';
// dataSources = 'local';
// dataSources = 'remote';
dataSources = 'local';
export {
baseUrl,

View File

@@ -1,6 +1,10 @@
<template>
<div :style="'background-color:'+((page.BackgroundColor==undefined||page.BackgroundColor=='')?'#fff':page.BackgroundColor)">
<div :style="'height:'+topheight+'px'" ></div>
<!-- TODO 搜索框 -->
<!-- <search v-if="item.Code=='Search'" :data="item.ParameterDictionary" v-on:settopheight="settopheight($event)" ></search>-->
<van-swipe :autoplay="3000" indicator-color="white" height="160">
<van-swipe-item v-for="(banner, index) in banners" :key="index" >
<a :href="banner.url">
@@ -8,26 +12,17 @@
</a>
</van-swipe-item>
</van-swipe>
<div v-for="(item,index) in page.Sections" :key="index">
<van-panel title="新品推荐">
<div v-for="(item,index) in page.Sections" :key="index">
<product v-if="item.Code=='Product'" :data="item" ></product>
</div>
</van-panel>
<imageText v-if="item.Code=='ImageText'" :data="item.ParameterDictionary"></imageText>
<pageLine v-if="item.Code=='Line'" :data="item.ParameterDictionary" ></pageLine>
<whitespace v-if="item.Code=='Line'" :data="item.ParameterDictionary" />
<pageText v-if="item.Code=='Text'" :data="item.ParameterDictionary" ></pageText>
<notice v-if="item.Code=='Notice'" :data="item.ParameterDictionary" ></notice>
<search v-if="item.Code=='Search'" :data="item.ParameterDictionary" v-on:settopheight="settopheight($event)" ></search>
<pageTitle v-if="item.Code=='Title'" :data="item.ParameterDictionary" ></pageTitle>
<cube v-if="item.Code=='Cube'" :data="item.ParameterDictionary" ></cube>
<product v-if="item.Code=='Product'" :data="item" ></product>
</div>
<van-panel title="热卖推荐">
<div v-for="(item,index) in page.Sections" :key="index">
<product v-if="item.Code=='Product'" :data="item" ></product>
</div>
</van-panel>
</div>
</template>