Commit d5954be2 by 施宇

Merge branch 'h5_zyly_vue_0517' of http://119.23.72.7/liangjianmin/h5 into h5_zyly_vue_0517

# Conflicts:
#	src/views/xianhuo/xianhuo.vue
parents 5fdb489e 15349a0f
......@@ -23,7 +23,7 @@ switch (window.location.hostname) {
urlApi = 'https://szapi.ichunt.com/';
url = 'https://szm.ichunt.com/v3/';
urlPc = 'https://sz.ichunt.com/v3/';
zyApi = 'https://tso.ichunt.com';
zyApi = 'https://szso.ichunt.com';
lyApi = 'https://szso.ichunt.com';
break;
case "tm.ichunt.com":
......@@ -31,14 +31,14 @@ switch (window.location.hostname) {
urlApi = 'https://api.ichunt.com/';
urlPc = 'https://t.ichunt.com/v3/';
zyApi = 'https://tso.ichunt.com';
lyApi = 'https://szso.ichunt.com';
lyApi = 'https://tso.ichunt.com';
break;
case "m.liexin.com":
url = 'http://m.liexin.com/v3/';
urlApi = 'http://api.liexin.com/';
urlPc = 'http://www.liexin.com/v3/';
zyApi = 'https://so12.ichunt.com';
lyApi = 'https://szso.ichunt.com';
zyApi = 'http://soso12.ichunt.com';
lyApi = 'http://soso12.ichunt.com';
break;
default:
//本地proxy配置参考vue.config.js
......
......@@ -170,7 +170,7 @@ $imgUrl: '../images/';
}
.backtop {
margin-top: 16px;
margin-top: 5px;
width: 1.053rem;
height: 1.053rem;
border-radius: 4px;
......@@ -178,14 +178,29 @@ $imgUrl: '../images/';
display: flex;
align-items: center;
justify-content: center;
color:#fff;
.icon-xiangshang1 {
color: #fff;
font-size: 28px;
}
}
.carslide{
position: relative;
.carNumx{
position: absolute;
right:2px; top:2px;
height:15px;
width: 15px;
background: red;
border-radius: 15px;
color:#fff;
font-weight: normal;
font-size: 12px;
text-align: center;
line-height: 15px;
}
}
}
/**客服模块**/
.kefu {
.t0 {
......@@ -238,99 +253,7 @@ $imgUrl: '../images/';
}
}
.celerity-nav {
position: fixed;
right: 0;
bottom: 100px;
z-index: 86;
display: block;
width: 40px;
text-align: center;
height: 40px;
dt {
position: relative;
z-index: 2;
width: 40px;
height: 40px;
text-align: center;
padding: 5px 0px;
opacity: .6;
background: #1080d0;
border-radius: 3px;
box-sizing: border-box;
&.show-dd {
right: 40px;
}
i {
font-size: 12px;
display: block;
float: left;
color: #fff;
width: 10px;
height: 40px;
line-height: 30px;
}
span {
font-size: 12px;
color: #fff;
width: 27px;
height: 30px;
padding-left: 2px;
line-height: 16px;
display: block;
float: left;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: distribute;
justify-content: space-around;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
}
dd {
position: absolute;
right: -160px;
z-index: 1;
top: -2px;
height: 45px;
text-align: center;
width: 135px;
opacity: 1;
background: #1080d0;
border-radius: 3px;
-webkit-transition: 0.8s ease-out;
transition: 0.8s ease-out;
p {
height: 45px;
padding-top: 3px;
width: 45px;
color: #fff;
float: left;
a {
display: block;
font-size: 12px;
color: #fff;
i {
display: block;
height: 20px;
line-height: 20px;
}
}
}
}
}
}
/**数字转码**/
font[class^="rowNum"]{
......
......@@ -6,14 +6,14 @@ import Util from "../../util"
Vue.use(Toast);
const state = {
cartCount: '',
cartCount: 0,
loginCheck: false,
phpParams: {}
}
const mutations = {
cartCount(state, payload) {
state.cartCount = payload.data == 0 ? '' : payload.data;
state.cartCount = payload.data ?payload.data : '';
},
loginCheck(state, payload) {
if (payload.data.err_code == 0) {
......@@ -35,10 +35,11 @@ const actions = {
cartCount({commit}, payload) {
Services.cartCount().then((res) => {
let data = res.data;
console.log(data)
if (data.err_code == 0) {
commit({
type: 'cartCount',
data: data.datacartCount
data: data.data
});
}
}).catch(function (err) {
......
......@@ -4,8 +4,12 @@
<div class="customer-service" @click="recordFn" v-if="kefuishow">
<i class="iconfont icon-kefu"></i>
</div>
<div class="backtop carslide" v-if="carshow">
<i class="iconfont icon-gouwuche1"></i>
<b class="carNumx">{{cartCount}}</b>
</div>
<template v-if="isWindow">
<div class="backtop" v-backTopWindow v-show="show">
<div class="backtop " v-backTopWindow v-show="show">
<i class="iconfont icon-xiangshang1"></i>
</div>
</template>
......@@ -14,37 +18,7 @@
<i class="iconfont icon-xiangshang1"></i>
</div>
</template>
<template v-if="fastNav">
<dl class="celerity-nav">
<dt class="celerity-but-z" @click="changFastNav">
<template v-if="!showFastNav">
<i class="icon iconfont icon-fanhui"></i>
<span>快速导航</span>
</template>
<template v-else>
<span>收起</span>
<i class="iconfont icon-jinru"></i>
</template>
</dt>
<dd :class="{'show-dd':showFastNav}">
<p>
<a href="/v3?ptag=search-rightnav">
<i class="icon iconfont icon-shouye1"></i>首页
</a>
</p>
<p>
<a href="/v3/joincart?ptag=search-rightnav">
<i class="icon iconfont icon-gouwuche-"></i>购物车
</a>
</p>
<p>
<a href="/v3/user?ptag=search-rightnav">
<i class="icon iconfont icon-wode-"></i>我的
</a>
</p>
</dd>
</dl>
</template>
</div>
<!--客服弹出框-->
<van-dialog
......@@ -93,13 +67,13 @@ export default {
type: Boolean, //是否展示客服
default: true
},
carshow: {
type: Boolean, //是否展示购物车
default: false
},
isWindow: {
type: Boolean, //是否开启windows监听
default: false
},
fastNav:{
type:Boolean,//是否展示快速导航
default:false
}
},
data() {
......@@ -112,7 +86,8 @@ export default {
};
},
computed: mapState({
phpParams: state => state.common.phpParams
phpParams: state => state.common.phpParams,
cartCount: state => state.common.cartCount
}),
mounted() {
if (this.isWindow) {
......
......@@ -50,6 +50,7 @@
</div>
</div>
<van-loading type="spinner" color="#000" class="loading-background" v-if="loading"/>
<SideBar :isWindow="isWindow" :carshow="carshow"></SideBar>
</section>
</template>
......@@ -60,12 +61,15 @@
import {Loading} from 'vant';
import Header from '@/views/common/Header.vue';
import GoodsOne from '@/views/common/GoodsOne.vue';
import SideBar from '@/views/common/SideBar.vue';
Vue.use(Loading);
export default {
name: 'news',
data() {
return {
carshow:true,
isWindow:true,
inputShow:true,
meaushow:true,
supplierShow:false,
......@@ -200,7 +204,8 @@
},
components: {
Header,
GoodsOne
GoodsOne,
SideBar
}
}
......
......@@ -156,6 +156,7 @@
</van-list>
</div>
</div>
<SideBar :isWindow="isWindow" :carshow="carshow"></SideBar>
<rightSelect
v-show="isShowRight"
:filterData="zyFilterData"
......@@ -190,8 +191,10 @@ export default {
},
data() {
return {
detailsData:{isShow:false,id:""},
isZy: true,
detailsData:{isShow:false,id:""},
isWindow:true,
carshow:true,
isZy:true,
zyFilterInit: -1,
zyRankInit: 0, //0综合 1库存多到少 2//库存少到多 3//价格高到低 4//价格低到高
classFilter: "",
......
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