Commit f773316c by 肖康

Merge branch 'XK_carB20190624' into Development

# Conflicts:
#	src/views/common/GoodsOne.vue
parents 9553340f 2071e286
......@@ -336,7 +336,12 @@ export const apis = {
allAddress:productionUrlApi+'/address/allpcd',
/**修改个人信息**/
changeUserInfo:productionUrlApi+'/user/changeUserInfo',
/**品牌分类**/
brandList: productionUrl + 'api/brandList',
/**品牌详细**/
brandInfo: productionUrl + 'api/brandInfo',
/**SKU公用接口**/
skuList: productionUrlApi + 'sku/info',
}
......@@ -546,6 +551,19 @@ export const services = {
changeUserInfo(params){
return axios.post(apis.changeUserInfo,params)
},
brandList(params){
return axios.post(apis.brandList,params)
},
brandInfo(params) {
return axios.get(apis.brandInfo, {
params: {
...params
}
})
},
skuList(params){
return axios.post(apis.skuList,params)
},
};
\ No newline at end of file
.brand{
background: #f8f8f8;
.van-index-bar__index {
font-size: 14px;
line-height: 18px;
}
.data-box{
padding-top: 44px;
.data-group{
.data-content{
background: #fff;
li{
height: 48px;
line-height: 48px;
padding: 5px 40px 4px 0px;
clear:both;
box-sizing: border-box;
.brand_img{
float: left;
width: 80px;
height: 40px;
margin-right: 10px;
}
p{
float: left;
height: 40px;
font-size: 14px;
line-height: 40px;
color: #666666;
}
}
}
}
}
.van-tabs{
position: fixed;
padding-top:0px;
top:44px;
left:0px;right:0px;
background: #fff;
height:44px;
z-index: 2;
}
}
.brand{background:#f8f8f8}.brand .van-index-bar__index{font-size:14px;line-height:18px}.brand .data-box{padding-top:44px}.brand .data-box .data-group .data-content{background:#fff}.brand .data-box .data-group .data-content li{height:48px;line-height:48px;padding:5px 40px 4px 0px;clear:both;box-sizing:border-box}.brand .data-box .data-group .data-content li .brand_img{float:left;width:80px;height:40px;margin-right:10px}.brand .data-box .data-group .data-content li p{float:left;height:40px;font-size:14px;line-height:40px;color:#666666}.brand .van-tabs{position:fixed;padding-top:0px;top:44px;left:0px;right:0px;background:#fff;height:44px;z-index:2}
\ No newline at end of file
.brandList{
.brand_detail{ width: 100%; background: #ffffff; position: fixed; z-index: 9; }
.brand_detail .brand_detail_box{ width: 95.2%; height: 50%; margin: 10px 9px; }
.brand_detail .brand_detail_box .brand_detail_img{ float: left; width: 68px; height: 50px; margin-right: 20px; }
.brand_detail .brand_detail_box .brand_detail_block{ float: left; width: 70%; height: 50px; }
.brand_detail .brand_detail_box .brand_detail_block li{ height: 12px; font-family: "Helvetica"; font-size: 12px; line-height: 12px; color: #666666; }
.brand_detail .brand_detail_box .brand_detail_block .detail_name{ margin-bottom: 8px; }
.brand_detail .brand_detail_box .brand_detail_block .main_brand{ height: 31px; }
.brand_detail .brand_detail_box .brand_detail_block .main_brand span{ float: left; height: 31px; font-family: "Microsoft Yahei"; font-size: 12px; line-height: 17px; }
.brand_detail .brand_detail_box .brand_detail_block .main_brand .main_brand_text{ width: 70%; /*height: 0.5rem;*/ height: 31px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.brand_detail .brand_introduce{ width: 95.2%; margin:10px; font-family: "Helvetica"; font-size: 12px; line-height:20px; color: #666666;overflow: hidden;height:60px;text-overflow: ellipsis;}
.brand_detail .down{ height: 40px; overflow-y: hidden; }
.brand_detail .up{ height: auto; }
.brand_detail .introduce_btn{ width:100%; height:26px; padding: 10px 0; }
.brand_detail .introduce_btn .introduce_down{ display: block; width: 12px; height: 7px; margin: 0 auto; background: url(https://static.ichunt.com/dist/res/m/images/question_content_down.png); background-size: contain; background-repeat: no-repeat; }
.brand_detail .introduce_btn .introduce_up{ display: block; width: 12px; height: 7px; margin: 0 auto; background: url(https://static.ichunt.com/dist/res/m/images/question_content_up.png); background-size: contain; background-repeat: no-repeat; }
.rank_condition{ width: 100%; padding: 0 13px; background: #ffffff;height:45px; }
.rank_condition li{ float: left; position: relative; /*width: 1.75rem; */height: 45px; font-family: "Microsoft Yahei"; font-size: 14px; line-height:45px; color: #333333; }
.rank_condition .overall_rank{ width: 22% }
.rank_condition .stock_rank{ width: 22% }
.rank_condition .price_rank{ width: 22% }
.rank_condition .stock_having{ width: 34% }
.rank_condition .act{ color: #e10601; }
.rank_condition li div{ width: 6px; height: 10px; position: absolute; top: 20px; left: 35px; }
.rank_condition li div .rank_up{ float: left; margin-bottom: 2px; width: 6px; height: 3px; }
.rank_condition li div .rank_down{ float: left; width: 6px; height: 3px; }
.rank_condition li div .rank_up_black{ background: url(https://static.ichunt.com/dist/res/m/images/rank_up_black.png); background-size: contain; background-repeat: no-repeat; }
.rank_condition li div .rank_down_black{ background: url(https://static.ichunt.com/dist/res/m/images/rank_down_black.png); background-size: contain; background-repeat: no-repeat; }
.rank_condition li div .rank_up_red{ background: url(https://static.ichunt.com/dist/res/m/images/rank_up_red.png); background-size: contain; background-repeat: no-repeat; }
.rank_condition li div .rank_down_red{ background: url(https://static.ichunt.com/dist/res/m/images/rank_down_red.png); background-size: contain; background-repeat: no-repeat; }
.border-top6{border-top:1px solid #ebedf0;border-bottom:1px solid #ebedf0;}
.rank_condition .stock_having span{ width: 15px; height: 15px; position: absolute; top: 15px; left: 0; z-index: 10;}
.rank_condition .stock_having .noact{ background: url(https://static.ichunt.com/dist/res/m/images/rank_noselected.png); background-size: contain; background-repeat: no-repeat; }
.rank_condition .stock_having .act{ background: url(https://static.ichunt.com/dist/res/m/images/rank_selected.png); background-size: contain; background-repeat: no-repeat; }
.data-list-box{
padding-top: 185px;
}
}
.brandList .brand_detail{width:100%;background:#ffffff;position:fixed;z-index:9}.brandList .brand_detail .brand_detail_box{width:95.2%;height:50%;margin:10px 9px}.brandList .brand_detail .brand_detail_box .brand_detail_img{float:left;width:68px;height:50px;margin-right:20px}.brandList .brand_detail .brand_detail_box .brand_detail_block{float:left;width:70%;height:50px}.brandList .brand_detail .brand_detail_box .brand_detail_block li{height:12px;font-family:"Helvetica";font-size:12px;line-height:12px;color:#666666}.brandList .brand_detail .brand_detail_box .brand_detail_block .detail_name{margin-bottom:8px}.brandList .brand_detail .brand_detail_box .brand_detail_block .main_brand{height:31px}.brandList .brand_detail .brand_detail_box .brand_detail_block .main_brand span{float:left;height:31px;font-family:"Microsoft Yahei";font-size:12px;line-height:17px}.brandList .brand_detail .brand_detail_box .brand_detail_block .main_brand .main_brand_text{width:70%;height:31px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.brandList .brand_detail .brand_introduce{width:95.2%;margin:10px;font-family:"Helvetica";font-size:12px;line-height:20px;color:#666666;overflow:hidden;height:60px;text-overflow:ellipsis}.brandList .brand_detail .down{height:40px;overflow-y:hidden}.brandList .brand_detail .up{height:auto}.brandList .brand_detail .introduce_btn{width:100%;height:26px;padding:10px 0}.brandList .brand_detail .introduce_btn .introduce_down{display:block;width:12px;height:7px;margin:0 auto;background:url(https://static.ichunt.com/dist/res/m/images/question_content_down.png);background-size:contain;background-repeat:no-repeat}.brandList .brand_detail .introduce_btn .introduce_up{display:block;width:12px;height:7px;margin:0 auto;background:url(https://static.ichunt.com/dist/res/m/images/question_content_up.png);background-size:contain;background-repeat:no-repeat}.brandList .rank_condition{width:100%;padding:0 13px;background:#ffffff;height:45px}.brandList .rank_condition li{float:left;position:relative;height:45px;font-family:"Microsoft Yahei";font-size:14px;line-height:45px;color:#333333}.brandList .rank_condition .overall_rank{width:22%}.brandList .rank_condition .stock_rank{width:22%}.brandList .rank_condition .price_rank{width:22%}.brandList .rank_condition .stock_having{width:34%}.brandList .rank_condition .act{color:#e10601}.brandList .rank_condition li div{width:6px;height:10px;position:absolute;top:20px;left:35px}.brandList .rank_condition li div .rank_up{float:left;margin-bottom:2px;width:6px;height:3px}.brandList .rank_condition li div .rank_down{float:left;width:6px;height:3px}.brandList .rank_condition li div .rank_up_black{background:url(https://static.ichunt.com/dist/res/m/images/rank_up_black.png);background-size:contain;background-repeat:no-repeat}.brandList .rank_condition li div .rank_down_black{background:url(https://static.ichunt.com/dist/res/m/images/rank_down_black.png);background-size:contain;background-repeat:no-repeat}.brandList .rank_condition li div .rank_up_red{background:url(https://static.ichunt.com/dist/res/m/images/rank_up_red.png);background-size:contain;background-repeat:no-repeat}.brandList .rank_condition li div .rank_down_red{background:url(https://static.ichunt.com/dist/res/m/images/rank_down_red.png);background-size:contain;background-repeat:no-repeat}.brandList .border-top6{border-top:1px solid #ebedf0;border-bottom:1px solid #ebedf0}.brandList .rank_condition .stock_having span{width:15px;height:15px;position:absolute;top:15px;left:0;z-index:10}.brandList .rank_condition .stock_having .noact{background:url(https://static.ichunt.com/dist/res/m/images/rank_noselected.png);background-size:contain;background-repeat:no-repeat}.brandList .rank_condition .stock_having .act{background:url(https://static.ichunt.com/dist/res/m/images/rank_selected.png);background-size:contain;background-repeat:no-repeat}.brandList .data-list-box{padding-top:185px}
\ No newline at end of file
......@@ -36,6 +36,7 @@
color: #969799;
text-align: right;
vertical-align: middle;
width:70%;
input{
display: block;
box-sizing: border-box;
......
.user-info{height:100%;background:#f8f8f8}.user-info .group-info{position:relative;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;overflow:hidden;color:#323233;font-size:14px;line-height:24px;background-color:#fff}.user-info .group-info:not(:last-child)::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:15px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.user-info .group-info .group-left{width:90px;-webkit-box-flex:0;-webkit-flex:none;flex:none}.user-info .group-info .group-right{position:relative;overflow:hidden;color:#969799;text-align:right;vertical-align:middle}.user-info .group-info .group-right input{display:block;box-sizing:border-box;width:100%;margin:0;padding:0;color:#323233;text-align:left;background-color:transparent;border:0;resize:none}.user-info .group-info .group-right input::-webkit-input-placeholder{color:#ccc}.user-info .tips{margin-top:15px;font-size:12px;color:#999;padding-left:15px}.user-info .btnsub{position:fixed;bottom:0;width:100%;padding:2%;right:0;left:0;box-sizing:border-box}.user-info .btnsub .btnnext{background:#fff;color:#1080d0;border:1px solid #1080d0;text-decoration:none;text-align:center;height:40px;line-height:40px;border-radius:5px;width:100%;display:block;cursor:pointer;font-size:14px}.user-info .btnsub .btnnext.submitbtn{background:#1080d0;color:#fff}.Router{position:absolute;height:100%;width:100%;transition:all .377s ease;will-change:transform;top:0;backface-visibility:hidden;perspective:1000;padding-top:44px;box-sizing:border-box}.slide-left-enter,.slide-right-leave-active{opacity:0;transform:translate3d(-100%, 0, 0)}.slide-left-leave-active,.slide-right-enter{opacity:0;transform:translate3d(100%, 0, 0)}
\ No newline at end of file
.user-info{height:100%;background:#f8f8f8}.user-info .group-info{position:relative;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;overflow:hidden;color:#323233;font-size:14px;line-height:24px;background-color:#fff}.user-info .group-info:not(:last-child)::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:15px;border-bottom:1px solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.user-info .group-info .group-left{width:90px;-webkit-box-flex:0;-webkit-flex:none;flex:none}.user-info .group-info .group-right{position:relative;overflow:hidden;color:#969799;text-align:right;vertical-align:middle;width:70%}.user-info .group-info .group-right input{display:block;box-sizing:border-box;width:100%;margin:0;padding:0;color:#323233;text-align:left;background-color:transparent;border:0;resize:none}.user-info .group-info .group-right input::-webkit-input-placeholder{color:#ccc}.user-info .tips{margin-top:15px;font-size:12px;color:#999;padding-left:15px}.user-info .btnsub{position:fixed;bottom:0;width:100%;padding:2%;right:0;left:0;box-sizing:border-box}.user-info .btnsub .btnnext{background:#fff;color:#1080d0;border:1px solid #1080d0;text-decoration:none;text-align:center;height:40px;line-height:40px;border-radius:5px;width:100%;display:block;cursor:pointer;font-size:14px}.user-info .btnsub .btnnext.submitbtn{background:#1080d0;color:#fff}.Router{position:absolute;height:100%;width:100%;transition:all .377s ease;will-change:transform;top:0;backface-visibility:hidden;perspective:1000;padding-top:44px;box-sizing:border-box}.slide-left-enter,.slide-right-leave-active{opacity:0;transform:translate3d(-100%, 0, 0)}.slide-left-leave-active,.slide-right-enter{opacity:0;transform:translate3d(100%, 0, 0)}
\ No newline at end of file
......@@ -35,6 +35,8 @@ const lxshop = resolve => require(['@/views/lxshop/lxshop'], resolve);
const joincart = resolve => require(['@/views/car/car'], resolve);
const user = resolve => require(['@/views/user/index'], resolve);
const userInfo = resolve => require(['@/views/user/userInfo'], resolve);
const brand = resolve => require(['@/views/brand/brand'], resolve);
const brandList = resolve => require(['@/views/brand/brandList'], resolve);
Vue.use(Router);
const routes = [{
......@@ -288,7 +290,21 @@ const routes = [{
back: true
}
},
{
path: '/brand',
component: brand,
meta: {
title: '品牌分类'
}
},
{
path: '/brandList/:brand_id',
component: brandList,
name: 'brandList',
meta: {
title: '品牌列表'
}
},
{
path: '*',
redirect: '/'
......
import Vue from 'vue'
import {Toast} from 'vant';
import {services as Services} from '../../../api/index'
import Util from '../../../util/index'
Vue.use(Toast);
var qs = require('qs');
const state = {
loading:false,
brandMapData:[],
indexList:[],
//品牌列表
loadStatus:false,
p:1,
offset: 10,//每页条数
totalLimit:0,//总条数
listData:[],
finished:false,
brandDetail:""
}
const mutations = {
skuList(state, payload) {
payload.data.goods_list=Object.values(payload.data.goods_list)
//处理数据的数组
if(state.p==1){
state.listData=payload.data.goods_list;
}else{
state.listData = state.listData.concat(payload.data.goods_list);
}
// //计算总页码
state.totalLimit = Math.ceil(Number(payload.data.total) / state.offset);
//判断数据是否加载完成
if (state.p>= state.totalLimit) {
state.finished = true;
}else{
state.finished = false;
}
console.log(state.listData)
}
}
const actions = {
brandList({commit},payload){
state.loading=true;
var params = {
brand_area: payload.brand_area
}
Services.brandList(qs.stringify(params)).then((res) => {
state.loading=false;
let data = res.data.data.BrandList;
state.brandMapData=[];
state.indexList=[];
if (data.err_code == 0) {
state.brandMapData=data.data;
for(var key in state.brandMapData){
state.indexList.push(key)
}
}else {
Toast({
message: data.err_msg,
duration: 3000
});
}
}).catch(function (err) {
state.loading = false;
});
},
brandInfo({commit},payload){
state.loading=true;
var params = {
brand_id: payload.brand_id
}
Services.brandInfo(params).then((res) => {
state.loading=false;
let data = res.data.data
if (data.err_code == 0) {
state.brandDetail=data.data;
}else {
Toast({
message: data.err_msg,
duration: 3000
});
}
}).catch(function (err) {
state.loading = false;
});
},
skuList({commit}, payload) {
state.loadStatus = true;
state.p=payload.p;
state.offset=payload.offset;
let params={
'stock/sr':payload['stock/sr'],
'brand_id/condition':payload['brand_id/condition'],
p:payload.p,
offset:payload.offset
}
if(payload['stock/order']){
params['stock/order']=payload['stock/order']
}
if(payload['single_price/order']){
params['single_price/order']=payload['single_price/order']
}
let params1= Util.getParams(params);
Services.skuList(params1).then((res) => {
let data = res.data;
state.loadStatus = false;
if (data.err_code == 0) {
commit({
type: 'skuList',
data: data.data
});
}
}).catch(function (err) {
state.loadStatus = false;
});
}
}
const getters = {}
export default {
state,
mutations,
actions,
getters
}
......@@ -22,6 +22,7 @@ import gooddetail from './modules/gooddetail/gooddetail'
import car from './modules/car/index'
import user from './modules/user/index'
import userInfo from './modules/user/userInfo'
import brand from './modules/brand/brand'
Vue.use(Vuex)
......@@ -49,6 +50,7 @@ export default new Vuex.Store({
gooddetail,
car,
user,
userInfo
userInfo,
brand
}
})
......@@ -69,13 +69,10 @@ export default {
qwertyuiop: qwertyuiop,
Yo4teW_gid: Yo4teW_gid
}
var obj = Object.assign({}, as, params);
Object.keys(obj).forEach(function (value, index, array) {
abb.push(value);
});
abb = abb.sort();
abb.forEach(function (value, index, array) {
......@@ -98,7 +95,6 @@ export default {
asdfghjkl = hex_sha1(aggx);
var parameter = Object.assign({}, params, {asdfghjkl: asdfghjkl}, {qwertyuiop: qwertyuiop}, {pf: 2});
return qs.stringify(parameter);
},
......
<template>
<section class="brand">
<Header :title="title" :meaushow='meaushow' v-show="xiding"></Header>
<van-tabs @change="getData" v-show="xiding">
<van-tab v-for="item in tabs" :title="item.text" :brand_area="title.brand_area" >
</van-tab>
</van-tabs>
<!--索引分类-->
<van-index-bar :index-list="indexList" @select="indexSelect" :z-index="33">
<div class="data-box">
<div class="data-group" v-for="(item,index) in brandMapData">
<van-index-anchor :index="index" >{{index}}</van-index-anchor>
<ul class="data-content" :class="{'act11':index==selecto}">
<li v-for="item1 in item" class="van-hairline--bottom">
<a :href="'/h5/view/#/brandList/'+item1.brand_id">
<img v-if="item1.brand_logo" :src="item1.brand_logo||'https://static.ichunt.com/dist/res/home/images/logo.png'" class="brand_img" alt="item1.brand_name">
<div v-else class="brand_img"></div>
<p class="brand_name" title="ATMEL">{{item1.brand_name}}</p>
</a>
</li>
</ul>
</div>
</div>
</van-index-bar>
<van-loading type="spinner" color="#000" class="loading-background" v-if="loading"/>
</section>
</template>
<script>
import Vue from 'vue';
import {mapState} from 'vuex'
import { IndexBar, IndexAnchor ,Tab, Tabs,Loading} from 'vant';
import Header from '@/views/common/Header.vue';
Vue.use(IndexBar).use(IndexAnchor).use(Tab).use(Tabs).use(Loading);
export default {
name: 'brand',
data() {
return {
title:"品牌分类",
meaushow:true,
highlight:"red",
selecto:"",
xiding:true,
tabs:[
{brand_area:"",text:"全部"},
{brand_area:1,text:"欧美"},
{brand_area:2,text:"日韩"},
{brand_area:3,text:"台湾"},
{brand_area:4,text:"中国内地"}
],
}
},
computed: {
...mapState({
loading: state => state.brand.loading,
indexList:state=>state.brand.indexList,
brandMapData:state=>state.brand.brandMapData,
})
},
watch: {
},
created() {
this.getData();
},
mounted() {
this.scrollFns();
},
methods: {
getData(index){
var brand_area=index==0?"":index;
this.$store.dispatch({
type: 'brandList',
brand_area:brand_area
})
},
indexSelect(index){
this.selecto=index;
if(index){
this.xiding=false;
}else{
this.xiding=true;
}
},
scrollFns() {
var self=this;
window.onscroll= function(){
var ele=document.querySelector('div.van-index-anchor--sticky')
if(ele){
self.xiding=false;
}else{
self.xiding=true;
}
}
}
},
components: {
Header
}
}
</script>
<style scoped>
@import "../../assets/css/brand/brand.min.css";
</style>
\ No newline at end of file
<template>
<section class="brandList">
<addCarAlert></addCarAlert>
<Header :inputShow="true" :meaushow="true" @toSearch="toSearch"></Header>
<div class="brand_detail van-hairline--bottom">
<div class="brand_detail_box clr">
<img :src="brandDetail.brand_logo" class="brand_detail_img">
<ul class="brand_detail_block">
<li class="detail_name">品牌名称:{{brandDetail.brand_name}}</li>
<li class="main_brand">
<span>主营品牌:</span>
<span class="main_brand_text">{{brandDetail.main_product}}</span>
</li>
</ul>
</div>
<p class="brand_introduce ">{{brandDetail.brand_brief}}</p>
<ul class="rank_condition van-hairline--top-bottom">
<li class="overall_rank" @click="tab(1)" :class="{'act':type==1}">综合</li>
<li class="stock_rank " @click="tab(2)" :class="{'act':type==2}">库存
<div>
<template v-if="stockRank=='desc'">
<span class="rank_up rank_up_black "></span>
<span class="rank_down rank_down_red"></span>
</template>
<template v-else-if="stockRank=='asc'">
<span class="rank_up rank_up_red "></span>
<span class="rank_down rank_down_black "></span>
</template>
<template v-else>
<span class="rank_up rank_up_black "></span>
<span class="rank_down rank_down_black "></span>
</template>
</div>
</li>
<li class="price_rank" @click="tab(3)" :class="{'act':type==3}">价格
<div>
<template v-if="priceRank=='desc'">
<span class="rank_up rank_up_black "></span>
<span class="rank_down rank_down_red"></span>
</template>
<template v-else-if="priceRank=='asc'">
<span class="rank_up rank_up_red "></span>
<span class="rank_down rank_down_black "></span>
</template>
<template v-else>
<span class="rank_up rank_up_black "></span>
<span class="rank_down rank_down_black "></span>
</template>
</div>
</li>
<li class="stock_having stock_having_flag" @click="tab(4)">
<span class="noact " :class="{'act':stock=='gte,2'}"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;仅显示有货
</li>
</ul>
</div>
<div class="data-list-box">
<van-list v-model="loading1" :loading="loadStatus" :finished="finished"
finished-text="没有更多了" @load="onLoad" :immediate-check="false">
<GoodsOne :dataList="listData" @placeOrder="placeOrder"></GoodsOne>
</van-list>
</div>
<goodsDetail :detailsData="detailsData"></goodsDetail>
</section>
</template>
<script>
import Vue from 'vue';
import {mapState} from 'vuex'
import {List} from 'vant';
import Header from '@/views/common/Header.vue';
import GoodsOne from "@/views/common/GoodsOne.vue";
import goodsDetail from "@/views/common/goodsDetail.vue";
import addCarAlert from "@/views/common/addCarAlert";
Vue.use(List);
export default {
name: 'brandList',
data() {
return {
detailsData: { isShow: false, id: "" },
meaushow:true,
stockRank:"",
priceRank:"",
stock:"gte,0",
p:1,
loading1:false,
offset:10,
type:1,//排序选中 1 2 3
}
},
computed: {
...mapState({
loading: state => state.brand.loading,
listData: state => state.brand.listData,
finished: state => state.brand.finished,
loadStatus: state => state.brand.loadStatus,
brandDetail: state => state.brand.brandDetail,
totalLimit: state => state.brand.totalLimit,
isShowAlert: state => state.gooddetail.isShowAlert
})
},
watch: {
isShowAlert(now) {
if (now) {
this.detailsData = { isShow: false, id: "" };
this.$store.dispatch({
type: "cartCount"
});
}
},
loadStatus(val) {
this.loading1=val;
}
},
created() {
this.$store.dispatch({
type: 'brandInfo',
brand_id:this.$route.params.brand_id,
})
this.getData();
},
methods: {
getData(){
this.$store.dispatch({
type: 'skuList',
'stock/order':this.stockRank,
'single_price/order':this.priceRank,
'stock/sr':this.stock,
'brand_id/condition':this.$route.params.brand_id,
p:this.p,
offset:this.offset
})
},
tab(type){
if(type!=4){
this.type=type;
}
if(type==1){
//综合排序
this.stockRank="";
this.priceRank="";
}else if(type==2){
this.priceRank="";
if(this.stockRank=='desc'){
this.stockRank="asc"
}else{
this.stockRank="desc"
}
}else if(type==3){
this.stockRank="";
if(this.priceRank=='desc'){
this.priceRank="asc"
}else{
this.priceRank="desc"
}
}else{
if(this.stock=="gte,0"){
this.stock="gte,2"
}else{
this.stock="gte,0"
}
}
this.p=1;
this.getData();
},
onLoad() {
if (this.p < this.totalLimit) {
this.p++;
this.getData();
}
},
placeOrder(id) {
this.detailsData = {
isShow: true,
id: id
};
},
toSearch() {
window.location.href = "/v3/search/search_index.html?ptag=lxshop-topnav";
}
},
components: {
Header,
GoodsOne,
goodsDetail,
addCarAlert
}
}
</script>
<style scoped>
@import "../../assets/css/brand/brandList.min.css";
</style>
\ No newline at end of file
......@@ -129,7 +129,7 @@
<template v-else>
<p class="mui-col-sm-4 mui-col-xs-4" v-html="itemPrice.purchases+'+'"></p>
<p class="mui-col-sm-4 mui-col-xs-4">{{itemPrice.price_cn}}</p>
<p class="mui-col-sm-4 mui-col-xs-4">${{itemPrice.price_us}}</p>
<p class="mui-col-sm-4 mui-col-xs-4">{{!itemPrice.price_us?'- -':'$'+itemPrice.price_us}}</p>
</template>
</div>
</div>
......
......@@ -41,7 +41,7 @@ export default {
.addCarAlert {
.backdrop {
position: fixed;
z-index: 4;
z-index: 12;
top: 0;
right: 0;
bottom: 0;
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -27,7 +27,7 @@
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js" type="text/javascript" charset="utf-8"></script>
<script src="//szh5static.ichunt.com/static/js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
<script src="//szh5static.ichunt.com/static/js/shence.min.js" type="text/javascript" charset="utf-8"></script>
<link href="//szh5static.ichunt.com/0.js" rel="prefetch"><link href="//szh5static.ichunt.com/1.js" rel="prefetch"><link href="//szh5static.ichunt.com/10.js" rel="prefetch"><link href="//szh5static.ichunt.com/11.js" rel="prefetch"><link href="//szh5static.ichunt.com/12.js" rel="prefetch"><link href="//szh5static.ichunt.com/13.js" rel="prefetch"><link href="//szh5static.ichunt.com/14.js" rel="prefetch"><link href="//szh5static.ichunt.com/15.js" rel="prefetch"><link href="//szh5static.ichunt.com/16.js" rel="prefetch"><link href="//szh5static.ichunt.com/17.js" rel="prefetch"><link href="//szh5static.ichunt.com/18.js" rel="prefetch"><link href="//szh5static.ichunt.com/19.js" rel="prefetch"><link href="//szh5static.ichunt.com/2.js" rel="prefetch"><link href="//szh5static.ichunt.com/20.js" rel="prefetch"><link href="//szh5static.ichunt.com/21.js" rel="prefetch"><link href="//szh5static.ichunt.com/22.js" rel="prefetch"><link href="//szh5static.ichunt.com/23.js" rel="prefetch"><link href="//szh5static.ichunt.com/24.js" rel="prefetch"><link href="//szh5static.ichunt.com/25.js" rel="prefetch"><link href="//szh5static.ichunt.com/26.js" rel="prefetch"><link href="//szh5static.ichunt.com/27.js" rel="prefetch"><link href="//szh5static.ichunt.com/28.js" rel="prefetch"><link href="//szh5static.ichunt.com/29.js" rel="prefetch"><link href="//szh5static.ichunt.com/3.js" rel="prefetch"><link href="//szh5static.ichunt.com/30.js" rel="prefetch"><link href="//szh5static.ichunt.com/31.js" rel="prefetch"><link href="//szh5static.ichunt.com/32.js" rel="prefetch"><link href="//szh5static.ichunt.com/33.js" rel="prefetch"><link href="//szh5static.ichunt.com/34.js" rel="prefetch"><link href="//szh5static.ichunt.com/35.js" rel="prefetch"><link href="//szh5static.ichunt.com/36.js" rel="prefetch"><link href="//szh5static.ichunt.com/37.js" rel="prefetch"><link href="//szh5static.ichunt.com/38.js" rel="prefetch"><link href="//szh5static.ichunt.com/39.js" rel="prefetch"><link href="//szh5static.ichunt.com/4.js" rel="prefetch"><link href="//szh5static.ichunt.com/5.js" rel="prefetch"><link href="//szh5static.ichunt.com/6.js" rel="prefetch"><link href="//szh5static.ichunt.com/7.js" rel="prefetch"><link href="//szh5static.ichunt.com/8.js" rel="prefetch"><link href="//szh5static.ichunt.com/9.js" rel="prefetch"><link href="//szh5static.ichunt.com/app.js" rel="preload" as="script"></head>
<link href="//szh5static.ichunt.com/0.js" rel="prefetch"><link href="//szh5static.ichunt.com/1.js" rel="prefetch"><link href="//szh5static.ichunt.com/10.js" rel="prefetch"><link href="//szh5static.ichunt.com/11.js" rel="prefetch"><link href="//szh5static.ichunt.com/12.js" rel="prefetch"><link href="//szh5static.ichunt.com/13.js" rel="prefetch"><link href="//szh5static.ichunt.com/14.js" rel="prefetch"><link href="//szh5static.ichunt.com/15.js" rel="prefetch"><link href="//szh5static.ichunt.com/16.js" rel="prefetch"><link href="//szh5static.ichunt.com/17.js" rel="prefetch"><link href="//szh5static.ichunt.com/18.js" rel="prefetch"><link href="//szh5static.ichunt.com/19.js" rel="prefetch"><link href="//szh5static.ichunt.com/2.js" rel="prefetch"><link href="//szh5static.ichunt.com/20.js" rel="prefetch"><link href="//szh5static.ichunt.com/21.js" rel="prefetch"><link href="//szh5static.ichunt.com/22.js" rel="prefetch"><link href="//szh5static.ichunt.com/23.js" rel="prefetch"><link href="//szh5static.ichunt.com/24.js" rel="prefetch"><link href="//szh5static.ichunt.com/25.js" rel="prefetch"><link href="//szh5static.ichunt.com/26.js" rel="prefetch"><link href="//szh5static.ichunt.com/27.js" rel="prefetch"><link href="//szh5static.ichunt.com/28.js" rel="prefetch"><link href="//szh5static.ichunt.com/29.js" rel="prefetch"><link href="//szh5static.ichunt.com/3.js" rel="prefetch"><link href="//szh5static.ichunt.com/30.js" rel="prefetch"><link href="//szh5static.ichunt.com/31.js" rel="prefetch"><link href="//szh5static.ichunt.com/32.js" rel="prefetch"><link href="//szh5static.ichunt.com/33.js" rel="prefetch"><link href="//szh5static.ichunt.com/34.js" rel="prefetch"><link href="//szh5static.ichunt.com/35.js" rel="prefetch"><link href="//szh5static.ichunt.com/36.js" rel="prefetch"><link href="//szh5static.ichunt.com/37.js" rel="prefetch"><link href="//szh5static.ichunt.com/38.js" rel="prefetch"><link href="//szh5static.ichunt.com/39.js" rel="prefetch"><link href="//szh5static.ichunt.com/4.js" rel="prefetch"><link href="//szh5static.ichunt.com/40.js" rel="prefetch"><link href="//szh5static.ichunt.com/41.js" rel="prefetch"><link href="//szh5static.ichunt.com/5.js" rel="prefetch"><link href="//szh5static.ichunt.com/6.js" rel="prefetch"><link href="//szh5static.ichunt.com/7.js" rel="prefetch"><link href="//szh5static.ichunt.com/8.js" rel="prefetch"><link href="//szh5static.ichunt.com/9.js" rel="prefetch"><link href="//szh5static.ichunt.com/app.js" rel="preload" as="script"></head>
<body class="boxsiz">
<noscript>
<strong>网站出现了一点小问题,正在紧急修复中.......</strong>
......
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