!43 2022-1-19 Leung

Merge pull request !43 from Admin/sit-Leung
This commit is contained in:
Admin 2022-01-19 13:55:33 +00:00 committed by Gitee
commit 697c9ebceb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
17 changed files with 552 additions and 226 deletions

View File

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

View File

@ -27,6 +27,9 @@
img{
border-radius: 50%;
}
&:first-child{
margin-left:0;
}
&.active {
img{
border: 3px solid #E2001A;
@ -46,8 +49,8 @@
.uservideo{
overflow: hidden;
video{
height:100%;
width:auto;
width:100%;
height:auto;
}
}
.ul-dog{
@ -179,50 +182,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%;
@ -238,6 +234,7 @@
flex-direction: column;
justify-content: flex-start;
align-items: center;
vertical-align: top;
}
img{
width: 10rem;
@ -276,16 +273,14 @@
/* 中间的图片 */
.swiper-container .swiper-wrapper .swiper-slide-active {
height: 165px !important;
}
.swiperWrap{
height: 469px;
width: 100%;
height: 469px;
width: 100%;
img{
height: 469px;
width: 100%;
height: 469px;
width: 100%;
}
/deep/.swiper-pagination-bullet-active{
background: red;
@ -379,6 +374,9 @@
}
.ts-banner-swiper-container{
position:relative;
img{
margin:0 auto;
}
.ts-carousel-indicator{
position:absolute;
bottom:.4rem;

View File

@ -55,11 +55,13 @@
}
.container {
font-size: 0.1rem;
background-color:#fff;
.van-field__body {
border-bottom: 1px solid red;
}
.content {
margin-top: 24px;
box-shadow: unset;
}
.userfoget {
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">
<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">
@ -45,10 +46,7 @@
<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" 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">
<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">
<span class="">法律声明 ©2021 ROYAL CANIN, Inc.</span>
<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;
<a target='_blank' href='https://royalcanin.com.cn/declaration'><span class="">法律声明</span></a>
</div>

View File

@ -4,22 +4,22 @@ export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'rc-busness',
title: '皇家官方商城',
htmlAttrs: {
lang: 'en',
lang: 'zh-cn',
},
script: [
//{ src: '/js/rem.js' },
// { 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/14054/index.js' },
{ innerHTML: trackingScript, 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' },
],
__dangerouslyDisableSanitizers: ['script', 'innerHTML'],
{ 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' },//订单
{ innerHTML: trackingScript, 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' },
],
__dangerouslyDisableSanitizers: ['script', 'innerHTML'],
meta: [
{ charset: 'utf-8' },

View File

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

View File

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

View File

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

View File

@ -1,22 +1,26 @@
<template>
<van-address-edit
:area-list="areaList"
show-postal
show-delete
show-set-default
show-search-result
:search-result="searchResult"
:area-columns-placeholder="['请选择', '请选择', '请选择']"
@save="onSave"
@delete="onDelete"
@change-detail="onChangeDetail"
/>
<div>
<van-address-edit
:area-list="areaList"
show-postal
show-delete
show-set-default
show-search-result
:search-result="searchResult"
:area-columns-placeholder="['请选择', '请选择', '请选择']"
@save="onSave"
@delete="onDelete"
@change-detail="onChangeDetail"
/>
<addressInput></addressInput>
</div>
</template>
<script>
import { editaddress } from "../../ajax/getData";
import { Toast } from 'vant';
import { areaList } from '@vant/area-data';
import addressInput from '~/components/addressInput.vue' //
export default {
data(){
return{
@ -69,7 +73,7 @@ export default {
},
components:{
addressInput
},

View File

@ -64,7 +64,7 @@
</div>
<div class="rc-layout-container rc-two-column rc-button">
<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 class="rc-column rc-text--right">
<nuxt-link :to="`/userlogin/login/`" class="rc-styled-link">
@ -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

@ -84,7 +84,7 @@
</div>
<div class="rc-layout-container rc-two-column rc-button">
<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 class="rc-column rc-text--right">
<nuxt-link :to="`/userlogin/edit/`" class="rc-styled-link">
@ -104,6 +104,7 @@
@click="register()"
class="ts-standard-btn ts-standard-btn--max-width"
value="登录"
readonly=""
></input
>
<!-- <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