mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
Merge branch 'sit-Carl' into sit-Leung
This commit is contained in:
commit
eed41ae763
@ -10,6 +10,7 @@ body {
|
|||||||
border:unset;
|
border:unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.rc-menu--xs .rc-screen-reader{
|
.rc-menu--xs .rc-screen-reader{
|
||||||
left:28%;
|
left:28%;
|
||||||
}
|
}
|
||||||
@ -148,6 +149,9 @@ picture {
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
.useruantity{
|
||||||
|
margin: 1rem 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.ts-remove {
|
.ts-remove {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
|
@ -279,7 +279,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 164px;
|
height: 164px;
|
||||||
.rc-usercenter{
|
.rc-usercenter{
|
||||||
width: 25%;
|
width: 27%;
|
||||||
em{
|
em{
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
@ -329,7 +329,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 58%;
|
width: 56%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #E1001A;
|
color: #E1001A;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -2,8 +2,110 @@ ul li ol li em strong i {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
.rc-main{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
//手机端
|
//手机端
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
|
.online{
|
||||||
|
margin: 0;
|
||||||
|
&.bold{
|
||||||
|
height: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单状态
|
||||||
|
.rc-receiving {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// margin: 1rem 1.25rem;
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
color: #e1001a;
|
||||||
|
font-size: 1.375rem;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
display: block;
|
||||||
|
margin-left: 1.125rem;
|
||||||
|
width: 62%;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//快递列表
|
||||||
|
.delivery {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 1rem 1.25rem;
|
||||||
|
.to-delivery {
|
||||||
|
img{
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-style: normal;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-left: 0.18rem;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
display: block;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
margin-top: 0.31rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bo-delivery {
|
||||||
|
span {
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #666666;
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//地址列表
|
||||||
|
.mypersonal{
|
||||||
|
.my-delivery {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-style: normal;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
display: block;
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #333333;
|
||||||
|
margin-left: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.per-delivery {
|
||||||
|
span {
|
||||||
|
font-size:0.875rem;
|
||||||
|
color: #666666;
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.43rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.rc-margin-y--md{
|
.rc-margin-y--md{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
@ -39,83 +141,7 @@ margin-right: 20px;
|
|||||||
.rc-foo{
|
.rc-foo{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.rc-receiving {
|
|
||||||
width: 100%;
|
|
||||||
height: 80px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
em {
|
|
||||||
font-style: normal;
|
|
||||||
color: #e1001a;
|
|
||||||
font-size: 22px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
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 {
|
.rc-usermain {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -207,14 +233,16 @@ margin-right: 20px;
|
|||||||
|
|
||||||
.rc-merchandise {
|
.rc-merchandise {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 32px;
|
margin-top: 24px;
|
||||||
|
padding-right: 0.7rem;
|
||||||
|
padding-left: 0.7rem;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
line-height: 26px;
|
line-height: 30px;
|
||||||
i {
|
i {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
@ -240,10 +268,15 @@ margin-right: 20px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.useruantity{
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.rc-payment{
|
.rc-payment{
|
||||||
|
padding-right: 0.7rem;
|
||||||
|
padding-left: 0.7rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
.u-trackingnumber{
|
.u-trackingnumber{
|
||||||
@ -293,7 +326,49 @@ margin-right: 20px;
|
|||||||
|
|
||||||
|
|
||||||
//pc端
|
//pc端
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px){
|
||||||
|
|
||||||
|
//快递列表
|
||||||
|
.delivery {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 1rem 1.25rem;
|
||||||
|
.to-delivery {
|
||||||
|
margin-top: 20px;
|
||||||
|
img{
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-style: normal;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-left: 16px;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
display: block;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
margin-top: 0.31rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bo-delivery {
|
||||||
|
margin-top: 16px;
|
||||||
|
span {
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #666666;
|
||||||
|
display: block;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.rc-margin-y--md{
|
.rc-margin-y--md{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -329,7 +404,6 @@ margin-right: 20px;
|
|||||||
.delivery {
|
.delivery {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 140px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
.viewdetails{
|
.viewdetails{
|
||||||
|
@ -2,63 +2,83 @@
|
|||||||
<div class="user-main">
|
<div class="user-main">
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<div class="rc-main" v-for="(item,index) in goldmedal" :key="item.id" >
|
<div class="rc-main" v-for="(item, index) in goldmedal" :key="item.id">
|
||||||
<div class="rc-receiving" >
|
<div class="online bold">
|
||||||
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
</div>
|
||||||
<span>{{orderstatus}}</span>
|
<div class="rc-receiving useruantity">
|
||||||
|
<em>{{
|
||||||
|
item.status == "0"
|
||||||
|
? "待付款"
|
||||||
|
: item.status == "1"
|
||||||
|
? "待收货"
|
||||||
|
: item.status == "2"
|
||||||
|
? "已完成"
|
||||||
|
: item.status == "3"
|
||||||
|
? "已取消"
|
||||||
|
: "异常订单"
|
||||||
|
}}</em>
|
||||||
|
<span>{{ orderstatus }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="online bold">
|
||||||
|
</div>
|
||||||
|
<div class="delivery useruantity" v-if="isshow">
|
||||||
|
<div class="to-delivery">
|
||||||
|
<img src="../../static/images/delivery.png" alt="">
|
||||||
|
<span>{{ trackingstates }}</span>
|
||||||
|
<!-- <i>2021-1-21</i> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="delivery" v-if="isshow" >
|
<div class="bo-delivery">
|
||||||
<div class="to-delivery">
|
<!-- <span> 广州天河—刘某某【15124617917】正在派送中</span> -->
|
||||||
<span>{{ trackingstates}}</span>
|
<!-- {{ logisticsCompany }} -->
|
||||||
</div>
|
|
||||||
<div class="bo-delivery">
|
|
||||||
<span>{{ logisticsCompany }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="viewdetails">
|
|
||||||
<span>查看详情</span>
|
|
||||||
<img :src="leftico" alt="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="viewdetails">
|
||||||
<div
|
<span>查看详情</span>
|
||||||
class="mypersonal"
|
<img :src="leftico" alt="" />
|
||||||
v-for="(datddress, index) in useraddress"
|
|
||||||
:key="datddress.id"
|
|
||||||
>
|
|
||||||
<div class="my-delivery">
|
|
||||||
<span>{{ datddress.recipient }}</span>
|
|
||||||
<i>{{ datddress.recipientPhone }}</i>
|
|
||||||
</div>
|
|
||||||
<div class="per-delivery">
|
|
||||||
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="online bold">
|
||||||
|
</div>
|
||||||
<div >
|
<div class="mypersonal useruantity">
|
||||||
|
<div class="my-delivery">
|
||||||
|
<span>{{ item.addressUserName }}</span>
|
||||||
|
<i>{{ item.addressPhoneNumber }}</i>
|
||||||
|
</div>
|
||||||
|
<div class="per-delivery">
|
||||||
|
<span
|
||||||
|
>{{ item.addressProvinceName }}{{ item.addressCityName
|
||||||
|
}}{{ item.addressCountyName }}</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="online bold"></div>
|
||||||
|
<div>
|
||||||
<div class="rc-center">
|
<div class="rc-center">
|
||||||
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
<div
|
||||||
|
class="rc-usermain useruantity"
|
||||||
|
v-for="(userlist, index) in item.orderDetailList"
|
||||||
|
:key="index"
|
||||||
|
|
||||||
|
>
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img src="../../static/images/default.jpg" alt="" />
|
<img :src="userlist.picFile" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
<em>{{ userlist.productName }}</em>
|
<em>{{ userlist.productName }}</em>
|
||||||
<div class="rc-userright">
|
<div class="rc-userright">
|
||||||
<span>规格:{{ item.productId }}</span>
|
<span>规格:{{ userlist.specifications }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ userlist.pcs }}件</span>
|
||||||
<i>¥{{ 10 }}</i>
|
<i>¥{{ userlist.ecPrice }}</i>
|
||||||
<div class="rc-bottom">
|
<div class="rc-bottom">
|
||||||
<span @click="userpay()">{{customer}}</span>
|
<span @click="userpay()">{{ customer }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="rc-bottomm">
|
||||||
|
<span @click="userpay()">{{ customer }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-bottomm">
|
|
||||||
<span @click="userpay()">{{customer}}</span>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="rc-userbottomm">
|
<!-- <div class="rc-userbottomm">
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.userprice }}</i>
|
||||||
<span>{{ item.orderstype }}</span>
|
<span>{{ item.orderstype }}</span>
|
||||||
@ -66,8 +86,10 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="online bold"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-merchandise">
|
<div class="rc-merchandise ">
|
||||||
|
<div class="rc-merchandise ">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span>商品总价:</span>
|
<span>商品总价:</span>
|
||||||
@ -87,8 +109,10 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="rc-payment">
|
<div class="rc-payment">
|
||||||
|
<div class="rc-payment">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span>订单编号::</span>
|
<span>订单编号::</span>
|
||||||
@ -96,7 +120,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>下单时间::</span>
|
<span>下单时间::</span>
|
||||||
<i>{{ item.orderDate }}</i>
|
<i>{{ logisticsDate }}</i>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>付款方式::</span>
|
<span>付款方式::</span>
|
||||||
@ -109,270 +133,259 @@
|
|||||||
<li>
|
<li>
|
||||||
<span>快递单号:</span>
|
<span>快递单号:</span>
|
||||||
<div class="u-trackingnumber">
|
<div class="u-trackingnumber">
|
||||||
<i>{{ logisticsNumber }}
|
<i>{{ logisticsNumber }} </i>
|
||||||
</i>
|
<!-- <img :src="information.catimage" alt=""> -->
|
||||||
<!-- <img :src="information.catimage" alt=""> -->
|
</div>
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rc-foot">
|
<div class="rc-foot">
|
||||||
<div class="rc-foo">
|
<div class="rc-foo">
|
||||||
<div style="padding-top:55px">
|
<div style="padding-top: 55px">
|
||||||
<i>合计金额:</i>
|
<i>合计金额:</i>
|
||||||
<em>¥{{usersalesAmount}}</em>
|
<em>¥{{ usersalesAmount }}</em>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-bottom:40px">
|
<div style="padding-bottom: 40px; cursor: pointer">
|
||||||
<span @click="onceagain()">再次购买</span>
|
<span @click="onceagain(item)"> {{ payorsucess }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
</div>
|
||||||
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain()">
|
</div>
|
||||||
{{payorsucess}}
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
</i>
|
<i
|
||||||
|
class="ts-standard-btn ts-standard-btn--two center"
|
||||||
|
@click="onceagain()"
|
||||||
|
>
|
||||||
|
{{ payorsucess }}
|
||||||
|
</i>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
<MyFooter></MyFooter>
|
||||||
|
|
||||||
<MyFooter></MyFooter>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import { mapMutations } from "vuex";
|
import { mapMutations } from "vuex";
|
||||||
import { userin} from "../../ajax/getData";
|
import { userin } from "../../ajax/getData";
|
||||||
import MyFooter from '~/components/rc-footer.vue'
|
import MyFooter from "~/components/rc-footer.vue";
|
||||||
import {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData";
|
import Vue from "vue";
|
||||||
|
let vm = new Vue();
|
||||||
|
import formatConversion from "../../static/js/date";
|
||||||
|
import {
|
||||||
|
selectaddress,
|
||||||
|
canceldanhao,
|
||||||
|
generateOrderWX,
|
||||||
|
} from "../../ajax/getData";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goldmedal:[],
|
goldmedal: [],
|
||||||
userproductId:'',
|
userproductId: "",
|
||||||
logisticsDate:'',
|
logisticsDate: "",
|
||||||
userphone:'',
|
addressPhoneNumber: "",
|
||||||
logisticsNumber:'',
|
userphone: "",
|
||||||
customer:'',//联系客服或者取消订单
|
logisticsNumber: "",
|
||||||
payorsucess:'', //立即支付或者再次购买,
|
customer: "", //联系客服或者取消订单
|
||||||
|
payorsucess: "", //立即支付或者再次购买,
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
addressUserName:'',
|
addressUserName: "",
|
||||||
logisticsCompany:'',//物流公司
|
logisticsCompany: "", //物流公司
|
||||||
orderstatus: '',
|
orderstatus: "",
|
||||||
goldastates:'',
|
goldastates: "",
|
||||||
userisdelivery:'待收货',
|
|
||||||
|
userisdelivery: "待收货",
|
||||||
userdelivery: "派送中",
|
userdelivery: "派送中",
|
||||||
isshow:true,
|
isshow: true,
|
||||||
usersalesAmount:'',
|
usersalesAmount: "",
|
||||||
leftico: require("../../assets/image/rc-left.png"),
|
leftico: require("../../assets/image/rc-left.png"),
|
||||||
orderNumber:'',
|
orderNumber: "",
|
||||||
userdata:"",
|
userdata: "",
|
||||||
usermessage:null,
|
usermessage: null,
|
||||||
userid: null,
|
userid: null,
|
||||||
trackingstates:'',//运输状态
|
trackingstates: "", //运输状态
|
||||||
useralllist:[],
|
useralllist: [],
|
||||||
delivery: [
|
delivery: [],
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
useraddress: [
|
useraddress: [],
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
goldmedal: [
|
goldmedal: [],
|
||||||
|
shopprice: {},
|
||||||
],
|
|
||||||
shopprice: {
|
|
||||||
|
|
||||||
},
|
|
||||||
information: {
|
information: {
|
||||||
reference: "1111111111111111",
|
reference: "1111111111111111",
|
||||||
ordertime: "2012-12-01 11:20:00",
|
ordertime: "2012-12-01 11:20:00",
|
||||||
paymentmethod: "微信支付",
|
paymentmethod: "微信支付",
|
||||||
distribution: "快递",
|
distribution: "快递",
|
||||||
trackingnumber: "11111111111111",
|
trackingnumber: "11111111111111",
|
||||||
catimage: require("../../assets/image/rc-left.png"),
|
catimage: require("../../assets/image/rc-left.png"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["checkIsLogin"]),
|
...mapMutations(["checkIsLogin"]),
|
||||||
refreshDesktopNav:function(){
|
refreshDesktopNav: function () {
|
||||||
RCDL.navigation.currentState=null;
|
RCDL.navigation.currentState = null;
|
||||||
RCDL.navigation.rebuild();
|
RCDL.navigation.rebuild();
|
||||||
},
|
},
|
||||||
//取消订单
|
//取消订单
|
||||||
async canceldanhao(orderNumber) {
|
async canceldanhao(orderNumber) {
|
||||||
let data = await canceldanhao(this.userphone,this.orderNumber);
|
let data = await canceldanhao(this.userphone, this.orderNumber);
|
||||||
if (data) {
|
if (data) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
message: "取消订单成功",
|
message: "取消订单成功",
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/useraddress",
|
path: "/personal/useraddress",
|
||||||
query: {
|
query: {
|
||||||
stype: 1,
|
stype: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
userpay(){
|
userpay() {
|
||||||
console.log('---');
|
console.log("---");
|
||||||
if(this.goldastates==0){
|
if (this.goldastates == 0) {
|
||||||
this.canceldanhao();
|
this.canceldanhao();
|
||||||
}
|
} else if ((this.customer = "联系客服申请售后")) {
|
||||||
else if( this.customer='联系客服申请售后'){
|
var option = {
|
||||||
var option = {
|
customer: {
|
||||||
customer: {id: '', name: '', email: '', mobile: '', memberId: this.userdata.data.id}
|
id: "",
|
||||||
}
|
name: "",
|
||||||
dis_livchat(option);
|
email: "",
|
||||||
}
|
mobile: "",
|
||||||
},
|
memberId: this.userdata.data.id,
|
||||||
//订单支付和再次购买
|
},
|
||||||
onceagain(){
|
|
||||||
console.log(this.payorsucess);
|
|
||||||
if(this.payorsucess=='立即支付'){
|
|
||||||
console.log('----')
|
|
||||||
this.getwei();
|
|
||||||
|
|
||||||
}else{
|
|
||||||
this.$router.push({
|
|
||||||
path: "/productdetails/producted",
|
|
||||||
query: {
|
|
||||||
stype: 1,
|
|
||||||
productCode: this.userproductId
|
|
||||||
},
|
|
||||||
});
|
|
||||||
console.log('不是立即支付');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
async orderquantity(orderNumber){
|
|
||||||
|
|
||||||
let data=await userin(orderNumber);
|
|
||||||
if(data){
|
|
||||||
this.goldmedal=data;
|
|
||||||
console.log(this.goldmedal);
|
|
||||||
for(let i=0;i<this.goldmedal.length;i++){
|
|
||||||
this.goldastates=this.goldmedal[i].status;
|
|
||||||
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
|
||||||
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber; //物流单号
|
|
||||||
this.trackingstates=this.goldmedal[i].orderDetailList[0].status//运输状态
|
|
||||||
|
|
||||||
if( this.trackingstates==0){
|
|
||||||
this.trackingstates='运输中'
|
|
||||||
}else if(this.trackingstates==1){
|
|
||||||
this.trackingstates='已签收'
|
|
||||||
}
|
|
||||||
else if(this.trackingstates==2){
|
|
||||||
this.trackingstates='未发货'
|
|
||||||
}
|
|
||||||
console.log(this.goldmedal[i].orderDate);
|
|
||||||
this.logisticsDate=new Date(this.goldmedal[i].orderDate.toLocaleString())//时间戳
|
|
||||||
console.log(this.logisticsDate);
|
|
||||||
this.logisticsCompany=this.goldmedal[i].orderDetailList[0].logisticsCompany; //物流公司
|
|
||||||
this.orderNumber=this.goldmedal[i].orderNumber
|
|
||||||
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
|
||||||
this.addressUserName=this.goldmedal[i].addressUserName;
|
|
||||||
|
|
||||||
}
|
|
||||||
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
//订单立即支付
|
|
||||||
async getwei(user) {
|
|
||||||
console.log(user);
|
|
||||||
let userPayData = {
|
|
||||||
userprice: this.usersalesAmount,
|
|
||||||
orderId:this.orderNumber,
|
|
||||||
userinformation:this.useraddress[0].recipient +
|
|
||||||
" "+this.userphone
|
|
||||||
};
|
};
|
||||||
this.$router.push({
|
dis_livchat(option);
|
||||||
path: "/personal/userpay",
|
}
|
||||||
|
},
|
||||||
|
//订单支付和再次购买
|
||||||
|
onceagain(item) {
|
||||||
|
console.log(this.payorsucess);
|
||||||
|
if (this.payorsucess == "立即支付") {
|
||||||
|
console.log("----");
|
||||||
|
this.getwei(item);
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/productdetails/producted",
|
||||||
query: {
|
query: {
|
||||||
userData:this.orderNumber,
|
stype: 1,
|
||||||
stype:1,
|
productCode: this.userproductId,
|
||||||
userPayData: JSON.stringify(userPayData),
|
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// this.$router.push({
|
console.log("不是立即支付");
|
||||||
// path: "/personal/userpay",
|
}
|
||||||
// query: {
|
|
||||||
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
async editaddress(user) {
|
async orderquantity(orderNumber) {
|
||||||
// user.data.id=844350;
|
let data = await userin(orderNumber);
|
||||||
let data = await selectaddress(this.userid);
|
if (data) {
|
||||||
let list=[]
|
this.goldmedal = data;
|
||||||
this.useraddress=data.data;
|
console.log(this.goldmedal);
|
||||||
for(let i =0;i<this.useraddress.length;i++){
|
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||||
if(this.useraddress[i].isDefault==true){
|
this.goldastates = this.goldmedal[i].status;
|
||||||
list.push(this.useraddress[i]);
|
|
||||||
|
this.userproductId = this.goldmedal[i].orderDetailList[0].productId;
|
||||||
|
this.logisticsNumber =
|
||||||
|
this.goldmedal[i].orderDetailList[0].logisticsNumber; //物流单号
|
||||||
|
this.trackingstates = this.goldmedal[i].orderDetailList[0].status; //运输状态
|
||||||
|
|
||||||
|
if (this.trackingstates == 0) {
|
||||||
|
this.trackingstates = "运输中";
|
||||||
|
} else if (this.trackingstates == 1) {
|
||||||
|
this.trackingstates = "已签收";
|
||||||
|
} else if (this.trackingstates == 2) {
|
||||||
|
this.trackingstates = "未发货";
|
||||||
}
|
}
|
||||||
|
this.logisticsDate = this.formatConversion(
|
||||||
|
this.goldmedal[i].orderDate
|
||||||
|
); //时间戳
|
||||||
|
this.logisticsCompany =
|
||||||
|
this.goldmedal[i].orderDetailList[0].logisticsCompany; //物流公司
|
||||||
|
this.orderNumber = this.goldmedal[i].orderNumber;
|
||||||
|
this.usersalesAmount = this.goldmedal[i].salesAmount;
|
||||||
|
this.addressUserName = this.goldmedal[i].addressUserName;
|
||||||
|
this.addressPhoneNumber = this.goldmedal[i].addressPhoneNumber;
|
||||||
}
|
}
|
||||||
this.useraddress=list;
|
console.log(this.goldmedal, this.userproductId, this.usersalesAmount);
|
||||||
console.log( this.useraddress[0].recipient);
|
}
|
||||||
|
|
||||||
// console.log(this.list);
|
|
||||||
},
|
},
|
||||||
|
//订单立即支付
|
||||||
|
async getwei(user) {
|
||||||
|
console.log(user);
|
||||||
|
let userPayData = {
|
||||||
|
userprice: this.usersalesAmount,
|
||||||
|
orderId: this.orderNumber,
|
||||||
|
userinformation: this.addressUserName + " " + this.addressPhoneNumber,
|
||||||
|
};
|
||||||
|
this.$router.push({
|
||||||
|
path: "/personal/userpay",
|
||||||
|
query: {
|
||||||
|
userData: this.orderNumber,
|
||||||
|
stype: 1,
|
||||||
|
userPayData: JSON.stringify(userPayData),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async editaddress(user) {
|
||||||
|
// user.data.id=844350;
|
||||||
|
let data = await selectaddress(this.userid);
|
||||||
|
let list = [];
|
||||||
|
this.useraddress = data.data;
|
||||||
|
for (let i = 0; i < this.useraddress.length; i++) {
|
||||||
|
if (this.useraddress[i].isDefault == true) {
|
||||||
|
list.push(this.useraddress[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.useraddress = list;
|
||||||
|
console.log(this.useraddress[0].recipient);
|
||||||
|
|
||||||
|
// console.log(this.list);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkIsLogin();
|
this.checkIsLogin();
|
||||||
this.userdata=this.$store.state.userInfo;
|
this.userdata = this.$store.state.userInfo;
|
||||||
console.log(this.userdata);
|
console.log(this.userdata);
|
||||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||||
this.userid = this.usermessage.data.id;
|
this.userid = this.usermessage.data.id;
|
||||||
this.userphone=this.usermessage.data.mobile;
|
this.userphone = this.usermessage.data.mobile;
|
||||||
this.editaddress(this.userid);
|
this.editaddress(this.userid);
|
||||||
this.addressstype = this.$route.query.stype;
|
this.addressstype = this.$route.query.stype;
|
||||||
|
|
||||||
this.orderNumber=this.$route.query.orderNumber;
|
this.orderNumber = this.$route.query.orderNumber;
|
||||||
this.orderquantity(this.orderNumber)
|
this.orderquantity(this.orderNumber);
|
||||||
if(this.addressstype==2){
|
if (this.addressstype == 2) {
|
||||||
this.orderstatus='您的订单已完成';
|
this.orderstatus = "您的订单已完成";
|
||||||
this.isshow=false;
|
this.isshow = false;
|
||||||
this.userisdelivery='待发货';
|
this.userisdelivery = "待发货";
|
||||||
this.customer='联系客服申请售后'
|
this.customer = "联系客服申请售后";
|
||||||
this.payorsucess='再次购买'
|
this.payorsucess = "再次购买";
|
||||||
console.log( this.orderstatus);
|
console.log(this.orderstatus);
|
||||||
}else if(this.addressstype==0){
|
} else if (this.addressstype == 0) {
|
||||||
this.orderstatus='您的订单还未付款,请尽快付款!';
|
this.orderstatus = "您的订单还未付款,请尽快付款!";
|
||||||
this.isshow=false;
|
this.isshow = false;
|
||||||
this.userisdelivery='待付款';
|
this.userisdelivery = "待付款";
|
||||||
this.customer='取消订单'
|
this.customer = "取消订单";
|
||||||
this.payorsucess='立即支付'
|
this.payorsucess = "立即支付";
|
||||||
}
|
} else if (this.addressstype == 1) {
|
||||||
else if(this.addressstype==1){
|
this.orderstatus = "您的订单已发出,请耐心等候。";
|
||||||
this.orderstatus='您的订单已发出,请耐心等候。';
|
this.isshow = true;
|
||||||
this.isshow=true;
|
this.userisdelivery = "待收货";
|
||||||
this.userisdelivery='待收货';
|
this.customer = "联系客服申请售后";
|
||||||
this.customer='联系客服申请售后'
|
this.payorsucess = "再次购买";
|
||||||
this.payorsucess='再次购买'
|
} else if (this.addressstype == 3) {
|
||||||
}
|
this.orderstatus = "您的订单已取消!";
|
||||||
else if(this.addressstype==3){
|
this.isshow = false;
|
||||||
this.orderstatus='您的订单已取消!';
|
this.userisdelivery = "已取消";
|
||||||
this.isshow=false;
|
this.customer = "联系客服申请售后";
|
||||||
this.userisdelivery='已取消';
|
this.payorsucess = "再次购买";
|
||||||
this.customer='联系客服申请售后'
|
|
||||||
this.payorsucess='再次购买'
|
|
||||||
}
|
}
|
||||||
console.log(this.addressstype);
|
console.log(this.addressstype);
|
||||||
},
|
},
|
||||||
@ -386,5 +399,4 @@ console.log(this.userdata);
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url("../../assets/css/global.less");
|
@import url("../../assets/css/global.less");
|
||||||
@import url("../../assets/css/usertion.less");
|
@import url("../../assets/css/usertion.less");
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -41,14 +41,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<i :style='usercolor'>
|
<i :style='usercolor'>
|
||||||
{{ item.couponName }}
|
{{ item.couponDesc }}
|
||||||
</i>
|
</i>
|
||||||
<div class="rc-userfont">
|
<div class="rc-userfont">
|
||||||
<strong>有效期</strong>
|
<strong>有效期</strong>
|
||||||
<span>{{item.validFrom}}至</span>
|
<span>{{item.validFrom}}至</span>
|
||||||
<em>{{item.validTo}}</em>
|
<em>{{item.validTo}}</em>
|
||||||
</div>
|
</div>
|
||||||
<nuxt-link :to="`/productdetails/productlist`">
|
<nuxt-link :to="`/productdetails/productlist`" v-if="activeIndex==0">
|
||||||
<div class="ts-standard-btn">
|
<div class="ts-standard-btn">
|
||||||
立即使用
|
立即使用
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,23 +44,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-usermain" >
|
<div class="rc-usermain" >
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img src="../../static/images/default.jpg" alt="" />
|
<img :src= item.picFile alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right" @click="usertiaozhuan(item)">
|
<div class="rc-right" @click="usertiaozhuan(item)">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
<em>{{ item.usereat }}</em>
|
<em>{{ item.productName }}</em>
|
||||||
<div class="rc-userright">
|
<div class="rc-userright">
|
||||||
<span>规格:{{ item.num }}</span>
|
<span>规格:{{ item.specifications }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ item.pcs }}件</span>
|
||||||
<i>¥10</i>
|
<i>¥{{item.ecPrice}}</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottomm">
|
<div class="rc-userbottomm">
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.ecPrice }}</i>
|
||||||
<span>{{ item.orderstype }}</span>
|
<span>{{ item.pcs }}</span>
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.salesAmount }}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -320,8 +320,14 @@ export default {
|
|||||||
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
||||||
this.useralllist[i].status = this.goldmedal[i].status;
|
this.useralllist[i].status = this.goldmedal[i].status;
|
||||||
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
|
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
|
||||||
this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber;
|
this.useralllist[i].phoneNumber = this.goldmedal[i].addressPhoneNumber;
|
||||||
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
||||||
|
// this.useralllist[i].picFile = this.goldmedal[i].picFile; //图片路径
|
||||||
|
// this.useralllist[i].productName=this.goldmedal[i].productName;//商品名称
|
||||||
|
// this.useralllist[i].ecPrice=this.goldmedal[i].ecPrice//第一个的单价
|
||||||
|
// this.useralllist[i].pcs=this.goldmedal[i].pcs//数量
|
||||||
|
|
||||||
|
|
||||||
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
||||||
}
|
}
|
||||||
console.log(this.obligation)
|
console.log(this.obligation)
|
||||||
|
@ -256,10 +256,14 @@ export default {
|
|||||||
else{
|
else{
|
||||||
//let user= JSON.parse(localStorage.getItem("userInfo"));
|
//let user= JSON.parse(localStorage.getItem("userInfo"));
|
||||||
let data = await this.vadmsg();
|
let data = await this.vadmsg();
|
||||||
if(data.code=="1")
|
console.log(data.code)
|
||||||
|
if(data.code=1)
|
||||||
{
|
{
|
||||||
|
console.log('---');
|
||||||
data=await useredit(this.tel);
|
data=await useredit(this.tel);
|
||||||
if(data.code=='1'){
|
console.log(this.tel);
|
||||||
|
console.log(data);
|
||||||
|
if(data.code=1){
|
||||||
let couponId='0000000123';
|
let couponId='0000000123';
|
||||||
this.serdiscount(this.tel,couponId);
|
this.serdiscount(this.tel,couponId);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
BIN
rc-busness/static/images/delivery.png
Normal file
BIN
rc-busness/static/images/delivery.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
28
rc-busness/static/js/date.js
Normal file
28
rc-busness/static/js/date.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
//时间戳转化成格式时间
|
||||||
|
import Vue from 'vue';
|
||||||
|
Vue.prototype.formatConversion = function (te){
|
||||||
|
if(te == ''){
|
||||||
|
return '';
|
||||||
|
}else if(te.length == 10){
|
||||||
|
var time = new Date(te * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
||||||
|
var y = time.getFullYear();
|
||||||
|
var m = time.getMonth() < 9 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
|
||||||
|
var d = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
|
||||||
|
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
||||||
|
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
||||||
|
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
||||||
|
var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
||||||
|
return timedate;
|
||||||
|
}else{
|
||||||
|
var time = new Date(te);
|
||||||
|
var y = time.getFullYear();
|
||||||
|
var m = time.getMonth() < 9 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
|
||||||
|
var d = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
|
||||||
|
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
||||||
|
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
||||||
|
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
||||||
|
var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
||||||
|
return timedate;
|
||||||
|
}
|
||||||
|
}
|
@ -44,6 +44,7 @@ public class ResponseDTO<T> {
|
|||||||
this.success = responseCodeConst.isSuccess();
|
this.success = responseCodeConst.isSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ResponseDTO(ResponseCodeConst responseCodeConst) {
|
private ResponseDTO(ResponseCodeConst responseCodeConst) {
|
||||||
this.code = responseCodeConst.getCode();
|
this.code = responseCodeConst.getCode();
|
||||||
this.msg = responseCodeConst.getMsg();
|
this.msg = responseCodeConst.getMsg();
|
||||||
@ -64,6 +65,8 @@ public class ResponseDTO<T> {
|
|||||||
return new ResponseDTO(ResponseCodeConst.SUCCESS, data, msg);
|
return new ResponseDTO(ResponseCodeConst.SUCCESS, data, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static <T> ResponseDTO<T> succData(T data) {
|
public static <T> ResponseDTO<T> succData(T data) {
|
||||||
return new ResponseDTO(ResponseCodeConst.SUCCESS, data);
|
return new ResponseDTO(ResponseCodeConst.SUCCESS, data);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@ import net.lab1024.smartadmin.constant.SwaggerTagConst;
|
|||||||
import net.lab1024.smartadmin.module.system.alipay.AliPayService;
|
import net.lab1024.smartadmin.module.system.alipay.AliPayService;
|
||||||
import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity;
|
import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity;
|
||||||
import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig;
|
import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.CouponService;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.coupon.CouponGetAllEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.constant.OrderResponseCodeConst;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.constant.OrderResponseCodeConst;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderAddress;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderAddress;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
||||||
@ -51,10 +53,13 @@ public class OrderController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CartService cartService;
|
private CartService cartService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CouponService couponService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "微信支付订单", notes = "生成订单")
|
@ApiOperation(value = "微信支付订单", notes = "生成订单")
|
||||||
@PostMapping("royalcanin/generateOrderWX")
|
@PostMapping("royalcanin/generateOrderWX")
|
||||||
public ResponseDTO<String> generateOrderWX(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
|
public ResponseDTO<Map<String, String>> generateOrderWX(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
|
||||||
StringBuffer productId = new StringBuffer();
|
StringBuffer productId = new StringBuffer();
|
||||||
StringBuffer productName = new StringBuffer();
|
StringBuffer productName = new StringBuffer();
|
||||||
String memberId = "";
|
String memberId = "";
|
||||||
@ -76,10 +81,18 @@ public class OrderController {
|
|||||||
orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount());
|
orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount());
|
||||||
orderDatilListJson.add(orderDatilListEntity);
|
orderDatilListJson.add(orderDatilListEntity);
|
||||||
if(ordersEntitys.getCouponCode() != "" && ordersEntitys.getCouponCode() != null) {
|
if(ordersEntitys.getCouponCode() != "" && ordersEntitys.getCouponCode() != null) {
|
||||||
ordersEntity.setCouponAmount(ordersEntitys.getCouponAmount());
|
CouponGetAllEntity couponGetAllEntity = new CouponGetAllEntity ();
|
||||||
ordersEntity.setCouponCode(ordersEntitys.getCouponCode());
|
couponGetAllEntity.setMemberId(ordersEntitys.getMemberId());
|
||||||
ordersEntity.setCouponName(ordersEntitys.getCouponName());
|
couponGetAllEntity.setCouponCode(ordersEntitys.getCouponCode());
|
||||||
ordersEntity.setCouponId(ordersEntitys.getCouponId());
|
String couponInfo = couponService.couponGetAll(couponGetAllEntity);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(couponInfo);
|
||||||
|
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||||
|
JSONObject jsonObjectData = (JSONObject)jsonArray.get(0);
|
||||||
|
|
||||||
|
ordersEntity.setCouponAmount(jsonObjectData.getString("couponAmount") == null ?jsonObjectData.getString("discount"):jsonObjectData.getString("couponAmount"));
|
||||||
|
ordersEntity.setCouponCode(jsonObjectData.getString("couponCode"));
|
||||||
|
ordersEntity.setCouponName(jsonObjectData.getString("couponName"));
|
||||||
|
ordersEntity.setCouponId(jsonObjectData.getString("couponId"));
|
||||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||||
}else{
|
}else{
|
||||||
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
||||||
@ -112,7 +125,10 @@ public class OrderController {
|
|||||||
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||||
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
||||||
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||||
return ResponseDTO.succData(ordersEntity.getOrderNo(),wxpayService.generateQRCode(wxPayEntity));
|
Map<String, String> returnMap = new HashMap<>();
|
||||||
|
returnMap.put("orderNumber",ordersEntity.getOrderNo());
|
||||||
|
returnMap.put("orderAmount",ordersEntity.getOrderAmount());
|
||||||
|
return ResponseDTO.succData(returnMap,wxpayService.generateQRCode(wxPayEntity));
|
||||||
}
|
}
|
||||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
||||||
}
|
}
|
||||||
@ -171,7 +187,6 @@ public class OrderController {
|
|||||||
ordersEntity.setBuyCount(buyCount);
|
ordersEntity.setBuyCount(buyCount);
|
||||||
ordersEntity.setOrderNo(GenerateSequenceUtil.generateSequenceNo());
|
ordersEntity.setOrderNo(GenerateSequenceUtil.generateSequenceNo());
|
||||||
ordersEntity.setOrderStatus("0");
|
ordersEntity.setOrderStatus("0");
|
||||||
|
|
||||||
if(orderService.generateOrder(ordersEntity,orderDatilListJson) == 1){
|
if(orderService.generateOrder(ordersEntity,orderDatilListJson) == 1){
|
||||||
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||||
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
||||||
@ -252,7 +267,7 @@ public class OrderController {
|
|||||||
AliPayEntity aliPayEntity = new AliPayEntity();
|
AliPayEntity aliPayEntity = new AliPayEntity();
|
||||||
ordersEntity.setPayType("2");
|
ordersEntity.setPayType("2");
|
||||||
ordersEntity.setOrderStatus("0");
|
ordersEntity.setOrderStatus("0");
|
||||||
if (orderService.updateOrder(ordersEntity) == 1) {
|
if (orderService.updateOrder(ordersEntity.getOrderNo()) == 1) {
|
||||||
aliPayEntity.setProduct_code(ordersEntity.getProductCode());
|
aliPayEntity.setProduct_code(ordersEntity.getProductCode());
|
||||||
aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount());
|
aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount());
|
||||||
aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||||
|
@ -22,4 +22,6 @@ public interface OrdersDao extends BaseMapper<OrderEntity> {
|
|||||||
|
|
||||||
Integer cancelOrder(String out_trade_no);
|
Integer cancelOrder(String out_trade_no);
|
||||||
|
|
||||||
|
int updateByOrderNumber (@Param("orderNumber")String orderNumber);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,6 @@ public class OrdersEntity {
|
|||||||
|
|
||||||
private OrderAddress orderAddress;
|
private OrderAddress orderAddress;
|
||||||
|
|
||||||
private Double basePoint;
|
private Double basePoint = 0.0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ public class OrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int updateOrder(OrderEntity orderEntity){
|
public int updateOrder(String orderNumber){
|
||||||
return ordersDao.updateById(orderEntity);
|
return ordersDao.updateByOrderNumber(orderNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ import java.io.*;
|
|||||||
@Component
|
@Component
|
||||||
public class MyConfig implements WXPayConfig {
|
public class MyConfig implements WXPayConfig {
|
||||||
|
|
||||||
// private String path ="C:/Users/Administrator/IdeaProjects/smart-admin/smart-admin-service/smart-admin-api/src/main/resources/wxpay/";
|
// private String path ="C:/Users/Administrator/IdeaProjects/smart-admin/smart-admin-service/smart-admin-api/src/main/resources/wxpay/pro/";
|
||||||
private String path ="/home/royalcanin-dev/cert/";
|
private String path ="/home/royalcanin-dev/cert/pro/";
|
||||||
|
|
||||||
// public String notify_url = "http://47.96.75.242:10086/smart-admin-api/royalcanin/updateOrderWX";
|
// public String notify_url = "http://47.96.75.242:10086/smart-admin-api/royalcanin/updateOrderWX";
|
||||||
|
|
||||||
@ -34,18 +34,22 @@ public class MyConfig implements WXPayConfig {
|
|||||||
certStream.close();
|
certStream.close();
|
||||||
}
|
}
|
||||||
public String getAppID() {
|
public String getAppID() {
|
||||||
return "wx3c51c14272f63a64";
|
return "wxa9a0ae603bbe6ceb";
|
||||||
}
|
}
|
||||||
//wxa9a0ae603bbe6ceb
|
//wx3c51c14272f63a64
|
||||||
|
|
||||||
public String getMchID() {
|
// public String getMchID() {
|
||||||
return "1315161001";
|
// return "16717629989";
|
||||||
|
// }
|
||||||
|
public String getMchID() {
|
||||||
|
return "1523977801";
|
||||||
}
|
}
|
||||||
// 16717629989
|
//1315161001
|
||||||
|
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return "b69497999e8fd1f8f1f0a9591b24eb72";
|
return "indexphpcorecertapicert201903200";
|
||||||
}
|
}
|
||||||
//indexphpcorecertapicert201903200
|
//b69497999e8fd1f8f1f0a9591b24eb72
|
||||||
|
|
||||||
public InputStream getCertStream() {
|
public InputStream getCertStream() {
|
||||||
ByteArrayInputStream certBis = new ByteArrayInputStream(this.certData);
|
ByteArrayInputStream certBis = new ByteArrayInputStream(this.certData);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package net.lab1024.smartadmin.module.system.wxpay;
|
package net.lab1024.smartadmin.module.system.wxpay;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.aliyun.oss.internal.SignUtils;
|
||||||
import net.lab1024.smartadmin.common.heartbeat.StringUtil;
|
import net.lab1024.smartadmin.common.heartbeat.StringUtil;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.MemberAccountService;
|
import net.lab1024.smartadmin.module.system.royalcanin.MemberAccountService;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
||||||
|
@ -22,4 +22,10 @@
|
|||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateByOrderNumber" >
|
||||||
|
update t_good_orders
|
||||||
|
set pay_type ='2'
|
||||||
|
where order_no = #{orderNumber}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Binary file not shown.
@ -0,0 +1,23 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIID6TCCAtGgAwIBAgIUMO4qJG/XR9oQeHQphVQ7usz5/0YwDQYJKoZIhvcNAQEL
|
||||||
|
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
|
||||||
|
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
|
||||||
|
Q0EwHhcNMjIwMTI0MDgxMTA3WhcNMjcwMTIzMDgxMTA3WjB7MRMwEQYDVQQDDAox
|
||||||
|
NTIzOTc3ODAxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM
|
||||||
|
HuS4iua1t+aHi+avheWVhui0uOaciemZkOWFrOWPuDELMAkGA1UEBgwCQ04xETAP
|
||||||
|
BgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||||
|
yRnwfm/9lHyq16cAJjx8/7x9WQF+/mKry6MvJIquaXUXBQKDO3d4deBLq8By7dXD
|
||||||
|
xi7S7bPFeUkjXhgxs/WD15xyzNZj4qpKmXuEaFi0g1VLNUs3RmlWaR9OX0On+G2X
|
||||||
|
vj4Zw1bi7sbefA1UrgNB7CH6nAaIVVWDdggxnUeX18F1y7BUBjPBh64Trbi0n011
|
||||||
|
U/m738gyH37tfcSZCMM7aBO4/8BqRmRmNr58Owci8ee7G2yybGbRyVpT/3Y7cWLt
|
||||||
|
k4pyOavIjpmaIo/CPbwMC5hOR4fxwyZUaTpyZh7foQFytz05UHvxp35hKZLnxI2d
|
||||||
|
U+0wtymYYxTFGe6BngVHVwIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC
|
||||||
|
BPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1
|
||||||
|
YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw
|
||||||
|
MUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQCOhr56rhhVqckEiN63f1JHD+SG
|
||||||
|
4DRLCkcJ5oon2EvKOxCKFW9sqcggjtoF3R5ZQe8TwpGl/Pp7t0tbcpor9Gpr3V75
|
||||||
|
fkkCsvotCaB3Hbpw/VzXP96848cQ8B/QtU+7oLCkCnakXeorgf/cLN/IlZ8ZAb5B
|
||||||
|
R7ZEf8qthobPqAygrk1ZLmRNKzEMD+kWaFvffkYGeGP1chZPqevb4sS0BlckBaP/
|
||||||
|
xeeU7R9Y5p5FANzIDCmHoFxqsrGLnF7Dh+bQSPSnG/rZjXnCYJFG6Jp/VvXP6enh
|
||||||
|
5fpVimiUe/62aP6XkKLSm1sX9b86GuTaAl58n78oocNa/XBcKNJNa/3A37bW
|
||||||
|
-----END CERTIFICATE-----
|
@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDJGfB+b/2UfKrX
|
||||||
|
pwAmPHz/vH1ZAX7+YqvLoy8kiq5pdRcFAoM7d3h14EurwHLt1cPGLtLts8V5SSNe
|
||||||
|
GDGz9YPXnHLM1mPiqkqZe4RoWLSDVUs1SzdGaVZpH05fQ6f4bZe+PhnDVuLuxt58
|
||||||
|
DVSuA0HsIfqcBohVVYN2CDGdR5fXwXXLsFQGM8GHrhOtuLSfTXVT+bvfyDIffu19
|
||||||
|
xJkIwztoE7j/wGpGZGY2vnw7ByLx57sbbLJsZtHJWlP/djtxYu2TinI5q8iOmZoi
|
||||||
|
j8I9vAwLmE5Hh/HDJlRpOnJmHt+hAXK3PTlQe/GnfmEpkufEjZ1T7TC3KZhjFMUZ
|
||||||
|
7oGeBUdXAgMBAAECggEBAKmjzA+cgRjlIWjRY3rdw8QnSMXwUSReL/WULoxwwDgN
|
||||||
|
oeGEARgE7ATjtHGp4klm7cMcdKo33/k0DTWuyx63mQQk4WKR56ipZkyauVMcoQm4
|
||||||
|
xbyrOnGXImGDGyWZePRD3qGI2UrC3KP39m5HAIvaC54Z+8HqcM8rV74Vo2S9pAVH
|
||||||
|
mhdH9VC5tnp2cBnOh8UyhIYmqAj/SXSk5Becq2IoYG8r5vojvohtxL/w5hbEfBnz
|
||||||
|
VhjZo82t0hhFGHfFJHw/3D2JjGdYI8QTxTZ78pMb0uK5XsJtxdQFKf5jS4XopJ5k
|
||||||
|
2h/YtAHxFv6K1cqyAaS3ZoyYGTOWy+eQrycGm62nNqECgYEA6UMsK8t/eS4NE1rK
|
||||||
|
capEufddSDzUr2C34ZLxZgXXOpLEdbvvADlCVqqT0/N682xxeM0iK+HVHRpmbzE9
|
||||||
|
v0MKPeMuRJ14aoiQEdGhDwEWgkyZr3GGdkgsIxO3/x9TNBK4F9pxZPFLSvkNDscO
|
||||||
|
75A2CBtB18gm6yAHkr+UQRlpXpsCgYEA3LQ4Tfme2xD6sa0WE+SFGk4hW/wfMawi
|
||||||
|
C1v5xJEjmI2ucKw3i19fKT+3a1LHY47ytjNS0hRQUoEYO0iEe1wO9t1TExmreLar
|
||||||
|
mUW4jcnoLEUBBYHfu6vTbyoRePUXhtk9jb2cFEMpDXI3qNwGN+2LTRz3Q1G8T+D9
|
||||||
|
kdHHGLF+h/UCgYB1GH5dAcvdBiwUMjh8NNBJVo7iS38tBu1n9H7wCzCPO8wZmh0R
|
||||||
|
TK0rmneZJ5nqBt8zmC52PujfsjgHy31GvR2wEZJRaYdgW2uPNl+Wi6JECLYBp4ir
|
||||||
|
afGWLjjofk4jTt5RQxw3YxW77igK6gxqYEdvbFdyPgyjbbG/jiKbR2lozwKBgQCU
|
||||||
|
PwXW8oYO1e/eqsm6oPP7AGIN/GMjpWDUynoR2//R99ElY7iHiI9OELtufpLpv9ou
|
||||||
|
InlOHVD6qjYRlBtRFTwD/BRSLxrroZ/P+3IE44ttOQh/n4Yd9EO4VsSXv+GGtaNP
|
||||||
|
8v3E6nvHyWGzrd8LcCbyrDM2Z8+axCDu8r7OSmMYhQKBgQDa3hTeI/sV72kH+8vz
|
||||||
|
GaTbQBtuxI34sKOxdsp7vR2IfTJjOPhTHgxCnISUaHFvgnYpmNgSZbLBMasIWouz
|
||||||
|
9NbU+lEwGBXKcNbCKQaWut7z3CArsV5j/9kKQrBwXWVsFNgKYwO0Md7aEKtcruLN
|
||||||
|
WjetT3R9CLwHFB2H+K3Mi0+5JA==
|
||||||
|
-----END PRIVATE KEY-----
|
Loading…
Reference in New Issue
Block a user