回退 'Pull Request !14 : 2022-01-14'

This commit is contained in:
Admin
2022-01-14 15:51:39 +00:00
committed by Gitee
parent 05a17d897f
commit 91fbeba1a4
62 changed files with 30797 additions and 1857 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +1,38 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-main rc-layout-container rc-max-width--lg">
<div class="rc-usermain">
<ul>
<li v-for="(item,index) in userrecord" :key="index">
{{item.title}}
</li>
</ul>
<ol>
<li v-for="(item,index) in usermessage" :key="index">
<span>{{item.startDate}}</span>
<em>{{item.changeValue}}</em>
<i>{{item.remark}}</i>
</li>
</ol>
</div>
<div class="rc-usermain ">
<ul>
<li v-for="(item,index) in userrecord" :key="index">
{{item.title}}
</li>
</ul>
<ol>
</div>
<Myfooter v-on:litentop='showmesg'></Myfooter>
</div>
<li v-for="(item,index) in usermessage" :key="index">
<span>{{item.startDate}}</span>
<em>{{item.changeValue}}</em>
<i>{{item.remark}}</i>
</li>
</ol>
</div>
<div class="rc-button">
<div class="rc-order">
<span>积分兑换</span>
</div>
</div>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
import Myfooter from '~/components/rc-footer.vue'
import { memberAccount } from "../../ajax/getData";
import { memberAccount } from "../../ajax/getData";
export default {
data(){
return{
@@ -103,7 +108,6 @@ export default {
},
components:{
Myheader,
Myfooter
},
}
@@ -111,4 +115,6 @@ export default {
<style lang="less" scoped>
@import url("../../assets/css/integral.less");
</style>

View File

@@ -1,8 +1,8 @@
<template>
<div>
<Myheader></Myheader>
<!-- <tabs></tabs> -->
<div class="rc-top"></div>
<tabs></tabs>
<div class="rc-layout-container rc-one-column rc-full-width ts-mypersonal">
<div class="rc-column">
<!-- <div class="rc-title">
@@ -47,8 +47,9 @@
<div class="rc-cordd">
<span>距离升级还差:</span> <span class="lackOfPoint">{{ rcvalue }}</span>
<div class="block">
<div class="ts-point-tag rc-md-up"></div>
<div class="r-block" ref="userblock"></div>
<div class="r-block" ref="userblock"></div>
<!-- <el-slider v-model="value" range show-stops :max="10"> </el-slider> -->
</div>
<div class="rc-value">
<span>0</span>
@@ -128,7 +129,7 @@
<MyFooter></MyFooter>
</div>
@@ -136,8 +137,7 @@
</template>
<script>
import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue'
import Myheader from '~/components/header.vue'
import tabs from "@/components/tabs.vue";
export default {
middleware: 'metaTitle',
@@ -145,16 +145,16 @@ export default {
meta: {title: '个人中心'},
data() {
return {
userlog:false,
islogin:false,
dialogInfo1:false,
userid:null,
usertitle:'',
rcvalue:5000,
usermessage:'关注皇家爱宠荟,修改个人资料',
userimage:require("../../assets/image/rc-new.png"),
userlogin:'登录注册',
userorder: "新手铲屎官",
userlog:false,
islogin:false,
dialogInfo1:false,
userid:null,
usertitle:'',
rcvalue:5000,
usermessage:'关注皇家爱宠荟,修改个人资料',
userimage:require("../../assets/image/rc-new.png"),
userlogin:'登录注册',
userorder: "新手铲屎官",
prefecture: [
{
title: "待付款",
@@ -199,11 +199,10 @@ export default {
};
},
components: {
Myheader,
MyFooter,
tabs,
},
components: {
Myheader,
tabs,
},
watch:{
},
@@ -313,7 +312,7 @@ obligation(item,index){
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
//console.log("当前是电脑打开")
console.log("当前是电脑打开")
if(this.userlog==true){
this.usermessage='关注皇家爱宠荟,修改个人资料',
this.dialogInfo1=true;
@@ -323,7 +322,7 @@ obligation(item,index){
}
}else{
//console.log("当前是手机打开")
console.log("当前是手机打开")
this.dialogInfo1=false;
}
},
@@ -339,12 +338,13 @@ obligation(item,index){
return
}else{
if(item.title=='收货地址'){
this.$router.push({
path: `/useraddress/openaddress/`
})
//console.log('这是地址的跳转');
}
if(item.title=='收货地址'){
this.$router.push({
path: `/useraddress/openaddress/`
})
console.log('这是地址的跳转');
}
if(index==0){
this.userlog=true
this.ifadroind();
@@ -368,58 +368,55 @@ obligation(item,index){
}
},
mounted() {
//console.log(this.islogin)
//console.log(this.userid);
let userwidth=0;
this.ifadroind();
let user= JSON.parse(localStorage.getItem("userInfo"));
//console.log(user)
if(user!==null){
//console.log('11')
this.userid=user.data;
console.log(this.userid);
this.usertitle=this.userid.memberName;
this.rcrcord=this.userid.availiblePoint;
if(this.userid.memberLevel==1){
let userlength=this.userid.availiblePoint.toString().length;
this.userimage=require('../../assets/image/rc-new.png');
this.userorder='新手铲屎官';
this.uservalue=5000; //新手总积分
this.rcvalue=this.uservalue-this.userid.availiblePoint; //新手总积分减去本身的积分
if(userlength==1||userlength==2||userlength==3||userlength==4){
userwidth=this.userid.availiblePoint/100
//console.log(userwidth);
}
}
else if(this.userid.memberLevel==2){
this.userimage=require('../../assets/image/rc-new2.png');
this.userorder='资深铲屎官';
this.uservalue=10000;
this.rcvalue=this.uservalue-this.userid.availiblePoint;
userwidth=this.userid.availiblePoint/100
}else if( this.userid.memberLevel==3){
this.userimage=require('../../assets/image/rc-new1.png');
this.userorder='金牌铲屎官';
this.usrnewlist=this.goldmedal;
userwidth=100
}
this.$refs.userblock.style.width=userwidth+'%'
let tagEle=document.querySelector('.ts-point-tag');
if(tagEle){
tagEle.innerText=this.userid.availiblePoint;
let tagEleLeft=userwidth-1;
if(tagEleLeft<=0)
tagEleLeft=0;
tagEle.style.left=tagEleLeft+"%";
}
} else{
console.log(this.islogin)
console.log(this.userid);
let userwidth=0;
this.ifadroind();
let user= JSON.parse(localStorage.getItem("userInfo"));
console.log(user)
if(user!==null){
console.log('11')
this.userid=user.data;
console.log(this.userid);
this.usertitle=this.userid.memberName;
this.rcrcord=this.userid.availiblePoint;
if(this.userid.memberLevel==1){
let userlength=this.userid.availiblePoint.toString().length;
this.userimage=require('../../assets/image/rc-new.png');
this.userorder='新手铲屎官';
this.uservalue=5000; //新手总积分
this.rcvalue=this.uservalue-this.userid.availiblePoint; //新手总积分减去本身的积分
if(userlength==1||userlength==2||userlength==3||userlength==4){
userwidth=this.userid.availiblePoint/100
console.log(userwidth);
}
}
else if(this.userid.memberLevel==2){
this.userimage=require('../../assets/image/rc-new2.png');
this.userorder='资深铲屎官';
this.uservalue=10000;
this.rcvalue=this.uservalue-this.userid.availiblePoint;
userwidth=this.userid.availiblePoint/100
}else if( this.userid.memberLevel==3){
this.userimage=require('../../assets/image/rc-new1.png');
this.userorder='金牌铲屎官';
this.usrnewlist=this.goldmedal;
userwidth=100
}
this.$refs.userblock.style.width=userwidth+'%'
} else{
console.log('---');
this.userid=[];
}
if(this.userid==undefined ||this.userid==''||this.userid==null){
console.log(this.userid)
this.islogin=true;
console.log(this.userid)
this.islogin=true;
}
},

View File

@@ -1,6 +1,7 @@
<template>
<div>
<Myheader></Myheader>
<tabs></tabs>
<div class="online"></div>
<div class="rc-main" v-for="(item,index) in goldmedal" :key="index" >
<div class="rc-border"></div>
@@ -103,8 +104,11 @@
<script>
import Myheader from "~/components/header.vue";
import { userin} from "../../ajax/getData";
import {userin} from "../../ajax/getData";
import tabs from "@/components/tabs.vue";
export default {
middleware: 'metaTitle',
meta: {title: '订单结算'},
data() {
return {
goldmedal:[],
@@ -187,6 +191,7 @@ jiesuan(){
},
components: {
Myheader,
tabs
},
};
</script>

View File

@@ -1,8 +1,7 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-full-width rc-layout-container">
<div class="rc-header">
<div class="rc-main">
<div class="rc-headera">
<span
@@ -118,39 +117,27 @@ export default {
goldmedal: [
{
ordernumber: "1111111111111111111",
orderstype: 1,
usereat: "专属升级奖励",
ordernum: 0,
num: "5kg",
specification: "1",
buttontitle:'立即支付',
userprice: "167.00",
catimage: require("../../assets/image/rc-win.png"),
orderDetailList:{
userlist:{
num:10,
pcs:10,
ecprice:167
}
}
ordernumber: "1111111111111111111",
orderstype: 1,
usereat: "专属升级奖励",
ordernum: 0,
num: "5kg",
specification: "1",
buttontitle:'立即支付',
userprice: "167.00",
catimage: require("../../assets/image/rc-win.png"),
},
{
ordernumber: "1111111111111111111",
usereat: "每年4次免积分产品试吃",
ordernum: 0,
buttontitle:'再次购买',
catimage: require("../../assets/image/usereat.png"),
orderstype: 2,
userprice: "167.00",
orderDetailList:{
userlist:{
num:10,
pcs:10,
ecprice:167
}
}
ordernumber: "1111111111111111111",
usereat: "每年4次免积分产品试吃",
ordernum: 0,
buttontitle:'再次购买',
catimage: require("../../assets/image/usereat.png"),
orderstype: 2,
userprice: "167.00",
},
{
ordernumber: "1111111111111111111",
@@ -160,13 +147,6 @@ export default {
catimage: require("../../assets/image/usercar.png"),
orderstype: 3,
userprice: "167.00",
orderDetailList:{
userlist:{
num:10,
pcs:10,
ecprice:167
}
}
},
{
ordernumber: "1111111111111111111",
@@ -183,13 +163,6 @@ export default {
catimage: require("../../assets/image/consult.png"),
orderstype: 2,
userprice: "167.00",
orderDetailList:{
userlist:{
num:10,
pcs:10,
ecprice:167
}
}
},
{
ordernumber: "1111111111111111111",
@@ -198,13 +171,6 @@ export default {
catimage: require("../../assets/image/rc-book.png"),
orderstype: 3,
userprice: "167.00",
orderDetailList:{
userlist:{
num:10,
pcs:10,
ecprice:100
}
}
},
{
ordernumber: "1111111111111111111",
@@ -213,13 +179,6 @@ export default {
catimage: require("../../assets/image/userself.png"),
orderstype: 3,
userprice: "167.00",
orderDetailList:{
userlist:{
num:10,
pcs:10,
ecprice:100
}
}
},
{
usereat: "每年积分兑换1次价值288元的免费体检及100元医院绝育券",
@@ -227,83 +186,84 @@ export default {
catimage: require("../../assets/image/rc-health.png"),
orderstype: 3,
userprice: "167.00",
orderDetailList:{
userlist:{
num:10,
pcs:10,
ecprice:100
}
}
},
],
};
},
mounted() {
let user= JSON.parse(localStorage.getItem("userInfo"));
this.userdata=user;
let stype=this.$route.query.stype
if(user=='' ||user==null){
this.$message({
type: 'warning',
message: '请先去登录'
});
return
}else{
this.indet(user.data.mobile,stype);
}
let user= JSON.parse(localStorage.getItem("userInfo"));
this.userdata=user;
let stype=this.$route.query.stype
if(user=='' ||user==null){
this.$message({
type: 'warning',
message: '请先去登录'
});
return
}else{
this.indet(user.data.mobile,stype);
}
},
components: {
Myheader,
Myheader,
},
methods: {
async indet(mobile,stype){
let data=await userindent(mobile,);
this.activeIndex=stype;
//this.goldmedal=data;
let list=[];
let fahuolist=[];
console.log(this.goldmedal);
for(let i=0;i<this.goldmedal.length;i++){
list.push(this.goldmedal[i].orderDetailList);
}
},
async indet(mobile,stype){
let data=await userindent(mobile,);
this.activeIndex=stype;
this.goldmedal=data;
let list=[];
let fahuolist=[];
console.log(this.goldmedal);
for(let i=0;i<this.goldmedal.length;i++){
list.push(this.goldmedal[i].orderDetailList);
}
},
async canceldanhao(orderNumber){
let data=await canceldanhao(orderNumber);
console.log(data);
if(data){
this.$message({
type: 'warning',
message: '取消订单成功'
});
this.indet(this.userdata.data.mobile);
}
},
async canceldanhao(orderNumber){
let data=await canceldanhao(orderNumber);
console.log(data);
if(data){
this.$message({
type: 'warning',
message: '取消订单成功'
});
this.indet(this.userdata.data.mobile);
}
userpay(item,index){
console.log(item);
if(item.status==0){
this.canceldanhao(item.orderNumber);
}
console.log(item.buttontitle);
if(item.buttontitle=='立即支付'){
this.$router.push({
path: "/personal/userpay",
query: {
stype: 1,
},
});
}else if(item.buttontitle=='再次购买'){
this.$router.push({
path: "/myorder/userrecord",
query: {
stype: 1,
},
});
}
},
},
userpay(item,index){
console.log(item);
if(item.status==0){
this.canceldanhao(item.orderNumber);
}
console.log(item.buttontitle);
if(item.buttontitle=='立即支付'){
this.$router.push({
path: "/personal/userpay",
query: {
stype: 1,
},
});
}else if(item.buttontitle=='再次购买'){
this.$router.push({
path: "/myorder/userrecord",
query: {
stype: 1,
},
});
}
},
selectGoods(item, index) {
this.activeIndex = index;
if(index==1){
@@ -339,6 +299,360 @@ export default {
</script>
<style lang="less" scoped>
@import url("../../assets/css/global.less");
@import url("../../assets/css/useraddress.less");
// 手机端
@media screen and(min-width: 320px) and(max-width:768px) {
.active {
font-size: 14px;
color: #e2001a;
cursor: pointer;
}
.unactive {
font-size: 14px;
color: #444444;
cursor: pointer;
}
.rc-header {
width: 100%;
.rc-main {
width: 92%;
margin: 0 auto;
.rc-usermaina{
width: 100%;
height: 100%;
}
.rc-headera {
display: flex;
justify-content: space-between;
height: 64px;
align-items: center;
}
.rc-userheader{
display: none;
}
.rc-center {
width: 100%;
height: 245px;
margin-top: 8px;
.rc-usermain {
.pc-bottom{
display: none;
}
display: flex;
.rc-image {
border: 1px solid #D8D8D8;
margin-top: 17px;
;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottomm{
display: none;
}
display: flex;
flex-direction: column;
width: 100%;
margin-left: 16px;
justify-content: center;
em
{
font-style: normal;
display: block;
font-size: 16px;
margin-top: 18px;
font-weight: bold;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 14px;
span{
display: block;
margin-top: 16px;
}
}
.rc-userbottom {
display: flex;
justify-content: space-between;
margin-top: 8px;
span{
color: #666666;
font-size: 14px;
}
i{
font-style: normal;
color: #E1001A;
font-size: 18px;
font-weight: bold;
}
}
}
.rc-bottom {
display: flex;
align-items: center;
justify-content: center;
margin-top: 24px;
span {
display: block;
width: 130px;
display: flex;
align-items: center;
line-height: 40px;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
font-weight: bold;
}
span:last-child{
margin-left: 15px;
}
}
}
.rc-title {
height: 52px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 14px;
color: #999999;
margin-left: 8px;
}
em{
font-style: normal;
font-size: 14px;
color: #333333;
}
i{
font-style: normal;
font-size: 14px;
color: #333333;
}
.rc-usertitle strong{
display: none;
}
}
}
}
}
// /* 最小768px最大1920 *pc端/
@media screen and (min-width: 768px) and (max-width: 1920px) {
.active {
font-size: 18px;
color: #e2001a;
cursor: pointer;
// margin-left: 40px;
}
.unactive {
font-size: 18px;
color: #444444;
cursor: pointer;
// margin-left: 80px;
}
.rc-header {
.rc-main {
width: 92%;
margin: 0 auto;
.rc-headera {
display: flex;
height: 64px;
align-items: center;
border: 1px solid #D7D7D7;
border-radius: 3px 3px 0px 0px;
font-size: 18px;
span:first-child{
margin-left: 40px;
}
span{
margin-left: 80px;
}
}
.rc-userheader{
width: 100%;
height: 64px;
background: #F6F6F6;
border: 1px solid #D7D7D7;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 18px;
span:first-child{
margin-left: 173px;
}
span:last-child{
margin-right: 87px;
}
}
.rc-center {
width: 100%;
height: 220px;
border: 1px solid #D7D7D7;
.rc-usermain {
display: flex;
justify-content: space-between;
align-items: center;
height: 164px;
.rc-usercenter{
width: 25%;
em{
font-size: 18px;
}
}
.rc-image {
border: 1px solid #D8D8D8;
margin-left: 40px;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottom{
display: none;
}
display: flex;
width: 100%;
margin-left: 16px;
em
{
font-style: normal;
font-weight: bold;
font-size: 16px;
margin-top: 18px;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 16px;
span{
display: block;
margin-top: 6px;
}
}
.rc-userbottomm {
display: flex;
justify-content: space-between;
align-items: center;
width: 58%;
font-size: 20px;
color: #E1001A;
font-weight: bold;
i{
font-style: normal;
}
}
.pc-bottom {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-right: 40px;
span {
display: block;
width: 130px;
cursor: pointer;
display: flex;
align-items: center;
line-height: 40px;
font-weight: bold;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
}
span:last-child{
margin-top: 15px;
}
}
}
.rc-bottom {
display: none;
}
}
.rc-title {
height: 55px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 16px;
color: #999999;
margin-left: 8px;
}
strong{
font-style: normal;
font-size: 16px;
color: #444444;
}
em{
font-style: normal;
font-size: 16px;
color: #333333;
}
i{
font-style: normal;
font-size: 16px;
margin-left: 40px;
color: #333333;
}
.rc-usertitle{
margin-right: 73px;
display: flex;
align-items: center;
em{
display: block;
margin-left: 8px;
}
}
}
}
}
}
</style>

View File

@@ -2,11 +2,14 @@
<div>
<div class="user" v-for="(item,index) in newlist" :key="index">
<Myheader></Myheader>
<div class="rc-top"></div>
<unlogin></unlogin>
<tabs></tabs>
<div class="online" ></div>
<div class="online" id="fixed-catbar-seperator"></div>
<div class="rc-top"></div>
<div class="rc-usermain ts-product-detail rc-max-width--xl rc-layout-container rc-two-column rc-border-bottom rc-border-colour--brand4">
<!--
<magnifier v-bind:parentmsg="msg" ></magnifier>
-->
<div class="rc-column">
<div data-js-carousel="" data-image-gallery="true">
<div class="rc-carousel rc-carousel__gallery-image" data-zoom-container="328b2e5f-6904-4cac-9709-51ed18d2500f" data-zoom-factor="2">
@@ -44,14 +47,14 @@
</div>
<div class="ts-product-header rc-column" id="328b2e5f-6904-4cac-9709-51ed18d2500f">
<div class="usermain fixed-catbar-seperator">
<div class="usermain">
<div class="online bold rc-md-down"></div>
<div class="rc-main">
<div class="rc-title">
<h2>{{ item.productName }}</h2>
</div>
</div>
<div class="online rc-md-down" id="fixed-catbar-seperator"></div>
<div class="online rc-md-down"></div>
<div class="rc-main">
<div class="productdetails">
<div class="rc-productdetail">
@@ -220,6 +223,7 @@
<script>
import Myheader from "~/components/header.vue";
import magnifier from "@/components/magnifier.vue";
import tabs from "@/components/tabs.vue";
import unlogin from "~/components/unlogin.vue";
import { mapMutations } from "vuex";
@@ -232,24 +236,24 @@ export default {
// meta: {title: '产品详情'},
data() {
return {
tableLabelTest:[],
userimage: require("../../assets/image/unused.png"),
activeIndexa:0,
gotop: false,
dialogInfo1:false,
name: [],
userlist:[],
drawlist:[],//用户可以领取的优惠券
alldraw:[],
userlistmenu:[],
msg:['11111111'],
parent_msg:['111'],
usermessage:[],
dialogInfo2:false,
productCode:'',//商品code
productlist:[],
userbuy:true,
sales_num:1,
tableLabelTest:[],
userimage: require("../../assets/image/unused.png"),
activeIndexa:0,
gotop: false,
dialogInfo1:false,
name: [],
userlist:[],
drawlist:[],//用户可以领取的优惠券
alldraw:[],
userlistmenu:[],
msg:['11111111'],
parent_msg:['111'],
usermessage:[],
dialogInfo2:false,
productCode:'',//商品code
productlist:[],
userbuy:true,
sales_num:1,
usernewlist: [
{
price: "30",
@@ -316,41 +320,43 @@ export default {
components: {
Myheader,
tabs,
magnifier,
unlogin,
Myfooter
},
mounted() {
window.addEventListener("scroll", this.handleScroll, true);
if(this.usermessage!=='' ||this.usermessage.data!==undefined){
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
let stype=this.$route.query.stype;
this.productCode=this.$route.query.productCode;
console.log(this.productCode)
this.userquery(this.productCode);
console.log(this.userlistmenu)
this.$nextTick(()=>{})
if(stype==1){
this.userbuy=true;
}else if(stype==2){
console.log('这是要消失的')
this.$nextTick(() => {
this.userbuy=false;
})
}
}
window.addEventListener("scroll", this.handleScroll, true);
if(this.usermessage!=='' ||this.usermessage.data!==undefined){
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
let stype=this.$route.query.stype;
this.productCode=this.$route.query.productCode;
console.log(this.productCode)
this.userquery(this.productCode);
console.log(this.userlistmenu)
this.$nextTick(()=>{
})
if(stype==1){
this.userbuy=true;
}else if(stype==2){
console.log('这是要消失的')
this.$nextTick(() => {
this.userbuy=false;
})
}
}
},
methods: {
...mapMutations(["changemessage"]),
handleScroll(e)
handleScroll(e)
{
let fixedCatbarSeperator = document.getElementById("fixed-catbar-seperator");
if(!fixedCatbarSeperator)
{
return;
}
let fixedCatbarSeperator = document.querySelector("#fixed-catbar-seperator");
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
if(fixedCatbarSeperator!=='null' ){
if((scrolltop-fixedCatbarSeperator.offsetTop))
@@ -546,25 +552,32 @@ if(this.usermessage.data!==''||this.usermessage.data!==undefined){
console.log(data);
},
usertanchu(item,orderm){
let user= localStorage.getItem("userInfo");
if(user==undefined||user==null||user==''){
this.dialogInfo2=true;
return
}else{
this.courseId(item);
if(orderm==0){
this.$message({
type: 'warning',
message: '加入购物车成功'
});
}
if(orderm==1){
this.$router.push({
path: "/myorder/userrecord",
});
}
}
let user= localStorage.getItem("userInfo");
if(user==undefined||user==null||user==''){
this.dialogInfo2=true;
return
}else{
this.courseId(item);
if(orderm==0){
this.$message({
type: 'warning',
message: '加入购物车成功'
});
}
if(orderm==1){
this.$router.push({
path: "/myorder/userrecord",
});
}
}
},
userget(){

View File

@@ -464,29 +464,15 @@ export default {
});
},
openclose(){
this.dialogInfo1=false;
this.dialogInfo1=false;
},
selectproduce(item){
if(item.productList[0]==undefined){
item.productlist[0].productCode=0;
}
if(item.productList[0]==undefined){
item.productlist[0]=[];
}
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
productCode:item.productList[0].productCode
},
});
// this.$router.push({
// path: "/productdetails/producted",
// query: {
// stype: 1,
// }
// });
selectproduce(){
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
},
});
},
ifadroind(){
var sUserAgent = navigator.userAgent.toLowerCase();
@@ -500,7 +486,7 @@ export default {
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
//console.log("当前是电脑打开")
console.log("当前是电脑打开")
this.$nextTick(() => {
this.isadrond=false;
@@ -512,7 +498,7 @@ export default {
}else{
//console.log("当前是手机打开")
console.log("当前是手机打开")
this.$nextTick(() => {
this.isadrond=true;
@@ -604,17 +590,18 @@ export default {
this.activeIndexe=index;
},
selectproduct(item, index){
this.activeIndexb=index;
let categoryName={
petType:this.activeIndex1,
categoryName:item.tagName,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(categoryName)){
this.userserachlist.push(categoryName)
}
}
this.usersearch(this.userserachlist)
this.activeIndexb=index;
let categoryName={
petType:this.activeIndex1,
categoryName:item.tagName,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(categoryName)){
this.userserachlist.push(categoryName)
}
}
this.usersearch(this.userserachlist)
},
//弹框的显示隐藏

View File

@@ -1,7 +1,8 @@
// <!-- -->
<template>
<div class="container rc-full-width">
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="container rc-full-width">
<Myheader></Myheader>
<div class="content ts-max-width--460">
<h2 class="rc-beta rc-text--center">账号注册</h2>
@@ -49,7 +50,7 @@
>
</div>
</div>
<div class="rc-layout-container rc-one-column">
<div class="usecheck rc-column rc-text--left">
<label>
@@ -100,28 +101,28 @@ import Myheader from '~/components/header.vue' //引用头部公共组件
export default {
data () {
return {
phone:'',
layerMSg:'手机格式不对',
tel:'',
password:'',
captchadata:'',
tamp:'',
hash:'',
sms:'',
buttonmsg:'获取验证码',
flag:false,
adminCode:'',
zhud:false,
usercheckbox:false,
loading:false,
usertitle:true,
gender: '',
inRank:false,
ifpassword:false
phone:'',
layerMSg:'手机格式不对',
tel:'',
password:'',
captchadata:'',
tamp:'',
hash:'',
sms:'',
buttonmsg:'获取验证码',
flag:false,
adminCode:'',
zhud:false,
usercheckbox:false,
loading:false,
usertitle:true,
gender: '',
inRank:false
};
},
components: {
Myheader,
// Myheader,
},
computed: {
usertel () {
@@ -142,7 +143,20 @@ export default {
return ''
}
},
// test () {
// if (this.sms === ""){
// return ''
// }else if(this.sms.length !== 5){
// return '验证码格式错误'
// }else {
// return ''
// }
// }
},
components: {
},
mounted(){
},
@@ -150,38 +164,44 @@ export default {
//获取验证码
async usermsg() {
//console.log("-----");
async usermsg() {
console.log("-----");
let data = await sendMsg(this.tel);
if(data){
//console.log(data);
//this.captchadata=data.msgNum;
console.log(data);
this.captchadata=data.msgNum;
this.tamp=data.tamp;
this.hash=data.hash;
}
},
async vadmsg() {
//console.log("-----");
let data = await vadatnmsg(this.sms,this.hash,this.tamp);
if(data){
return data;
}
//发送验证码数据
async vadmsg() {
console.log("-----");
let data = await vadatnmsg(this.captchadata,this.hash,this.tamp);
if(data){
console.log(data);
if(!data.code==1){
return false
}
}
},
checkBox(){
//console.log(event.target.checked)
this.usercheckbox=event.target.checked
checkBox(){
console.log(event.target.checked)
this.usercheckbox=event.target.checked
},
//添加优惠券
async serdiscount (mobile,couponId) {
async serdiscount (mobile,couponId) {
let data = await inserdiscount(mobile,couponId);
if(data){
console.log(data);
}
//console.log(data);
console.log(data);
},
//注册账户
sendCode () {
@@ -222,13 +242,13 @@ export default {
return
}
// if(this.sms!==this.captchadata){
// this.$message({
// type: 'warning',
// message: '验证码输入有误请重新输入'
// });
// return
// }
if(this.sms!==this.captchadata){
this.$message({
type: 'warning',
message: '验证码输入有误请重新输入'
});
return
}
if(this.sms==''){
this.$message({
type: 'warning',
@@ -241,7 +261,7 @@ export default {
console.log('----');
this.$message({
type: 'warning',
message: '请先同意隐私声明和账号使用协议'
message: '请先勾选'
});
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
@@ -253,31 +273,30 @@ export default {
}
}
else{
//let user= JSON.parse(localStorage.getItem("userInfo"));
let data = await this.vadmsg();
if(data.code=="1")
{
data=await useredit(this.tel);
if(data.code=='1'){
let couponId='0000000123';
this.serdiscount(this.tel,couponId);
setTimeout(() => {
this.serdiscount(this.tel,"0000000140");
}, 100);
setTimeout(() => {
this.serdiscount(this.tel,"0000000122");
}, 500);
this.$router.push({
path: "/",
});
return;
}
}
this.$message({
type: 'warning',
message: data.msg
});
return
let user= JSON.parse(localStorage.getItem("userInfo"));
console.log(this.tel);
let data=await useredit(this.tel);
this.vadmsg();
this.$message({
type: 'warning',
message: data.msg
});
if(data){
let couponId='0000000123';
this.serdiscount(user.data.mobile,couponId);
setTimeout(() => {
this.serdiscount(user.data.mobile,"0000000140");
}, 100);
setTimeout(() => {
this.serdiscount(user.data.mobile,"0000000122");
}, 500);
}
return
}

View File

@@ -1,8 +1,8 @@
<template>
<div class="container rc-full-width">
<div class="container rc-full-width">
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="content ts-max-width--460">
<div class="content ts-max-width--460">
<h2 class="rc-beta rc-text--center">{{ usertitle ? "账号登录" : "" }}</h2>
<!-- Deprecated : No tab switching as no password
<div class="rc-header">
@@ -15,6 +15,7 @@
>
</div>
-->
<div class="rc-layout-container rc-one-column">
<div class="rc-column">
<input
@@ -28,23 +29,23 @@
</div>
</div>
<!-- Deprecated : No tab switching as no password
<input
v-model="text"
class="ts-standard-input ts-standard-input--two"
placeholder="请输入账号"
v-if="ifpassword"
clearable
/>
<van-field
v-model="password"
type="password"
placeholder="请输入密码"
v-if="ifpassword"
clearable
/>
<input
v-model="text"
class="ts-standard-input ts-standard-input--two"
placeholder="请输入账号"
v-if="ifpassword"
clearable
/>
<van-field
v-model="password"
type="password"
placeholder="请输入密码"
v-if="ifpassword"
clearable
/>
-->
<div class="rc-layout-container rc-two-column">
<div class="rc-column">
@@ -109,7 +110,7 @@
<!-- <van-divider @click="toLogin">注册账户</van-divider> -->
</div>
</div>
</div>
</div>
</div>
</template>
@@ -145,11 +146,11 @@ export default {
swiperData: [
// { index: 1 ,title:'短信验证码登录'},
// { index: 2 ,title:'密码登录'},
]
],
};
},
components: {
Myheader
Myheader
},
computed: {
usertel() {
@@ -180,40 +181,48 @@ export default {
}
},
},
components: {},
mounted() {
//console.log(this.$route.params);
console.log(this.$route.params);
},
// watch: function () {
// console.log(this.inRank);
// },
methods: {
...mapMutations(["changeClod"]),
...mapMutations(["changeClod"]),
checkBox(){
console.log(event.target.checked)
this.usercheckbox=event.target.checked
console.log(event.target.checked)
this.usercheckbox=event.target.checked
},
//获取验证码
async usermsg() {
//console.log("-----");
async usermsg() {
console.log("-----");
let data = await sendMsg(this.tel);
if(data){
console.log(data);
//this.captchadata=data.msgNum;
this.tamp=data.tamp;
this.hash=data.hash;
}
if(data){
console.log(data);
this.captchadata=data.msgNum;
this.tamp=data.tamp;
this.hash=data.hash;
}
},
//发送验证码数据
async vadmsg() {
//console.log("-----");
let data = await vadatnmsg(this.sms,this.hash,this.tamp);
if(data){
return data;
}
async vadmsg() {
console.log("-----");
let data = await vadatnmsg(this.captchadata,this.hash,this.tamp);
if(data){
console.log(data.code);
if(!data.code==1){
return false
}
}
},
onClickHander(e) {
console.log(e);
@@ -230,7 +239,7 @@ export default {
},
//注册账户
useredd() {
//console.log("---注册账户");
console.log("---注册账户");
this.usertitle = false;
},
@@ -272,63 +281,101 @@ export default {
}
},
async register() {
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
message: '手机号码输入有误'
});
return
}
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
message: '手机号码输入有误'
});
return
}
if(this.sms!==this.captchadata){
this.$message({
type: 'warning',
message: '验证码输入有误请重新输入'
});
return
}
if(this.sms==''){
this.$message({
type: 'warning',
message: '请输入验证码'
});
return
this.$message({
type: 'warning',
message: '请输入验证码'
});
return
}
console.log(this.usercheckbox);
if(this.usercheckbox==false){
//console.log('----');
this.$message({
type: 'warning',
message: '请先同意隐私声明和账号使用协议'
});
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
message: '手机号码输入有误'
});
return
}
console.log('----');
this.$message({
type: 'warning',
message: '请先勾选'
});
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
message: '手机号码输入有误'
});
return
}
else{
let data=await this.vadmsg();
if(data.code=="1")
{
data = await userLongin(this.tel);
if(data.msg=='SUCCESS'){
this.$message({
type: 'warning',
message: '登录成功'
});
this.$router.push({
path: "/",
});
let token=JSON.stringify(data);
this.changeClod({ cloud: token });
return;
}
}
this.$message({
type: 'warning',
message: data.msg
});
}
else{
console.log(this.tel);
let data = await userLongin(this.tel);
console.log(data);
this.vadmsg();
return
}},
this.$message({
type: 'warning',
message: '登录成功'
});
if(data.msg=='SUCCESS'){
this.$router.push({
path: "/",
});
let token=JSON.stringify(data);
this.changeClod({ cloud: token });
}else{
this.$message({
type: 'warning',
message: data.msg
});
}
return
}
},
// reallR () {
// this.zhud=true
// this.loading=true
// axios.post('https://www.daxunxun.com/users/register', {
// username: this.tel,
// password: this.password
// }).then(res=>{
// this.zhud=false
// this.loading=false
// if (res.data === 2) {
// Toast('用户名已注册,请直接登录')
// } else if (res.data === 0) {
// Toast('注册失败')
// } else {
// Toast('注册成功')
// }
// })
// }
},
};
</script>
<style lang="less" scoped>
@import url("../../assets/css/global.less");
@import url("../../assets/css/login.less");
</style>

View File

@@ -210,7 +210,7 @@
<script>
import Myheader from '~/components/header.vue'
import { biaome,userstype,searchchanpin } from "../../ajax/getData";
import { biaome,userstype,searchchanpin } from "../../ajax/getData";
export default {
data() {
return {