Commit 5db16318 authored by youjie's avatar youjie

品牌列表

parent 6cd134dc
...@@ -740,7 +740,13 @@ ...@@ -740,7 +740,13 @@
{ {
"path": "baomingorder" //报名订单 "path": "baomingorder" //报名订单
}, { }, {
"path": "brand/list" //品牌列表 "path": "brand/list" ,//品牌列表
"style": {
"navigationStyle": "custom"
},
"globalStyle": {
"navigationStyle": "custom"
}
}, { }, {
"path": "brand/detail" //品牌详情 "path": "brand/detail" //品牌详情
// "enablePullDownRefresh": true, // "enablePullDownRefresh": true,
......
...@@ -53,6 +53,6 @@ export default { ...@@ -53,6 +53,6 @@ export default {
position: relative; position: relative;
} }
.carrHeader{ .carrHeader{
padding-top: 88rpx; padding-top: 48rpx;
} }
</style> </style>
\ No newline at end of file
<template>
<u-row gutter="24">
<u-col span="6" v-for="(x, i) in g" :key="i">
<view
class="good_study_two"
@click="openGood(x.ID)"
:style="{ borderRadius: '20rpx' }"
>
<view class="img-box">
<view class="img-show">
<image
style="
width: 100%;
height: 100%;
border-radius: 20rpx 20rpx 0 0;
"
mode="aspectFill"
:src="x.BannerList[0]"
/>
</view>
</view>
<view class="good-info">
<view class="good-name">{{ x.BrandName }}</view>
<view class="good-price-info">
<span class="price">{{ x.CategoryName }}</span>
</view>
</view>
</view>
</u-col>
</u-row>
</template>
<script>
export default {
props:['g'],
data() {
return {
replace: null
}
},
onLoad(options) {
},
mounted() {
let uid = uni.getStorageSync("mall_UserInfo")
this.replace = uni.getStorageSync('replace_page_index')
},
methods:{
openGood(id) {
return
if(this.replace.state=='1'){
uni.navigateTo({
url: "/pages/kotra/brand/detail?id=" + id,
});
}else{
}
},
}
}
</script>
\ No newline at end of file
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
overflow: 'hidden', overflow: 'hidden',
}" }"
> >
<view style="padding: 5px 10px"> <view class="brandHeadBgBox"
:style="{'background': TenantId!=18?`linear-gradient(-3deg, #eff8ff, #c6e6ff)`:''}">
<headers :title="replace.state=='1'?'品牌列表':'企业列表'"></headers>
<view v-if="TenantId==18" style="padding: 5px 10px">
<u-search <u-search
placeholder="搜索品牌名称" placeholder="搜索品牌名称"
:focus="false" :focus="false"
...@@ -19,6 +22,14 @@ ...@@ -19,6 +22,14 @@
bg-color="#FFF" bg-color="#FFF"
></u-search> ></u-search>
</view> </view>
<view v-else class="brandSearch" style="padding: 5px 10px;margin-top: 6rpx;">
<view class="brandSearch-right">
<input v-model="msg.BrandName"
:placeholder="`搜索${replace.state=='1'?'品牌':'企业'}名称`"
@input="ResetQuery"></input>
</view>
</view>
<template v-if="TenantId==18">
<view style="display: flex; align-items: center"> <view style="display: flex; align-items: center">
<view style="flex: 1; overflow: hidden"> <view style="flex: 1; overflow: hidden">
<u-tabs <u-tabs
...@@ -41,7 +52,7 @@ ...@@ -41,7 +52,7 @@
<u-icon name="filter-o" color="#111" size="42"></u-icon> <u-icon name="filter-o" color="#111" size="42"></u-icon>
</div> --> </div> -->
</view> </view>
<view class="carrierScreen" > <view class="brandScreen" >
<view <view
class="statusBox" class="statusBox"
v-if="msg.IsInChengdu == 0" v-if="msg.IsInChengdu == 0"
...@@ -75,9 +86,36 @@ ...@@ -75,9 +86,36 @@
> >
</view> </view>
</view> </view>
</template>
<view v-else style="display: flex; align-items: center;padding: 28rpx 0;">
<view style="flex: 1; overflow: hidden;padding-left: 32rpx;"
class="brandTabBox">
<u-tabs
bg-color="none"
:is-scroll="true"
name="ClassName"
:list="typeList"
:active-color="mainColor"
inactive-color="#000000"
:active-item-style="activeItemStyleBrand"
:current="active"
@change="changeHandler"
:show-bar="false"
:activeFontSize="23"
:bold="true"
height="45"
duration="0"
font-size="23"
gutter="29"
></u-tabs>
</view>
</view>
</view>
<u-empty v-if="g.length == 0" text="暂无内容" mode="list"></u-empty> <u-empty v-if="g.length == 0" text="暂无内容" mode="list"></u-empty>
<view <view
style="height: calc(100% - 127px); padding: 2px 10px" style="height: calc(100% - 192px); padding: 2px 10px"
v-if="g.length > 0" v-if="g.length > 0"
> >
<scroll-view <scroll-view
...@@ -85,9 +123,9 @@ ...@@ -85,9 +123,9 @@
:enable-back-to-top="true" :enable-back-to-top="true"
:enable-flex="true" :enable-flex="true"
@scrolltolower="lower" @scrolltolower="lower"
style="height: 100%; padding-bottom: 0px" style="height: 100%; padding-bottom: 0px;padding-top: 20rpx;"
> >
<u-row gutter="24"> <u-row v-if="TenantId==18" gutter="24">
<u-col span="6" v-for="(x, i) in g" :key="i"> <u-col span="6" v-for="(x, i) in g" :key="i">
<view <view
class="good_study_two" class="good_study_two"
...@@ -124,6 +162,9 @@ ...@@ -124,6 +162,9 @@
</u-col> </u-col>
</u-row> </u-row>
<template v-else>
<brandComponent v-if="g&&g.length>0" :g="g"></brandComponent>
</template>
<u-loadmore <u-loadmore
:status="status" :status="status"
:load-text="loadText" :load-text="loadText"
...@@ -143,10 +184,14 @@ ...@@ -143,10 +184,14 @@
<script> <script>
import auth from "@/components/auth/index.vue"; import auth from "@/components/auth/index.vue";
import tabbars from "@/components/tabbar/index"; import tabbars from "@/components/tabbar/index";
import headers from "@/pages/components/header";
import brandComponent from "./brandComponent";
export default { export default {
components: { components: {
tabbars, tabbars,
auth auth,
headers,
brandComponent
}, },
data() { data() {
return { return {
...@@ -172,6 +217,7 @@ export default { ...@@ -172,6 +217,7 @@ export default {
BrandClassId: 0, BrandClassId: 0,
PrizeId: 0, // PrizeId: 0, //
IsInChengdu:-1,//是否已在成都落地 IsInChengdu:-1,//是否已在成都落地
BrandEnterpriseType:null,
}, },
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
...@@ -183,6 +229,21 @@ export default { ...@@ -183,6 +229,21 @@ export default {
g: [], g: [],
contentHeight: 0, contentHeight: 0,
PrizeList: [], //首店年份列表 PrizeList: [], //首店年份列表
activeItemStyleBrand:{
"font-size": "23rpx",
"font-family": "PingFang SC",
"font-weight": "Bold",
color: "#017EDF",
"border": "1rpx solid #017EDF",
"border-radius": "10rpx",
"height": "50rpx",
"line-height": "45rpx",
"padding": "0 22rpx",
"background": "#FFF"
},
TenantId: 18,
replace: null,
secondary: null,
}; };
}, },
onShareTimeline() { onShareTimeline() {
...@@ -244,6 +305,11 @@ export default { ...@@ -244,6 +305,11 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
let uid = uni.getStorageSync("mall_UserInfo")
this.TenantId = uid.TenantId
this.replace = uni.getStorageSync('replace_page_index')
this.msg.BrandEnterpriseType = this.replace.state=='1'?1:2
if (options && options.id) { if (options && options.id) {
this.msg.BrandClassId = options.id; this.msg.BrandClassId = options.id;
} }
...@@ -284,10 +350,14 @@ export default { ...@@ -284,10 +350,14 @@ export default {
this.showAuth = false this.showAuth = false
}, },
GetBrandClassList() { GetBrandClassList() {
let BrandCategory = ''
if(this.TenantId!=18) BrandCategory = this.replace.state=='1' ? 3 : 4
this.request2( this.request2(
{ {
url: "/api/AppletTrade/GetBrandClassList", url: "/api/AppletTrade/GetBrandClassList",
data: {}, data: {
BrandCategory
},
}, },
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
...@@ -313,10 +383,20 @@ export default { ...@@ -313,10 +383,20 @@ export default {
); );
this.init(); this.init();
}, },
ResetQuery(){
this.g = []
this.msg.pageIndex=1
this.init()
},
init() { init() {
let url = "/api/AppletTrade/GetBrandPageList"
if(this.TenantId!=18&&this.replace.state){
if(this.replace.state=='1') url = "/api/AppletTrade/GetBrandEnterprisePageList"
else url = "/api/AppletTrade/GetEnterpriseServicesPageList"
}
this.request2( this.request2(
{ {
url: "/api/AppletTrade/GetBrandPageList", url: url,
data: this.msg, data: this.msg,
}, },
(res) => { (res) => {
...@@ -401,6 +481,24 @@ export default { ...@@ -401,6 +481,24 @@ export default {
</script> </script>
<style> <style>
.brandSearch-right>input::placeholder{
color: #95AAB9;
}
.brandSearch-right{
font-size: 27rpx;
font-weight: 100;
}
.brandSearch{
height: 76rpx;
display: flex;
flex-direction: row;
align-items: center;
z-index: 101;
margin: 0 32rpx;
background: #EEF7FF;
border-radius: 18rpx;
position: relative;
}
.good_study_two { .good_study_two {
position: relative; position: relative;
margin-bottom: 12px; margin-bottom: 12px;
...@@ -560,7 +658,7 @@ export default { ...@@ -560,7 +658,7 @@ export default {
top: 0; top: 0;
left: 0; left: 0;
} }
.carrierScreen { .brandScreen {
height: 50rpx; height: 50rpx;
margin: 20rpx 0; margin: 20rpx 0;
display: flex; display: flex;
......
<template> <template>
<view>
<view v-for="(item, index) in dataList" :key="index"> <view v-for="(item, index) in dataList" :key="index">
<div <div
class="good_study_one" class="good_study_one"
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
</div> </div>
</div> </div>
</view> </view>
</view>
</template> </template>
<script> <script>
export default { export default {
...@@ -73,11 +75,11 @@ ...@@ -73,11 +75,11 @@
} }
}, },
onLoad(options) { onLoad(options) {
let uid = uni.getStorageSync("mall_UserInfo")
this.replace = uni.getStorageSync('replace_page_index')
}, },
mounted() { mounted() {
let uid = uni.getStorageSync("mall_UserInfo")
this.replace = uni.getStorageSync('replace_page_index')
}, },
methods:{ methods:{
openGood(id, type) { openGood(id, type) {
...@@ -86,7 +88,9 @@ ...@@ -86,7 +88,9 @@
url: "/pages/kotra/carrier/detail_carrier?id=" + id + "&&type=" + type, url: "/pages/kotra/carrier/detail_carrier?id=" + id + "&&type=" + type,
}); });
}else{ }else{
uni.navigateTo({
url: "/pages/kotra/carrier/detail_building?id=" + id + "&&type=" + type,
});
} }
}, },
} }
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
mode="list" mode="list"
class="noBox" class="noBox"
></u-empty> ></u-empty>
<view style="height: calc(100% - 201px)" v-if="dataList&&dataList.length > 0"> <view style="height: calc(100% - 191px)" v-if="dataList&&dataList.length > 0">
<scroll-view <scroll-view
:scroll-y="true" :scroll-y="true"
:enable-back-to-top="true" :enable-back-to-top="true"
...@@ -209,7 +209,10 @@ ...@@ -209,7 +209,10 @@
</div> </div>
</view> </view>
</template> </template>
<carrierElement v-else :dataList="dataList"></carrierElement> <template v-else>
<carrierElement v-if="dataList&&dataList.length>0" :dataList="dataList"></carrierElement>
</template>
<u-loadmore <u-loadmore
:status="status" :status="status"
:load-text="loadText" :load-text="loadText"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment