Commit 5db16318 authored by youjie's avatar youjie

品牌列表

parent 6cd134dc
......@@ -740,7 +740,13 @@
{
"path": "baomingorder" //报名订单
}, {
"path": "brand/list" //品牌列表
"path": "brand/list" ,//品牌列表
"style": {
"navigationStyle": "custom"
},
"globalStyle": {
"navigationStyle": "custom"
}
}, {
"path": "brand/detail" //品牌详情
// "enablePullDownRefresh": true,
......
......@@ -53,6 +53,6 @@ export default {
position: relative;
}
.carrHeader{
padding-top: 88rpx;
padding-top: 48rpx;
}
</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 @@
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
placeholder="搜索品牌名称"
:focus="false"
......@@ -19,6 +22,14 @@
bg-color="#FFF"
></u-search>
</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="flex: 1; overflow: hidden">
<u-tabs
......@@ -41,7 +52,7 @@
<u-icon name="filter-o" color="#111" size="42"></u-icon>
</div> -->
</view>
<view class="carrierScreen" >
<view class="brandScreen" >
<view
class="statusBox"
v-if="msg.IsInChengdu == 0"
......@@ -75,9 +86,36 @@
>
</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>
<view
style="height: calc(100% - 127px); padding: 2px 10px"
style="height: calc(100% - 192px); padding: 2px 10px"
v-if="g.length > 0"
>
<scroll-view
......@@ -85,9 +123,9 @@
:enable-back-to-top="true"
:enable-flex="true"
@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">
<view
class="good_study_two"
......@@ -124,6 +162,9 @@
</u-col>
</u-row>
<template v-else>
<brandComponent v-if="g&&g.length>0" :g="g"></brandComponent>
</template>
<u-loadmore
:status="status"
:load-text="loadText"
......@@ -143,10 +184,14 @@
<script>
import auth from "@/components/auth/index.vue";
import tabbars from "@/components/tabbar/index";
import headers from "@/pages/components/header";
import brandComponent from "./brandComponent";
export default {
components: {
tabbars,
auth
auth,
headers,
brandComponent
},
data() {
return {
......@@ -172,6 +217,7 @@ export default {
BrandClassId: 0,
PrizeId: 0, //
IsInChengdu:-1,//是否已在成都落地
BrandEnterpriseType:null,
},
loadText: {
loadmore: "轻轻上拉,加载更多",
......@@ -183,6 +229,21 @@ export default {
g: [],
contentHeight: 0,
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() {
......@@ -244,6 +305,11 @@ export default {
};
},
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) {
this.msg.BrandClassId = options.id;
}
......@@ -284,10 +350,14 @@ export default {
this.showAuth = false
},
GetBrandClassList() {
let BrandCategory = ''
if(this.TenantId!=18) BrandCategory = this.replace.state=='1' ? 3 : 4
this.request2(
{
url: "/api/AppletTrade/GetBrandClassList",
data: {},
data: {
BrandCategory
},
},
(res) => {
if (res.resultCode == 1) {
......@@ -313,10 +383,20 @@ export default {
);
this.init();
},
ResetQuery(){
this.g = []
this.msg.pageIndex=1
this.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(
{
url: "/api/AppletTrade/GetBrandPageList",
url: url,
data: this.msg,
},
(res) => {
......@@ -401,6 +481,24 @@ export default {
</script>
<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 {
position: relative;
margin-bottom: 12px;
......@@ -560,7 +658,7 @@ export default {
top: 0;
left: 0;
}
.carrierScreen {
.brandScreen {
height: 50rpx;
margin: 20rpx 0;
display: flex;
......
<template>
<view>
<view v-for="(item, index) in dataList" :key="index">
<div
class="good_study_one"
......@@ -63,6 +64,7 @@
</div>
</div>
</view>
</view>
</template>
<script>
export default {
......@@ -73,11 +75,11 @@
}
},
onLoad(options) {
let uid = uni.getStorageSync("mall_UserInfo")
this.replace = uni.getStorageSync('replace_page_index')
},
mounted() {
let uid = uni.getStorageSync("mall_UserInfo")
this.replace = uni.getStorageSync('replace_page_index')
},
methods:{
openGood(id, type) {
......@@ -86,7 +88,9 @@
url: "/pages/kotra/carrier/detail_carrier?id=" + id + "&&type=" + type,
});
}else{
uni.navigateTo({
url: "/pages/kotra/carrier/detail_building?id=" + id + "&&type=" + type,
});
}
},
}
......
......@@ -127,7 +127,7 @@
mode="list"
class="noBox"
></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-y="true"
:enable-back-to-top="true"
......@@ -209,7 +209,10 @@
</div>
</view>
</template>
<carrierElement v-else :dataList="dataList"></carrierElement>
<template v-else>
<carrierElement v-if="dataList&&dataList.length>0" :dataList="dataList"></carrierElement>
</template>
<u-loadmore
:status="status"
: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