Commit 8c59c171 by 肖康

x

parent 15349a0f
.car-page{
.lxBox{
.lyNav{
color:#333;
position: fixed;
left:0px;
top:44px;
right:0px;
height:44px;
border-bottom:1px solid #d6d7dc;
span{
cursor: pointer;
width:50%;
box-sizing: border-box;
font-size: 14px;
text-align: center;
line-height: 44px;
font{color:#333;}
&.act{
color:#1080d0;
}
}
}
.logintip{
top:88px;
}
.dataBox{
padding-top: 44px;
}
}
.zyBox{
.logintip{
top:44px;
}
.dataBox{
padding-top: 44px;
}
}
.logintip{
position: fixed;
background: #fff6e5;
height:44px;
line-height: 44px;
color:#666;
top:44px;
left:0px;
right: 0px;
font-size: 14px;
text-align: center;
a{
background: #e10601;
border-radius: 4px;
text-align: center;
width: 70px;
height: 23px;
color: #fff;
font-size: 12px;
display: inline-block;
line-height: 23px;
cursor: pointer;
margin-left: 10px;
}
}
.editBox{
position: fixed;
padding:0 3%;
height:44px;
line-height: 44px;
color:#666;
left:0px;
right: 0px;
font-size: 12px;
.remind{
color:#999;
i{color:#ffa200;position: relative;top:2px;left:5px;}
}
a{color:#1080d0;font-size: 14px;}
}
}
\ No newline at end of file
.car-page .lxBox .lyNav{color:#333;position:fixed;left:0px;top:44px;right:0px;height:44px;border-bottom:1px solid #d6d7dc}.car-page .lxBox .lyNav span{cursor:pointer;width:50%;box-sizing:border-box;font-size:14px;text-align:center;line-height:44px}.car-page .lxBox .lyNav span font{color:#333}.car-page .lxBox .lyNav span.act{color:#1080d0}.car-page .lxBox .logintip{top:88px}.car-page .lxBox .dataBox{padding-top:44px}.car-page .zyBox .logintip{top:44px}.car-page .zyBox .dataBox{padding-top:44px}.car-page .logintip{position:fixed;background:#fff6e5;height:44px;line-height:44px;color:#666;top:44px;left:0px;right:0px;font-size:14px;text-align:center}.car-page .logintip a{background:#e10601;border-radius:4px;text-align:center;width:70px;height:23px;color:#fff;font-size:12px;display:inline-block;line-height:23px;cursor:pointer;margin-left:10px}.car-page .editBox{position:fixed;padding:0 3%;height:44px;line-height:44px;color:#666;left:0px;right:0px;font-size:12px}.car-page .editBox .remind{color:#999}.car-page .editBox .remind i{color:#ffa200;position:relative;top:2px;left:5px}.car-page .editBox a{color:#1080d0;font-size:14px}
\ No newline at end of file
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,SACE,MAAK","file":"index.min.css"}
\ No newline at end of file
...@@ -68,8 +68,8 @@ axios.interceptors.request.use(function (config) { ...@@ -68,8 +68,8 @@ axios.interceptors.request.use(function (config) {
var Yo4teW_gid = Util.getCookie('Yo4teW_gid'); var Yo4teW_gid = Util.getCookie('Yo4teW_gid');
var timestmp = new Date().getTime()+Math.random(); var timestmp = new Date().getTime()+Math.random();
if (Yo4teW_gid == null) { if (Yo4teW_gid == null) {
var mdStr = md5(timestmp); // var mdStr = md5(timestmp);
Util.setCookie('Yo4teW_gid', mdStr, 1, window.cookieHostname); // Util.setCookie('Yo4teW_gid', mdStr, 1, window.cookieHostname);
} }
//微信授权 //微信授权
......
...@@ -32,6 +32,7 @@ const WalletRetrieve = resolve => require(['@/views/wallet/Retrieve'], resolve); ...@@ -32,6 +32,7 @@ const WalletRetrieve = resolve => require(['@/views/wallet/Retrieve'], resolve);
const WalletCashier = resolve => require(['@/views/wallet/Cashier'], resolve); const WalletCashier = resolve => require(['@/views/wallet/Cashier'], resolve);
const xianhuo = resolve => require(['@/views/xianhuo/xianhuo'], resolve); const xianhuo = resolve => require(['@/views/xianhuo/xianhuo'], resolve);
const lxshop = resolve => require(['@/views/lxshop/lxshop'], resolve); const lxshop = resolve => require(['@/views/lxshop/lxshop'], resolve);
const joincart = resolve => require(['@/views/car/car'], resolve);
Vue.use(Router); Vue.use(Router);
const routes = [{ const routes = [{
...@@ -263,6 +264,14 @@ const routes = [{ ...@@ -263,6 +264,14 @@ const routes = [{
} }
}, },
{ {
path: '/joincart',
component: joincart,
meta: {
title: '购物车'
}
},
{
path: '*', path: '*',
redirect: '/' redirect: '/'
} }
......
import Vue from 'vue'
import {Toast} from 'vant';
import {services as Services} from '../../../api/index'
Vue.use(Toast);
var qs = require('qs');
const state = {
loading:false
}
const mutations = {
}
const actions = {
chainSmsVerify({commit},payload){
state.loading=true;
state.formCodeStatus=false;
var params = {
verify: payload.verify,
mobile: payload.mobile
}
Services.smsVerify(qs.stringify(params)).then((res) => {
state.loading=false;
state.formImgShow=false;
let data = res.data;
if (data.err_code == 0) {
state.formCodeStatus=true;
Toast({
message: data.err_msg,
duration: 2000
});
}else if(data.err_code==23019||data.err_code==11008||data.err_code==11011){
Toast({
message: data.err_msg,
duration: 2000
});
state['formImgShow']=true;
}else {
Toast({
message: data.err_msg,
duration: 3000
});
}
}).catch(function (err) {
state.loading = false;
});
}
}
const getters = {}
export default {
state,
mutations,
actions,
getters
}
...@@ -18,6 +18,7 @@ import aboutus from './modules/aboutUs/index' ...@@ -18,6 +18,7 @@ import aboutus from './modules/aboutUs/index'
import chain from './modules/chain/chain' import chain from './modules/chain/chain'
import xianhuo from './modules/xianhuo/xianhuo' import xianhuo from './modules/xianhuo/xianhuo'
import lxshop from './modules/lxshop/lxshop' import lxshop from './modules/lxshop/lxshop'
import car from './modules/car/index'
Vue.use(Vuex) Vue.use(Vuex)
...@@ -41,6 +42,7 @@ export default new Vuex.Store({ ...@@ -41,6 +42,7 @@ export default new Vuex.Store({
aboutus, aboutus,
chain, chain,
xianhuo, xianhuo,
lxshop lxshop,
car
} }
}) })
<template>
<div class="car-page">
<Header :isCar="isCar" :meaushow="meaushow" :bgcolor="bgcolor" @listTab="listTab"></Header>
<div class="lxBox" v-show="type==1" :style="{'paddingTop':paddingTop+'px'}">
<div class="lyNav clr">
<span class="fl" :class="{'act':(delivery==1)}" @click="deliveryTab(1)">大陆交货(0)<font class="fr">|</font></span>
<span class="fl" :class="{'act':(delivery==2)}" @click="deliveryTab(2)">香港交货(0)</span>
</div>
<!--登录提示框-->
<div class="logintip" v-if="!isLogingo">
<span>登录后商品会同步到您账户中</span>
<a :href="loginUrl">登录</a>
</div>
<div class="dataBox">
<!--编辑-->
<div class="editBox clr" :style="{'top':(paddingTop+44)+'px'}">
<span class="remind fl">友情提醒<i class="iconfont icon-tishi" ></i></span>
<a href="javascript:void(0)" class="edit-btn fr">编辑</a>
</div>
<div class="dlBox" v-show="delivery==1">
国内数据
</div>
<div class="hkBox" v-show="delivery==2">
香港数据
</div>
</div>
</div>
<div class="zyBox" v-show="type==2" :style="{'paddingTop':(paddingTop-44)+'px'}">
<!--登录提示框-->
<div class="logintip" v-if="!isLogingo">
<span>登录后商品会同步到您账户中</span>
<a :href="loginUrl">登录</a>
</div>
<div class="dataBox">
<!--编辑-->
<div class="editBox clr" :style="{'top':paddingTop+'px'}">
<span class="remind fl">友情提醒<i class="iconfont icon-tishi" ></i></span>
<a href="javascript:void(0)" class="edit-btn fr">编辑</a>
</div>
自营数据
</div>
</div>
</div>
</template>
<script>
import Vue from 'vue';
import {mapState} from 'vuex'
import Header from "@/views/common/Header.vue";
import {Loading,Toast} from 'vant';
import Util from "../../util";
Vue.use(Loading).use(Toast);
export default {
name: "car",
data(){
return {
isCar:true,
meaushow:true,
bgcolor:"#fff",
loginUrl:'/v3/login?referer='+encodeURIComponent(window.location.href),//登录地址
type:1,//联营 1 //自营2
delivery:1,//大陆1 //香港2,
paddingTop:88,//控制登录提示条
isLogingo:Util.isLogin()==1?true:false,//强登录太
}
},
computed:{
},
created(){
this.loginTip();
},
watch:{
},
methods:{
loginTip:function(){
if(this.isLogingo){
this.paddingTop=44;
}else{
this.paddingTop=88;
}
},
listTab:function(type){
this.type=type;
// if(type==1){
//
// }else{
//
// }
console.log(type)
},
deliveryTab:function(delivery){
this.delivery=delivery;
}
},
components:{
Header
}
}
</script>
<style scoped>
@import "../../assets/css/car/index.min.css";
</style>
\ No newline at end of file
<template> <template>
<section class="head-dom"> <section class="head-dom">
<div class="header-page clr"> <div class="header-page clr" :style="{'background':bgcolor,'borderBottom':borderBottom}">
<i class="icon iconfont icon-xiangzuo fl" @click="historyback"></i> <i class="icon iconfont icon-xiangzuo fl" @click="historyback"></i>
<h3 class="title fl" v-if="!inputShow">{{title}}</h3> <div v-if="isCar">
<div class="search" v-else> <div class="car-title clr">
<span class="fl" :class="{'act':(type==1)}" @click="listTab(1)">联营(<font>0</font>)</span>
<span class="fl" :class="{'act':(type==2)}" @click="listTab(2)">自营(<font>0</font>)</span>
</div>
</div>
<div class="search" v-else-if="inputShow">
<van-icon name="search" size="18px" color="#666"/> <van-icon name="search" size="18px" color="#666"/>
<van-field placeholder="请输入元器件型号、参数,查找全站库存数据" @focus="toSearch"/> <van-field placeholder="请输入元器件型号、参数,查找全站库存数据" @focus="toSearch"/>
</div> </div>
<h3 class="title fl" v-else>{{title}}</h3>
<Menu v-if="meaushow" :color="color"></Menu> <Menu v-if="meaushow" :color="color"></Menu>
</div> </div>
</section> </section>
...@@ -21,6 +27,14 @@ export default { ...@@ -21,6 +27,14 @@ export default {
type: String, type: String,
default: "" default: ""
}, },
bgcolor:{
type: String,
default: "#f3f3f3"
},
isCar:{
type: Boolean,
default: false
},
inputShow: { inputShow: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -35,15 +49,27 @@ export default { ...@@ -35,15 +49,27 @@ export default {
} }
}, },
data() { data() {
return {}; return {
type:1,//自营2 //联营1,
borderBottom:"0px"
};
}, },
mounted() {}, mounted() {},
created(){
if(this.bgcolor=="#fff"){
this.borderBottom="1px solid #d6d7dc"
}
},
methods: { methods: {
historyback: function() { historyback: function() {
history.go(-1); history.go(-1);
}, },
toSearch(){ toSearch(){
this.$emit('toSearch') this.$emit('toSearch')
},
listTab(type){
this.type=type;
this.$emit('listTab',type)
} }
}, },
components: { components: {
...@@ -59,14 +85,34 @@ export default { ...@@ -59,14 +85,34 @@ export default {
padding-top: 44px; padding-top: 44px;
.header-page { .header-page {
border-bottom:1px solid #d6d7dc;
height: 44px; height: 44px;
width: 100%; width: 100%;
padding: 0 0.2rem; padding: 0 0.2rem;
position: fixed; position: fixed;
z-index: 998; z-index: 3;
top: 0; top: 0;
background: #f3f3f3; .car-title{
width:170px;
position: fixed;
top:0px;
left:50%;
margin-left:-85px;
span{
cursor: pointer;
width:80px;
height:44px;
line-height: 44px;
text-align: center;
font-size: 18px;
&.act{
color:#1080d0;
border-bottom:2px solid #1080d0;
height:42px;
}
font{color:#1080d0;}
}
}
i { i {
font-size: 18px; font-size: 18px;
margin-top: 13px; margin-top: 13px;
......
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