Hyperlink completed except products, working on address component

This commit is contained in:
Vion 2022-01-19 21:45:04 +08:00
parent afca9ff37a
commit 83d77cfaeb
17 changed files with 545 additions and 219 deletions

View File

@ -8,7 +8,10 @@ body{
.fade-leave-active { .fade-leave-active {
opacity: 0; opacity: 0;
} }
.ts-no-data{
text-align: center;
margin:3rem 0;
}
.ts-mask{ .ts-mask{
width:100%; width:100%;
height:100%; height:100%;
@ -66,8 +69,6 @@ body{
} }
//用户光点 //用户光点
.rc-screen-reader{ .rc-screen-reader{
width: 0.81rem;
height: 0.81rem;
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
background-color: red; background-color: red;
@ -77,6 +78,13 @@ body{
width: 0.37rem; width: 0.37rem;
height: 0.37rem; height: 0.37rem;
} }
.rc-menu--xs .rc-screen-reader{
left: 30%;
}
.rc-list__link.ts-login--xs .rc-screen-reader{
left:16%;
}
img, picture { img, picture {
display: block; display: block;
max-width: 100%; max-width: 100%;
@ -103,7 +111,8 @@ img, picture {
li{ li{
border: 1px solid #D7D7D7; border: 1px solid #D7D7D7;
display: inline-flex; display: inline-flex;
border-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
flex-direction: column; flex-direction: column;
max-width:10rem; max-width:10rem;
.rc-column .rc-column
@ -135,7 +144,7 @@ img, picture {
} }
img{ img{
width:10rem; width:10rem;
height:10rem; min-height:10rem;
object-fit: contain; object-fit: contain;
display: flex; display: flex;
margin: 0 auto; margin: 0 auto;
@ -330,6 +339,9 @@ img, picture {
html { html {
//font-size:100px; //font-size:100px;
} }
.rc-list__link.ts-login--xs .rc-screen-reader{
left:7%;
}
.rc-md-up { .rc-md-up {
display: none!important; display: none!important;
} }

View File

@ -27,6 +27,9 @@
img{ img{
border-radius: 50%; border-radius: 50%;
} }
&:first-child{
margin-left:0;
}
&.active { &.active {
img{ img{
border: 3px solid #E2001A; border: 3px solid #E2001A;
@ -46,8 +49,8 @@
.uservideo{ .uservideo{
overflow: hidden; overflow: hidden;
video{ video{
height:100%; width:100%;
width:auto; height:auto;
} }
} }
.ul-dog{ .ul-dog{
@ -181,38 +184,31 @@
#xxxFullScreen { #xxxFullScreen {
background-color: white; background-color: white;
margin-top: 0.40rem; margin-top: 0.40rem;
#swiper1 {
overflow: hidden;
}
.swiper-container{ .swiper-container{
height: 6.45rem; height: 6.45rem;
} }
.swiper-container, .swiper-container2 { .swiper-container {
width: 100%; width: 100%;
// overflow: visible !important;
height: 100%; height: 100%;
position: relative; position: relative;
} }
#swiper1 .swiper-container .swiper-wrapper .swiper-slide { .swiper-container .swiper-wrapper .swiper-slide {
width: 17.25rem; width: 17.25rem;
//height: 6.45rem !important; //Auto adaption //height: 6.45rem !important; //Auto adaption
} }
/* 上一张 */ /* 上一张 */
#swiper1 .swiper-container .swiper-wrapper .swiper-slide-prev { swiper-container .swiper-wrapper .swiper-slide-prev {
margin-top: 0.05rem; margin-top: 0.05rem;
height: 100%; height: 100%;
} }
/* 下一张 */ /* 下一张 */
#swiper1 .swiper-container .swiper-wrapper .swiper-slide-next { .swiper-container .swiper-wrapper .swiper-slide-next {
margin-top: 0.05rem; margin-top: 0.05rem;
height: 100%; height: 100%;
} }
.swiper-container .swiper-wrapper .swiper-slide-active { .swiper-container .swiper-wrapper .swiper-slide-active {
height: 100%; height: 100%;
} }
.uservideo{ .uservideo{
width: 100%; width: 100%;
@ -238,6 +234,7 @@
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
vertical-align: top;
} }
img{ img{
width: 10rem; width: 10rem;
@ -276,7 +273,7 @@
/* 中间的图片 */ /* 中间的图片 */
.swiper-container .swiper-wrapper .swiper-slide-active { .swiper-container .swiper-wrapper .swiper-slide-active {
height: 165px !important;
} }
.swiperWrap{ .swiperWrap{
height: 469px; height: 469px;
@ -284,8 +281,6 @@
img{ img{
height: 469px; height: 469px;
width: 100%; width: 100%;
} }
/deep/.swiper-pagination-bullet-active{ /deep/.swiper-pagination-bullet-active{
background: red; background: red;
@ -379,6 +374,9 @@
} }
.ts-banner-swiper-container{ .ts-banner-swiper-container{
position:relative; position:relative;
img{
margin:0 auto;
}
.ts-carousel-indicator{ .ts-carousel-indicator{
position:absolute; position:absolute;
bottom:.4rem; bottom:.4rem;

View File

@ -55,11 +55,13 @@
} }
.container { .container {
font-size: 0.1rem; font-size: 0.1rem;
background-color:#fff;
.van-field__body { .van-field__body {
border-bottom: 1px solid red; border-bottom: 1px solid red;
} }
.content { .content {
margin-top: 24px; margin-top: 24px;
box-shadow: unset;
} }
.userfoget { .userfoget {
font-size: 14px; font-size: 14px;

View File

@ -0,0 +1,357 @@
<template>
<div class="ts-area-picker-container">
<input class="ts-area-picker-value-displayer" placeholder="请选择收货地址" @focus="initAddress" v-model="displayValue"></input>
<input type="hidden" :value="returnValue">
<div class="ts-area-picker-desktop" v-if="show">
<div class="ts-area-picker-tmp-value">
<ul>
<li class="active" @click="switchTab(0)">{{ returnValueArr[0]?returnValueArr[0].name:'请选择' }}</li>
<li @click="switchTab(1)">{{ returnValueArr[1]?returnValueArr[1].name:'请选择' }}</li>
<li @click="switchTab(2)">{{ returnValueArr[2]?returnValueArr[2].name:'请选择' }}</li>
</ul>
</div>
<div class="ts-area-picker-values">
<ul>
<li v-for="(item, index) in curDisplayingCol" :key="item.id" @click="pickValue(item.id,item.name)" v-bind:class="{ active:(returnValue[curDisplayingColIndex]?returnValue.id==item.id:false) }">
{{ item.name }}
</li>
</ul>
</div>
</div>
<div class="ts-area-picker-mobile ts-mask" v-if="show">
<div class="ts-mask-bg"></div>
<van-picker
show-toolbar
title="选择地区"
:columns="columns"
value-key="name"
@confirm="onConfirm"
@cancel="onCancel"
@change="onChange"
class="ts-area-picker-mobile-component"
/>
</div>
</div>
</template>
<script>
export default {
data(){
return{
displayValue:"",
returnValue:"",
returnValueArr:[],
show:false,
columns:[
{
values:[{id:"001",name:"省份1"},{id:"002",name:"省份2"}],
className:'col1'
},
{
values:[{id:"001-001",name:"省份1-城市1"},{id:"001-002",name:"省份1-城市2"},{id:"002-001",name:"省份2-城市1"},{id:"002-002",name:"省份2-城市2"}],
className:'col2'
},
{
values:[{id:"001-001-001",name:"省份1-城市1-区1"},{id:"001-002-002",name:"省份1-城市2-区2"},{id:"002-001-001",name:"省份2-城市1-区1"},{id:"002-002-002",name:"省份2-城市2-区2"}],
className:'col3'
}
],
curDisplayingColIndex:0,
curDisplayingCol:[]
}
},
methods:{
initAddress(){
this.show=true;
//Initilizing
//mobile
let self=this;
// defaultValues : array[{id:"_ID_IN_columns_of_province",name:"_NAME_IN_columns"},{id:"_ID_IN_columns_of_city",name:"_NAME_IN_columns"},{id:"_ID_IN_columns_of_area",name:"_NAME_IN_columns"}]
let defaultValues = [{id:this.columns[0].values[0].id, name:this.columns[0].values[0].name},{id:this.columns[1].values[0].id, name:this.columns[1].values[0].name},{id:this.columns[2].values[0].id, name:this.columns[2].values[0].name}];
this.$children.forEach(function(vueComponent){
if(vueComponent._name=="<VanPicker>")
{
self.onChange(vueComponent,defaultValues); //Important
}
});
//mobile end
//PC
this.switchTab(this.curDisplayingColIndex);
//PC end
//Initilizing end
},
pickValue(pickId,pickName){
let areaObj={id:pickId,name:pickName};
this.returnValueArr[this.curDisplayingColIndex]=areaObj;
this.validatePickedValues();
//Submit to value displaying
let tmpDisplayValueEle = document.querySelectorAll(".ts-area-picker-tmp-value li");
tmpDisplayValueEle[this.curDisplayingColIndex].innerText=this.returnValueArr[this.curDisplayingColIndex].name;
//Submit to value displaying end
//Moving to next tab
this.curDisplayingColIndex++;
if(this.curDisplayingColIndex>2 || this.curDisplayingColIndex<0)
this.curDisplayingColIndex = 0;
if(this.returnValueArr.length>=3)
{
this.onConfirm(this.returnValueArr);
}
else
this.switchTab(this.curDisplayingColIndex);
//Moving to next tab end
},
// For van picker
onChange(picker,values) { //values = [{id:this.columns[0].id, name:this.columns[0].name},{id:this.columns[1].id, name:this.columns[1].name},{id:this.columns[3].id, name:this.columns[3].name}];
//Support single choice only , index = 0 province, index = 1 city, index = 2 area
let curSelection={'province':'','city':'','area':''};
if(!values)
return;
let _self=this;
values.forEach(function(ele,index){
switch(index){
case 0:
//Handling Province
curSelection.province=ele.id;
//Handling Province end
break;
case 1:
//Handling City
let matchedCity=_self.fitlerValuesInArray(curSelection.province,_self.columns[index].values);
picker.setColumnValues(index,matchedCity);
curSelection.city=matchedCity[0].id;
//Handling City end
break;
default:
//Handling Area
let matchedArea=_self.fitlerValuesInArray(curSelection.city,_self.columns[index].values);
picker.setColumnValues(index,matchedArea);
curSelection.area=matchedArea[0].id;
//Handling Area end
break;
}
});
},
validatePickedValues(){
let _self=this;
let provinceId='';
let areaId=undefined;
this.returnValueArr.forEach(function(obj,index){
switch(index){
case 0:
//Skipping province checking
provinceId = obj.id;
break;
case 1:
//Checking City
if(obj.id.indexOf(provinceId)<0)
{
console.log('500 : error via checking validatePickedValues');
_self.returnValueArr[index]={};
}
else
{
areaId = _self.returnValueArr[index].id;
}
//Checking City end
break;
case 2:
//Checking Area
if(areaId && obj.id.indexOf(areaId)<0)
{
console.log('501 : error via checking validatePickedValues');
_self.returnValueArr[index]={};
}
//Checking Area end
break;
default:
break;
}
});
},
onConfirm(values) {
debugger;
//Get columns structure array here : values
let _self=this;
let returnVal=[];
let tmpArr = [];
this.displayValue='';
values.forEach(function(ele,index){
_self.displayValue = _self.displayValue + ele.name + " ";
tmpArr.push(ele.id);
returnVal.push(ele);
});
this.returnValueArr=returnVal;
this.returnValue=tmpArr.join("|");
this.hideAddress();
},
onCancel() {
},
fitlerValuesInArray(stringStartWith,dataColArea){
let result=[];
dataColArea.forEach(function(ele){
if(ele.id.indexOf(stringStartWith)===0)
{
result.push(ele);
}
});
return result;
},
popAddress() {
this.show=true;
},
hideAddress() {
this.show=false;
},
switchTab(tabIndex){
let _self=this;
let areaTabLi=document.querySelectorAll(".ts-area-picker-tmp-value li");
if(tabIndex==0){
this.curDisplayingCol = this.columns[tabIndex].values;
}
else{
if(this.returnValueArr[tabIndex-1]){}
else{
tabIndex=tabIndex-1;
}
}
this.curDisplayingColIndex=tabIndex;
areaTabLi.forEach(function(ele,index){
if(tabIndex==index)
{
ele.classList.add('active');
let filteredData=_self.columns[tabIndex].values;
if(_self.curDisplayingColIndex>0) //pass
{
let pickedId = _self.returnValueArr[_self.curDisplayingColIndex-1].id;
filteredData=_self.fitlerValuesInArray(pickedId,_self.columns[tabIndex].values);
}
_self.curDisplayingCol=filteredData;
}
else
ele.classList.remove('active');
})
}
},
mounted(){
},
components:{
},
}
</script>
<style lang="less" scoped>
.ts-area-picker-container{display:inline-block;}
.ts-area-picker-value-displayer{
width:40rem;
}
.ts-area-picker-tmp-value{
border-bottom:1px solid #D7D7D7;
padding:0 2.5rem;
box-sizing: border-box;
ul{
padding:0;
margin:0;
display: flex;
li{
display:inline-block;
color:#333333;
width:3.125rem;
padding: 1.25rem 0;
margin-right:4rem;
cursor: pointer;
&.active{
color:#E2001A;
border-bottom:4px solid #E2001A;
}
}
}
}
.ts-area-picker-values{
ul{
padding:1rem 2.5rem 2rem 2.5rem;
margin:0;
}
li{
display:inline-block;
margin-top:1rem;
margin-right:3.875rem;
color:#333;
cursor:pointer;
&.nth-child(6n){
margin-right:0;
}
}
}
@media screen and (max-width:768px)
{
/deep/.van-picker__cancel
{
display:none;
}
/deep/.van-picker__title{
font-size:1.375rem;
color:#E1001A;
}
/deep/.van-picker__toolbar{
padding:1.5rem 1.25rem;
box-sizing: border-box;
border-bottom:1px solid #D8D8D8;
}
/deep/.van-picker__confirm{
text-indent:-999rem;
position:relative;
&:after{
transform: rotate(45deg);
}
&:before{
transform: rotate(-45deg);
}
&:before,
&:after {
position: absolute;
content: ' ';
background-color: #E1001A;
left: 1.25rem;
bottom:-0.875rem;
width: 1px;
height: 1.375rem;
}
}
.ts-area-picker-mobile{
display:flex;
flex-direction: column;
justify-content: flex-end;
.ts-area-picker-mobile-component{
height:40vh;
width:100%;
}
}
.ts-area-picker-desktop{
display:none;
}
}
@media screen and (min-width:769px)
{
.ts-area-picker-mobile{
display:none;
}
.ts-area-picker-desktop{
display:block;
width:100%;
height:19.25rem;
border:1px solid #808285;
}
}
</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">
@ -45,10 +46,7 @@
<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" role="menuitem" data-modal-trigger="main-nav-modal" @click="turnlogin">
个人中心
<em class="rc-screen-reader" v-show="loginornot"></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">
与我们联系 与我们联系

View File

@ -203,7 +203,7 @@
<div class="rc-column rc-text--center rc-padding-y--none"> <div class="rc-column rc-text--center rc-padding-y--none">
<span class="">法律声明 ©2021 ROYAL CANIN, Inc.</span> <span class="">法律声明 ©2021 ROYAL CANIN, Inc.</span>
<br/> <br/>
<a target='_blank' href='https://royalcanin.com.cn/#privacy'><span class="">隐私声明</span></a> <a target='_blank' href='https://royalcanin.com.cn/privacy'><span class="">隐私声明</span></a>
&nbsp; | &nbsp; &nbsp; | &nbsp;
<a target='_blank' href='https://royalcanin.com.cn/declaration'><span class="">法律声明</span></a> <a target='_blank' href='https://royalcanin.com.cn/declaration'><span class="">法律声明</span></a>
</div> </div>

View File

@ -4,16 +4,16 @@ export default {
// Global page headers: https://go.nuxtjs.dev/config-head // Global page headers: https://go.nuxtjs.dev/config-head
head: { head: {
title: 'rc-busness', title: '皇家官方商城',
htmlAttrs: { htmlAttrs: {
lang: 'en', lang: 'zh-cn',
}, },
script: [ script: [
//{ src: '/js/rem.js' }, //{ src: '/js/rem.js' },
// { src: '/js/flexible.js', type: 'text/javascript', charset: 'utf-8'}, // { src: '/js/flexible.js', type: 'text/javascript', charset: 'utf-8'},
{ src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14053/index.js' }, { src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14053/index.js' },//SOL
//{ src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14054/index.js' }, { src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14054/index.js' },//订单
{ innerHTML: trackingScript, type: 'text/javascript', charset: 'utf-8'}, { innerHTML: trackingScript, type: 'text/javascript', charset: 'utf-8'},
{ innerHTML: assetsUrl, type: 'text/javascript', charset: 'utf-8'}, { innerHTML: assetsUrl, type: 'text/javascript', charset: 'utf-8'},
{ src: '/royalcanin-cdn-assets-new/css_js/royal-canin.min.bundle.js' }, { src: '/royalcanin-cdn-assets-new/css_js/royal-canin.min.bundle.js' },

View File

@ -5,9 +5,43 @@
<!-- Suppose in header end --> <!-- Suppose in header end -->
<div class="ts-banner-swiper-container"> <div class="ts-banner-swiper-container">
<swiper :options="headerSwiperOption"> <swiper :options="headerSwiperOption">
<swiper-slide v-for="(banner, index) in showingBanners" :key="index"> <swiper-slide>
<a :href="banner.link" target="_blank"> <a href="#" target="_blank">
<img :src="banner.src" class="useraimg"/> <picture>
<source media="(max-width: 768px)" srcset="/images/banner/one.jpg">
<source media="(min-width: 769px)" srcset="/images/banner/pc-banner1.png">
<img src="/images/banner/one.jpg">
</picture>
</a>
</swiper-slide>
<swiper-slide>
<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">
<img src="/images/banner/two.jpg">
</picture>
</a>
</swiper-slide>
<swiper-slide>
<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">
<img src="/images/banner/three.jpg">
</picture>
</a>
</swiper-slide>
<swiper-slide>
<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">
<img src="/images/banner/four.jpg">
</picture>
</a> </a>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
@ -49,7 +83,7 @@
<swiper-slide v-for="(item, index) in catlistvideo" :key="index"> <swiper-slide v-for="(item, index) in catlistvideo" :key="index">
<div class="rc-video"> <div class="rc-video">
<div class="uservideo"> <div class="uservideo">
<video controls="" :poster=item.catimage> <video controls="" :poster=item.catimage preload="none">
<source :src=item.video type="video/mp4"> <source :src=item.video type="video/mp4">
</video> </video>
</div> </div>
@ -65,7 +99,7 @@
<div class="sw-center" > <div class="sw-center" >
<div class="rc-click" @click="selectproduce(item,index)"> <div class="rc-click" @click="selectproduce(item,index)">
<div class="uservideo"> <div class="uservideo">
<video controls="controls" :poster=item.catimage> <video controls="controls" :poster=item.catimage preload="none">
<source :src= item.video type="video/ogg"> <source :src= item.video type="video/ogg">
</video> </video>
</div> </div>
@ -95,6 +129,7 @@
<van-tabs @click='catclickShi' class="van-tabs" v-if="onemao" v-model="maoshiCurIndex"> <van-tabs @click='catclickShi' class="van-tabs" v-if="onemao" v-model="maoshiCurIndex">
<van-tab v-for="(item,index) in discoun" :key="index" :title="item.title"> <van-tab v-for="(item,index) in discoun" :key="index" :title="item.title">
<div class="rc-contair"> <div class="rc-contair">
<div class="ts-no-data" v-if="!catshi.length">暂未发现相关记录</div>
<ul class="ts-product-list rc-margin-bottom--lg"> <ul class="ts-product-list rc-margin-bottom--lg">
<li v-for="(item,index) in catshi" :key="index" class="rc-margin-top--md"> <li v-for="(item,index) in catshi" :key="index" class="rc-margin-top--md">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)"> <div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
@ -105,7 +140,7 @@
<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.name}}</span> <span>{{item.name}}</span>
<i>0.001{{item.price}}</i> <i>{{item.ecprice}}</i>
</div> </div>
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong> <strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
</div> </div>
@ -149,6 +184,7 @@
</ul> </ul>
</div> </div>
<div class=""> <div class="">
<div class="ts-no-data" v-if="!catshi.length">暂未发现相关记录</div>
<ul class="ts-product-list rc-margin-bottom--lg"> <ul class="ts-product-list rc-margin-bottom--lg">
<li v-for="(item,index) in rccontair" :key="index" class="rc-margin-top--md"> <li v-for="(item,index) in rccontair" :key="index" class="rc-margin-top--md">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)"> <div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
@ -179,6 +215,7 @@
<van-tabs @click='catclickGan' class="van-tabs" v-if="twomao" v-model="maoganCurIndex"> <van-tabs @click='catclickGan' class="van-tabs" v-if="twomao" v-model="maoganCurIndex">
<van-tab v-for="(item,index) in discoun" :key="index" :title="item.title"> <van-tab v-for="(item,index) in discoun" :key="index" :title="item.title">
<div class="rc-contair"> <div class="rc-contair">
<div class="ts-no-data" v-if="!catgan.length">暂未发现相关记录</div>
<ul class="ts-product-list rc-margin-bottom--lg"> <ul class="ts-product-list rc-margin-bottom--lg">
<li v-for="(item,index) in catgan" :key="index" class="rc-margin-top--md"> <li v-for="(item,index) in catgan" :key="index" class="rc-margin-top--md">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)"> <div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
@ -236,6 +273,7 @@
</ul> </ul>
</div> </div>
<div class="rc-contair"> <div class="rc-contair">
<div class="ts-no-data" v-if="!rccontair.length">暂未发现相关记录</div>
<ul class="ts-product-list rc-margin-bottom--lg"> <ul class="ts-product-list rc-margin-bottom--lg">
<li v-for="(item,index) in rccontair" :key="index" class="rc-margin-top--md"> <li v-for="(item,index) in rccontair" :key="index" class="rc-margin-top--md">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)"> <div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
@ -246,7 +284,7 @@
<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.title}}</span> <span>{{item.title}}</span>
<i>0.001{{item.price}}</i> <i>{{item.ecprice}}</i>
</div> </div>
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong> <strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
</div> </div>
@ -279,7 +317,7 @@
<swiper-slide v-for="(item, key) in doglistvideo" :key="key"> <swiper-slide v-for="(item, key) in doglistvideo" :key="key">
<div class="rc-video"> <div class="rc-video">
<div class="uservideo"> <div class="uservideo">
<video controls="" :poster=item.catimage> <video controls="" :poster=item.catimage preload="none">
<source :src=item.video type="video/mp4"> <source :src=item.video type="video/mp4">
</video> </video>
</div> </div>
@ -295,7 +333,7 @@
<div class="sw-center" > <div class="sw-center" >
<div class="rc-click" @click="selectproduce(item,index)"> <div class="rc-click" @click="selectproduce(item,index)">
<div class="uservideo"> <div class="uservideo">
<video controls="controls"> <video controls="controls" preload="none" :poster="item.catimage">
<source :src= item.video type="video/ogg"> <source :src= item.video type="video/ogg">
</video> </video>
</div> </div>
@ -343,6 +381,8 @@
</div> </div>
<div class="rc-contair"> <div class="rc-contair">
<div class="ts-no-data" v-if="!dogshi.length">暂未发现相关记录</div>
<ul class="ts-product-list rc-margin-bottom--lg"> <ul class="ts-product-list rc-margin-bottom--lg">
<li v-for="(item,index) in dogshi" :key="index" class="rc-margin-top--md"> <li v-for="(item,index) in dogshi" :key="index" class="rc-margin-top--md">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)"> <div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
@ -353,7 +393,7 @@
<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.name}}</span> <span>{{item.name}}</span>
<i>0.001{{item.price}}</i> <i>{{item.ecprice}}</i>
</div> </div>
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong> <strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
</div> </div>
@ -388,8 +428,6 @@
</ol> </ol>
<div class="rc-maa"> <div class="rc-maa">
<ul> <ul>
<li <li
v-for="(item, index) in doglist" v-for="(item, index) in doglist"
:key="index" :key="index"
@ -413,7 +451,7 @@
<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.title}}</span> <span>{{item.title}}</span>
<i>0.001{{item.price}}</i> <i>{{item.ecprice}}</i>
</div> </div>
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong> <strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
</div> </div>
@ -457,6 +495,7 @@
</ul> </ul>
</div> </div>
<div class="rc-contair"> <div class="rc-contair">
<div class="ts-no-data" v-if="!doggan.length">暂未发现相关记录</div>
<ul class="ts-product-list rc-margin-bottom--lg"> <ul class="ts-product-list rc-margin-bottom--lg">
<li v-for="(item,index) in doggan" :key="index" class="rc-margin-top--md"> <li v-for="(item,index) in doggan" :key="index" class="rc-margin-top--md">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)"> <div class="rc-click rc-margin-bottom--md" @click="selectproduce(item,index)">
@ -467,7 +506,7 @@
<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.name}}</span> <span>{{item.name}}</span>
<i>0.001{{item.price}}</i> <i>{{item.ecprice}}</i>
</div> </div>
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong> <strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
</div> </div>
@ -526,7 +565,7 @@
<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.title}}</span> <span>{{item.title}}</span>
<i>0.001{{item.price}}</i> <i>{{item.ecprice}}</i>
</div> </div>
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong> <strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="selectproduce(item,index)">立即购买</strong>
</div> </div>
@ -553,6 +592,7 @@
<van-tabs @click='userclick' class="van-tabs" v-if="fivemao"> <van-tabs @click='userclick' class="van-tabs" v-if="fivemao">
<van-tab v-for="(item,index) in discounchufang" :key="index" :title="item.title"> <van-tab v-for="(item,index) in discounchufang" :key="index" :title="item.title">
<div class="rc-contair"> <div class="rc-contair">
<div class="ts-no-data" v-if="!processinformation.length">暂未发现相关记录</div>
<ul class="ts-product-list rc-margin-bottom--lg"> <ul class="ts-product-list rc-margin-bottom--lg">
<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)">
@ -740,19 +780,16 @@
doggan:[], doggan:[],
dogtype:[ dogtype:[
{ {
title: "幼犬", title: "离乳期",
}, },
{ {
title: "成犬", title: "幼年",
}, },
{ {
title: "老年犬", title: "成年",
}, },
{ {
title: "品种犬", title: "老年",
},
{
title: "亚健康",
} }
], ],
anchor:'', anchor:'',
@ -823,22 +860,17 @@
], ],
discoun: [ discoun: [
{ {
title: "幼猫", title: "<4月龄",
}, },
{ {
title: "成猫", title: "4-12月龄",
}, },
{ {
title: "老年猫", title: "1-7岁",
}, },
{ {
title: "品种猫", title: ">7岁"
}
},
{
title: "亚健康猫"
},
], ],
discountlist: [ discountlist: [
@ -1065,9 +1097,12 @@
centeredSlides: true, centeredSlides: true,
speed:1000, speed:1000,
spaceBetween: 0, spaceBetween: 0,
autoplay: true, autoplay: {
delay: 3000,
},
pagination: { pagination: {
el: '#homeBannerSwiperPagnation' el: '#homeBannerSwiperPagnation',
clickable: true
}, },
paginationClickable: true, paginationClickable: true,
loopAdditionalSlides: 100, loopAdditionalSlides: 100,
@ -1094,6 +1129,7 @@
loopAdditionalSlides: 100, loopAdditionalSlides: 100,
pagination: { pagination: {
el: '#catStarSwiperPagnation', el: '#catStarSwiperPagnation',
clickable: true
}, },
navigation: { navigation: {
nextEl: '.swiper-button-next', nextEl: '.swiper-button-next',
@ -1117,6 +1153,7 @@
loopAdditionalSlides: 100, loopAdditionalSlides: 100,
pagination: { pagination: {
el: '#dogStarSwiperPagnation', el: '#dogStarSwiperPagnation',
clickable: true
}, },
navigation: { navigation: {
nextEl: '.swiper-button-next', nextEl: '.swiper-button-next',
@ -1367,13 +1404,14 @@
userdogShi(){ userdogShi(){
this.activeIndex5=(this.activeIndex5?this.activeIndex5:0); this.activeIndex5=(this.activeIndex5?this.activeIndex5:0);
let apiDogSize=this.userdoglist[this.activeIndex5].title; let apiDogSize=this.userdoglist[this.activeIndex5].title;
let apiDogFoodType=this.dogtype[this.quanshiCurIndex].title; let apiDogAgeType=this.dogtype[this.quanshiCurIndex].title;
this.userstype=1; this.userstype=1;
let petType={ let petType={
petType:1, petType:1,
categoryName:"皇家犬湿粮", categoryName:"皇家犬湿粮",
name:apiDogFoodType, tagUsedAge:apiDogAgeType,
name:apiDogSize
} }
for(let i =0;i<this.userserachlist.length;i++){ for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(petType)){ if(!this.userserachlist.includes(petType)){
@ -1386,12 +1424,13 @@
userdogGan(){ userdogGan(){
this.activeIndex6=(this.activeIndex6?this.activeIndex6:0); this.activeIndex6=(this.activeIndex6?this.activeIndex6:0);
let apiDogSize=this.userdoglist[this.activeIndex6].title; let apiDogSize=this.userdoglist[this.activeIndex6].title;
let apiDogFoodType=this.dogtype[this.quanganCurIndex].title; let apiDogAgeType=this.dogtype[this.quanganCurIndex].title;
this.userstype=1; this.userstype=1;
let petType={ let petType={
petType:1, petType:1,
name:apiDogFoodType, tagUsedAge:apiDogAgeType,
name:apiDogSize
} }
for(let i =0;i<this.userserachlist.length;i++){ for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(petType)){ if(!this.userserachlist.includes(petType)){
@ -1502,6 +1541,7 @@
//userlist=data.slice(0,6); //userlist=data.slice(0,6);
if(dataType) if(dataType)
{ {
console.log(this.dogshi,this.dogshi.length);
if(dataType=='Shi') if(dataType=='Shi')
this.dogshi=data; this.dogshi=data;
else if(dataType=='Gan') else if(dataType=='Gan')
@ -1562,10 +1602,10 @@
catclickGan(){ catclickGan(){
this.userstype=0; this.userstype=0;
this.maoganCurIndex=this.maoganCurIndex?this.maoganCurIndex:0; this.maoganCurIndex=this.maoganCurIndex?this.maoganCurIndex:0;
let apiCatType=this.discoun[this.maoganCurIndex].title; let apiCatAgeType=this.discoun[this.maoganCurIndex].title;
let petType={ let petType={
petType:0, petType:0,
name:apiCatType, tagUsedAge:apiCatAgeType
} }
for(let i =0;i<this.userserachlist.length;i++){ for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(petType)){ if(!this.userserachlist.includes(petType)){
@ -1577,11 +1617,11 @@
catclickShi(){ catclickShi(){
this.userstype=0; this.userstype=0;
this.maoshiCurIndex=this.maoshiCurIndex?this.maoshiCurIndex:0; this.maoshiCurIndex=this.maoshiCurIndex?this.maoshiCurIndex:0;
let apiCatType=this.discoun[this.maoshiCurIndex].title; let apiCatAgeType=this.discoun[this.maoshiCurIndex].title;
let petType={ let petType={
petType:0, petType:0,
categoryName:"皇家猫湿粮", categoryName:"皇家猫湿粮",
name:apiCatType, tagUsedAge:apiCatAgeType
} }
for(let i =0;i<this.userserachlist.length;i++){ for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(petType)){ if(!this.userserachlist.includes(petType)){

View File

@ -75,79 +75,7 @@ export default {
userstates:0, userstates:0,
userimage: require("../../assets/image/unused.png"), userimage: require("../../assets/image/unused.png"),
newlist: [ newlist: [
{
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",
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: [
{ {
@ -162,27 +90,7 @@ export default {
], ],
preferential: [ preferential: [
{
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",
},
], ],
userdiscount:[], userdiscount:[],
activeIndex: 0, activeIndex: 0,
@ -281,6 +189,5 @@ import Myheader from "~/components/header.vue";
<style lang="less" scoped> <style lang="less" scoped>
// //
@import url("../../assets/css/global.less");
@import url("../../assets/css/discount.less"); @import url("../../assets/css/discount.less");
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<Myheader></Myheader> <Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-usermain "> <div class="rc-usermain ">
<ul> <ul>
<li v-for="(item,index) in userrecord" :key="index"> <li v-for="(item,index) in userrecord" :key="index">

View File

@ -1,4 +1,5 @@
<template> <template>
<div>
<van-address-edit <van-address-edit
:area-list="areaList" :area-list="areaList"
show-postal show-postal
@ -10,13 +11,16 @@
@save="onSave" @save="onSave"
@delete="onDelete" @delete="onDelete"
@change-detail="onChangeDetail" @change-detail="onChangeDetail"
/> />
<addressInput></addressInput>
</div>
</template> </template>
<script> <script>
import { editaddress } from "../../ajax/getData"; import { editaddress } from "../../ajax/getData";
import { Toast } from 'vant'; import { Toast } from 'vant';
import { areaList } from '@vant/area-data'; import { areaList } from '@vant/area-data';
import addressInput from '~/components/addressInput.vue' //
export default { export default {
data(){ data(){
return{ return{
@ -69,7 +73,7 @@ export default {
}, },
components:{ components:{
addressInput
}, },

View File

@ -64,7 +64,7 @@
</div> </div>
<div class="rc-layout-container rc-two-column rc-button"> <div class="rc-layout-container rc-two-column rc-button">
<div class="rc-column rc-text--left"> <div class="rc-column rc-text--left">
<a href="#" class="rc-styled-link"><span>隐私政策</span></a> <a href="https://royalcanin.com.cn/privacy" target="_blank" class="rc-styled-link"><span>隐私政策</span></a>
</div> </div>
<div class="rc-column rc-text--right"> <div class="rc-column rc-text--right">
<nuxt-link :to="`/userlogin/login/`" class="rc-styled-link"> <nuxt-link :to="`/userlogin/login/`" class="rc-styled-link">
@ -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

@ -84,7 +84,7 @@
</div> </div>
<div class="rc-layout-container rc-two-column rc-button"> <div class="rc-layout-container rc-two-column rc-button">
<div class="rc-column rc-text--left"> <div class="rc-column rc-text--left">
<a href="#" class="rc-styled-link"><span>隐私政策</span></a> <a href="https://royalcanin.com.cn/privacy" target="_blank" class="rc-styled-link"><span>隐私政策</span></a>
</div> </div>
<div class="rc-column rc-text--right"> <div class="rc-column rc-text--right">
<nuxt-link :to="`/userlogin/edit/`" class="rc-styled-link"> <nuxt-link :to="`/userlogin/edit/`" class="rc-styled-link">
@ -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> -->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 66 KiB