|
@@ -5,29 +5,28 @@
|
|
|
<u-search placeholder="请输入商品名称" inputAlign="center" bgColor="#fff" shape="square" v-model="search.cname"
|
|
|
@search="searchButton" @custom="searchButton" :animation="true"></u-search>
|
|
|
</view>
|
|
|
- <view style="margin: -15rpx auto 10rpx auto;display: flex;padding: 0 20rpx;z-index: 999;" >
|
|
|
- <u-tag :text="search.brandNmae" borderColor="#FD4B09" color="#FD4B09" plain size="medium" closable v-if="show == true"
|
|
|
- :show="show" @close="close" @click="close"></u-tag>
|
|
|
-
|
|
|
- <u-tag text="原厂" borderColor="#FD4B09" color="#FD4B09" plain size="medium" closable v-if="originalFactory"
|
|
|
+ <view v-if="false" style="margin: -15rpx auto 10rpx auto;display: flex;padding: 0 20rpx;z-index: 999;" >
|
|
|
+ <u-tag :text="search.brandNmae" borderColor="#FD4B09" color="#FD4B09" plain size="medium" closable
|
|
|
+ :show="false" @close="close" @click="close"></u-tag>
|
|
|
+ <!-- <u-tag text="原厂" borderColor="#FD4B09" color="#FD4B09" plain size="medium" closable v-if="originalFactory"
|
|
|
:show="originalFactory" @close="yuanchangclose('originalFactory')" @click="yuanchangclose('originalFactory')"></u-tag>
|
|
|
<u-tag text="自修补" borderColor="#FD4B09" color="#FD4B09" plain size="medium" closable v-if="selfRecovery"
|
|
|
:show="selfRecovery" @close="yuanchangclose('selfRecovery')" @click="yuanchangclose('selfRecovery')"></u-tag>
|
|
|
<u-tag text="防爆" borderColor="#FD4B09" color="#FD4B09" plain size="medium" closable v-if="explosionProof"
|
|
|
- :show="explosionProof" @close="yuanchangclose('explosionProof')" @click="yuanchangclose('explosionProof')"></u-tag>
|
|
|
+ :show="explosionProof" @close="yuanchangclose('explosionProof')" @click="yuanchangclose('explosionProof')"></u-tag> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view :style="{marginTop:show == true?'164rpx':'108rpx'}">
|
|
|
+ <view :style="{marginTop:show == true?'108rpx':'108rpx'}">
|
|
|
<u-swiper :list="list3" indicator indicatorMode="dot" circular></u-swiper>
|
|
|
</view>
|
|
|
<view style="background-color: #fff;margin-bottom: 20rpx;">
|
|
|
<view style="padding: 20rpx 0 0 0;">
|
|
|
- <u-grid :border="false" @click="click" col="5">
|
|
|
+ <u-grid :border="false" @click="click" col="4">
|
|
|
<u-grid-item v-for="(item,index) in brandList" :key="index">
|
|
|
<view v-if="item.brandFilesList.length>0" style="text-align: center;">
|
|
|
<view v-for="(li,i) in item.brandFilesList" :key="i" :src="li.url">
|
|
|
<image :src="li.url" style="width: 80rpx;height: 80rpx;"></image>
|
|
|
- <view style="font-size: 28rpx;">{{item.cname}}</view>
|
|
|
+ <view style="font-size: 28rpx;" :style="PPindex == index?'color:#3c9cff':''" >{{item.cname}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else style="text-align: center;">
|
|
@@ -40,19 +39,35 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
- <view style="margin-top: 10rpx;display: flex;justify-content: space-around;">
|
|
|
+ <view style="margin-top: 10rpx;display: flex;">
|
|
|
+ <u-tabs :list="dianjiqielist" v-model="groupModel" @click="groupChange"></u-tabs>
|
|
|
+ <!-- <u-radio-group
|
|
|
+ v-model="groupModel"
|
|
|
+ placement="row"
|
|
|
+ @change="groupChange"
|
|
|
+ >
|
|
|
+ <u-radio
|
|
|
+ :customStyle="{margin: '0 10px'}"
|
|
|
+ v-for="(item, index) in dianjiqielist"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :name="item.name" >
|
|
|
+ </u-radio>
|
|
|
+ </u-radio-group> -->
|
|
|
+ <!-- <view style="display: flex;align-items: center;" @click="dianjiqiehuan('')">
|
|
|
+ <view style="margin-right: 10rpx;"
|
|
|
+ :style="originalFactory?'color:#4070fc':''">全部</view>
|
|
|
+ </view>
|
|
|
<view style="display: flex;align-items: center;" @click="dianjiqiehuan('originalFactory')">
|
|
|
- <view style="margin-right: 10rpx;" :style="originalFactory?'color:#4070fc':''">原厂</view>
|
|
|
- <!-- <u-switch v-model="originalFactory"></u-switch> -->
|
|
|
+ <view style="margin-right: 10rpx;"
|
|
|
+ :style="originalFactory?'color:#4070fc':''">静音棉</view>
|
|
|
</view>
|
|
|
<view style="display: flex;align-items: center;" @click="dianjiqiehuan('selfRecovery')">
|
|
|
<view style="margin-right: 10rpx;" :style="selfRecovery?'color:#4070fc':''">自修补</view>
|
|
|
- <!-- <u-switch v-model="selfRecovery"></u-switch> -->
|
|
|
</view>
|
|
|
<view style="display: flex;align-items: center;" @click="dianjiqiehuan('explosionProof')">
|
|
|
<view style="margin-right: 10rpx;" :style="explosionProof?'color:#4070fc':''">防爆</view>
|
|
|
- <!-- <u-switch v-model="explosionProof"></u-switch> -->
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -116,7 +131,10 @@
|
|
|
import {
|
|
|
appList,
|
|
|
userDept,
|
|
|
- validationCorpEmpty
|
|
|
+ validationCorpEmpty,
|
|
|
+
|
|
|
+ brandDescList,
|
|
|
+ brandDescDetail
|
|
|
} from '@/api/tabBar/home.js'
|
|
|
import {
|
|
|
listAll
|
|
@@ -133,18 +151,30 @@
|
|
|
},
|
|
|
status: 'loadmore',
|
|
|
dataList: [],
|
|
|
- list3: [
|
|
|
- 'https://td.echepei.com/file/applets/temporary/images/swiper1.jpg',
|
|
|
- 'https://td.echepei.com/file/applets/temporary/images/swiper2.jpg',
|
|
|
- 'https://td.echepei.com/file/applets/temporary/images/swiper3.jpg'
|
|
|
- ],
|
|
|
+ list3: [],
|
|
|
brandList: [],
|
|
|
- // 原厂
|
|
|
+ // 静音棉
|
|
|
originalFactory:0,
|
|
|
// 自修补
|
|
|
selfRecovery:0,
|
|
|
// 防爆
|
|
|
- explosionProof:0
|
|
|
+ explosionProof:0,
|
|
|
+ dianjiqielist:[
|
|
|
+ {
|
|
|
+ name: '全部',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '静音棉',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '自修补',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '防爆',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ groupModel:null,
|
|
|
+ PPindex:null,
|
|
|
}
|
|
|
},
|
|
|
onReachBottom() {
|
|
@@ -156,7 +186,16 @@
|
|
|
this.status = 'nomore'
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
+ onShow() {
|
|
|
+ // 轮播图
|
|
|
+ brandDescList({type:'LBT'}).then(res=>{
|
|
|
+ brandDescDetail({id:res.data.records[0].id}).then(res=>{
|
|
|
+ // this.list3 = res.data.brandFilesList
|
|
|
+ this.list3 = res.data.brandFilesList.map(item=>{
|
|
|
+ return item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
uni.showLoading({
|
|
|
title: '加载中',
|
|
|
mask: true
|
|
@@ -170,7 +209,7 @@
|
|
|
})
|
|
|
})
|
|
|
//获取所有品牌
|
|
|
- listAll().then(res => {
|
|
|
+ listAll({type:'PP'}).then(res => {
|
|
|
this.brandList = res.data
|
|
|
})
|
|
|
this.page = {
|
|
@@ -186,6 +225,30 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ groupChange(e){
|
|
|
+ console.log(e,228);
|
|
|
+ if (e.name == '静音棉') {
|
|
|
+ this.originalFactory = 1
|
|
|
+ this.selfRecovery = 0
|
|
|
+ this.explosionProof = 0
|
|
|
+ }else if (e.name == '自修补') {
|
|
|
+ this.originalFactory = 0
|
|
|
+ this.selfRecovery = 1
|
|
|
+ this.explosionProof = 0
|
|
|
+ }else if (e.name == '防爆') {
|
|
|
+ this.originalFactory = 0
|
|
|
+ this.selfRecovery = 0
|
|
|
+ this.explosionProof = 1
|
|
|
+ }else {
|
|
|
+ this.originalFactory = 0
|
|
|
+ this.selfRecovery = 0
|
|
|
+ this.explosionProof = 0
|
|
|
+ }
|
|
|
+ this.page.current = 1
|
|
|
+ this.dataList = []
|
|
|
+ this.onSearch()
|
|
|
+
|
|
|
+ },
|
|
|
// 点击筛选条件
|
|
|
dianjiqiehuan(name){
|
|
|
if (this[name] == 0) {
|
|
@@ -245,21 +308,30 @@
|
|
|
},
|
|
|
|
|
|
click(name) {
|
|
|
- console.log(name,239);
|
|
|
- this.page = {
|
|
|
- total: 0,
|
|
|
- size: 10,
|
|
|
- current: 1,
|
|
|
- }
|
|
|
- this.dataList = []
|
|
|
- if (name) {
|
|
|
- this.search = {
|
|
|
- ...this.search,
|
|
|
- brandId: this.brandList[name].id,
|
|
|
- brandNmae: this.brandList[name].cname,
|
|
|
+ if (name != undefined) {
|
|
|
+ this.page = {
|
|
|
+ total: 0,
|
|
|
+ size: 10,
|
|
|
+ current: 1,
|
|
|
}
|
|
|
- this.show = true
|
|
|
- }
|
|
|
+ this.dataList = []
|
|
|
+ if (this.PPindex == name) {
|
|
|
+ this.PPindex = null
|
|
|
+ delete this.search.brandId
|
|
|
+ delete this.search.brandNmae
|
|
|
+ }else {
|
|
|
+ this.PPindex = name
|
|
|
+
|
|
|
+ this.search = {
|
|
|
+ ...this.search,
|
|
|
+ brandId: this.brandList[this.PPindex].id,
|
|
|
+ brandNmae: this.brandList[this.PPindex].cname,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ this.show = true
|
|
|
+
|
|
|
this.onSearch()
|
|
|
},
|
|
|
searchButton(value) {
|