Commit dd82e9fa by LJM

Merge branch 'master' of http://git.ichunt.net/xiaokang/H5_2.0

parents f4ccffe9 ae34b9ef
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
height:48rpx; height:48rpx;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 12rpx; margin-bottom: 12rpx;
navigator{ .itemoneurl{
height:48rpx; height:48rpx;
line-height: 48rpx; line-height: 48rpx;
.goodsName{ .goodsName{
...@@ -189,6 +189,8 @@ ...@@ -189,6 +189,8 @@
position: relative; position: relative;
margin-left: 10rpx; margin-left: 10rpx;
top:10rpx; top:10rpx;
font-size: 22rpx;
font-weight: normal;
} }
} }
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
height:48rpx; height:48rpx;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 12rpx; margin-bottom: 12rpx;
navigator{ .itemoneurl{
height:48rpx; height:48rpx;
line-height: 48rpx; line-height: 48rpx;
.goodsName{ .goodsName{
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
position: relative; position: relative;
margin-left: 10rpx; margin-left: 10rpx;
top:10rpx; top:10rpx;
font-size: 22rpx;
font-weight: normal;
} }
} }
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
position: relative; position: relative;
margin-left: 10rpx; margin-left: 10rpx;
top:10rpx; top:10rpx;
font-size: 22rpx;
font-weight: normal;
} }
} }
.iconfont{ .iconfont{
...@@ -133,15 +135,9 @@ ...@@ -133,15 +135,9 @@
line-height: 41rpx; line-height: 41rpx;
font-size: 24rpx; font-size: 24rpx;
color:$uni-color999; color:$uni-color999;
.pi1{width:139rpx;} .pi1{flex: 2;}
.pi2{width:318rpx;} .pi2{flex: 3;}
.w140{width:140rpx;} .pi3{flex: 3;}
.w120{width:120rpx;}
.hxj{
color:#C2C4CC!important;
font-weight: normal!important;
text-decoration-line: line-through;
}
&.titso{ &.titso{
color:$uni-color666; color:$uni-color666;
font-weight: 600; font-weight: 600;
...@@ -251,7 +247,7 @@ ...@@ -251,7 +247,7 @@
} }
} }
.kfbtn{ .kfbtn{
border: 2px solid $uni-colorwarning; border: 1px solid $uni-colorwarning;
color:$uni-colorwarning; color:$uni-colorwarning;
} }
} }
......
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
color:#fff; color:#fff;
font-size: 20rpx; font-size: 20rpx;
margin-left: 16rpx; margin-left: 16rpx;
font-size: 22rpx;
font-weight: normal;
} }
.tdbox{ .tdbox{
width: 120rpx; width: 120rpx;
...@@ -175,7 +177,6 @@ ...@@ -175,7 +177,6 @@
} }
.cons{ .cons{
border: 1rpx solid #C6C7CC; border: 1rpx solid #C6C7CC;
.groups{ .groups{
font-size: 24rpx; font-size: 24rpx;
color: $uni-color999; color: $uni-color999;
...@@ -318,6 +319,26 @@ ...@@ -318,6 +319,26 @@
} }
} }
&.act{
.headprice{
background: #FFF8F2!important;
}
.detailfoot .foo1 .checkbox .icon,.detailfoot .foo2 .pr uni-text{
color:#F98119;
}
.detailfoot .foo2 .pr input{
border-left: 1rpx solid #F98119;
border-right: 1rpx solid #F98119;
}
.detailfoot .foo2 .pr{
border: 1px solid #F98119;
}
.detailfoot .btnbox .totalpricebox .addcarbtn{
background: #F98119;
}
}
} }
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
height:48rpx; height:48rpx;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 12rpx; margin-bottom: 12rpx;
navigator{ .itemoneurl{
height:48rpx; height:48rpx;
line-height: 48rpx; line-height: 48rpx;
.goodsName{ .goodsName{
...@@ -159,6 +159,7 @@ ...@@ -159,6 +159,7 @@
position: relative; position: relative;
margin-left: 10rpx; margin-left: 10rpx;
top:10rpx; top:10rpx;
font-size: 22rpx;
} }
} }
......
...@@ -4,40 +4,38 @@ ...@@ -4,40 +4,38 @@
<text v-back class="icon iconfont icon-arrleft"></text> <text v-back class="icon iconfont icon-arrleft"></text>
<view class="inputbox row verCenter" > <view class="inputbox row verCenter" >
<text class="icon iconfont icon-search "></text> <text class="icon iconfont icon-search "></text>
<input placeholder="在此品牌下搜索型号" @focus="isSearch=!isSearch" @blur="isSearch=!isSearch" /> <input placeholder="在此品牌下搜索型号" v-model="goods_name" @focus="isSearch=!isSearch" @blur="blurinputs" />
</view> </view>
<navigator url="/joincart"> <navigator url="/joincart">
<text class="icon iconfont icon-car"></text> <text class="icon iconfont icon-car"></text>
</navigator> </navigator>
<view class="searchbtn">搜索</view> <view class="searchbtn" @click.stop="searchlistgo()">搜索</view>
</view> </view>
<view class="brandinfo"> <view class="brandinfo">
<view class="tp1 row bothSide verCenter"> <view class="tp1 row bothSide verCenter">
<image src="https://img.ichunt.com/images/brands/174.png"></image> <image :src="brandInfo.brand_logo"></image>
<text>关于ADI</text> <text>关于{{brandInfo.brand_name}}</text>
</view>
<view class="tp2 " :class="{'zazts elep2':!zkshow}">
Analog Devices以追求创新、品质和卓越为使命,是一家历史悠久,成长迅速的技术公司。Analog Devices的客户逾Analog Devices以追求创新、品质和卓越为使命,是一家历史悠久,成长迅速的技术公司。Analog Devices的客户逾……
</view> </view>
<view class="tp2 " :class="{'zazts elep2':!zkshow}" v-html="brandInfo.brand_desc">asddddddddddd</view>
<view class="zkbtnsi row verCenter" v-show="!zkshow" @click="zkshow=!zkshow">展开详情<text class="icon iconfont icon-arrbot"></text></view> <view class="zkbtnsi row verCenter" v-show="!zkshow" @click="zkshow=!zkshow">展开详情<text class="icon iconfont icon-arrbot"></text></view>
<view class="zkbtnsi row verCenter" v-show="zkshow" @click="zkshow=!zkshow">收起详情<text class="icon iconfont icon-arrtop"></text></view> <view class="zkbtnsi row verCenter" v-show="zkshow" @click="zkshow=!zkshow">收起详情<text class="icon iconfont icon-arrtop"></text></view>
</view> </view>
<view class="datasc"> <view class="datasc">
<view class="shiftbox row avarage "> <view class="shiftbox row avarage ">
<view class="rank1 row ">综合</view> <view class="rank1 row " @click="tab(1)" :class="{'act':tabType==1}">综合</view>
<view class="rank2 row sjpx act top">库存</view> <view class="rank2 row sjpx" @click="tab(2)" :class="{'act':tabType==2,'top':stocksort,'bot':(!stocksort)}">库存</view>
<view class="rank3 row sjpx act bot">价格</view> <view class="rank3 row sjpx " @click="tab(3)" :class="{'act':tabType==3,'top':pricesort,'bot':(!pricesort)}">价格</view>
</view> </view>
<view class="databox branddataboxs" > <view class="databox branddataboxs" >
<view class="group" v-for="(item,index) in list" :key="index"> <view class="group" v-for="(item,index) in list" :key="index">
<view class="toprs1 row bothSide"> <view class="toprs1 row bothSide">
<navigator :url="'/item?goods_id='+item.goods_id" class="row"> <a :href="'/#/item/'+item.goods_id" class="row itemoneurl">
<view class="goodsName elep">{{item.goods_name}}</view> <view class="goodsName elep">{{item.goods_name}}</view>
<view class="actag" v-if="item.ac_type==10">{{item.activity_info.sign}}</view> <view class="actag" v-if="item.ac_type==10">{{item.activity_info.sign}}</view>
</navigator> </a>
<view class="addcar" v-if="item.is_buy==1" @click="addcarpopfunc(item.goods_id)">加入购物车</view> <view class="addcar" v-if="item.is_buy==1" @click="addcarpopfunc(item.goods_id)">加入购物车</view>
<view class="kfbtns" v-if="item.is_buy!=1" @click="addcarpopfunc(item.goods_id)">联系客服</view> <a class="kfbtns" v-if="item.is_buy!=1" :href="kfurl">联系客服</a>
</view> </view>
<view class="toprs2 row bothSide"> <view class="toprs2 row bothSide">
<view class="l2 elep"><text class="labelsd">品牌:</text>{{item.brand_name}}</view> <view class="l2 elep"><text class="labelsd">品牌:</text>{{item.brand_name}}</view>
...@@ -85,12 +83,16 @@ ...@@ -85,12 +83,16 @@
zkshow:false, zkshow:false,
kfurl:"", kfurl:"",
list:[], list:[],
brandInfo:{},
isInitLogin:0, isInitLogin:0,
class_id1:"",
class_id2:"",
page:1, page:1,
page_size:10, page_size:10,
isLoadEnd: false // 是否已全部加载完 isLoadEnd: false, // 是否已全部加载完
goods_name:"",
tabType:1,
stocksort:false,//库存升序 false 降序
pricesort:false,//价格升序 false 降序
} }
}, },
onPageScroll(e) { onPageScroll(e) {
...@@ -100,7 +102,11 @@ ...@@ -100,7 +102,11 @@
}, },
onShow() { onShow() {
this.getData(); this.getData();
this.getqqurl() },
mounted() {
setTimeout(() => {
this.kfurl=this.$globalData.kfqq_xk
}, 500);
}, },
onLoad: function(option) { onLoad: function(option) {
this.brand_id = this.$Route.query.brand_id; this.brand_id = this.$Route.query.brand_id;
...@@ -115,25 +121,51 @@ ...@@ -115,25 +121,51 @@
this.getData(); this.getData();
}, },
methods: { methods: {
getqqurl:function(){ blurinputs(){
this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => { setTimeout(()=>{
if (res.err_code === 0) { this.isSearch=!this.isSearch
this.kfurl=res.data.kfqq_xk.data },100)
} },
}); searchlistgo(){
console.log(666)
this.page=1
this.getData()
},
tab(type){
this.tabType=type;
if(type==1){
}else if(type==2){
this.stocksort=!this.stocksort;
}else if(type==3){
this.pricesort=!this.pricesort
}
this.page=1
this.getData()
}, },
getData() { getData() {
this.request(Api_Es + "/optimum/goods", 'POST', {class_id1:13396,page:this.page,page_size:this.page_size},true,true).then(res => { let data_={
'standard_brand_id/condition':this.brand_id,
'goods_name/condition':this.goods_name,
'offset':this.page_size,
'p':this.page
}
if(this.tabType==2){
data_['stock_sort']=this.stocksort?"desc":"asc"
}
if(this.tabType==3){
data_['single_sort']=this.pricesort?"asc":"desc"
}
this.request(Api_Es+ "/label/brandInfo", 'POST', data_,true,true).then(res => {
this.isInitLogin=1; this.isInitLogin=1;
if (res.error_code == 0) { if (res.error_code == 0) {
this.class_id1_name=res.data.class_id1_name; this.brandInfo=res.data.brand_info;
this.class_id2_name=res.data.class_id2_name; let newDataList = res.data.goods_info||[];
this.page++;
let newDataList = res.data.goods_lists||[];
this.list = this.list.concat(newDataList); this.list = this.list.concat(newDataList);
if (newDataList.length <this.page_size) { if ((this.page*this.page_size) >=Number(res.data.goods_count)) {
this.isLoadEnd = true; this.isLoadEnd = true;
} }
this.page++;
}else{ }else{
this.list=[] this.list=[]
} }
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
<view class="databox"> <view class="databox">
<view class="group" v-for="(item,index) in list" :key="index"> <view class="group" v-for="(item,index) in list" :key="index">
<view class="toprs1 row bothSide"> <view class="toprs1 row bothSide">
<navigator :url="'/item?goods_id='+item.goods_id" class="row"> <a :href="'/#/item/'+item.goods_id" class="row itemoneurl">
<view class="goodsName elep">{{item.goods_name}}</view> <view class="goodsName elep">{{item.goods_name}}</view>
<view class="actag" v-if="item.ac_type==10">{{item.activity_info.sign}}</view> <view class="actag" v-if="item.ac_type==10">{{item.activity_info.sign}}</view>
</navigator> </a>
<view class="addcar" v-if="item.is_buy==1" @click="addcarpopfunc(item.goods_id)">加入购物车</view> <view class="addcar" v-if="item.is_buy==1" @click="addcarpopfunc(item.goods_id)">加入购物车</view>
<view class="kfbtns" v-if="item.is_buy!=1" @click="addcarpopfunc(item.goods_id)">联系客服</view> <a class="kfbtns" :href="kfurl" target="_blank" v-if="item1.is_buy!=1">联系客服</a>
</view> </view>
<view class="toprs2 row bothSide"> <view class="toprs2 row bothSide">
<view class="l2 elep"><text class="labelsd">品牌:</text>{{item.brand_name}}</view> <view class="l2 elep"><text class="labelsd">品牌:</text>{{item.brand_name}}</view>
...@@ -82,7 +82,12 @@ ...@@ -82,7 +82,12 @@
}, },
onShow() { onShow() {
this.getData(); this.getData();
this.getqqurl() },
mounted() {
setTimeout(() => {
this.kfurl=this.$globalData.kfqq_xk
}, 500);
}, },
onLoad: function(option) { onLoad: function(option) {
this.class_id1 = option.class_id1||""; this.class_id1 = option.class_id1||"";
...@@ -90,25 +95,18 @@ ...@@ -90,25 +95,18 @@
console.log(this.class_id1,this.class_id2) console.log(this.class_id1,this.class_id2)
}, },
methods: { methods: {
getqqurl:function(){
this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => {
if (res.err_code === 0) {
this.kfurl=res.data.kfqq_xk.data
}
});
},
getData() { getData() {
this.request(Api_Es + "/optimum/goods", 'POST', {class_id1:13396,page:this.page,page_size:this.page_size},true,true).then(res => { this.request(Api_Es + "/optimum/goods", 'POST', {class_id1:this.class_id1,class_id2:this.class_id2,page:this.page,page_size:this.page_size},true,true).then(res => {
this.isInitLogin=1; this.isInitLogin=1;
if (res.error_code == 0) { if (res.error_code == 0) {
this.class_id1_name=res.data.class_id1_name; this.class_id1_name=res.data.class_id1_name;
this.class_id2_name=res.data.class_id2_name; this.class_id2_name=res.data.class_id2_name;
this.page++;
let newDataList = res.data.goods_lists||[]; let newDataList = res.data.goods_lists||[];
this.list = this.list.concat(newDataList); this.list = this.list.concat(newDataList);
if (newDataList.length <this.page_size) { if ((this.page*this.page_size) >=Number(res.data.page.total)) {
this.isLoadEnd = true; this.isLoadEnd = true;
} }
this.page++;
}else{ }else{
this.list=[] this.list=[]
} }
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<view class="goods-box"> <view class="goods-box">
<view class="titg">精选物料</view> <view class="titg">精选物料</view>
<scroll-view class="goods-con" scroll-x="true"> <scroll-view class="goods-con" scroll-x="true">
<navigator :url="'/item?goods_id=' + item.goods_id" class="goods-item" v-for="(item, index) in obj.h5_home_choice_goods" :key="index"> <a :href="'/#/item/' + item.goods_id" class="goods-item" v-for="(item, index) in obj.h5_home_choice_goods" :key="index">
<image :src="item.goods_images"></image> <image :src="item.goods_images"></image>
<view class="xhg elep">{{ item.goods_name }}</view> <view class="xhg elep">{{ item.goods_name }}</view>
<view class="ppg elep"> <view class="ppg elep">
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
价格: 价格:
<text>{{ item.price }}</text> <text>{{ item.price }}</text>
</view> </view>
</navigator> </a>
</scroll-view> </scroll-view>
</view> </view>
<view class="fwbox"> <view class="fwbox">
...@@ -165,7 +165,12 @@ export default { ...@@ -165,7 +165,12 @@ export default {
intervalHandler: null intervalHandler: null
}; };
}, },
mounted() {
setTimeout(() => {
this.pbobj = this.$globalData;
this.kfurl = this.$globalData.kfqq_xk;
}, 500);
},
onShow() { onShow() {
this.getData(); this.getData();
}, },
...@@ -209,12 +214,7 @@ export default { ...@@ -209,12 +214,7 @@ export default {
}, 10000); }, 10000);
} }
}); });
this.request(Ichunt_Api + '/api/common/data', 'GET', {}).then(res => {
if (res.err_code === 0) {
this.pbobj = res.data;
this.kfurl = this.pbobj.kfqq_xk.data;
}
});
this.request(Api_Url + '/msg/allnum', 'POST', {}, false, true).then(res => { this.request(Api_Url + '/msg/allnum', 'POST', {}, false, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.newscount = res.data; this.newscount = res.data;
......
...@@ -65,11 +65,14 @@ ...@@ -65,11 +65,14 @@
console.log(option); console.log(option);
this.searchVal=option.k||"" this.searchVal=option.k||""
}, },
mounted() {
setTimeout(() => {
this.obj = this.$globalData;
}, 500);
},
onShow:function(){ onShow:function(){
//获取历史记录 //获取历史记录
console.log(this.searchVal)
this.getsearchHistory() this.getsearchHistory()
this.getData()
}, },
methods: { methods: {
getListPOI(val_){ getListPOI(val_){
...@@ -79,13 +82,6 @@ ...@@ -79,13 +82,6 @@
} }
}); });
}, },
getData(){
this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => {
if (res.err_code === 0) {
this.obj = res.data;
}
});
},
getsearchHistory(){ getsearchHistory(){
let listhis_=uni.getStorageSync('historyItems'); let listhis_=uni.getStorageSync('historyItems');
if(listhis_){ if(listhis_){
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
</view> </view>
<view class="group" v-for="(item1,index1) in item.data" :key="index1" v-show="item1.isshow"> <view class="group" v-for="(item1,index1) in item.data" :key="index1" v-show="item1.isshow">
<view class="toprs1 row bothSide"> <view class="toprs1 row bothSide">
<navigator :url="'/item?goods_id='+item1.goods_id" class="row"> <a :href="'/#/item/'+item1.goods_id" class="row itemoneurl">
<view class="goodsName elep">{{item1.goods_name_org||item1.goods_name}}</view> <view class="goodsName elep">{{item1.goods_name_org||item1.goods_name}}</view>
<view class="actag" v-if="item1.ac_type==10">{{item1.activity_info.sign}}</view> <view class="actag" v-if="item1.ac_type==10">{{item1.activity_info.sign}}</view>
</navigator> </a>
<view class="addcar" v-if="item1.is_buy==1" @click="addcarpopfunc(item1.goods_id)">加入购物车</view> <view class="addcar" v-if="item1.is_buy==1" @click="addcarpopfunc(item1.goods_id)">加入购物车</view>
<a class="kfbtns" :href="kfqqurl" target="_blank" v-if="item1.is_buy!=1">联系客服</a> <a class="kfbtns" :href="kfqqurl" target="_blank" v-if="item1.is_buy!=1">联系客服</a>
</view> </view>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<script> <script>
import {Ichunt_Api,Api_Url,Api_Es,Api_ES_Go} from '@/util/api.js'; import {Ichunt_Api,Api_Url,Api_Es,Api_ES_Go} from '@/util/api.js';
const EsUrl="//so12.ichunt.com" //Api_Es const EsUrl=Api_Es //Api_Es
import addCar from '@/components/addcar.vue'; import addCar from '@/components/addcar.vue';
export default { export default {
data() { data() {
...@@ -140,7 +140,13 @@ ...@@ -140,7 +140,13 @@
onLoad: function(option) { onLoad: function(option) {
this.searchVal = option.k; this.searchVal = option.k;
this.setHistoryItems(this.searchVal) this.setHistoryItems(this.searchVal)
this.getData() },
mounted() {
setTimeout(() => {
this.SEARCH_SUPPLIER_SINGLE=this.$globalData.SEARCH_SUPPLIER_SINGLE;
this.kfqqurl=this.$globalData.kfqq_xk
this.getSupplierData()
}, 500);
}, },
methods: { methods: {
//创建历史搜索缓存 最大10个 //创建历史搜索缓存 最大10个
...@@ -161,22 +167,76 @@ ...@@ -161,22 +167,76 @@
uni.setStorageSync('historyItems', historyItems); uni.setStorageSync('historyItems', historyItems);
} }
}, },
getData() { //综合排序
this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => { rankTotal(){
if (res.err_code === 0) { //按供应商排序
this.SEARCH_SUPPLIER_SINGLE=res.data.SEARCH_SUPPLIER_SINGLE; this.list.sort((a, b) => {
this.kfqqurl=res.data.kfqq_xk.data if (a.supplier_name == '国内现货') {
this.getSupplierData() return -1;
} } else if (b.supplier_name == '国内现货') {
return 1;
} else if (a.supplier_name == '国际现货') {
return -1;
} else if (b.supplier_name == '国际现货') {
return 1;
}
return 0;
}); });
//价格排序
this.list.forEach(item=>{
item.data.sort((a, b) => Number(a.ladder_price[0].price_ac||a.ladder_price[0].price_cn) - Number(b.ladder_price[0].price_ac||b.ladder_price[0].price_cn));
})
//完全匹配
this.list.forEach(item=>{
let piarr_=JSON.parse(JSON.stringify(item.data))
let arr1=[]
let arr2=[]
piarr_.forEach((iy,index)=>{
if (iy.goods_name.toLowerCase()==this.searchVal.toLowerCase()) {
arr1.push(iy)
}else{
arr2.push(iy)
}
})
item.data=[]
item.data=item.data.concat(arr1,arr2)
// console.log(piarr_)
// item.data.sort((a, b) => {
// if (a.goods_name.toLowerCase()==this.searchVal.toLowerCase()) {
// return -1;
// } else if (b.goods_name.toLowerCase()==this.searchVal.toLowerCase()) {
// return 1;
// }
// return 0;
// });
})
}, },
tab(type){ tab(type){
this.tabType=type; this.tabType=type;
if(type==2){ if(type==1){
this.stocksort=!this.stocksort this.rankTotal()
} }else if(type==2){
if(type==3){ this.stocksort=!this.stocksort;
if(this.stocksort){
this.list.forEach(item=>{
item.data.sort((b, a) => Number(a.stock) - Number(b.stock));
})
}else{
this.list.forEach(item=>{
item.data.sort((a, b) => Number(a.stock) - Number(b.stock));
})
}
}else if(type==3){
this.pricesort=!this.pricesort this.pricesort=!this.pricesort
if(this.pricesort){
this.list.forEach(item=>{
item.data.sort((b, a) => Number(a.ladder_price[0].price_ac||a.ladder_price[0].price_cn) - Number(b.ladder_price[0].price_ac||b.ladder_price[0].price_cn));
})
}else{
this.list.forEach(item=>{
item.data.sort((a, b) => Number(a.ladder_price[0].price_ac||a.ladder_price[0].price_cn) - Number(b.ladder_price[0].price_ac||b.ladder_price[0].price_cn));
})
}
} }
}, },
//品牌供应商搜索 //品牌供应商搜索
...@@ -285,15 +345,21 @@ ...@@ -285,15 +345,21 @@
name:key, name:key,
checked:false checked:false
} }
if(key=="国内现货"){ this.supplierArr.push(is_)
this.supplierArr.unshift(is_)
}else if(key=="猎芯期货"){
this.supplierArr.push(is_)
}else{
this.supplierArr.splice(1, 0, is_);
}
}) })
this.supplierArr.sort((a, b) => {
if (a.name == '国内现货') {
return -1;
} else if (b.name == '国内现货') {
return 1;
} else if (a.name == '国际现货') {
return -1;
} else if (b.name == '国际现货') {
return 1;
}
return 0;
});
//品牌处理 //品牌处理
obj.data.forEach(item=>{ obj.data.forEach(item=>{
let keys_=(item.standard_brand_name||item.brand_name) let keys_=(item.standard_brand_name||item.brand_name)
...@@ -329,19 +395,15 @@ ...@@ -329,19 +395,15 @@
obj_.data.forEach(it=>{ obj_.data.forEach(it=>{
it.isshow=true it.isshow=true
}) })
if(obj_.supplier_name=="国内现货"){ this.list.push(obj_)
this.list.unshift(obj_)
}else if(obj_.supplier_name=="猎芯期货"){
this.list.push(obj_)
}else{
this.list.splice(1, 0, obj_);
}
this.getBrandAndSupplier(obj_) this.getBrandAndSupplier(obj_)
} }
//数据加载完 //数据加载完
if(this.loadcount==Object.keys(this.SEARCH_SUPPLIER_SINGLE)){ if(this.loadcount==Object.keys(this.SEARCH_SUPPLIER_SINGLE).length){
if(this.list.length==0){ if(this.list.length==0){
this.isNOdata=1; this.isNOdata=1;
}else{
this.rankTotal()
} }
} }
}); });
...@@ -373,9 +435,12 @@ ...@@ -373,9 +435,12 @@
} }
//数据加载完 //数据加载完
if(this.loadcount==Object.keys(this.SEARCH_SUPPLIER_SINGLE)){ if(this.loadcount==Object.keys(this.SEARCH_SUPPLIER_SINGLE).length){
if(this.list.length==0){ if(this.list.length==0){
this.isNOdata=1; this.isNOdata=1;
}else{
this.rankTotal()
} }
} }
}); });
......
...@@ -60,14 +60,14 @@ const router = new Router({ ...@@ -60,14 +60,14 @@ const router = new Router({
}, },
{ {
path: '/pages/brand/brand', path: '/pages/brand/brand',
aliasPath: '/brand', aliasPath: '/brand/:brand_id',
meta: { meta: {
title: '品牌详情' title: '品牌详情'
} }
}, },
{ {
path: '/pages/detail/detail', path: '/pages/detail/detail',
aliasPath: '/item', aliasPath: '/item/:goods_id',
meta: { meta: {
title: '商品详情' title: '商品详情'
} }
......
...@@ -16,7 +16,7 @@ const request = (url = '', type = 'GET', param = {}, Loading, headertype) => { ...@@ -16,7 +16,7 @@ const request = (url = '', type = 'GET', param = {}, Loading, headertype) => {
pf: 2 pf: 2
}); });
//请求es相关 //请求es相关
if (url.indexOf("so12.ichunt.") != -1 || url.indexOf("/esapi/") != -1 || url.indexOf("/goods/detail") != -1) { if (url.indexOf("so12.ichunt.") != -1 || url.indexOf("/esapi/") != -1 || url.indexOf("/goods/detail") != -1|| url.indexOf("/optimum/goods") != -1) {
params = Object.assign(param, { hkyefgyd: 1 }); params = Object.assign(param, { hkyefgyd: 1 });
} }
......
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 sign in to comment