This commit is contained in:
952108534@qq.com
2022-01-07 19:48:22 +08:00
parent bd6e653dc1
commit a49efd47b2
22 changed files with 2039 additions and 211 deletions

View File

@@ -20,7 +20,9 @@
<span>{{usertitle}}</span>
<em>{{userorder}}</em>
</div>
<nuxt-link :to="`/userlogin/login/`">
<span v-if="islogin">登录/注册</span>
</nuxt-link>
</div>
</div>
<div class="rc-islogin">
@@ -32,9 +34,7 @@
<div class="usercord">
<em>当前积分:{{ rcrcord }}</em>
<nuxt-link :to="`/personal/integral/`">
<span>积分明细</span>
</nuxt-link>
<span @click="userinter">积分明细</span>
</div>
<div class="rc-cordd">
@@ -54,9 +54,9 @@
<div class="rc-order">
<em>我的订单</em>
<nuxt-link :to="`/personal/useraddress/`">
<span >查看全部</span>
</nuxt-link>
<span @click="findall" >查看全部</span>
</div>
<div class="rc-obligation">
<ul>
@@ -185,12 +185,51 @@ export default {
},
methods: {
userinter(){
console.log(this.userid);
if(this.userid!==null||this.userid!==undefined){
this.$router.push({
path: "/personal/integral/",
query: {
stype: 1,
},
});
}else{
this.$message({
type: 'warning',
message: '您还未登录'
});
return
}
},
findall(){
console.log('PPP');
console.log(this.userid.length);
if(this.userid!==null||this.userid!==undefined){
this.$router.push({
path: "/personal/useraddress/",
query: {
stype: 0,
},
});
}else{
this.$message({
type: 'warning',
message: '您还未登录'
});
return
}
},
//地址的跳转
obligation(item,index){
console.log(index);
if(index==0){
console.log(item);
if(this.userid!==null||this.userid!==undefined){
if(item.title=='待付款'){
this.$router.push({
path: "/myorder/usertion",
path: "/personal/useraddress",
query: {
stype: 1,
},
@@ -198,22 +237,31 @@ obligation(item,index){
}
else if(index==1){
else if(item.title=='待发货'){
this.$router.push({
path: "/myorder/usertion",
path: "/personal/useraddress",
query: {
stype: 2,
},
});
}
else if(index==2){
else if(item.title=='待收货'){
this.$router.push({
path: "/myorder/usertion",
path: "/personal/useraddress",
query: {
stype: 3,
},
});
}
}else{
this.$message({
type: 'warning',
message: '您还未登录'
});
return
}
},
@@ -253,7 +301,8 @@ obligation(item,index){
},
openaddress(index){
console.log(index);
if(index==2){
if(this.userid!==null||this.userid!==undefined){
if(index==2){
this.$router.push({
path: `/useraddress/openaddress/`
})
@@ -273,6 +322,15 @@ this.$router.push({
}
}else{
console.log('---=');
this.$message({
type: 'warning',
message: '您还未登录'
});
return
}
},
opendialog(){
@@ -282,6 +340,7 @@ this.$router.push({
},
mounted() {
console.log(this.islogin)
console.log(this.userid);
let userwidth=0;
this.ifadroind();
let user= JSON.parse(localStorage.getItem("userInfo"));
@@ -289,6 +348,7 @@ this.$router.push({
if(user!==null){
console.log('11')
this.userid=user.data;
console.log(this.userid);
this.usertitle=this.userid.memberName;
this.rcrcord=this.userid.availiblePoint;