!76 2022-1-22 Leung

Merge pull request !76 from Admin/sit-Leung
This commit is contained in:
Admin 2022-01-22 07:24:57 +00:00 committed by Gitee
commit c1bf773be0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
21 changed files with 755 additions and 729 deletions

View File

@ -178,7 +178,7 @@ export const useredit = (mobile, pet,address) => {
// return fetch('h5/brand/query', data, 'POST' )
// }
//点击商品全部信息
export const userquery = (stype) => {
export const userquery = (stype, ) => {
console.log(stype);
var data = {
@ -187,13 +187,20 @@ export const userquery = (stype) => {
}
return fetch('goods?petType='+stype, data, 'POST' )
}
//商品全部信息
export const userque = (stype) => {
console.log(stype);
//处方信息
export const userque = (stype, curPage,curRow) => {
if(!curPage)
curPage=1;
if(!curRow)
curRow=10;
let queryTail='page='+curPage+'&rows='+curRow;
if(stype)
queryTail = '?stype='+queryTail+'&'+queryTail;
else
queryTail = '?'+queryTail;
var data = {
}
return fetch('goods', data, 'POST' )
return fetch('goods'+queryTail, data, 'POST' )
}

View File

@ -19,10 +19,9 @@
}
.rc {
height: 64px;
display: flex;
align-items: center;
margin-left: 23px;
margin-left: 1rem;
span {
display: block;
margin-left: 32px;
@ -184,7 +183,6 @@ margin-top: 8px;
height: 96px;
display: flex;
align-items: center;
margin-left: 23px;
justify-content: center;
span {
display: block;

View File

@ -4,7 +4,12 @@ body {
line-height: 1.5;
color: #666;
}
.rc-menu--xs .rc-screen-reader{
left:28%;
}
.ts-login--xs .rc-screen-reader{
left:12%;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
@ -38,6 +43,35 @@ body {
top: 0;
}
}
input[type=checkbox]{
position:relative;
cursor: pointer;
border:none;
border: 1px solid #d7d7d7;
border-radius: 3px;
width: 1.5rem;
height: 1.5rem;
&:before {
top: 0;
left: 0;
content: "";
width: 1.5rem;
height: 1.5rem;
position: absolute;
display: inline-block;
background-color: #fff;
background-image: url("../image/rc-select.png");
background-size: contain;
}
&:checked:before {
background-image: url("../image/rc-unselect.png");
}
}
label {
input[type=checkbox] {
top:.375rem;
}
}
.userloding {
background: url(../image/onloading.png) center center no-repeat;
@ -146,13 +180,13 @@ picture {
font-size: 1.125rem;
margin-top: .5rem;
display: block;
min-height:1.6rem;
}
}
}
img {
width: 10rem;
height: 10rem;
img{
width:10rem;
//min-height:19.875rem;
object-fit: contain;
display: flex;
margin: 0 auto;
@ -281,9 +315,8 @@ picture {
background: #FFFFFF;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
border-radius: .25rem;
z-index: 3;
ul {
z-index:11;
ul{
width: 60px;
height: 181px;
background-color: white;
@ -370,9 +403,17 @@ picture {
html {
//font-size:100px;
}
.rc-md-up {
display: none !important;
label {
input[type=checkbox] {
top:.25rem;
}
}
.rc-header__nav--primary{
overflow:hidden;
}
.ts-login--xs .rc-screen-reader{
left:7%;
top:22%;
}
.rc-main {
@ -484,16 +525,11 @@ picture {
.ts-product-list {
text-align: left;
//display:block;
display: flex;
li {
max-width: 20rem;
min-width: 18.75rem;
width: 22.8vw;
//margin-right:.875rem;
margin-left: 2vw;
padding-left: 1px;
padding-right: 1px;
display:flex;
li{
max-width:20rem;
min-width:18.75rem;
width:22.8vw;
box-sizing: border-box;
.rc-column {
@ -690,17 +726,9 @@ picture {
display: none !important;
}
}
@media screen and (min-width: 769px) and (max-width: 1370px) {
.ts-product-list {
display: flex;
//justify-content: space-between;
li {
margin-left: 0;
margin-right: 0;
}
}
@media screen and (min-width: 769px) and (max-width: 1370px)
{
}
.rc_contline {

View File

@ -46,8 +46,8 @@
.uservideo{
overflow: hidden;
video{
height:100%;
width:auto;
width:100%;
height:auto;
}
}
.ul-dog{
@ -179,50 +179,43 @@
display: none;
}
#xxxFullScreen {
background-color: white;
margin-top: 0.40rem;
#swiper1 {
overflow: hidden;
}
.swiper-container{
height: 6.45rem;
}
.swiper-container, .swiper-container2 {
width: 100%;
// overflow: visible !important;
height: 100%;
position: relative;
}
#swiper1 .swiper-container .swiper-wrapper .swiper-slide {
width: 17.25rem;
//height: 6.45rem !important; //Auto adaption
}
/* 上一张 */
#swiper1 .swiper-container .swiper-wrapper .swiper-slide-prev {
margin-top: 0.05rem;
height: 100%;
}
/* 下一张 */
#swiper1 .swiper-container .swiper-wrapper .swiper-slide-next {
margin-top: 0.05rem;
height: 100%;
}
.swiper-container .swiper-wrapper .swiper-slide-active {
height: 100%;
}
.uservideo{
width: 100%;
height:auto;
display: block;
video{
max-width:100%;
max-height:100%;
background-color: white;
margin-top: 0.40rem;
.swiper-container{
height: 6.45rem;
}
.swiper-container {
width: 100%;
height: 100%;
position: relative;
}
.swiper-container .swiper-wrapper .swiper-slide {
width: 17.25rem;
//height: 6.45rem !important; //Auto adaption
}
/* 上一张 */
swiper-container .swiper-wrapper .swiper-slide-prev {
margin-top: 0.05rem;
height: 100%;
}
/* 下一张 */
.swiper-container .swiper-wrapper .swiper-slide-next {
margin-top: 0.05rem;
height: 100%;
}
.swiper-container .swiper-wrapper .swiper-slide-active {
height: 100%;
}
.uservideo{
width: 100%;
height:auto;
display: block;
video{
max-width:100%;
max-height:100%;
}
}
}
}
.sw-center{
width: 100%;
@ -476,7 +469,7 @@
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 这里是超出几行省略 */
-webkit-line-clamp: 2;
color: #666666;
margin-top: 0.16rem;
text-align: center;

View File

@ -40,8 +40,7 @@ span{
li{
float: left;
width: 30%;
position:relative;
}
li:after{
// height: 2px;
@ -49,8 +48,9 @@ span{
// display: block;
content:"|";
color: #707070;
margin-left: 5px;
position:absolute;
top:0;
right:0;
}
li:last-child:after{
content:"";
@ -126,10 +126,7 @@ span{
}
}
}
.rc-usermain{
width: 92%;
margin: 0 auto;
margin-top: 60px;
.rc-max-width--xl{
ul{
height: 64px;
@ -158,9 +155,9 @@ border-radius: 3px 3px 0px 0px;
font-style: normal;
display: block;
height: 48px;
margin-top: 16px;
display: flex;
border: 1px solid #D7D7D7;
border-top:0;
// justify-content: space-between;
align-items: center;
color: #666666;

View File

@ -120,20 +120,19 @@
margin: 0 auto;
}
.rc-button {
font-size: 14px;
width:335px;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
color: #333333;
}
.rc-button span {
border-bottom: 1px solid #333333;
font-size: 14px;
width:335px;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
color: #333333;
}
.rc-button span {
margin-left: 20px;
margin-top: 24px;
border-bottom: 1px solid #333333;
padding-bottom:.5rem;
}
.rc-button span:last-child {
margin-right: 20px;
@ -142,7 +141,7 @@
}
}
// /* 最小768px最大1920 *pc端/
@media screen and (min-width: 768px) and (max-width: 1920px) {
@media screen and (min-width: 769px) {
.usecheck{
display: flex;
text-align: left;
@ -232,7 +231,6 @@ margin-top: 24px;
}
.rc-button {
.rc-styled-link{
padding-bottom:3px;
border-bottom:1px solid #333;
&:hover{
border-bottom:1px solid #e2001a;

View File

@ -2,12 +2,22 @@ ul li ol li em strong i {
list-style: none;
font-style: normal;
}
.rc-header {
width: 100%;
}
.rc-center{
overflow:hidden;
}
.rc-title{
img{
width: 96px;
height: 96px;
margin:0 auto;
}
}
.userer{
img{
margin-left:auto;
margin-right:auto;
}
}
//手机端
@media screen and (max-width: 768px) {
.ts-mypersonal{
@ -45,13 +55,6 @@ ul li ol li em strong i {
color:#333333;
font-size: 26px;
}
.rc-title{
img{
width: 96px;
height: 96px;
}
}
.userer{
img{
width: 210px;
@ -246,10 +249,10 @@ ul li ol li em strong i {
//pc端
@media screen and (min-width: 769px) {
/deep/.el-dialog {
width: 440px;
height: 652px;
}
/deep/.el-dialog {
width: 440px;
height: 652px;
}
.ts-mypersonal{
margin-left:0;
.rc-column{

View File

@ -0,0 +1,208 @@
ul li ol li em strong i {
list-style: none;
font-style: normal;
}
/deep/.van-swipe__indicator--active{
background:#E2001A;
}
//手机端
@media screen and (max-width: 768px) {
.rc-main {
margin: 0 auto;
overflow: hidden;
.rc-center {
width: 100%;
height: 180px;
img {
width: 100%;
height: 100%;
display: block;
}
}
.rc-userorder{
display: flex;
align-items: center;
height: 100%;
}
.rc-order{
padding: 16px 0 16px 0 ;
width: 100%;
display: flex;
align-items: center;
font-size: 14px;
color: #333333;
font-weight: 500;
border-bottom: 1px solid #D8D8D8;
margin-top: 22px;
}
.rc-cordd{
color:#666666;
font-size: 14px;
margin-top: 16px;
span{
display: block;
margin-top: 16px;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.usermember{
width: 100%;
height: 80px;
border-bottom: 1px solid #D8D8D8;
display: flex;
align-items: center;
padding-left:0;
padding-bottom:0;
.rc-image{
height: 100%;
display: flex;
align-items: center;
}
img{
width: 3rem;
height: 3rem;
display: block;
object-fit: contain;
}
em{
font-style: normal;
font-size: 16px;
display: block;
margin-left:3vw;
font-weight: bold;
color: #531c1c;
width:4.25rem;
}
span{
color: #666666;
font-size: 14px;
margin-left: 3vw;
width: 51vw;
}
}
}
}
@media screen and (min-width: 769px) {
.rc-main {
.rc-center {
width: 100%;
height: 180px;
display: none;
img {
width: 100%;
height: 100%;
display: block;
}
}
.rc-order{
padding: 16px 0 16px 0 ;
width: 100%;
display: flex;
align-items: center;
font-size: 26px;
color: #333333;
font-weight: 500;
}
.rc-cordd{
color:#666666;
margin-top: 16px;
span{
display: block;
margin-top: 16px;
font-size: 16px;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.usermember{
min-width:14.5rem;
max-width:16.75rem;
width:16vw;
height: 10rem;
border: 1px solid #D7D7D7;
margin-top: 5rem;
margin-left: .75rem;
.rc-image{
float: right;
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
}
img{
width: 5rem;
height: 5rem;
display: block;
}
em{
font-style: normal;
font-size: 1.25rem;
display: block;
font-weight: 500;
color: #333333;
}
span{
color: #999999;
font-size: .875rem;
}
}
.rc-userorder{
width: 60%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
span{
margin-top: .5rem;
}
}
}
}

View File

@ -0,0 +1,106 @@
<template>
<div class="rc-fixright" >
<ul >
<li v-for="(userfixed,index) in fixedlist" :key="index" @click="lianxi(userfixed,index)">
<img :src="userfixed.catimage" alt="">
<span> {{userfixed.title}}</span>
</li>
</ul>
<div class="tuntop" @click="toTop" v-show="gotop">
<img src="../assets/image/turntop.png" alt="">
<span>回到顶部</span>
</div>
</div>
</template>
<script>
export default {
data(){
return{
gotop: false,
loginornot:false,
fixedlist: [
{
title: "购物车",
catimage: require("../assets/buy.png"),
},
{
title: "在线客服",
catimage: require("../assets/service.png"),
},
{
title: "营养专家",
catimage: require("../assets/consult.png"),
}
]
}
},
methods:{
lianxi(item,index){
if(item.title=='在线客服'){
var option = {
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
}
dis_livchat(option);
}
if(item.title=='购物车'){
if(this.loginornot){
this.$router.push({
path: "/userlogin/login",
});
} else {
this.$router.push({
path: "/myorder/userrecord",
});
}
}
if(item.title=='营养专家'){
var option = {
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
}
dis_livchat(option);
}
},
toTop() {
let top = document.documentElement.scrollTop || document.body.scrollTop;
//
const timeTop = setInterval(() => {
document.body.scrollTop = document.documentElement.scrollTop = top -= 400;
if (top <= 0) {
clearInterval(timeTop);
}
}, 10);
},
handleScroll() {
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
if(scrolltop>400)
{
this.gotop = true
}
else
{
this.gotop = false
}
}
},
mounted(){
//Check login
let usernot=JSON.parse(localStorage.getItem("userInfo"));
//console.log(usernot);
if(usernot==null ||usernot==undefined){
this.loginornot=true
}else{
this.loginornot=false
this.usermessage=usernot;
}
//Check login end
window.addEventListener("scroll", this.handleScroll, true);
}
}
</script>
<style lang="less" scoped >
</style>

View File

@ -6,6 +6,7 @@
<li class="rc-list__item rc-xl-down">
<button class="rc-btn rc-btn--icon-label rc-icon rc-menu--xs rc-iconography rc-md-up" data-modal-trigger="main-nav-modal" aria-label="Menu" role="menuitem">
菜单
<em class="rc-screen-reader" v-show="loginornot"></em>
</button>
<button class="rc-btn rc-btn--icon rc-icon rc-menu--xs rc-iconography rc-md-down" data-js-trigger="mobile-push-nav" aria-label="Menu" role="menuitem">
<span class="rc-screen-reader-text">
@ -41,14 +42,11 @@
</div>
</a>
<a class="rc-md-up rc-btn rc-btn--icon rc-icon ts-login--xs rc-iconography rc-interactive" aria-label="login" @click="turnlogin">
<a class="rc-xl-up rc-btn rc-btn--icon rc-icon ts-login--xs rc-iconography rc-interactive" aria-label="login" @click="turnlogin">
<span class="rc-screen-reader-text">
登录
</span>
<em class="rc-screen-reader" v-show="loginornot">
</em>
<em class="rc-screen-reader" v-show="loginornot"></em>
</a>
<!--
@ -305,6 +303,12 @@
<div class="rc-column rc-padding-x--none">
<ul class="rc-list rc-list--blank rc-list--align rc-btn-offset--top" role="menu">
<li class="rc-list__item">
<a class="rc-list__link rc-icon ts-login--xs rc-iconography--xs" role="menuitem" href="javascript:void();" @click="turnlogin">
个人中心
<em class="rc-screen-reader"></em>
</a>
</li>
<li class="rc-list__item">
<a class="rc-list__link rc-icon rc-email--xs rc-iconography--xs" role="menuitem" href="https://royalcanin.com.cn/about/contact">
与我们联系
@ -342,6 +346,7 @@
</div>
</template>
<script>
import { mapMutations } from "vuex";
export default {
data() {
return {
@ -354,13 +359,12 @@ export default {
},
mounted() {
//
let usernot=JSON.parse(localStorage.getItem("userInfo"));
let usernot=this.checkIsLogin();
//console.log(usernot);
if(usernot==null ||usernot==undefined){
console.log(usernot);
this.loginornot=true
if(usernot){
this.loginornot=true
}else{
this.loginornot=false
this.loginornot=false
this.usermessage=usernot;
}
//debugger;
@ -386,6 +390,7 @@ export default {
},
methods: {
...mapMutations(["checkIsLogin"]),
refreshDesktopNav:function(){
RCDL.navigation.currentState=null;
RCDL.navigation.rebuild();
@ -430,6 +435,5 @@ export default {
</script>
<style lang="less" scoped>
@import url("../assets/css/global.less");
</style>

View File

@ -56,7 +56,7 @@
<a href="/productdetails/productlist/?stype=0" class="rc-list__link" data-ref="nav-link" role="menuitem">猫系列</a>
</li>
<li class="rc-list__item">
<a href="/productdetails/productlist/?style=1" class="rc-list__link" data-ref="nav-link" role="menuitem">狗系列</a>
<a href="/productdetails/productlist/?stype=1" class="rc-list__link" data-ref="nav-link" role="menuitem">狗系列</a>
</li>
</ul>
</li>

View File

@ -6,7 +6,7 @@
<div class="ts-banner-swiper-container">
<swiper :options="headerSwiperOption">
<swiper-slide>
<a href="#" target="_blank">
<a href="/" target="_blank">
<picture>
<source media="(max-width: 768px)" srcset="/images/banner/one.jpg">
<source media="(min-width: 769px)" srcset="/images/banner/pc-banner1.png">
@ -16,7 +16,7 @@
</swiper-slide>
<swiper-slide>
<a href="#" target="_blank">
<a href="/" target="_blank">
<picture>
<source media="(max-width: 768px)" srcset="/images/banner/two.jpg">
<source media="(min-width: 769px)" srcset="/images/banner/pc-banner2.png">
@ -26,7 +26,7 @@
</swiper-slide>
<swiper-slide>
<a href="#" target="_blank">
<a href="/" target="_blank">
<picture>
<source media="(max-width: 768px)" srcset="/images/banner/three.jpg">
<source media="(min-width: 769px)" srcset="/images/banner/pc-banner3.png">
@ -36,7 +36,7 @@
</swiper-slide>
<swiper-slide>
<a href="#" target="_blank">
<a href="/" target="_blank">
<picture>
<source media="(max-width: 768px)" srcset="/images/banner/four.jpg">
<source media="(min-width: 769px)" srcset="/images/banner/pc-banner4.png">
@ -93,7 +93,7 @@
<span>{{item.title}}</span>
<p>{{item.detail}}</p>
<em>{{item.price}}</em>
<strong class="ts-standard-btn ts-standard-btn--two center" @click="userbuy(item,index)">立即购买</strong>
<strong class="ts-standard-btn ts-standard-btn--two center" @click="selectproduce(item,index)">立即购买</strong>
</div>
</div>
<div class="sw-center" >
@ -110,7 +110,7 @@
<em>{{item.price}}</em>
</div>
<div class="rc-full-width rc-margin-y--md">
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
</div>
</div>
</swiper-slide>
@ -327,7 +327,7 @@
<span>{{item.title}}</span>
<p>{{item.detail}}</p>
<em>{{item.price}}</em>
<strong class="ts-standard-btn ts-standard-btn--two center" @click="userbuy(item,index)">立即购买</strong>
<strong class="ts-standard-btn ts-standard-btn--two center" @click="selectproduce(item,index)">立即购买</strong>
</div>
</div>
<div class="sw-center" >
@ -344,7 +344,7 @@
<em>{{item.price}}</em>
</div>
<div class="rc-full-width rc-margin-y--md">
<i @click="userbuy(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
</div>
</div>
@ -600,12 +600,12 @@
<li v-for="(item,index) in processinformation" :key="index" class="rc-margin-top--md rc-padding-bottom--lg">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
<div class="rc-rccontair">
<img :src="`${usersetting}/${item.picFile}`">
<img :src="`${item.picture}`">
</div>
</div>
<div class="rc-column">
<div class="rc-click" @click="selectproduce(item,index)">
<span>{{item.productName}}</span>
<span>{{item.name}}</span>
</div>
</div>
</li>
@ -726,29 +726,19 @@
</nuxt-link>
</div> -->
<div class="rc-fixright" >
<ul >
<li v-for="(userfixed,index) in fixedlist" :key="index" @click="lianxi(userfixed,index)">
<img :src="userfixed.catimage" alt="">
<span> {{userfixed.title}}</span>
</li>
</ul>
<div class="tuntop" @click="toTop" v-show="gotop">
<img src="../assets/image/turntop.png" alt="">
<span>回到顶部</span>
</div>
</div>
<FixRight></FixRight>
<div v-if="!dataLoaded" class="ts-mask">
<div class="ts-mask-bg"></div>
<div class="userloding"></div>
<span>数据加载中</span>
</div>
<Myfooter v-on:litentop='showmesg'></Myfooter>
<Myfooter></Myfooter>
</div>
</template>
<script>
let vm=null;
import Myheader from "~/components/header.vue";
import FixRight from "~/components/fixed-right.vue";
import Myfooter from "~/components/rc-footer.vue";
import unlogin from "~/components/unlogin.vue";
import { userquery,postCourseId,biaomessage,userque,searchchanpin } from "../ajax/getData";
@ -762,6 +752,7 @@
fixedHeader:false,
dataLoaded:true,
useraindex:0,
usertitle:'明星猫粮',
dogtitle:'明星犬粮',
processinformation:[],
@ -961,7 +952,12 @@
catimage: "/images/cat/one.jpg",
productimage: "/images/cat/star-1.png",
detail:'为10柔软细腻慕斯 适合离乳期幼猫舔食',
price:'¥77',
price:'¥372',
productList:[
{
productCode : "80240008F24"
}
]
},
{
title: "幼猫成长专属",
@ -969,7 +965,12 @@
catimage: "/images/cat/two.jpg",
productimage: "/images/cat/star-2.png",
detail:'支持幼猫自身保护力 为快速生长提供足够能量',
price:'¥147',
price:'¥33',
productList:[
{
productCode : "20030040"
}
]
},
{
title: "室内成猫专属",
@ -977,7 +978,12 @@
catimage: "/images/cat/three.jpg",
productimage: "/images/cat/star-3.png",
detail:'高易消化蛋白 减少粪便量和异味',
price:'¥140',
price:'¥157',
productList:[
{
productCode : "21100200"
}
]
},
{
title: "英短成猫专属",
@ -985,7 +991,12 @@
catimage: "/images/cat/four.jpg",
productimage: "/images/cat/star-4.png",
detail:'增强肌肉质量 支持骨骼与关节健康',
price:'¥183',
price:'¥402',
productList:[
{
productCode : "23040450"
}
]
},
],
@ -997,103 +1008,62 @@
catimage: "/images/dog/one.jpg",
productimage: "/images/dog/star-1.png",
detail:'柔软细腻慕斯 适合离乳期幼犬舔食',
price:'¥77',
price:'¥359',
productList:[
{
productCode : "81220020F12"
}
]
},
{
title: "贵宾成犬专属",
video:"/images/dog/two.mp4",
catimage: "/images/dog/two.jpg",
productimage: "/images/cat/star-2.png",
productimage: "/images/dog/star-2.png",
detail:'护肤靓毛 理想体态',
price:'¥241',
price:'¥562',
productList:[
{
productCode : "14200300"
}
]
},
{
title: "小型犬成犬专属",
video:"/images/dog/three.mp4",
catimage: "/images/dog/three.jpg",
productimage: "/images/cat/star-3.png",
productimage: "/images/dog/star-3.png",
detail:'亮泽被毛 呵护牙齿',
price:'¥121',
price:'¥57',
productList:[
{
productCode : "16020080"
}
]
},
{
title: "离乳期全价奶糕",
video:"/images/dog/four.mp4",
catimage: "/images/dog/four.jpg",
productimage: "/images/cat/star-4.png",
productimage: "/images/dog/star-4.png",
detail:'高易再水合颗粒 帮助增强保护健康成长',
price:'¥88',
price:'¥263',
productList:[
{
productCode : "17220400"
}
]
},
],
fixedlist: [
{
title: "购物车",
catimage: require("../assets/buy.png"),
},
{
title: "在线客服",
catimage: require("../assets/service.png"),
},
{
title: "营养专家",
catimage: require("../assets/consult.png"),
},
],
rccontair: [
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
ordernum: 1,
catimage: require("../assets/image/rc-cat.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
ordernum: "2",
catimage: require("../assets/image/rc-cat.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
ordernum: "2",
catimage: require("../assets/image/rc-cat.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
ordernum: "2",
catimage: require("../assets/image/rc-cat.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
ordernum: "2",
catimage: require("../assets/image/rc-dog.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
ordernum: "2",
catimage: require("../assets/image/rc-dog.png"),
},
// {
// title: "湿",
// price:'123.45',
// ordernum: "2",
// catimage: require("../assets/image/rc-dog.png"),
// },
// {
// title: "湿",
// price:'123.45',
// ordernum: "2",
// catimage: require("../assets/image/rc-dog.png"),
// },
],
rccontair: [
{
title: "",
price:'',
ordernum: 1,
catimage: "",
},
],
headerSwiperOption: {
loop: true,
@ -1176,6 +1146,7 @@
Myheader,
Myfooter,
unlogin,
FixRight
// userswiper
},
created(){
@ -1219,7 +1190,7 @@
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
console.log("当前是电脑打开")
//console.log("")
this.stypechange=false;
//console.log(this.usertitle)
@ -1235,7 +1206,7 @@
}
else
{
console.log("当前是手机打开")
//console.log("")
this.showingBanners=this.banners.mobile;
this.stypechange=true;
this.onemao=true;
@ -1463,9 +1434,6 @@
this.processinformation=this.chufanlist
}
},
showmesg(){
this.toTop();
},
handleScroll(e)
{
let fixedCatbarSeperator = document.getElementById("fixed-catbar-seperator");
@ -1487,16 +1455,6 @@
this.searchBar=true
}
},
toTop() {
let top = document.documentElement.scrollTop || document.body.scrollTop;
//
const timeTop = setInterval(() => {
document.body.scrollTop = document.documentElement.scrollTop = top -= 400;
if (top <= 0) {
clearInterval(timeTop);
}
}, 10);
},
async courseId(item) {
this.dataLoaded=false;
let data = await postCourseId(this.productCode,1,this.usermessage.data.id,this.usermessage.data.mobile,item.picFile,item.name,item.basePrice,item.specifications);
@ -1637,29 +1595,6 @@
}
this.catmessage(this.userserachlist,'Shi')
},
lianxi(item,index){
if(item.title=='在线客服'){
var option = {
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
}
dis_livchat(option);
}
if(item.title=='购物车'){
this.$router.push({
path: "/myorder/userrecord",
});
}
if(item.title=='营养专家'){
var option = {
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
}
dis_livchat(option);
}
},
userbuy(item){
let user= localStorage.getItem("userInfo");
this.courseId(item)

View File

@ -6,7 +6,7 @@
<div class="rc-top"></div>
<div class="rc-usermain">
<div class="rc">
<div class="rc rc-column">
<span
v-for="(item, index) in discountlist"
:key="index"
@ -83,71 +83,6 @@ export default {
starttime: "2021.11.29-2022.01.28",
catimage: require("../../assets/image/unused.png"),
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
catimage: require("../../assets/image/unused.png"),
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
catimage: require("../../assets/image/unused.png"),
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
},
{
price: "30",
pricestype: "新客优惠券",
special: "全场每满299-30",
period: "有效期",
starttime: "2021.11.29-2022.01.28",
},
],
discountlist: [
{

View File

@ -1,8 +1,8 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-usermain ">
<div class="rc-top"></div>
<div class="rc-max-width--xl rc-padding-y--md">
<ul>
<li v-for="(item,index) in userrecord" :key="index">
{{item.title}}
@ -20,13 +20,13 @@
</div>
<div class="rc-button">
<!-- <div class="rc-button">
<div class="rc-order">
<span>积分兑换</span>
</div>
</div>
</div> -->
</div>
</template>
@ -115,6 +115,4 @@ export default {
<style lang="less" scoped>
@import url("../../assets/css/integral.less");
</style>

View File

@ -99,6 +99,10 @@
</div>
</div>
<div class="online bold"></div>
<div class="ts-btn" v-if="!islogin">
<div class="ts-standard-btn center" @click="logout">退出登录</div>
</div>
</div>
</div>
@ -108,8 +112,8 @@
:before-close="handleClose"
@open="open"
>
<div class="rc-header">
<div class="rc-title">
<div class="rc-full-width rc-max-width--xl rc-text--center">
<div class="rc-title rc-text--center rc-margin-bottom--md">
<img src="../../assets/error.png" alt="">
</div>
<div class="rc-logmain">
@ -119,8 +123,7 @@
</div>
<div class="userer">
<img src="../../assets/image/rc-discount.png" alt="">
<img src="/images/qrcode-aichong.jpg" alt="" class="rc-margin-y--xs">
<span>微信扫一扫识别二维码</span>
</div>
</div>
@ -129,7 +132,7 @@
</el-dialog>
<FixRight></FixRight>
<MyFooter></MyFooter>
</div>
@ -140,7 +143,9 @@
<script>
import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue'
import FixRight from "~/components/fixed-right.vue";
import tabs from "@/components/tabs.vue";
import { mapMutations } from "vuex";
export default {
middleware: 'metaTitle',
// middleware: 'metaTitle',
@ -150,7 +155,7 @@ export default {
userlog:false,
islogin:false,
dialogInfo1:false,
userid:null,
userid:null,
usertitle:'',
rcvalue:5000,
usermessage:'关注皇家爱宠荟,修改个人资料',
@ -204,30 +209,37 @@ export default {
components: {
Myheader,
MyFooter,
tabs
tabs,
FixRight
},
watch:{
},
methods: {
userinter(){
let user= localStorage.getItem("userInfo");
if(user==undefined||user==null||user==''){
this.$message({
type: 'warning',
message: '您还未登录'
});
return
}else{
this.$router.push({
path: "/personal/integral/",
query: {
stype: 1,
},
});
}
},
...mapMutations(["logoutSystem","checkIsLogin"]),
logout() {
this.logoutSystem();
this.$router.push({
path: "/",
});
},
userinter(){
let user= this.checkIsLogin();
if(!user){
this.$message({
type: 'warning',
message: '您还未登录'
});
return
} else {
this.$router.push({
path: "/personal/integral/",
query: {
stype: 1,
},
});
}
},
findall(){
console.log('PPP');
console.log(this.userid.length);
@ -303,65 +315,58 @@ obligation(item,index){
open(){
},
ifadroind(){
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid = sUserAgent.match(/android/i) == "android";
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
console.log("当前是电脑打开")
if(this.userlog==true){
this.usermessage='关注皇家爱宠荟,修改个人资料',
this.dialogInfo1=true;
}else{
this.dialogInfo1=false;
this.usermessage='关注皇家爱宠荟,兑换更多福利';
}
}else{
console.log("当前是手机打开")
this.dialogInfo1=false;
}
},
ifadroind(){
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid = sUserAgent.match(/android/i) == "android";
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
if(this.userlog==true){
this.usermessage='关注皇家爱宠荟,修改个人资料',
this.dialogInfo1=true;
}else{
this.dialogInfo1=false;
this.usermessage='关注皇家爱宠荟,兑换更多福利';
}
return false;
} else {
this.dialogInfo1=false;
return true;
}
},
openaddress(item,index){
console.log(item,index);
let user= localStorage.getItem("userInfo");
if(user==undefined||user==null||user==''){
console.log('---=');
this.$message({
type: 'warning',
message: '您还未登录'
});
return
let user= localStorage.getItem("userInfo");
if(user==undefined||user==null||user==''){
this.$message({
type: 'warning',
message: '您还未登录'
});
return
}else{
if(item.title=='收货地址'){
this.$router.push({
path: `/useraddress/openaddress/`
})
console.log('这是地址的跳转');
}
if(item.title=='收货地址'){
this.$router.push({
path: `/useraddress/openaddress/`
})
}
if(index==0){
this.userlog=true
this.ifadroind();
let isMobile = this.ifadroind();
if(isMobile)
window.location.href="weixin://dl/business/?t=BE1OA2AngRs";
}
if(index==1){
this.$router.push({
path: `/personal/discount/`
})
console.log('这是地址的跳转');
}
if(index==1){
this.$router.push({
path: `/personal/discount/`
})
}
}
},
@ -372,43 +377,37 @@ this.$router.push({
}
},
mounted() {
console.log(this.islogin)
console.log(this.userid);
let userwidth=0;
this.ifadroind();
let user= JSON.parse(localStorage.getItem("userInfo"));
console.log(user)
if(user!==null){
console.log('11')
this.userid=user.data;
console.log(this.userid);
this.usertitle=this.userid.memberName;
this.rcrcord=this.userid.availiblePoint;
if(this.userid.memberLevel==1){
let userlength=this.userid.availiblePoint.toString().length;
this.userimage=require('../../assets/image/rc-new.png');
this.userorder='新手铲屎官';
this.uservalue=5000; //
this.rcvalue=this.uservalue-this.userid.availiblePoint; //
if(userlength==1||userlength==2||userlength==3||userlength==4){
userwidth=this.userid.availiblePoint/100
console.log(userwidth);
}
}
else if(this.userid.memberLevel==2){
this.userimage=require('../../assets/image/rc-new2.png');
this.userorder='资深铲屎官';
this.uservalue=10000;
this.rcvalue=this.uservalue-this.userid.availiblePoint;
userwidth=this.userid.availiblePoint/100
}else if( this.userid.memberLevel==3){
this.userimage=require('../../assets/image/rc-new1.png');
this.userorder='金牌铲屎官';
this.usrnewlist=this.goldmedal;
userwidth=100
}
let user= this.checkIsLogin();
if(user){
this.userid=user.data;
this.islogin=false;
this.usertitle=this.userid.memberName;
this.rcrcord=this.userid.availiblePoint;
if(this.userid.memberLevel==1){
let userlength=this.userid.availiblePoint.toString().length;
this.userimage=require('../../assets/image/rc-new.png');
this.userorder='新手铲屎官';
this.uservalue=5000; //
this.rcvalue=this.uservalue-this.userid.availiblePoint; //
if(userlength==1||userlength==2||userlength==3||userlength==4){
userwidth=this.userid.availiblePoint/100
console.log(userwidth);
}
}
else if(this.userid.memberLevel==2){
this.userimage=require('../../assets/image/rc-new2.png');
this.userorder='资深铲屎官';
this.uservalue=10000;
this.rcvalue=this.uservalue-this.userid.availiblePoint;
userwidth=this.userid.availiblePoint/100
}else if( this.userid.memberLevel==3){
this.userimage=require('../../assets/image/rc-new1.png');
this.userorder='金牌铲屎官';
this.usrnewlist=this.goldmedal;
userwidth=100
}
this.$refs.userblock.style.width=userwidth+'%';
let tagEle=document.querySelector('.ts-point-tag');
if(tagEle){
@ -418,17 +417,13 @@ this.$router.push({
tagEleLeft=0;
tagEle.style.left=tagEleLeft+"%";
}
} else{
console.log('---');
this.userid=[];
} else {
this.userid='';
}
if(this.userid==undefined ||this.userid==''||this.userid==null){
console.log(this.userid)
this.islogin=true;
}
if(this.userid==undefined ||this.userid==''||this.userid==null){
this.islogin=true;
}
},

View File

@ -1,7 +1,8 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-header">
<div class="rc-top"></div>
<div class="rc-full-width rc-max-width--xl rc-padding-y--lg">
<div class="rc-main">
<div class="rc-center" >
@ -30,25 +31,28 @@
<span>金牌铲屎官</span>
</div>
</div>
<div class="usermember" v-for="(item,index) in newlist" :key="index">
<div class="rc-image">
<img :src="item.catimage" alt="" />
</div>
<div class="rc-userorder">
<em>{{item.title}}</em>
<span>{{item.usereat}}</span>
</div>
</div>
<div class="rc-layout-container">
<div class="usermember rc-column" v-for="(item,index) in newlist" :key="index">
<div class="rc-image">
<img :src="item.catimage" alt="" />
</div>
<div class="rc-userorder">
<em>{{item.title}}</em>
<span>{{item.usereat}}</span>
</div>
</div>
</div>
</div>
</div>
<Myfooter></Myfooter>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
import Myheader from '~/components/header.vue'
import Myfooter from '~/components/rc-footer.vue'
export default {
data(){
@ -246,7 +250,8 @@ methods:{
},
components:{
Myheader
Myheader,
Myfooter
},
mounted(){
console.log(this.$refs.userblock);
@ -293,216 +298,6 @@ mounted(){
</script>
<style lang="less" scoped>
ul li ol li em strong i {
list-style: none;
font-style: normal;
}
.rc-header {
width: 100%;
}
//
@media screen and (max-width: 768px) {
.rc-main {
width: 92%;
margin: 0 auto;
overflow: hidden;
.rc-center {
width: 100%;
height: 180px;
img {
width: 100%;
height: 100%;
display: block;
}
}
.rc-userorder{
display: flex;
align-items: center;
height: 100%;
}
.rc-order{
padding: 16px 0 16px 0 ;
width: 100%;
display: flex;
align-items: center;
font-size: 14px;
color: #333333;
font-weight: 500;
border-bottom: 1px solid #D8D8D8;
margin-top: 22px;
}
.rc-cordd{
color:#666666;
font-size: 14px;
margin-top: 16px;
span{
display: block;
margin-top: 16px;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.usermember{
width: 100%;
height: 80px;
border-bottom: 1px solid #D8D8D8;
display: flex;
align-items: center;
.rc-image{
height: 100%;
display: flex;
align-items: center;
}
img{
width: 48px;
height: 48px;
display: block;
}
em{
font-style: normal;
font-size: 16px;
display: block;
margin-left:16px;
font-weight: bold;
color: #531c1c;
}
span{
color: #666666;
font-size: 14px;
margin-left: 8px;
}
}
}
}
@media screen and (min-width: 768px) and (max-width: 1920px) {
.rc-main {
width: 92%;
margin: 0 auto;
overflow: hidden;
.rc-center {
width: 100%;
height: 180px;
display: none;
img {
width: 100%;
height: 100%;
display: block;
}
}
.rc-order{
padding: 16px 0 16px 0 ;
width: 100%;
display: flex;
align-items: center;
font-size: 26px;
color: #333333;
font-weight: 500;
}
.rc-cordd{
color:#666666;
margin-top: 16px;
span{
display: block;
margin-top: 16px;
font-size: 16px;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.usermember{
width: 23%;
float: left;
height: 160px;
border: 1px solid #D7D7D7;
margin-top: 80px;
margin-left: 19px;
.rc-image{
float: right;
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
margin-right:20px;
}
img{
width: 80px;
height: 80px;
display: block;
}
em{
font-style: normal;
font-size: 20px;
display: block;
font-weight: 500;
color: #333333;
}
span{
color: #999999;
font-size: 14px;
}
}
.rc-userorder{
width: 60%;
float: left;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
span{
margin-top: 8px;
width: 54%;
}
}
}
}
@import url("../../assets/css/usermember.less");
</style>

View File

@ -118,7 +118,7 @@
rc-margin-y--md
center
"
@click="userbuy()"
@click="selectproduce(item)"
>立即购买</strong
>
</div>
@ -296,6 +296,7 @@
<em>确认</em>
</div>
</el-dialog>
<FixRight></FixRight>
<div v-if="isLoading" class="ts-mask">
<div class="ts-mask-bg"></div>
<div class="userloding"></div>
@ -308,6 +309,7 @@
<script>
import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import FixRight from "~/components/fixed-right.vue";
import {
userstype,
biaome,
@ -321,7 +323,7 @@ export default {
value: "",
isLoading: false,
userstype: [],
activeIndex: 0,
activeIndex: "0",
allacindex: 0,
userishwo: true,
userishwo4: true,
@ -473,20 +475,18 @@ export default {
},
components: {
Myheader,
MyFooter
MyFooter,
FixRight
},
created() {
this.routeParams=this.$route.query;
let stype = this.routeParams.stype;
stype = (stype=='0'?0:1);
if(stype>-1){
this.activeIndex = this.routeParams.stype;//Initialized pet type selection
}
},
mounted() {
let stype = this.routeParams.stype;
stype = (stype=='1'?1:0);
if(stype>-1){
this.activeIndex = stype;//Initialized pet type selection
}
this.$nextTick(() => {
this.$refs.userstandard[0].style.margin = 0 + "px";
});
@ -732,13 +732,20 @@ export default {
openclose() {
this.dialogInfo1 = false;
},
selectproduce() {
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
},
});
selectproduce(item,index){
if(item.productList[0]==undefined){
item.productlist[0].productCode=0;
}
if(item.productList[0]==undefined){
item.productlist[0]=[];
}
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
productCode:item.productList[0].productCode
},
});
},
ifadroind() {
var sUserAgent = navigator.userAgent.toLowerCase();

View File

@ -84,6 +84,7 @@
@click="register()"
class="ts-standard-btn ts-standard-btn--max-width"
value="注册"
readonly
></input
>
<!-- <van-divider @click="toLogin">注册账户</van-divider> -->

View File

@ -104,6 +104,7 @@
@click="register()"
class="ts-standard-btn ts-standard-btn--max-width"
value="登录"
readonly
></input
>
<!-- <van-divider @click="toLogin">注册账户</van-divider> -->

View File

@ -14,6 +14,7 @@
show-action
placeholder="请输入搜索关键词"
@search="onSearch"
@cancel="onCancel"
class="rc-keyword"
>
<template #action>
@ -128,7 +129,7 @@
rc-margin-y--md
center
"
@click="userbuy()"
@click="selectproduce(item)"
>立即购买</strong
>
</div>
@ -313,6 +314,7 @@
</el-dialog>
</div>
<!-- rc-main end -->
<FixRight></FixRight>
<div v-if="isLoading" class="ts-mask">
<div class="ts-mask-bg"></div>
<div class="userloding"></div>
@ -325,6 +327,7 @@
<script>
import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import FixRight from "~/components/fixed-right.vue";
import { biaome, userstype, searchchanpin, userquery } from "../../ajax/getData";
export default {
data() {
@ -510,7 +513,8 @@ export default {
},
components: {
Myheader,
MyFooter
MyFooter,
FixRight
},
mounted() {
this.usetmessage();
@ -661,14 +665,20 @@ export default {
element.checked = false;
});
},
selectproduce(item) {
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
productCode: item.productList[0].productCode,
},
});
selectproduce(item,index){
if(item.productList[0]==undefined){
item.productlist[0].productCode=0;
}
if(item.productList[0]==undefined){
item.productlist[0]=[];
}
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
productCode:item.productList[0].productCode
},
});
},
checkRxGoods(toggleSwitch){
let _self = this;
@ -766,6 +776,10 @@ export default {
onSearch(e) {
this.usetmessage(this.activeIndex1, this.value);
},
onCancel(e) {
debugger;
this.value='';
},
selectGoods(item, index, onlyRefreshCategory) {
this.activeIndex1 = index;
this.resetAllOptions();

View File

@ -25,21 +25,24 @@ const mutations = {
// },
changeClod(state, val) {
localStorage.setItem('userInfo', val.cloud);
console.log(state,val);
},
logoutSystem(state) {
localStorage.removeItem('userInfo')
},
checkIsLogin() {
let rawUserInfoStr = localStorage.getItem('userInfo');
let rawUserInfo = JSON.parse(rawUserInfoStr);
if(rawUserInfo && rawUserInfo.hasOwnProperty('xaccessToken') && rawUserInfo['xaccessToken'].length>36)
return rawUserInfo;
return false;
},
changemessage(state, val) {
localStorage.setItem('message', val.data);
console.log(state,val);
},
selectMenu(state, val) {
let result = state.tabsList.findIndex(item => item.name === val.data.name)
result === -1 ? state.tabsList.push(val.data) : ''
},
},
// changeMenu(state, user){
// // console.log("vuex存储的变化",JSON.parse(user))