Commit c696c83c by 梁建民

css

parent 7175e41b
......@@ -29,9 +29,9 @@ export const productionUrlApi = urlApi;
export const apis = {
/**
* 商城数据获取
* 首页
*/
getPointPrize: productionUrlApi + 'point/getPointPrize',
index: productionUrlApi + 'index',
/**
* 获取购物车数量
*/
......@@ -40,8 +40,8 @@ export const apis = {
}
export const services = {
getPointPrize(params) {
return axios.get(apis.getPointPrize, {
index(params) {
return axios.get(apis.index, {
params: {
data: params
}
......
......@@ -2,18 +2,31 @@ import axios from 'axios'
import {services as Services} from '../../api/index'
const state = {
appindex: {}
index: {}
}
const mutations = {
appIndex(state, payload) {
index(state, payload) {
state.index = payload.data;
}
}
const actions = {
appIndex({commit}, payload) {
index({commit}, payload) {
Services.index().then(function (res) {
let data = res.data;
if (data.err_code == 0) {
commit({
type: 'index',
data: data.data
});
}
}).catch(function (err) {
Toast({
message: '网络出现问题,请重试',
duration: 1500
});
});
}
}
......
......@@ -45,9 +45,9 @@
cartCount: state => state.common.cartCount
}),
created() {
this.$store.dispatch({
/*this.$store.dispatch({
type: 'cartCount'
})
})*/
}
}
</script>
\ No newline at end of file
<template>
<van-swipe :autoplay="3000000" indicator-color="#ffffff" :loop="false">
<van-swipe-item>
<img src="../../assets/images/home/banner.png" alt="" class="slide-pic">
</van-swipe-item>
<van-swipe-item>
<img src="../../assets/images/home/banner.png" alt="" class="slide-pic">
</van-swipe-item>
<template v-if="slidedata">
<van-swipe-item v-for="(item, index) in slidedata" :key="index">
<img :src="item.images" class="slide-pic">
</van-swipe-item>
</template>
<template v-else>
<van-swipe-item>
<img src="../../assets/images/home/banner.png" class="slide-pic">
</van-swipe-item>
</template>
</van-swipe>
</template>
......@@ -16,13 +20,8 @@
Vue.use(Swipe).use(SwipeItem);
export default {
name: 'slide',
data() {
return {
images: [
'https://img.yzcdn.cn/1.jpg',
'https://img.yzcdn.cn/2.jpg'
]
}
props: {
slidedata: Array
}
}
</script>
......
......@@ -4,7 +4,7 @@
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<div class="head boxsiz">
<div class="banner boxsiz">
<Slide></Slide>
<Slide :slidedata="index.rollbanner"></Slide>
</div>
<div class="login-wrap">
<a href="/v3/login?ptag=index-topnav" class="btn" style="display: none">登录</a>
......@@ -37,350 +37,135 @@
</div>
<div class="tab-content boxsiz">
<ul class="boxsiz">
<li>
<a href="">
<img src="../../assets/images/home/nav-1.png" alt="">
<p>关于我们</p>
</a>
</li>
<li>
<a href="">
<img src="../../assets/images/home/nav-2.png" alt="">
<p>自营现货</p>
</a>
</li>
<li>
<a href="">
<img src="../../assets/images/home/nav-3.png" alt="">
<p>联营商场</p>
</a>
</li>
<li>
<a href="">
<img src="../../assets/images/home/nav-4.png" alt="">
<p>积分商城</p>
</a>
</li>
<li>
<a href="">
<img src="../../assets/images/home/nav-5.png" alt="">
<p>平台入驻</p>
</a>
</li>
<li>
<a href="">
<img src="../../assets/images/home/nav-6.png" alt="">
<p>SMT工厂</p>
</a>
</li>
<li>
<a href="">
<img src="../../assets/images/home/nav-7.png" alt="">
<p>PCB快板</p>
</a>
</li>
<li>
<a href="">
<img src="../../assets/images/home/nav-8.png" alt="">
<p>资讯中心</p>
<li v-for="(item,index) in index.business_entry">
<a :href="item.url" :target="item.window_open > 0 ?'_blank':'_self'">
<img :src="item.images" alt="">
<p>{{item.title}}</p>
</a>
</li>
</ul>
</div>
<div class="content boxsiz">
<div class="selfshop boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">自营现货</span>
<span class="t2 va-b">海量商品 正品低价</span>
</div>
<a class="r">
<span class="va-m">更多</span>
<i class="lineBlock va-m"></i>
</a>
</div>
<ul class="boxsiz list">
<li class="boxsiz">
<a href="javascript:;">
<img src="../../assets/images/home/pic-1.png" alt="">
<div class="text">
<p class="t1">贴片电阻1111111111</p>
<p class="t2">
<span class="l">¥ 0.17089</span>
<span class="r">抢购</span>
</p>
<p class="t3">¥ 0.26089</p>
<template v-for="(item,index) in index.template">
<!--自营现货-->
<template v-if="item.class == 'temp2'">
<div class="selfshop boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">{{item.tem_name}}</span>
<span class="t2 va-b">{{item.ad_words}}</span>
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;">
<img src="../../assets/images/home/pic-1.png" alt="">
<div class="text">
<p class="t1">贴片电阻1111111111</p>
<p class="t2">
<span class="l">¥ 0.17089</span>
<span class="r">抢购</span>
</p>
<p class="t3">¥ 0.26089</p>
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;">
<img src="../../assets/images/home/pic-1.png" alt="">
<div class="text">
<p class="t1">贴片电阻1111111111</p>
<p class="t2">
<span class="l">¥ 0.17089</span>
<span class="r">抢购</span>
</p>
<p class="t3">¥ 0.26089</p>
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;">
<img src="../../assets/images/home/pic-1.png" alt="">
<div class="text">
<p class="t1">贴片电阻1111111111</p>
<p class="t2">
<span class="l">¥ 0.17089</span>
<span class="r">抢购</span>
</p>
<p class="t3">¥ 0.26089</p>
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;">
<img src="../../assets/images/home/pic-1.png" alt="">
<div class="text">
<p class="t1">贴片电阻1111111111</p>
<p class="t2">
<span class="l">¥ 0.17089</span>
<span class="r">抢购</span>
</p>
<p class="t3">¥ 0.26089</p>
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;">
<img src="../../assets/images/home/pic-1.png" alt="">
<div class="text">
<p class="t1">贴片电阻1111111111</p>
<p class="t2">
<span class="l">¥ 0.17089</span>
<span class="r">抢购</span>
</p>
<p class="t3">¥ 0.26089</p>
</div>
</a>
</li>
</ul>
</div>
<div class="lxshop boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">联营现货</span>
<span class="t2 va-b">一片起订 3小时发货</span>
<template v-if="item.link_words">
<a class="r" :href="item.url">
<span class="va-m">{{item.link_words}}</span>
<i class="lineBlock va-m"></i>
</a>
</template>
</div>
<ul class="boxsiz list">
<li class="boxsiz" v-for="(v,index) in item.data.tempGoods" :key="index">
<a href="javascript:;">
<img src="../../assets/images/home/pic-1.png" alt="">
<div class="text">
<p class="t1">{{v.goods_name}}</p>
<p class="t2">
<span class="l">{{v.price_ac}}</span>
<span class="r">抢购</span>
</p>
<p class="t3">{{v.price}}</p>
</div>
</a>
</li>
</ul>
</div>
<a class="r">
<span class="va-m">更多</span>
<i class="lineBlock va-m"></i>
</a>
</div>
<ul class="boxsiz list">
<li class="boxsiz">
<a href="javascript:;" class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-2.png" alt="">
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;" class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-2.png" alt="">
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;" class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-2.png" alt="">
</template>
<!--联营-->
<template v-else-if="item.class == 'temp1'">
<div class="lxshop boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">{{item.tem_name}}</span>
<span class="t2 va-b">{{item.ad_words}}</span>
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;" class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-2.png" alt="">
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;" class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-2.png" alt="">
</div>
</a>
</li>
<li class="boxsiz">
<a href="javascript:;" class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-2.png" alt="">
</div>
</a>
</li>
</ul>
</div>
<div class="pcb boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">自营现货</span>
<span class="t2 va-b">海量商品 正品低价</span>
</div>
<a class="r">
<span class="va-m">更多</span>
<i class="lineBlock va-m"></i>
</a>
</div>
<ul class="list boxsiz">
<li class="boxsiz">
<a class="boxsiz" href="">
<img src="../../assets/images/home/banner-1.png" alt="">
</a>
</li>
</ul>
</div>
<div class="smt boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">SMT工厂</span>
<span class="t2 va-b">整合多家传统SMT贴片OEM工厂</span>
</div>
<a class="r">
<span class="va-m">更多</span>
<i class="lineBlock va-m"></i>
</a>
</div>
<ul class="list boxsiz">
<li class="boxsiz">
<a class="boxsiz" href="">
<img src="../../assets/images/home/banner-2.png" alt="">
</a>
</li>
</ul>
</div>
<div class="jfshop boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">积分商城</span>
<span class="t2 va-b">积分商城火热上线 EM工厂</span>
<template v-if="item.link_words">
<a class="r" :href="item.url">
<span class="va-m">{{item.link_words}}</span>
<i class="lineBlock va-m"></i>
</a>
</template>
</div>
<ul class="boxsiz list">
<li class="boxsiz" v-for="(v,index) in item.data.brandImages" :key="index">
<a :href="v.url" class="boxsiz">
<div class="pic">
<img :src="v.images" :alt="v.title">
</div>
</a>
</li>
</ul>
</div>
<a class="r">
<span class="va-m">更多</span>
<i class="lineBlock va-m"></i>
</a>
</div>
<ul class="list boxsiz">
<li class="boxsiz">
<a class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-3.png" alt="">
</template>
<!--积分商城-->
<template v-else-if="item.class == 'temp3'">
<div class="jfshop boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">{{item.tem_name}}</span>
<span class="t2 va-b">{{item.ad_words}}</span>
</div>
<p class="t1">Apple/苹果 iPad Pro 1</p>
<p class="t2">
<i class="va-m lineBlock"></i>
<em>45124578</em>
</p>
</a>
</li>
<li class="boxsiz">
<a class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-3.png" alt="">
</div>
<p class="t1">Apple/苹果 iPad Pro 1</p>
<p class="t2">
<i class="va-m lineBlock"></i>
<em>45124578</em>
</p>
</a>
</li>
<li class="boxsiz">
<a class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-3.png" alt="">
</div>
<p class="t1">Apple/苹果 iPad Pro 1</p>
<p class="t2">
<i class="va-m lineBlock"></i>
<em>45124578</em>
</p>
</a>
</li>
<li class="boxsiz">
<a class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-3.png" alt="">
</div>
<p class="t1">Apple/苹果 iPad Pro 1</p>
<p class="t2">
<i class="va-m lineBlock"></i>
<em>45124578</em>
</p>
</a>
</li>
</ul>
</div>
<div class="scm boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">进口报关</span>
<span class="t2 va-b">快速 安全 透明 低收费</span>
<template v-if="item.link_words">
<a class="r" :href="item.url">
<span class="va-m">{{item.link_words}}</span>
<i class="lineBlock va-m"></i>
</a>
</template>
</div>
<ul class="list boxsiz">
<li class="boxsiz" v-for="(v,index) in item.data.pointGoods" :key="index">
<a class="boxsiz">
<div class="pic">
<img :src="v.prize_img_url" :alt="v.prize_name">
</div>
<p class="t1">{{v.prize_name}}</p>
<p class="t2">
<i class="va-m lineBlock"></i>
<em>{{v.prize_point}}</em>
</p>
</a>
</li>
</ul>
</div>
<a class="r">
<span class="va-m">更多</span>
<i class="lineBlock va-m"></i>
</a>
</div>
<ul class="list boxsiz">
<li class="boxsiz">
<a class="boxsiz" href="">
<img src="../../assets/images/home/banner-3.png" alt="">
</a>
</li>
</ul>
</div>
<div class="supplier boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">平台入驻</span>
<span class="t2 va-b">诚邀合作供应商</span>
</template>
<!--PCB打板 SMT云工厂 进口报关 平台入驻-->
<template v-else-if="item.class == 'temp4'">
<div class="pcb boxsiz">
<div class="tit boxsiz">
<div class="l">
<i class="lineBlock va-b"></i>
<span class="t1 va-b">{{item.tem_name}}</span>
<span class="t2 va-b">{{item.ad_words}}</span>
</div>
<template v-if="item.link_words">
<a class="r" :href="item.url">
<span class="va-m">{{item.link_words}}</span>
<i class="lineBlock va-m"></i>
</a>
</template>
</div>
<ul class="list boxsiz">
<li class="boxsiz" v-for="(v,index) in item.data.tempImages" :key="index">
<a class="boxsiz" href="v.url">
<img :src="v.images" :alt="v.title">
</a>
</li>
</ul>
</div>
<a class="r">
<span class="va-m">更多</span>
<i class="lineBlock va-m"></i>
</a>
</div>
<ul class="list boxsiz">
<li class="boxsiz">
<a class="boxsiz" href="">
<img src="../../assets/images/home/banner-4.png" alt="">
</a>
</li>
</ul>
</div>
</template>
</template>
<!--资讯中心-->
<div class="news boxsiz">
<div class="tit boxsiz">
<div class="l">
......@@ -393,69 +178,20 @@
</a>
</div>
<ul class="list boxsiz">
<li class="boxsiz">
<a class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-4.png" alt="">
</div>
<div class="text">
<p class="t1">吕家璈:中国半导体代工部分最难,看好IC设计和封装看好IC设计和封装看好IC设计和封装 </p>
<div class="t2">
<span>来源:21世纪电源网</span>
<div>
<i class="ico lineBlock va-m"></i>
<em class="va-m">242424</em>
</div>
</div>
</div>
</a>
</li>
<li class="boxsiz">
<a class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-4.png" alt="">
</div>
<div class="text">
<p class="t1">吕家璈:中国半导体代工部分最难,看好IC设计和封装看好IC设计和封装看好IC设计和封装 </p>
<div class="t2">
<span>来源:21世纪电源网</span>
<div>
<i class="ico lineBlock va-m"></i>
<em class="va-m">242424</em>
</div>
</div>
</div>
</a>
</li>
<li class="boxsiz">
<a class="boxsiz">
<li class="boxsiz" v-for="item in index.footer_new_article" :key="item.art_id">
<a class="boxsiz" :href="'/article/'+item.art_id+'.html?ptag='+ptag+'-dynamic'">
<div class="pic">
<img src="../../assets/images/home/pic-4.png" alt="">
<img :src="item.litpic">
</div>
<div class="text">
<p class="t1">吕家璈:中国半导体代工部分最难,看好IC设计和封装看好IC设计和封装看好IC设计和封装 </p>
<p class="t1">{{item.title_seo}}</p>
<div class="t2">
<span>来源:21世纪电源网</span>
<span>来源:{{item.writer}}</span>
<div>
<i class="ico lineBlock va-m"></i>
<em class="va-m">242424</em>
</div>
</div>
</div>
</a>
</li>
<li class="boxsiz">
<a class="boxsiz">
<div class="pic">
<img src="../../assets/images/home/pic-4.png" alt="">
</div>
<div class="text">
<p class="t1">吕家璈:中国半导体代工部分最难,看好IC设计和封装看好IC设计和封装看好IC设计和封装 </p>
<div class="t2">
<span>来源:21世纪电源网</span>
<div>
<i class="ico lineBlock va-m"></i>
<em class="va-m">242424</em>
<em class="va-m">
{{parseInt(item.click)+parseInt(item.start_review)}}
</em>
</div>
</div>
</div>
......@@ -473,6 +209,7 @@
<script>
import Vue from 'vue';
import {mapState} from 'vuex'
import {PullRefresh} from 'vant';
import Navigator from '@/views/common/Navigator.vue';
import Slide from '@/views/common/Slide.vue';
......@@ -481,6 +218,9 @@
export default {
name: 'index',
computed: mapState({
index: state => state.home.index
}),
data() {
return {
ptag: 'index',
......@@ -489,7 +229,9 @@
}
},
created() {
this.$store.dispatch({
type: 'index'
})
},
methods: {
onRefresh() {
......@@ -734,13 +476,9 @@
justify-content: space-between;
li {
padding: 0.16rem 0.133rem 0.267rem 0.133rem;
flex: 1;
width: 32%;
background: #fff;
margin-right: 0.13rem;
margin-bottom: 0.13rem;
&:nth-of-type(3n) {
margin-right: 0;
}
a {
display: block;
img {
......@@ -936,7 +674,6 @@
a {
display: flex;
align-items: center;
justify-content: space-between;
.pic {
width: 115px;
height: 69px;
......
......@@ -2,7 +2,7 @@ module.exports = {
devServer: {
proxy: {
'/api': {
target: 'https://api.ichunt.com',
target: 'http://m.liexin.com',
changeOrigin: true,
ws: true,
pathRewrite: {
......
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