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

@@ -21,16 +21,17 @@
</div>
<div class="rc-center" v-for="(item, index) in goldmedal" :key="index">
<div class="rc-usermaina" v-for="(userlist,index) in item.orderDetailList" :key="index" >
<div class="rc-title">
<div>
<i>订单编号:</i><span>{{ item.ordernumber }}</span>
<i>订单编号:</i><span>{{ item.orderNumber }}</span>
</div>
<div class="rc-usertitle">
<strong>订单状态:</strong> <em>{{ item.orderstype }}</em>
<strong>订单状态:</strong> <em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
</div>
</div>
<div class="rc-usermain">
<div class="rc-usermain" @click="userfind(item)">
<div class="rc-image">
<img :src="item.catimage" alt="" />
@@ -39,12 +40,12 @@
<div class="rc-usercenter">
<em>{{ item.usereat }}</em>
<div class="rc-userright">
<span>规格:{{ item.num }}</span>
<span>规格:{{ userlist.num }}</span>
</div>
</div>
<div class="rc-userbottom">
<span>数量:{{ item.orderstype }}</span>
<i>{{ item.userprice }}</i>
<span>数量:{{ userlist.pcs}}</span>
<i>{{ userlist.ecPrice }}</i>
</div>
@@ -60,10 +61,11 @@
<span @click="userfind()">查看订单</span>
</div>
</div>
<div class="rc-bottom">
<span @click="userpay(item,index)">{{item.buttontitle}}</span>
<span @click="userfind()">查看订单</span>
</div>
<!-- <div class="rc-bottom">
<span @click="userpay(item,index)">{{item.status=='0'?'取消订单':item.status=='1'?'确认收货':item.status=='2'?'再次购买':item.status=='3'?'再次购买':'异常订单'}}</span>
<span @click="userfind(item)">{{item.status=='0'?'立即支付':item.status=='1'?'查看订单':item.status=='2'?'查看订单':item.status=='3'?'查看订单':'异常订单'}}</span>
</div> -->
</div>
</div>
</div>
</div>
@@ -71,12 +73,14 @@
</template>
<script>
import { List } from 'vant';
import Myheader from "~/components/header.vue";
import { customerorders } from "../../ajax/getData";
import { customerorders,userindent,canceldanhao } from "../../ajax/getData";
export default {
data() {
return {
activeIndex: 0,
userdata:[],
buttontitle:'再次购买',
discountlist: [
{
@@ -186,8 +190,61 @@ export default {
],
};
},
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);
}
},
components: {
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 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({
@@ -216,12 +273,14 @@ export default {
}
},
userfind(){
userfind(item){
console.log('--');
console.log(item.orderNumber);
this.$router.push({
path: "/personal/quiry",
path: "/myorder/usertion",
query: {
stype: 1,
stype: item.status,
orderNumber:item.orderNumber
},
});
},
@@ -232,15 +291,10 @@ export default {
stype: 1,
},
});
}
},
},
mounted() {
},
components: {
Myheader,
},
};
</script>
@@ -265,7 +319,10 @@ export default {
.rc-main {
width: 92%;
margin: 0 auto;
.rc-usermaina{
width: 100%;
height: 100%;
}
.rc-headera {
display: flex;
justify-content: space-between;