missing file

This commit is contained in:
Admin 2022-01-06 03:26:23 +00:00 committed by Gitee
parent 44e33e7925
commit 489c93b060
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 4126 additions and 0 deletions

View File

@ -0,0 +1,522 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-main">
<div class="rc-usermain">
<div class="rc-header">
<span
v-for="(item, index) in discountlist"
:key="index"
@click="selectGoods(item, index)"
:class="activeIndex == index ? 'active' : 'unactive'"
>
{{ item.title }}
</span>
<!-- <span @click="tanchu()">弹出</span> -->
</div>
<div class="rs-dis">
<div
class="rc-discount"
v-for="(item, index) in newlist"
:key="index"
>
<img :src="userimage" alt="" />
<div class="rc-contair">
<div class="rc-left" ref="userleft" id="userleft">
<div>
<i></i><span>{{ item.couponAmount }}</span>
</div>
<strong>{{ item.couponName }}</strong>
</div>
<div class="rc-right">
<i>
{{ item.couponDesc }}
</i>
<div class="rc-main" id="rc-main">
<span>有效期{{item.validFrom}}</span>
<em>{{ item.validTo }}</em>
</div>
<nuxt-link :to="`/`">
<div class="rc-footer" v-if="userload">
<span @click="usertiao()">立即使用</span>
</div>
</nuxt-link>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {allConfig,getdraw} from "../../ajax/getData";
export default {
data() {
return {
userload: true,
pastdue: false,
unused: false,
usermessage:[],
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: [
{
title: "未使用",
},
{
title: "已使用",
},
{
title: "已过期",
},
],
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,
};
},
methods: {
//
async userdraw(mobile,states) {
let data = await getdraw(mobile,states);
if(data){
console.log(data);
this.newlist=data.data;
console.log(this.newlist);
}
},
selectGoods(item, index) {
this.activeIndex = index;
if(this.usermessage!==null){
if (this.activeIndex == 1) {
this.userload = false;
this.pastdue = true;
this.userimage = require("../../assets/image/hasused.png");
this.userstates=1
this.userdraw(this.usermessage.data.mobile,1)
}
if (this.activeIndex == 0) {
this.userload = true;
this.pastdue = false;
this.userdraw(this.usermessage.data.mobile,0)
this.userstates=0
this.userimage = require("../../assets/image/unused.png");
}
if (this.activeIndex == 2) {
this.userload = false;
this.pastdue = true;
this.userdraw(this.usermessage.data.mobile,2)
this.userstates=2
this.userimage = require("../../assets/image/expired.png");
}
}else{
this.$message({
type: 'warning',
message: '请先去登录'
});
}
console.log(index);
},
usertiao(){
this.$router.push({
path: "/",
query: {
stype: 1,
},
});
},
// tanchu() {
// console.log('---')
// var option = {
// customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
// }
// dis_livchat(option);
// }
},
mounted() {
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
if(this.usermessage!==null){
this.userdraw(this.usermessage.data.mobile,);
}
},
components: {
Myheader,
},
};
import Myheader from "~/components/header.vue";
</script>
<style lang="less" scoped>
//
@media screen and(min-width: 320px) and(max-width:768px) {
.active {
font-size: 14px;
color: #e2001a;
}
.unactive {
font-size: 14px;
color: #444444;
}
.rc-header {
height: 64px;
display: flex;
align-items: center;
margin-left: 23px;
span {
display: block;
margin-left: 32px;
}
span:first-child {
margin-left: 0;
}
}
.rc-discount {
margin-left: 23px;
display: flex;
margin-top: 16px;
width: 335px;
background: #ffffff;
position: relative;
height: 120px;
img {
display: block;
width: 100%;
height: 100%;
}
.rc-contair {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.rc-left {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #e1001a;
padding-right: 21px;
width: 30%;
float: left;
height: 100%;
i {
font-style: normal;
font-size: 12px;
}
span {
font-size: 26px;
}
strong {
font-style: normal;
font-size: 12px;
display: block;
margin-top: 8px;
}
}
.rc-right {
display: flex;
flex-direction: column;
margin-left: 36px;
justify-content: center;
height: 100%;
i {
font-style: normal;
font-size: 14px;
color: #e1001a;
}
.rc-main {
color: #999999;
font-size: 12px;
}
span {
display: block;
margin-top: 8px;
}
em {
font-style: normal;
}
}
.rc-footer {
display: flex;
justify-content: flex-end;
span {
width: 72px;
height: 25px;
background: #e2001a;
text-align: center;
line-height: 25px;
font-size: 12px;
color: #ffffff;
margin-bottom: 8px;
border-radius: 100px;
margin-right: 30px;
}
}
}
}
// // /* 768px1920 *pc/
@media screen and (min-width: 768px) and (max-width: 1920px) {
.rc-main {
width: 100%;
.rc-usermain {
width: 92%;
margin: 0 auto;
}
}
.active {
font-size: 16px;
color: #e2001a;
cursor: pointer;
}
.unactive {
font-size: 16px;
color: #444444;
cursor: pointer;
}
.rc-header {
height: 64px;
display: flex;
align-items: center;
margin-left: 23px;
justify-content: center;
span {
display: block;
margin-left: 32px;
}
span:first-child {
margin-left: 0;
}
}
.rs-dis {
margin-top: 70px;
}
.rc-discount {
margin-left: 50px;
display: flex;
margin-top: 40px;
width: 335px;
background: #ffffff;
position: relative;
height: 120px;
float: left;
img {
display: block;
width: 100%;
height: 100%;
}
.rc-contair {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.rc-left {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #e1001a;
padding-right: 21px;
width: 30%;
float: left;
height: 100%;
i {
font-style: normal;
font-size: 12px;
}
span {
font-size: 26px;
}
strong {
font-style: normal;
font-size: 12px;
display: block;
margin-top: 8px;
}
}
.rc-right {
display: flex;
flex-direction: column;
margin-left: 36px;
justify-content: center;
height: 100%;
i {
font-style: normal;
font-size: 16px;
color: #e1001a;
}
.rc-main {
color: #999999;
font-size: 12px;
}
span {
display: block;
margin-top: 8px;
}
em {
font-style: normal;
}
}
.rc-footer {
display: flex;
justify-content: flex-end;
margin-right: 10px;
span {
width: 72px;
height: 25px;
background: #e2001a;
text-align: center;
line-height: 25px;
font-size: 12px;
color: #ffffff;
margin-bottom: 8px;
border-radius: 100px;
margin-right: 30px;
}
}
.rc-userright {
display: flex;
align-items: center;
width: 78px;
justify-content: center;
height: 78px;
border: 2px solid #999999;
border-radius: 50%;
span {
width: 60px;
height: 60px;
border: 1px solid #999999;
border-radius: 50%;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
}
}
}
}
</style>

View File

@ -0,0 +1,321 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-header">
<div class="rc-main">
<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>
<div class="rc-button">
<div class="rc-order">
<span>积分兑换</span>
</div>
</div>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
import { memberAccount } from "../../ajax/getData";
export default {
data(){
return{
userrecord:[
{
title:'日期',
},
{
title:'积分',
},
{
title:'类型',
},
],
usermessage:[
{
title:'2021-09-11',
rccord:'+100',
buycord:'购物积分'
},
{
title:'2021-09-11',
rccord:'+100',
buycord:'购物积分'
},
{
title:'2021-09-11',
rccord:'+100',
buycord:'购物积分'
},
{
title:'2021-09-11',
rccord:'+100',
buycord:'购物积分'
},
{
title:'2021-09-11',
rccord:'+100',
buycord:'购物积分'
},
]
}
},
methods:{
//
async catmessage() {
let user= JSON.parse(localStorage.getItem("userInfo"));
let data = await memberAccount(user.data.id);
if(data){
this.usermessage=data.data;
console.log(this.usermessage.data);
}
},
},
mounted(){
this.catmessage();
},
components:{
Myheader,
},
}
</script>
<style lang="less" scoped>
ul li ol li em strong i {
list-style: none;
font-style: normal;
}
.rc-header {
width: 100%;
}
//
@media screen and (max-width: 768px) {
.rc-button{
width: 100%;
height: 80px;
background: #FFFFFF;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: center;
margin-top: 12px;
.rc-order{
width: 164px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
background: #E2001A;
text-align: center;
align-items: center;
line-height: 48px;
span{
font-size: 16px;
display: block;
color: #FFFFFF;
}
}
}
.rc-main{
width: 92%;
margin: 0 auto;
ul{
height: 70px;
display: block;
border-bottom: 1px solid #D8D8D8;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 16px;
color: #444444;
li{
float: left;
width: 30%;
}
li:after{
// height: 2px;
// border: 1px solid red;
// display: block;
content:"|";
color: #707070;
margin-left: 5px;
}
li:last-child:after{
content:"";
}
}
ol{
li{
font-style: normal;
display: block;
height: 32px;
margin-top: 16px;
display: flex;
// justify-content: space-between;
align-items: center;
color: #666666;
font-size: 14px;
text-align: center;
i{
font-style: normal;
display: block;
width: 40%;
}
span{
font-style: normal;
display: block;
width: 36%;
}
em{
font-style: normal;
display: block;
width: 23%;
}
}
}
}
}
//pc
@media screen and (min-width: 768px) and (max-width: 1920px) {
.rc-button{
width: 100%;
height: 80px;
background: #FFFFFF;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: center;
margin-top: 12px;
display: none;
.rc-order{
width: 164px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
background: #E2001A;
text-align: center;
align-items: center;
line-height: 48px;
span{
font-size: 16px;
display: block;
color: #FFFFFF;
}
}
}
.rc-main{
width: 92%;
margin: 0 auto;
margin-top: 60px;
ul{
height: 64px;
background: #F6F6F6;
border: 1px solid #D7D7D7;
opacity: 1;
border-radius: 3px 3px 0px 0px;
display: block;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 16px;
color: #444444;
li{
float: left;
width: 42%;
}
}
ol{
li{
font-style: normal;
display: block;
height: 48px;
margin-top: 16px;
display: flex;
border: 1px solid #D7D7D7;
// justify-content: space-between;
align-items: center;
color: #666666;
font-size: 14px;
text-align: center;
i{
font-style: normal;
display: block;
width: 34%;
}
span{
font-style: normal;
display: block;
width: 34%;
}
em{
font-style: normal;
display: block;
width: 34%;
}
}
}
}
}
</style>

View File

@ -0,0 +1,826 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-header">
<div class="rc-main">
<!-- <div class="rc-title">
<img src="../../assets/image/rc-cat.png" alt="" />
<span>{{ userorder }}</span>
</div> -->
<div class="rc-center">
<img :src='userimage' />
</div>
<div class="rc-login">
<div class="rc-unlogin">
<div class="rc-people" @click="opendialog()">
<img src="../../assets/image/rc-people.png" alt="" />
</div>
<div class="rc-userlogin">
<div v-if="!islogin">
<span>{{usertitle}}</span>
<em>{{userorder}}</em>
</div>
<span v-if="islogin">登录/注册</span>
</div>
</div>
<div class="rc-islogin">
<nuxt-link :to="`/personal/usermember/`">
<span>会员权益</span>
</nuxt-link>
</div>
</div>
<div class="usercord">
<em>当前积分:{{ rcrcord }}</em>
<nuxt-link :to="`/personal/integral/`">
<span>积分明细</span>
</nuxt-link>
</div>
<div class="rc-cordd">
<span>距离升级还差:{{ rcvalue }} </span>
<div class="block">
<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>
<span>5000</span>
<span>10000</span>
</div>
</div>
<div class="rc-order">
<em>我的订单</em>
<nuxt-link :to="`/personal/useraddress/`">
<span >查看全部</span>
</nuxt-link>
</div>
<div class="rc-obligation">
<ul>
<li v-for="(item, index) in prefecture" :key="index" @click="obligation(item,index)">
<img :src="item.catimage" alt="" />
<span>{{ item.title }}</span>
</li>
</ul>
</div>
<div class="rc-usermain">
<h2>服务工具</h2>
<div class="rc-buymain">
<div class="rc-buy" v-for="(item, index) in personallist" :key="index" @click="openaddress(index)">
<div class="rc-cord">
<img :src="item.buyimage" alt="" />
<em>{{ item.title }}</em>
</div>
<div class="rc-load">
<span>{{ item.usertitle }}</span>
<img src="../../assets/image/rc-left.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
<el-dialog
:visible.sync="dialogInfo1"
hegight="700px"
:before-close="handleClose"
@open="open"
>
<div class="rc-header">
<div class="rc-title">
<img src="../../assets/error.png" alt="">
</div>
<div class="rc-logmain">
<h3>温馨提示</h3>
<span>{{usermessage}}</span>
</div>
<div class="userer">
<img src="../../assets/image/rc-discount.png" alt="">
<span>微信扫一扫识别二维码</span>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
export default {
data() {
return {
userlog:false,
islogin:false,
dialogInfo1:false,
userid:null,
usertitle:'',
rcvalue:5000,
usermessage:'关注皇家爱宠荟,修改个人资料',
userimage:require("../../assets/image/rc-new.png"),
userlogin:'登录注册',
userorder: "新手铲屎官",
prefecture: [
{
title: "待付款",
ordernum: "2",
catimage: require("../../assets/image/rc-obligation.png"),
},
{
title: "待发货",
ordernum: "2",
catimage: require("../../assets/image/rc-pending.png"),
},
{
title: "待收货",
ordernum: "2",
catimage: require("../../assets/image/rc-wait.png"),
},
],
personallist: [
{
title: "积分商城",
ordernum: "0",
buyimage: require("../../assets/image/rc-integral.png"),
usertitle: "点击进入爱宠荟",
},
{
title: "优惠券",
ordernum: "1",
buyimage: require("../../assets/image/rc-discount.png"),
usertitle: "查看详情",
},
{
title: "收货地址",
ordernum: "2",
buyimage: require("../../assets/image/rc-address.png"),
usertitle: "查看详情",
},
],
rcrcord: '',
value: [4, 8],
};
},
components: {
Myheader,
},
watch:{
},
methods: {
//
obligation(item,index){
console.log(index);
if(index==0){
this.$router.push({
path: "/myorder/usertion",
query: {
stype: 1,
},
});
}
else if(index==1){
this.$router.push({
path: "/myorder/usertion",
query: {
stype: 2,
},
});
}
else if(index==2){
this.$router.push({
path: "/myorder/usertion",
query: {
stype: 3,
},
});
}
},
handleClose(){
this.dialogInfo1=false;
console.log(this.dialogInfo1);
},
open(){
},
ifadroind(){
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid = sUserAgent.match(/android/i) == "android";
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
console.log("当前是电脑打开")
if(this.userlog==true){
this.usermessage='关注皇家爱宠荟,修改个人资料',
this.dialogInfo1=true;
}else{
this.dialogInfo1=false;
this.usermessage='关注皇家爱宠荟,兑换更多福利';
}
}else{
console.log("当前是手机打开")
this.dialogInfo1=false;
}
},
openaddress(index){
console.log(index);
if(index==2){
this.$router.push({
path: `/useraddress/openaddress/`
})
console.log('这是地址的跳转');
}
if(index==0){
this.userlog=true
this.ifadroind();
}
if(index==1){
this.$router.push({
path: `/personal/discount/`
})
console.log('这是地址的跳转');
}
},
opendialog(){
this.ifadroind();
}
},
mounted() {
console.log(this.islogin)
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;
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;
}
},
};
</script>
<style lang="less" scoped>
ul li ol li em strong i {
list-style: none;
font-style: normal;
}
.rc-header {
width: 100%;
}
//
@media screen and (max-width: 768px) {
/deep/.el-dialog {
width: 352px;
height: 500px;
}
.rc-header{
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
h3{
color:#333333;
font-size: 26px;
}
.rc-title{
img{
width: 96px;
height: 96px;
}
}
.userer{
img{
width: 210px;
height: 210px;
display: flex;
justify-content: center;
flex-direction: column;
}
}
}
.rc-main {
width: 92%;
margin: 0 auto;
overflow: hidden;
.rc-usermain{
h2{
display: none;
}
}
.rc-center {
width: 100%;
height: 180px;
img {
width: 100%;
height: 100%;
display: block;
}
}
.rc-login {
width: 100%;
height: 112px;
display: flex;
justify-content: space-between;
align-items: center;
.rc-unlogin{
display: flex;
align-items: center;
}
.rc-userlogin{
margin-left: 16px;
span{
font-size: 18px;
color: #333333;
display: block;
}
em{
font-size: 14px;
color:#666666;
font-style: normal;
display: block;
margin-top: 8px;
}
}
.rc-islogin{
span{
color: #E1001A;
font-size: 14px;
display: block;
border-bottom: 1px solid #E1001A;
}
}
.rc-people {
width: 64px;
height: 64px;
display: flex;
align-items: center;
border: 2px solid #d7d7d7;
border-radius: 50%;
img {
width: 48px;
height: 48px;
display: block;
margin: 0 auto;
}
}
}
.usercord{
display: flex;
justify-content: space-between;
height: 32px;
align-items: center;
border-bottom: 1px solid #D8D8D8;
padding-bottom: 17px
;
em{
font-style: normal;
color: #333333;
font-weight: bold;
}
span{
color:#E1001A;
font-size: 14px;
display: block;
border-bottom: 1px solid #E1001A;
}
}
.rc-cordd{
color:#666666;
font-size: 14px;
span{
display: block;
margin-top: 16px;
text-align: left;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.rc-order{
display: flex;
justify-content: space-between;
margin-top: 16px;
border-bottom: 1px solid #D8D8D8;
padding-bottom: 16px;
em{
font-style: normal;
font-size: 14px;
font-weight: bold;
color: #333333;
}
span{
color:#E1001A;
font-size: 14px;
display: block;
border-bottom: 1px solid #E1001A;
}
}
.rc-obligation{
margin-top: 16px;
ul{
display: flex;
justify-content: space-between;
li{
float: left;
}
img{
width: 44px;
height: 44px;
display: block;
}
}
}
.rc-buy{
width: 100%;
height: 64px;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #D8D8D8;
margin-top: 24px;
.rc-cord{
display: flex;
align-items: center;
}
img{
width: 32px;
height: 32px;
display: block;
}
em{
font-style: normal;
font-size: 14px;
color: #333333;
margin-left: 16px;
}
.rc-load{
display: flex;
align-items: center;
font-size: 14px;
color: #666666;
span{
display: block;
margin-right: 8px;
margin-top: -4px;
}
img{
width: 8px;
height: 16px;
display: block;
}
}
}
}
}
//pc
@media screen and (min-width: 768px) and (max-width: 1920px) {
/deep/.el-dialog {
width: 440px;
height: 652px;
}
.rc-header{
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
h3{
color:#333333;
font-size: 26px;
}
.rc-title{
img{
width: 96px;
height: 96px;
}
}
.userer{
img{
width: 210px;
height: 210px;
display: flex;
justify-content: center;
flex-direction: column;
}
}
}
.rc-main {
width: 92%;
margin: 0 auto;
.rc-center {
width: 100%;
height: 180px;
img {
width: 100%;
height: 100%;
display: block;
}
display: none;
}
.rc-login {
width: 100%;
height: 112px;
display: flex;
justify-content: space-between;
align-items: center;
.rc-unlogin{
display: flex;
align-items: center;
}
.rc-userlogin{
margin-left: 16px;
span{
font-size: 18px;
color: #333333;
display: block;
}
em{
font-size: 14px;
color:#666666;
font-style: normal;
display: block;
margin-top: 8px;
}
}
.rc-islogin{
span{
color: #E1001A;
font-size: 18px;
display: block;
}
}
.rc-people {
width: 64px;
height: 64px;
display: flex;
align-items: center;
border: 2px solid #d7d7d7;
border-radius: 50%;
img {
width: 48px;
height: 48px;
display: block;
margin: 0 auto;
}
}
}
.usercord{
display: flex;
justify-content: space-between;
align-items: center;
height: 80px;
border-bottom: 1px solid #D7D7D7;
em{
font-style: normal;
color: #333333;
font-weight: bold;
font-size: 18px;
}
span{
color:#E1001A;
font-size: 18px;
display: block;
}
}
.rc-cordd{
color:#333333;
font-size: 18px;
height: 133px;
margin-top: 32px;
color:#666666;
font-size: 14px;
span{
margin-top: 16px;
font-size: 18px;
text-align: left;
display: block;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.rc-order{
display: flex;
justify-content: space-between;
border-bottom: 1px solid #D8D8D8;
padding-bottom: 28px;
margin-top: 20px;
em{
font-style: normal;
font-size: 26px;
color: #333333;
}
span{
color:#E1001A;
font-size: 18px;
display: block;
}
}
.rc-obligation{
margin-top: 16px;
ul{
display: flex;
justify-content: space-between;
width: 80%;
margin: 0 auto;
text-align: center;
li{
float: left;
}
img{
width: 96px;
height: 96px;
display: block;
}
}
span{
font-size: 18px;
}
}
.rc-usermain{
h2{
color: #333333;
font-size: 26px;
font-weight: normal;
display: block;
padding-bottom: 28px;
border-bottom: 1px solid #D8D8D8;
text-align: left;
}
}
.rc-buymain{
display: flex;
justify-content: space-between;
width: 80%;
margin: 0 auto;
}
.rc-buy{
display: flex;
justify-content: space-between;
text-align: center;
margin-top: 24px;
img{
width: 96px;
height: 96px;
display: block;
}
em{
font-style: normal;
font-size: 18px;
color: #333333;
}
.rc-load{
display: flex;
align-items: center;
font-size: 14px;
color: #666666;
span{
display: block;
margin-right: 8px;
margin-top: -4px;
}
img{
width: 8px;
height: 16px;
display: block;
}
display: none;
}
}
}
}
</style>

View File

@ -0,0 +1,824 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-header">
<div class="rc-main">
<div class="rc-receiving">
<em>{{userisdelivery}}</em>
<span>{{orderstatus}}</span>
</div>
<div class="rc-border"></div>
<div v-if="isshow">
<div class="delivery" v-for="(item, index) in delivery" :key="index" >
<div class="to-delivery">
<span>{{ item.state }}</span>
<i>{{ item.time }}</i>
</div>
<div class="bo-delivery">
<span>{{ item.address }}</span>
</div>
<div class="viewdetails">
<span>查看详情</span>
<img :src="leftico" alt="" />
</div>
</div>
</div>
<div
class="mypersonal"
v-for="(item, index) in useraddress"
:key="index"
>
<div class="my-delivery">
<span>{{ item.state }}</span>
<i>{{ item.tel }}</i>
</div>
<div class="per-delivery">
<span>{{ item.address }}</span>
</div>
</div>
<div class="rc-center" v-for="(item, index) in goldmedal" :key="index">
<div class="rc-usermain">
<div class="rc-image">
<img :src="item.catimage" alt="" />
</div>
<div class="rc-right">
<div class="rc-usercenter">
<em>{{ item.usereat }}</em>
<div class="rc-userright">
<span>规格:{{ item.num }}</span>
</div>
</div>
<div class="rc-userbottom">
<span>数量:{{ item.orderstype }}</span>
<i>{{ item.userprice }}</i>
<div class="rc-bottom">
<span>联系客服申请售后</span>
</div>
</div>
<div class="rc-bottomm">
<span>联系客服申请售后</span>
</div>
<!-- <div class="rc-userbottomm">
<i>{{ item.userprice }}</i>
<span>{{ item.orderstype }}</span>
<i>{{ item.userprice }}</i>
</div> -->
</div>
</div>
</div>
<div class="rc-merchandise">
<ul>
<li>
<span>商品总价:</span>
<i>{{ shopprice.price }}</i>
</li>
<li>
<span>配送费用:</span>
<i>{{ shopprice.distribution }}</i>
</li>
<li>
<span>活动促销:</span>
<i>{{ shopprice.promotion }}</i>
</li>
<li>
<span>实际付款:</span>
<i>{{ shopprice.payment }}</i>
</li>
</ul>
</div>
<div class="rc-payment">
<ul>
<li>
<span>订单编号::</span>
<i>{{ information.reference }}</i>
</li>
<li>
<span>下单时间::</span>
<i>{{ information.ordertime }}</i>
</li>
<li>
<span>付款方式::</span>
<i>{{ information.paymentmethod }}</i>
</li>
<li>
<span>配送方式::</span>
<i>{{ information.distribution }}</i>
</li>
<li>
<span>快递单号:</span>
<div class="u-trackingnumber">
<i>{{ information.trackingnumber }}
</i>
<img :src="information.catimage" alt="">
</div>
</li>
</ul>
</div>
<div class="rc-foot">
<div class="rc-foo">
<div style="padding-top:55px">
<i>合计金额:</i>
<em>167.00</em>
</div>
<div style="padding-bottom:40px;cursor: pointer;">
<span @click="oncebuy()">再次购买</span>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Myheader from "~/components/header.vue";
export default {
data() {
return {
addressstype: null,
orderstatus: '',
userisdelivery:'待收货',
userdelivery: "派送中",
isshow:true,
leftico: require("../../assets/image/rc-left.png"),
delivery: [
{
state: "派送中",
time: "2021-11-21",
address: "广州天河—刘某某【15124617917】正在派送中",
},
],
useraddress: [
{
state: "李某某",
tel: "15124117917",
address: "广东省 广州市 天河区 天河客运站118号",
},
],
goldmedal: [
{
ordernumber: "1111111111111111111",
orderstype: 1,
index:0,
usereat: "英国短毛猫成猫全价湿粮",
num: "5kg",
specification: "1",
userprice: "167.00",
catimage: require("../../assets/image/rc-win.png"),
},
],
shopprice: {
price: "¥197.00",
distribution: "¥0.00",
promotion: "-¥30.00",
payment: "¥167.00",
},
information: {
reference: "1111111111111111",
ordertime: "2012-12-01 11:20:00",
paymentmethod: "微信支付",
distribution: "快递",
trackingnumber: "11111111111111",
catimage: require("../../assets/image/rc-left.png"),
},
};
},
methods: {
oncebuy(){
this.$router.push({
path: "/myorder/userrecord",
query: {
stype: 1,
},
});
}
},
mounted() {
this.addressstype = this.$route.query.stype;
if(this.addressstype==1){
this.orderstatus='您的订单已完成,欢迎您再次购买。';
this.isshow=false;
this.userisdelivery='已完成';
console.log( this.orderstatus);
}
console.log(this.addressstype);
},
components: {
Myheader,
},
};
</script>
<style lang="less" scoped>
ul li ol li em strong i {
list-style: none;
font-style: normal;
}
.rc-header {
width: 100%;
}
//
@media screen and (max-width: 768px) {
.rc-main {
width: 92%;
margin: 0 auto;
.rc-userbottom{
display: none;
}
.viewdetails{
display: none;
}
.rc-foo{
display: none;
}
.rc-receiving {
width: 100%;
height: 80px;
display: flex;
align-items: center;
em {
font-style: normal;
color: #e1001a;
font-size: 22px;
}
span {
color: #666666;
font-size: 12px;
display: block;
margin-left: 18px;
width: 62%;
}
}
.delivery {
display: flex;
flex-direction: column;
height: 80px;
.to-delivery {
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
margin-left: 3px;
}
i {
font-style: normal;
margin-left: 8px;
display: block;
}
}
.bo-delivery {
span {
font-size: 14px;
color: #666666;
display: block;
margin-top: 8px;
}
}
}
.mypersonal {
display: flex;
flex-direction: column;
height: 80px;
.my-delivery {
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
margin-left: 3px;
}
i {
font-style: normal;
margin-left: 8px;
display: block;
}
}
.per-delivery {
span {
font-size: 14px;
color: #666666;
display: block;
margin-top: 8px;
}
}
}
.rc-usermain {
display: flex;
.rc-image {
border: 1px solid #d8d8d8;
margin-top: 17px;
height: 96px;
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: none;
}
}
.rc-bottomm {
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 24px;
span {
display: block;
width: 130px;
display: flex;
align-items: center;
line-height: 40px;
text-align: center;
color: #e2001a;
font-size: 14px;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
font-weight: bold;
}
span:last-child {
margin-left: 15px;
}
}
}
.rc-merchandise {
width: 100%;
margin-top: 32px;
ul {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 26px;
i {
font-style: normal;
color: #666666;
font-size: 14px;
}
li {
list-style: none;
font-style: normal;
display: flex;
justify-content: space-between;
span {
font-size: 14px;
color: #333333;
}
}
li:last-child {
i {
color: #e1001a;
font-size: 16px;
font-style: normal;
}
}
}
}
.rc-payment{
width: 100%;
margin-top: 32px;
.u-trackingnumber{
display: flex;
align-items: center;
i {
font-size: 14px;
font-style: normal;
margin-right: 16px;
}
img{
width: 8px;
height: 16px;
}
}
ul {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 26px;
i {
font-style: normal;
color: #666666;
font-size: 14px;
}
li {
list-style: none;
font-style: normal;
display: flex;
justify-content: space-between;
span {
font-size: 14px;
color: #333333;
}
}
}
}
}
}
//pc
@media screen and (min-width: 768px) and (max-width: 1920px) {
.rc-main {
width: 92%;
margin: 0 auto;
.rc-userbottomm{
display: none;
}
.rc-border{
width: 100%;
border-bottom: 1px solid #D7D7D7;
margin-top: 32px;
}
.rc-receiving {
width: 100%;
height: 80px;
display: flex;
flex-direction: column;
em {
font-style: normal;
color: #E1001A;
font-size: 26px;
}
span {
color: #666666;
font-size: 16px;
display: block;
margin-top: 25px;
}
}
.delivery {
display: flex;
flex-direction: column;
height: 140px;
display: flex;
justify-content: center;
.viewdetails{
display: flex;
align-items: center;
justify-content: flex-end;
span{
color:#444444;
font-size: 18px;
display: block;
margin-right: 8px;
}
img{
width: 8px;
height: 16px;
}
}
.to-delivery {
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
// margin-left: 16px;
font-size: 18px;
color: #333333;
}
i {
font-style: normal;
margin-left: 8px;
display: block;
font-size: 18px;
color: #999999;
}
}
.bo-delivery {
span {
font-size: 16px;
color: #666666;
display: block;
margin-top: 16px;
}
}
}
.mypersonal {
display: flex;
flex-direction: column;
height: 140px;
justify-content: center;
.my-delivery {
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
margin-left: 3px;
font-size: 18px;
color: #333333;
}
i {
font-style: normal;
margin-left: 8px;
display: block;
font-size: 18px;
color: #333333;
}
}
.per-delivery {
span {
font-size: 18px;
color: #666666;
display: block;
margin-top: 16px;
}
}
}
.rc-usermain {
display: flex;
.rc-image {
border: 1px solid #d8d8d8;
margin-top: 17px;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-bottomm{
display: none;
}
.rc-usercenter{
display: flex;
justify-content: center;
flex-direction: column;
em {
font-style: normal;
display: block;
font-size: 18px;
font-weight: bold;
margin-top: 17px;
color: #e1001a;
}
}
display: flex;
width: 100%;
margin-left: 16px;
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 16px;
span {
display: block;
margin-top: 16px;
font-size: 16px;
}
}
.rc-userbottom {
display: flex;
width: 80%;
justify-content: space-between;
align-items: center;
margin-left: 119px;
span {
color: #E1001A;
font-size: 20px;
}
i {
font-style: normal;
color: #e1001a;
font-size: 20px;
font-weight: bold;
}
.rc-bottom {
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 24px;
span {
display: block;
width: 164px;
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;
font-size: 14px;
}
}
}
}
.rc-merchandise {
width: 100%;
margin-top: 32px;
ul {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 40px;
font-size: 18px;
i {
font-style: normal;
color: #666666;
}
li {
list-style: none;
font-style: normal;
display: flex;
justify-content: space-between;
span {
color: #333333;
}
}
li:last-child {
i {
color: #e1001a;
font-size: 20px;
font-style: normal;
}
}
}
}
.rc-payment{
width: 100%;
margin-top: 80px;
.u-trackingnumber{
display: flex;
align-items: center;
i {
font-size: 18px;
font-style: normal;
margin-right: 16px;
}
img{
width: 8px;
height: 16px;
}
}
ul {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 40px;
font-size: 18px;
i {
font-style: normal;
color: #666666;
display: block;
}
li {
list-style: none;
font-style: normal;
display: flex;
justify-content: space-between;
span {
color: #333333;
}
}
}
}
.rc-foot{
display: flex;
flex-direction: column;
.rc-foo{
display: flex;
justify-content: flex-end;
flex-direction: column;
align-items: self-end;
i{
font-style: normal;
color:#333333;
font-size: 20px;
margin-right: 20px;
}
em{
font-style: normal;
color: #E1001A;
font-size: 26px;
}
span{
display: block;
width: 164px;
margin-top: 36px;
background: #E2001A;
line-height: 48px;
text-align: center;
color: white;
font-size: 16px;
height: 48px;
border-radius: 30px;
}
}
}
}
}
</style>

View File

@ -0,0 +1,601 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-header">
<div class="rc-main">
<div class="rc-headera">
<span
v-for="(item, index) in discountlist"
:key="index"
@click="selectGoods(item, index)"
:class="activeIndex == index ? 'active' : 'unactive'"
>
{{item.title}}
</span>
</div>
<div class="rc-userheader">
<span v-for="(item, index) in message" :key="index">
{{item.title}}
</span>
</div>
<div class="rc-center" v-for="(item, index) in goldmedal" :key="index">
<div class="rc-title">
<div>
<i>订单编号:</i><span>{{ item.ordernumber }}</span>
</div>
<div class="rc-usertitle">
<strong>订单状态:</strong> <em>{{ item.orderstype }}</em>
</div>
</div>
<div class="rc-usermain">
<div class="rc-image">
<img :src="item.catimage" alt="" />
</div>
<div class="rc-right">
<div class="rc-usercenter">
<em>{{ item.usereat }}</em>
<div class="rc-userright">
<span>规格:{{ item.num }}</span>
</div>
</div>
<div class="rc-userbottom">
<span>数量:{{ item.orderstype }}</span>
<i>{{ item.userprice }}</i>
</div>
<div class="rc-userbottomm">
<i>{{ item.userprice }}</i>
<span>{{item.orderstype}}</span>
<i>{{ item.userprice }}</i>
</div>
</div>
<div class="pc-bottom">
<span @click="usertwo()">再次购买</span>
<span @click="userfind()">查看订单</span>
</div>
</div>
<div class="rc-bottom">
<span @click="userpay(item,index)">{{item.buttontitle}}</span>
<span @click="userfind()">查看订单</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Myheader from "~/components/header.vue";
import { customerorders } from "../../ajax/getData";
export default {
data() {
return {
activeIndex: 0,
buttontitle:'再次购买',
discountlist: [
{
title: "全部",
},
{
title: "待付款",
},
{
title: "待发货",
},
{
title: "待收货",
},
],
message: [
{
title: "商品",
},
{
title: "单价/元",
},
{
title: "数量",
},
{
title: "实付款/元",
},
{
title: "操作",
},
],
goldmedal: [
{
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",
},
{
ordernumber: "1111111111111111111",
usereat: "尊享订单免邮服务(指点商品)",
ordernum: 0,
buttontitle:'取消订单',
catimage: require("../../assets/image/usercar.png"),
orderstype: 3,
userprice: "167.00",
},
{
ordernumber: "1111111111111111111",
usereat: "365天专属养宠工具",
ordernum: 1,
catimage: require("../../assets/image/rc-growth.png"),
orderstype: 1,
userprice: "167.00",
},
{
ordernumber: "1111111111111111111",
usereat: "10年专业团队1v1咨询",
ordernum: 2,
catimage: require("../../assets/image/consult.png"),
orderstype: 2,
userprice: "167.00",
},
{
ordernumber: "1111111111111111111",
usereat: "行业大咖专业养宠知识",
ordernum: 3,
catimage: require("../../assets/image/rc-book.png"),
orderstype: 3,
userprice: "167.00",
},
{
ordernumber: "1111111111111111111",
usereat: "爱宠生活定制活动高级养宠宝典",
ordernum: 3,
catimage: require("../../assets/image/userself.png"),
orderstype: 3,
userprice: "167.00",
},
{
usereat: "每年积分兑换1次价值288元的免费体检及100元医院绝育券",
ordernum: 4,
catimage: require("../../assets/image/rc-health.png"),
orderstype: 3,
userprice: "167.00",
},
],
};
},
methods: {
userpay(item,index){
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){
}
if(index==2){
}
},
userfind(){
console.log('--');
this.$router.push({
path: "/personal/quiry",
query: {
stype: 1,
},
});
},
usertwo(){
this.$router.push({
path: "/myorder/userrecord",
query: {
stype: 1,
},
});
}
},
mounted() {
},
components: {
Myheader,
},
};
</script>
<style lang="less" scoped>
//
@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-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;
}
}
}
}
}
// /* 768px1920 *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

@ -0,0 +1,477 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-header">
<div class="rc-main">
<div class="rc-center" >
<van-swipe @change="onChange">
<van-swipe-item v-for="(banner, index) in banners" :key="index">
<img :src="banner.src" class="useraimg"/>
</van-swipe-item>
</van-swipe>
<!-- <img :src='userimage' /> -->
</div>
<div class="rc-order">
<span>当前等级{{userorder}}</span>
</div>
<div class="rc-cordd">
<span>距离升级还差:{{ rcvalue }} </span>
<div class="block">
<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>新手铲屎官</span>
<span>资深铲屎官</span>
<span>金牌铲屎官</span>
</div>
</div>
<div class="usermember" v-for="(item,index) in newlist" :key="index">
<div class="rc-image">
<img :src="item.catimage" alt="" />
</div>
<div class="rc-userorder">
<em>{{item.title}}</em>
<span>{{item.usereat}}</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
export default {
data(){
return{
banners:[
{src:require("../../assets/image/rc-new.png"),link:""},
{src:require("../../assets/image/rc-new1.png"),link:""},
{src:require("../../assets/image/rc-new2.png"),link:""},
],
userid:null,
userimage:require("../../assets/image/rc-new.png"),
userorder:'新手铲屎官',
rcvalue:5000,
uservalue:0,
usrnewlist:[],
newlist:[],
newlista:[
{
title: "产品试吃",
usereat:'每年4次免积分产品试吃',
ordernum: 0,
catimage: require("../../assets/image/usereat.png"),
},
{
title: "成长工具",
usereat:'365天专属养宠工具',
ordernum: 1,
catimage: require("../../assets/image/rc-growth.png"),
},
{
title: "1V1咨询",
usereat:'10年专业团队1v1咨询',
ordernum: 2,
catimage: require("../../assets/image/consult.png"),
},
{
title: "知识课堂",
usereat:'行业大咖专业养宠知识',
ordernum: 3,
catimage: require("../../assets/image/rc-book.png"),
},
{
title: "健康服务",
usereat:'每年积分兑换1次价值288元的免费体检及100元医院绝育券',
ordernum: 4,
catimage: require("../../assets/image/rc-health.png"),
},
],
senior:[
{
title: "会员奖励",
usereat:'专属升级奖励',
ordernum: 0,
catimage: require("../../assets/image/rc-win.png"),
},
{
title: "产品试吃",
usereat:'每年4次免积分产品试吃',
ordernum: 0,
catimage: require("../../assets/image/usereat.png"),
},
{
title: "成长工具",
usereat:'365天专属养宠工具',
ordernum: 1,
catimage: require("../../assets/image/rc-growth.png"),
},
{
title: "1V1咨询",
usereat:'10年专业团队1v1咨询',
ordernum: 2,
catimage: require("../../assets/image/consult.png"),
},
{
title: "知识课堂",
usereat:'行业大咖专业养宠知识',
ordernum: 3,
catimage: require("../../assets/image/rc-book.png"),
},
{
title: "专属定制",
usereat:'爱宠生活定制活动高级养宠宝典',
ordernum: 3,
catimage: require("../../assets/image/userself.png"),
},
{
title: "健康服务",
usereat:'每年积分兑换1次价值288元的免费体检及100元医院绝育券',
ordernum: 4,
catimage: require("../../assets/image/rc-health.png"),
},
],
goldmedal :[
{
title: "会员奖励",
usereat:'专属升级奖励',
ordernum: 0,
catimage: require("../../assets/image/rc-win.png"),
},
{
title: "产品试吃",
usereat:'每年4次免积分产品试吃',
ordernum: 0,
catimage: require("../../assets/image/usereat.png"),
},
{
title: "产品包邮",
usereat:'尊享订单免邮服务(指点商品)',
ordernum: 0,
catimage: require("../../assets/image/usercar.png"),
},
{
title: "成长工具",
usereat:'365天专属养宠工具',
ordernum: 1,
catimage: require("../../assets/image/rc-growth.png"),
},
{
title: "1V1咨询",
usereat:'10年专业团队1v1咨询',
ordernum: 2,
catimage: require("../../assets/image/consult.png"),
},
{
title: "知识课堂",
usereat:'行业大咖专业养宠知识',
ordernum: 3,
catimage: require("../../assets/image/rc-book.png"),
},
{
title: "专属定制",
usereat:'爱宠生活定制活动高级养宠宝典',
ordernum: 3,
catimage: require("../../assets/image/userself.png"),
},
{
title: "健康服务",
usereat:'每年积分兑换1次价值288元的免费体检及100元医院绝育券',
ordernum: 4,
catimage: require("../../assets/image/rc-health.png"),
},
]
}
},
methods:{
onChange(index){
console.log(index);
if(index==0){
this.newlist=this.newlista;
}else if(index==1){
this.newlist=this.senior
}else if(index==2){
this.newlist=this.goldmedal
}
console.log(this.newlist)
}
},
components:{
Myheader
},
mounted(){
console.log(this.$refs.userblock);
let userwidth=0;
let user= JSON.parse(localStorage.getItem("userInfo"));
if(user!==null){
this.userid=user.data;
let userlength=this.userid.availiblePoint.toString().length;
console.log(this.userid.availiblePoint);
if(this.userid.memberLevel==1){
this.userimage=require('../../assets/image/rc-new.png');
this.userorder='新手铲屎官';
this.newlist=this.newlista;
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);
}
console.log(userwidth)
}else if( this.userid.memberLevel==2){
this.userimage=require('../../assets/image/rc-new2.png');
this.userorder='资深铲屎官';
this.newlist=this.senior
this.uservalue=10000;
this.rcvalue=this.uservalue-this.userid.availiblePoint;
userwidth=this.userid.availiblePoint/100
console.log('---2222')
}else if( this.userid.memberLevel==3){
this.userimage=require('../../assets/image/rc-new1.png');
this.userorder='金牌铲屎官';
this.newlist=this.goldmedal;
userwidth=100
}
this.$refs.userblock.style.width=userwidth+'%'
}else{
console.log('---');
this.userid=[];
}
}
}
</script>
<style lang="less" scoped>
ul li ol li em strong i {
list-style: none;
font-style: normal;
}
.rc-header {
width: 100%;
}
//
@media screen and (max-width: 768px) {
.rc-main {
width: 92%;
margin: 0 auto;
overflow: hidden;
.rc-center {
width: 100%;
height: 180px;
img {
width: 100%;
height: 100%;
display: block;
}
}
.rc-userorder{
display: flex;
align-items: center;
height: 100%;
}
.rc-order{
padding: 16px 0 16px 0 ;
width: 100%;
display: flex;
align-items: center;
font-size: 14px;
color: #333333;
font-weight: 500;
border-bottom: 1px solid #D8D8D8;
margin-top: 22px;
}
.rc-cordd{
color:#666666;
font-size: 14px;
margin-top: 16px;
span{
display: block;
margin-top: 16px;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.usermember{
width: 100%;
height: 80px;
border-bottom: 1px solid #D8D8D8;
display: flex;
align-items: center;
.rc-image{
height: 100%;
display: flex;
align-items: center;
}
img{
width: 48px;
height: 48px;
display: block;
}
em{
font-style: normal;
font-size: 16px;
display: block;
margin-left:16px;
font-weight: bold;
color: #531c1c;
}
span{
color: #666666;
font-size: 14px;
margin-left: 8px;
}
}
}
}
@media screen and (min-width: 768px) and (max-width: 1920px) {
.rc-main {
width: 92%;
margin: 0 auto;
overflow: hidden;
.rc-center {
width: 100%;
height: 180px;
display: none;
img {
width: 100%;
height: 100%;
display: block;
}
}
.rc-order{
padding: 16px 0 16px 0 ;
width: 100%;
display: flex;
align-items: center;
font-size: 26px;
color: #333333;
font-weight: 500;
}
.rc-cordd{
color:#666666;
margin-top: 16px;
span{
display: block;
margin-top: 16px;
font-size: 16px;
}
.block{
height: 8px;
background: #D7D7D7;
margin-top: 16px;
border-radius: 4px;
.r-block{
width: 0%;
height: 100%;
background: #008900;
}
}
.rc-value{
display: flex;
justify-content: space-between;
}
}
.usermember{
width: 23%;
float: left;
height: 160px;
border: 1px solid #D7D7D7;
margin-top: 80px;
margin-left: 19px;
.rc-image{
float: right;
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
margin-right:20px;
}
img{
width: 80px;
height: 80px;
display: block;
}
em{
font-style: normal;
font-size: 20px;
display: block;
font-weight: 500;
color: #333333;
}
span{
color: #999999;
font-size: 14px;
}
}
.rc-userorder{
width: 60%;
float: left;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
span{
margin-top: 8px;
width: 54%;
}
}
}
}
</style>

View File

@ -0,0 +1,555 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-main">
<div class="rc-hearder">
<div class="rc-userpay">
<div class="paysucess">
<span>订单提交成功等待付款</span>
</div>
<div class="rc-all">
<div class="rc-payprice">
<span>付款金额:</span>
<i>{{ userprice }}</i>
</div>
<div class="rc-receiving">
<span>收货信息:</span>
<i>{{ userinformation }}</i>
</div>
</div>
<div class="rc-usermaina">
<div class="rc-title" id="qrcode" ref="qrcode" >
</div>
</div>
</div>
<div class="rc-paystype">
<span>请选择支付方式</span>
</div>
<div class="paystype">
<div
class="payAlipay"
v-for="(item, index) in userpaystype"
:key="index"
@click="selectGoods(item, index)"
:class="activeIndex == index ? 'active' : 'unactive'"
>
<div class="rc-payype">
<img :src="item.payimage" alt="" />
<span>{{ item.price }}</span>
</div>
<div class="user-righticon">
<img src="../../assets/image/rc-left.png" alt="" />
</div>
</div>
</div>
</div>
<div class="paycord" @click="usershow()" id="qrcode" ref="qrcode">
<!-- <img src="../../assets/image/rc-discount.png" alt="" />
<span>微信扫一扫立即支付</span> -->
</div>
</div>
<el-dialog
:visible.sync="dialogInfo1"
hegight="700px"
@close='closeDialog'
>
<div class="rc-header">
<div class="rc-titled" >
<img src="../../assets/image/usersucess.png" alt="">
</div>
<div class="rc-logmain">
<h3>支付成功</h3>
<span>{{usermessage}}</span>
</div>
<div class="userer">
<img src="../../assets/image/rc-discount.png" alt="">
<span>微信扫一扫识别二维码</span>
<i>加入社群0元试用商品随单发放</i>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import Myheader from "~/components/header.vue";
import QRCode from 'qrcodejs2'
import { generateOrderWX } from "../../ajax/getData";
export default {
data() {
return {
userdata:null,
activeIndex: 0,
usermessage:'您的商品我们正在抓紧打包,请耐心等候!',
userprice: "¥167.00",
userinformation: "李某某 151****7917",
userpaystype: [
{
price: "支付宝支付",
payimage: require("../../assets/image/rc-cat.png"),
catimage: require("../../assets/image/rc-left.png"),
},
{
price: "微信支付",
payimage: require("../../assets/image/rc-cat.png"),
catimage: require("../../assets/image/rc-left.png"),
},
],
dialogInfo1:false,
};
},
mounted() {
this.userdata=this.$route.query.wxdata;
this.userpay(this.userdata);
console.log(this.userdata);
this.$nextTick(() => {
this.userpay();
})
},
methods: {
closeDialog(){
this.qrcode=null;
console.log('关闭的')
},
async userpay(userdata) {
console.log("-----");
let data = await generateOrderWX();
console.log();
this.qrcode(userdata);
},
qrcode (e) {
console.log(e);
let qrcode = new QRCode('qrcode',{
width: 150, //
height: 150, //
text: e//
})
},
selectGoods(item,index){
let _that=this
_that.dialogInfo1=true;
_that.activeIndex=index;
if(item.price=='微信支付'){
// this.userpay();
}
},
usershow(){
console.log('这是支付')
this.dialogInfo1=true;
}
},
components: {
Myheader,
},
};
</script>
<style lang="less" scoped >
@media screen and (max-width: 768px) {
.rc-usermaina{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.rc-userpay{
display: none;
}
/deep/.el-dialog {
width:80%;
height: 500px;
}
.rc-header{
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
h3{
color:#333333;
font-size: 26px;
}
.rc-title{
img{
width: 96px;
height: 96px;
}
}
.rc-titled{
img{
width: 96px;
height: 96px;
}
}
.userer{
display: flex;
flex-direction: column;
align-items: center;
img{
width: 96px;
height: 96px;
display: flex;
justify-content: center;
flex-direction: column;
}
span{
font-size: 16px;
color: #333333;
}
i{
font-size: 18px;
font-style: normal;
display: block;
margin-top: 32px;
color: #E1001A;
}
}
}
.rc-main {
width: 100%;
.paysucess{
display: none;
}
.paycord{
display: none;
}
.rc-hearder {
width: 93%;
margin: 0 auto;
i em {
font-style: normal;
}
.rc-userpay {
width: 100%;
// height: 96px;
display: flex;
flex-direction: column;
justify-content: center;
.rc-all{
display: none;
}
.rc-payprice {
display: flex;
justify-content: space-between;
span {
font-size: 14px;
color: #333333;
}
i {
font-size: 14px;
font-style: normal;
color: #e1001a;
}
}
.rc-receiving {
margin-top: 8px;
display: flex;
justify-content: space-between;
span {
font-size: 14px;
color: #333333;
}
i {
font-style: normal;
color: #666666;
font-size: 14px;
}
}
strong {
font-size: 16px;
display: block;
margin-top: 53px;
color: #e1001a;
}
}
.rc-paystype {
margin-top: 53px;
span {
font-size: 16px;
color: #e1001a;
}
}
.payAlipay {
.user-righticon{
display: flex;
align-items: center;
img{
width: 8px;
height: 16px;
}
}
display: flex;
justify-content: space-between;
height: 80px;
border-bottom: 1px solid #d8d8d8;
.rc-payype {
display: flex;
align-items: center;
img {
width: 32px;
height: 32px;
border-radius: 50%;
}
span {
color: #333333;
font-size: 14px;
margin-left: 16px;
}
}
}
}
}
}
@media screen and (min-width: 768px) and (max-width: 1920px) {
/deep/.el-dialog {
width: 440px;
height: 677px;
}
.rc-header{
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
h3{
color:#333333;
font-size: 26px;
}
.rc-titled{
img{
width: 96px;
height: 96px;
}
}
.rc-title{
position: absolute;
left: 50%;
margin-left: -75px;
top: 59%;
img{
width: 96px;
height: 96px;
}
}
.userer{
img{
width: 210px;
height: 210px;
display: flex;
justify-content: center;
flex-direction: column;
}
span{
font-size: 16px;
color: #333333;
}
i{
font-size: 18px;
font-style: normal;
display: block;
margin-top: 32px;
color: #E1001A;
}
}
}
.rc-main {
.active {
border: 1px solid #E2001A;
cursor: pointer;
width: 200px;
height: 56px;
}
.unactive {
border:1px solid #3D3D3D;
cursor: pointer;
width: 200px;
height: 56px;
}
width: 100%;
.rc-hearder {
width: 93%;
margin: 0 auto;
i em {
font-style: normal;
}
.rc-userpay {
width: 100%;
height: 96px;
// display: flex;
// justify-content: space-between;
.paysucess{
display: flex;
align-items: center;
span{
font-size: 20px;
display: block;
width: 61%;
color: #E2001A;
}
}
.rc-all{
display: flex;
flex-direction: column;
justify-content: center;
}
.rc-payprice {
display: flex;
justify-content: flex-end;
span {
font-size: 16px;
color: #333333;
}
i {
font-size: 16px;
font-style: normal;
color: #e1001a;
}
}
.rc-receiving {
margin-top: 8px;
display: flex;
justify-content: flex-end;
span {
font-size: 16px;
color: #333333;
}
i {
font-style: normal;
color: #666666;
font-size: 16px;
}
}
strong {
font-size: 16px;
display: block;
margin-top: 53px;
color: #e1001a;
}
}
.paystype{
display: flex;
align-items: center;
}
.rc-paystype {
height: 100px;
display: flex;
align-items: center;
span {
font-size: 26px;
color: #E2001A;
}
}
.payAlipay {
margin-left: 20px;
.user-righticon{
display: none;
img{
width: 8px;
height: 16px;
}
}
display: flex;
justify-content: space-between;
height: 56px;
.rc-payype {
display: flex;
align-items: center;
font-size: 16px;
color: #E2001A;
justify-content: center;
width: 100%;
img {
width: 32px;
height: 32px;
border-radius: 50%;
}
span {
margin-left: 16px;
}
}
}
}
.paycord{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
img{
width: 260px;
height: 260px;
display: block;
}
span{
font-size: 20px;
display: block;
color: #333333;
}
}
}
}
</style>