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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,12 +2,22 @@ ul li ol li em strong i {
list-style: none; list-style: none;
font-style: normal; font-style: normal;
} }
.rc-header {
width: 100%;
}
.rc-center{ .rc-center{
overflow:hidden; 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) { @media screen and (max-width: 768px) {
.ts-mypersonal{ .ts-mypersonal{
@ -45,13 +55,6 @@ ul li ol li em strong i {
color:#333333; color:#333333;
font-size: 26px; font-size: 26px;
} }
.rc-title{
img{
width: 96px;
height: 96px;
}
}
.userer{ .userer{
img{ img{
width: 210px; width: 210px;
@ -246,10 +249,10 @@ ul li ol li em strong i {
//pc端 //pc端
@media screen and (min-width: 769px) { @media screen and (min-width: 769px) {
/deep/.el-dialog { /deep/.el-dialog {
width: 440px; width: 440px;
height: 652px; height: 652px;
} }
.ts-mypersonal{ .ts-mypersonal{
margin-left:0; margin-left:0;
.rc-column{ .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"> <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"> <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>
<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"> <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"> <span class="rc-screen-reader-text">
@ -41,14 +42,11 @@
</div> </div>
</a> </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 class="rc-screen-reader-text">
登录 登录
</span> </span>
<em class="rc-screen-reader" v-show="loginornot"> <em class="rc-screen-reader" v-show="loginornot"></em>
</em>
</a> </a>
<!-- <!--
@ -305,6 +303,12 @@
<div class="rc-column rc-padding-x--none"> <div class="rc-column rc-padding-x--none">
<ul class="rc-list rc-list--blank rc-list--align rc-btn-offset--top" role="menu"> <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"> <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"> <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> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
export default { export default {
data() { data() {
return { return {
@ -354,13 +359,12 @@ export default {
}, },
mounted() { mounted() {
// //
let usernot=JSON.parse(localStorage.getItem("userInfo")); let usernot=this.checkIsLogin();
//console.log(usernot); //console.log(usernot);
if(usernot==null ||usernot==undefined){ if(usernot){
console.log(usernot); this.loginornot=true
this.loginornot=true
}else{ }else{
this.loginornot=false this.loginornot=false
this.usermessage=usernot; this.usermessage=usernot;
} }
//debugger; //debugger;
@ -386,6 +390,7 @@ export default {
}, },
methods: { methods: {
...mapMutations(["checkIsLogin"]),
refreshDesktopNav:function(){ refreshDesktopNav:function(){
RCDL.navigation.currentState=null; RCDL.navigation.currentState=null;
RCDL.navigation.rebuild(); RCDL.navigation.rebuild();
@ -430,6 +435,5 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url("../assets/css/global.less");
</style> </style>

View File

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

View File

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

View File

@ -6,7 +6,7 @@
<div class="rc-top"></div> <div class="rc-top"></div>
<div class="rc-usermain"> <div class="rc-usermain">
<div class="rc"> <div class="rc rc-column">
<span <span
v-for="(item, index) in discountlist" v-for="(item, index) in discountlist"
:key="index" :key="index"
@ -83,71 +83,6 @@ export default {
starttime: "2021.11.29-2022.01.28", starttime: "2021.11.29-2022.01.28",
catimage: require("../../assets/image/unused.png"), 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: [ discountlist: [
{ {

View File

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

View File

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

View File

@ -1,7 +1,8 @@
<template> <template>
<div> <div>
<Myheader></Myheader> <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-main">
<div class="rc-center" > <div class="rc-center" >
@ -30,25 +31,28 @@
<span>金牌铲屎官</span> <span>金牌铲屎官</span>
</div> </div>
</div> </div>
<div class="rc-layout-container">
<div class="usermember" v-for="(item,index) in newlist" :key="index"> <div class="usermember rc-column" v-for="(item,index) in newlist" :key="index">
<div class="rc-image"> <div class="rc-image">
<img :src="item.catimage" alt="" /> <img :src="item.catimage" alt="" />
</div> </div>
<div class="rc-userorder"> <div class="rc-userorder">
<em>{{item.title}}</em> <em>{{item.title}}</em>
<span>{{item.usereat}}</span> <span>{{item.usereat}}</span>
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
<Myfooter></Myfooter>
</div> </div>
</template> </template>
<script> <script>
import Myheader from '~/components/header.vue' import Myheader from '~/components/header.vue'
import Myfooter from '~/components/rc-footer.vue'
export default { export default {
data(){ data(){
@ -246,7 +250,8 @@ methods:{
}, },
components:{ components:{
Myheader Myheader,
Myfooter
}, },
mounted(){ mounted(){
console.log(this.$refs.userblock); console.log(this.$refs.userblock);
@ -293,216 +298,6 @@ mounted(){
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
ul li ol li em strong i { @import url("../../assets/css/usermember.less");
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%;
}
}
}
}
</style> </style>

View File

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

View File

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

View File

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

View File

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

View File

@ -25,21 +25,24 @@ const mutations = {
// }, // },
changeClod(state, val) { changeClod(state, val) {
localStorage.setItem('userInfo', val.cloud); 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) { changemessage(state, val) {
localStorage.setItem('message', val.data); localStorage.setItem('message', val.data);
console.log(state,val);
}, },
selectMenu(state, val) { selectMenu(state, val) {
let result = state.tabsList.findIndex(item => item.name === val.data.name) let result = state.tabsList.findIndex(item => item.name === val.data.name)
result === -1 ? state.tabsList.push(val.data) : '' result === -1 ? state.tabsList.push(val.data) : ''
},
},
// changeMenu(state, user){ // changeMenu(state, user){
// // console.log("vuex存储的变化",JSON.parse(user)) // // console.log("vuex存储的变化",JSON.parse(user))