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) { ...@@ -23,7 +23,7 @@ switch (window.location.hostname) {
urlApi = 'https://szapi.ichunt.com/'; urlApi = 'https://szapi.ichunt.com/';
url = 'https://szm.ichunt.com/v3/'; url = 'https://szm.ichunt.com/v3/';
urlPc = 'https://sz.ichunt.com/v3/'; urlPc = 'https://sz.ichunt.com/v3/';
zyApi = 'https://tso.ichunt.com'; zyApi = 'https://szso.ichunt.com';
lyApi = 'https://szso.ichunt.com'; lyApi = 'https://szso.ichunt.com';
break; break;
case "tm.ichunt.com": case "tm.ichunt.com":
...@@ -31,14 +31,14 @@ switch (window.location.hostname) { ...@@ -31,14 +31,14 @@ switch (window.location.hostname) {
urlApi = 'https://api.ichunt.com/'; urlApi = 'https://api.ichunt.com/';
urlPc = 'https://t.ichunt.com/v3/'; urlPc = 'https://t.ichunt.com/v3/';
zyApi = 'https://tso.ichunt.com'; zyApi = 'https://tso.ichunt.com';
lyApi = 'https://szso.ichunt.com'; lyApi = 'https://tso.ichunt.com';
break; break;
case "m.liexin.com": case "m.liexin.com":
url = 'http://m.liexin.com/v3/'; url = 'http://m.liexin.com/v3/';
urlApi = 'http://api.liexin.com/'; urlApi = 'http://api.liexin.com/';
urlPc = 'http://www.liexin.com/v3/'; urlPc = 'http://www.liexin.com/v3/';
zyApi = 'https://so12.ichunt.com'; zyApi = 'http://soso12.ichunt.com';
lyApi = 'https://szso.ichunt.com'; lyApi = 'http://soso12.ichunt.com';
break; break;
default: default:
//本地proxy配置参考vue.config.js //本地proxy配置参考vue.config.js
......
...@@ -170,7 +170,7 @@ $imgUrl: '../images/'; ...@@ -170,7 +170,7 @@ $imgUrl: '../images/';
} }
.backtop { .backtop {
margin-top: 16px; margin-top: 5px;
width: 1.053rem; width: 1.053rem;
height: 1.053rem; height: 1.053rem;
border-radius: 4px; border-radius: 4px;
...@@ -178,14 +178,29 @@ $imgUrl: '../images/'; ...@@ -178,14 +178,29 @@ $imgUrl: '../images/';
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color:#fff;
.icon-xiangshang1 { .icon-xiangshang1 {
color: #fff; color: #fff;
font-size: 28px; 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 { .kefu {
.t0 { .t0 {
...@@ -238,99 +253,7 @@ $imgUrl: '../images/'; ...@@ -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"]{ font[class^="rowNum"]{
......
...@@ -6,14 +6,14 @@ import Util from "../../util" ...@@ -6,14 +6,14 @@ import Util from "../../util"
Vue.use(Toast); Vue.use(Toast);
const state = { const state = {
cartCount: '', cartCount: 0,
loginCheck: false, loginCheck: false,
phpParams: {} phpParams: {}
} }
const mutations = { const mutations = {
cartCount(state, payload) { cartCount(state, payload) {
state.cartCount = payload.data == 0 ? '' : payload.data; state.cartCount = payload.data ?payload.data : '';
}, },
loginCheck(state, payload) { loginCheck(state, payload) {
if (payload.data.err_code == 0) { if (payload.data.err_code == 0) {
...@@ -35,10 +35,11 @@ const actions = { ...@@ -35,10 +35,11 @@ const actions = {
cartCount({commit}, payload) { cartCount({commit}, payload) {
Services.cartCount().then((res) => { Services.cartCount().then((res) => {
let data = res.data; let data = res.data;
console.log(data)
if (data.err_code == 0) { if (data.err_code == 0) {
commit({ commit({
type: 'cartCount', type: 'cartCount',
data: data.datacartCount data: data.data
}); });
} }
}).catch(function (err) { }).catch(function (err) {
......
...@@ -4,8 +4,12 @@ ...@@ -4,8 +4,12 @@
<div class="customer-service" @click="recordFn" v-if="kefuishow"> <div class="customer-service" @click="recordFn" v-if="kefuishow">
<i class="iconfont icon-kefu"></i> <i class="iconfont icon-kefu"></i>
</div> </div>
<div class="backtop carslide" v-if="carshow">
<i class="iconfont icon-gouwuche1"></i>
<b class="carNumx">{{cartCount}}</b>
</div>
<template v-if="isWindow"> <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> <i class="iconfont icon-xiangshang1"></i>
</div> </div>
</template> </template>
...@@ -14,37 +18,7 @@ ...@@ -14,37 +18,7 @@
<i class="iconfont icon-xiangshang1"></i> <i class="iconfont icon-xiangshang1"></i>
</div> </div>
</template> </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> </div>
<!--客服弹出框--> <!--客服弹出框-->
<van-dialog <van-dialog
...@@ -93,13 +67,13 @@ export default { ...@@ -93,13 +67,13 @@ export default {
type: Boolean, //是否展示客服 type: Boolean, //是否展示客服
default: true default: true
}, },
carshow: {
type: Boolean, //是否展示购物车
default: false
},
isWindow: { isWindow: {
type: Boolean, //是否开启windows监听 type: Boolean, //是否开启windows监听
default: false default: false
},
fastNav:{
type:Boolean,//是否展示快速导航
default:false
} }
}, },
data() { data() {
...@@ -112,7 +86,8 @@ export default { ...@@ -112,7 +86,8 @@ export default {
}; };
}, },
computed: mapState({ computed: mapState({
phpParams: state => state.common.phpParams phpParams: state => state.common.phpParams,
cartCount: state => state.common.cartCount
}), }),
mounted() { mounted() {
if (this.isWindow) { if (this.isWindow) {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
</div> </div>
</div> </div>
<van-loading type="spinner" color="#000" class="loading-background" v-if="loading"/> <van-loading type="spinner" color="#000" class="loading-background" v-if="loading"/>
<SideBar :isWindow="isWindow" :carshow="carshow"></SideBar>
</section> </section>
</template> </template>
...@@ -60,12 +61,15 @@ ...@@ -60,12 +61,15 @@
import {Loading} from 'vant'; import {Loading} from 'vant';
import Header from '@/views/common/Header.vue'; import Header from '@/views/common/Header.vue';
import GoodsOne from '@/views/common/GoodsOne.vue'; import GoodsOne from '@/views/common/GoodsOne.vue';
import SideBar from '@/views/common/SideBar.vue';
Vue.use(Loading); Vue.use(Loading);
export default { export default {
name: 'news', name: 'news',
data() { data() {
return { return {
carshow:true,
isWindow:true,
inputShow:true, inputShow:true,
meaushow:true, meaushow:true,
supplierShow:false, supplierShow:false,
...@@ -200,7 +204,8 @@ ...@@ -200,7 +204,8 @@
}, },
components: { components: {
Header, Header,
GoodsOne GoodsOne,
SideBar
} }
} }
......
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
</van-list> </van-list>
</div> </div>
</div> </div>
<SideBar :isWindow="isWindow" :carshow="carshow"></SideBar>
<rightSelect <rightSelect
v-show="isShowRight" v-show="isShowRight"
:filterData="zyFilterData" :filterData="zyFilterData"
...@@ -190,8 +191,10 @@ export default { ...@@ -190,8 +191,10 @@ export default {
}, },
data() { data() {
return { return {
detailsData:{isShow:false,id:""}, detailsData:{isShow:false,id:""},
isZy: true, isWindow:true,
carshow:true,
isZy:true,
zyFilterInit: -1, zyFilterInit: -1,
zyRankInit: 0, //0综合 1库存多到少 2//库存少到多 3//价格高到低 4//价格低到高 zyRankInit: 0, //0综合 1库存多到少 2//库存少到多 3//价格高到低 4//价格低到高
classFilter: "", 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