File merging

This commit is contained in:
Vion 2022-01-21 18:21:36 +08:00
commit 33647c2f6c
21 changed files with 1397 additions and 644 deletions

View File

@ -517,6 +517,7 @@ export const goodsmessage = (productCode) => {
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
export const editaddress = (memberId, detailAddress,recipient,tel,provinceId,cityId,districtId) => {
var data = {
memberId:844350,
provinceId:25,
@ -528,7 +529,7 @@ export const goodsmessage = (productCode) => {
zipCode:'214423',
default:false,
}
return fetch('memberAddress?type=add', data, 'POST' )
return fetch('memberAddress?type=add', memberId, 'POST' )
}
//删除
@ -541,21 +542,13 @@ export const goodsmessage = (productCode) => {
}
//地址的编辑
export const editupdate = (mobile, pet,address) => {
var data = {
memberId:'3242',
id:'620111',
provinceId:'',
cityId:'',
districtId:'',
detailAddress:'江西省萍乡市',
recipient:'刘佳敏',
recipientPhone:'13407998521',
zipCode:'',
isDefault:'',
}
return fetch('memberAddress?type=update', data, 'POST' )
export const editupdate = (userid,) => {
// var data = {
// memberId:userid,
// id:id,
// isDefault:isDefault,
// }
return fetch('memberAddress?type=update', userid, 'POST' )
}
//修改密码

View File

@ -2,16 +2,6 @@
@media screen and (max-width:768px){
.usercontend{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.rc-useaddress{
textarea{
display: none;
}
}
.rc-button{
display: flex;
justify-content: center;
@ -46,6 +36,17 @@
margin-left: 40px;
}
}
.usercontend{
align-items: center;
justify-content: center;
flex-direction: column;
min-height: 70vh;
.rc-useaddress{
textarea{
display: none;
}
}
.rc-max-width--xl{
h2{
display: none;
@ -55,7 +56,7 @@
}
.rc-max-width--xl{
margin-top: 16px;
padding: 24px 20px 0 20px;
input{
width: 258px;
height: 34px;
@ -100,6 +101,40 @@
@media screen and (min-width: 769px)
{
.rc-button{
display: flex;
justify-content: center;
font-size: 14px;
width: 100%;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
padding:0 20px 0 20px;
span
{
width: 160px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #E2001A;
}
em{
font-style: normal;
width: 164px;
height: 48px;
background: #E2001A;
cursor: pointer;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
margin-left: 40px;
}
}
.usercontend{
display: flex;
align-items: center;
@ -197,12 +232,11 @@
// .rc-phone{
// }
// .rc-address{
.rc-address{
position: relative;
// }
// .rc-useaddress{
}
// }

View File

@ -1,3 +1,6 @@
@media screen and (max-width:768px){
.rc-button{
display: flex;
@ -7,8 +10,6 @@
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
position: absolute;
bottom: 0;
padding:0 20px 0 20px;
span
{
@ -35,8 +36,27 @@
margin-left: 40px;
}
}
.usercontend{
align-items: center;
justify-content: center;
flex-direction: column;
min-height: 70vh;
.rc-useaddress{
textarea{
display: none;
}
}
.rc-max-width--xl{
margin-top: 16px;
h2{
display: none;
}
}
}
.rc-max-width--xl{
padding: 24px 20px 0 20px;
input{
width: 258px;
height: 34px;
@ -61,8 +81,6 @@
span{
text-align: left;
}
}
// .rc-phone{
@ -83,7 +101,146 @@
@media screen and (min-width: 769px)
{
.rc-button{
display: flex;
justify-content: center;
font-size: 14px;
width: 100%;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
padding:0 20px 0 20px;
span
{
width: 160px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #E2001A;
}
em{
font-style: normal;
width: 164px;
height: 48px;
background: #E2001A;
cursor: pointer;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
margin-left: 40px;
}
}
.usercontend{
display: flex;
align-items: center;
justify-content: center;
position: relative;
flex-direction: column;
.rc-button{
display: flex;
justify-content: center;
font-size: 14px;
width: 100%;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
padding:0 20px 0 20px;
span
{
width: 160px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #E2001A;
}
em{
font-style: normal;
width: 164px;
height: 48px;
background: #E2001A;
cursor: pointer;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
margin-left: 40px;
}
}
h2{
font-size: 26px;
color: #333333;
text-align: center;
font-weight: bold;
}
.rc-useaddress{
display: flex;
align-items: center;
textarea{
width: 680px;
height: 118px;
background: #FFFFFF;
border: 1px solid #808285;
opacity: 1;
border-radius: 0px;
padding-top: 12px;
padding-left: 16px;
}
.userinput{
display: none;
}
}
}
.rc-max-width--xl{
margin-top: 16px;
input{
width: 680px;
height: 45px;
border: 1px solid #808285;
color: #999999;
font-size: 16px;
margin-left: 2px;
padding-left: 16px;
}
span{
font-size: 16px;
font-weight: bold;
width: 10%;
text-align: center;
color: #333333;
margin-top: 2px;
}
.rc-people{
width: 100%;
display: flex;
align-items: center;
}
// .rc-phone{
// }
.rc-address{
position: relative;
}
}
}

View File

@ -1,11 +1,288 @@
.rc-margin-bottom--lg{
margin: 0;
}
@media screen and (max-width:768px){
.userdit{
display: none;
}
.online{
width:100%;
background:#d7d7d7;
margin-top:1.5rem;
height:.06rem;
&.bold{
height:8px;
background:#f6f6f6;
}
}
.useredit{
display: none;
}
.rc-button{
display: flex;
align-items: center;
justify-content: center;
width: 375px;
height: 80px;
background: #FFFFFF;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
opacity: 1;
border-radius: 0px;
}
.rc-footbutton {
width: 164px;
height: 48px;
border: 2px solid #E2001A;
opacity: 1;
border-radius: 30px;
background: #E2001A;
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
color: #FFFFFF;
}
.rc-max-width--xl{
padding: 0px 20px 24px 20px;
min-height: 60vh;
.rc-cat{
margin-top: 20px;
}
.rc-title {
display: flex;
align-items: center;
color: #333333;
font-size: 14px;
em {
font-style: normal;
font-size: 14px;
}
span {
display: block;
margin-left: 8px;
}
}
}
@media screen and (min-width: 769px)
.rc-address {
margin-top: 8px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 14px;
color: #333333;
}
.rc-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
display: flex;
align-items: center;
.rc-right {
span {
border-bottom: 1px solid #666666;
}
span:first-child {
margin-right: 16px;
}
}
img{
width: 43px;
}
.rc-foot{
display: flex;
align-items: center;
color: #333333;
font-size: 14px;
span{
margin-left: 8px;
}
}
}
}
@media screen and (min-width: 768px)
{
.rc-max-width--xl{
margin-bottom: 80px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between
}
.rc-button{
display: none;
}
.usercontend {
display:inline-block;
width: 48%;
margin-top: 40px;
padding: 24px 20px;
}
.online{
display: none;
}
.rc-button{
display: none;
}
.rc-max-width--xl{
.rc-cat{
border: 1px solid #D7D7D7;
border-radius: 3px;
position: relative;
height: 164px;
box-sizing: border-box;
padding: 20px 20px;
}
.rc-title {
display: flex;
align-items: center;
color: #333333;
font-size: 20px;
em {
font-style: normal;
}
span {
display: block;
margin-left: 32px;
font-size: 20px;
}
}
.rc-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
display: flex;
align-items: center;
.rc-right {
position: absolute;
right: 24px;
top: 24px;
span {
border-bottom: 1px solid #666666;
cursor: pointer;
}
span:first-child {
margin-right: 16px;
}
}
img{
width: 43px;
}
.rc-foot{
display: flex;
align-items: center;
color: #333333;
font-size: 16px;
margin-top: 16px;
span{
margin-left: 8px;
}
}
}
}
.rc-max-width--xl{
.rc-button {
display: none;
}
.rc-header {
display: flex;
align-items: center;
color: #333333;
em {
font-style: normal;
font-size: 14px;
}
span {
display: block;
margin-left: 8px;
}
}
.rc-address {
margin-top: 16px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 20px;
color: #333333;
}
.rc-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20px;
margin-top: 8px;
.rc-right {
span {
border-bottom: 1px solid #666666;
}
span:first-child {
margin-right: 16px;
}
}
}
}
.userdit{
width: 45%;
height: 164px;
display: inline-block;
height: 164px;
border: 1px solid #D7D7D7;
border-radius: 3px;
margin-top: 65px;
box-sizing: border-box;
border: 1px solid #D7D7D7;
border-radius: 3px;
position: relative;
height: 164px;
box-sizing: border-box;
margin-left: 20px;
}
.alledit{
display: flex;
align-items: center;
justify-content: center;
position: relative;
height: 100%;
img{
width: 31px;
height: 31px;
}
span{
color: #333333;
font-size: 18px;
}
}
}

View File

@ -0,0 +1,366 @@
@media screen and (max-width:768px){
.active {
font-size: 14px;
color: #e2001a;
cursor: pointer;
}
.unactive {
font-size: 14px;
color: #444444;
cursor: pointer;
}
.usercontshow{
padding: 0 1.5rem;
.online{
margin: 0;
&.bold{
height: 0.5rem;
}
}
.rc-usermaina{
width: 100%;
height: 100%;
}
.rc-headera {
display: flex;
justify-content: space-between;
height: 64px;
align-items: center;
}
.rc-userheader{
display: none;
}
.rc-center {
width: 100%;
height: 245px;
margin-top: 8px;
.rc-usermain {
.pc-bottom{
display: none;
}
display: flex;
.rc-image {
border: 1px solid #D8D8D8;
margin-top: 17px;
;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottomm{
display: none;
}
display: flex;
flex-direction: column;
width: 100%;
margin-left: 16px;
justify-content: center;
em
{
font-style: normal;
display: block;
font-size: 16px;
margin-top: 18px;
font-weight: bold;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 14px;
span{
display: block;
margin-top: 16px;
}
}
.rc-userbottom {
display: flex;
justify-content: space-between;
margin-top: 8px;
span{
color: #666666;
font-size: 14px;
}
i{
font-style: normal;
color: #E1001A;
font-size: 18px;
font-weight: bold;
}
}
}
.rc-bottom {
display: flex;
align-items: center;
justify-content: center;
margin-top: 24px;
span {
display: block;
width: 130px;
display: flex;
align-items: center;
line-height: 40px;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
font-weight: bold;
}
span:last-child{
margin-left: 15px;
}
}
}
.rc-title {
height: 52px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 14px;
color: #999999;
margin-left: 8px;
}
em{
font-style: normal;
font-size: 14px;
color: #333333;
}
i{
font-style: normal;
font-size: 14px;
color: #333333;
}
.rc-usertitle strong{
display: none;
}
}
}
}
@media screen and (min-width: 769px)
{
.active {
font-size: 18px;
color: #e2001a;
cursor: pointer;
// margin-left: 40px;
}
.unactive {
font-size: 18px;
color: #444444;
cursor: pointer;
// margin-left: 80px;
}
.usercontshow{
.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;
}
}
}
}
}

View File

@ -63,10 +63,9 @@ export default {
{
defaultValues = this.defaultValues;
this.onConfirm(defaultValues);
}
else
{
else{
this.defaultValues = defaultValues;
}
//Initilizing end
},

View File

@ -2,8 +2,8 @@
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-header">
<div class="rc-main">
<div class="online bold"></div>
<div class="usercontshow rc-max-width--xl">
<div class="rc-headera">
<span
v-for="(item, index) in discountlist"
@ -15,6 +15,7 @@
</span>
</div>
<div class="online bold"></div>
<div class="rc-userheader">
<span v-for="(item, index) in message" :key="index">
{{item.title}}
@ -22,7 +23,7 @@
</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-usermaina" >
<div class="rc-title">
<div>
<i>订单编号:</i><span>{{ item.orderNumber }}</span>
@ -41,15 +42,13 @@
<div class="rc-usercenter">
<em>{{ item.usereat }}</em>
<div class="rc-userright">
<span>规格:{{ userlist.num }}</span>
<span>规格:{{ item.num }}</span>
</div>
</div>
<div class="rc-userbottom">
<span>数量:{{ userlist.pcs}}</span>
<i>{{ userlist.ecPrice }}</i>
<span>数量:{{ item.pcs}}</span>
<i>{{ item.ecPrice }}</i>
</div>
<div class="rc-userbottomm">
<i>{{ item.userprice }}</i>
<span>{{item.orderstype}}</span>
@ -62,10 +61,9 @@
<span @click="userfind()">查看订单</span>
</div>
</div>
<!-- <div class="rc-bottom">
<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>
@ -300,360 +298,6 @@ async canceldanhao(orderNumber){
</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-usermaina{
width: 100%;
height: 100%;
}
.rc-headera {
display: flex;
justify-content: space-between;
height: 64px;
align-items: center;
}
.rc-userheader{
display: none;
}
.rc-center {
width: 100%;
height: 245px;
margin-top: 8px;
.rc-usermain {
.pc-bottom{
display: none;
}
display: flex;
.rc-image {
border: 1px solid #D8D8D8;
margin-top: 17px;
;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottomm{
display: none;
}
display: flex;
flex-direction: column;
width: 100%;
margin-left: 16px;
justify-content: center;
em
{
font-style: normal;
display: block;
font-size: 16px;
margin-top: 18px;
font-weight: bold;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 14px;
span{
display: block;
margin-top: 16px;
}
}
.rc-userbottom {
display: flex;
justify-content: space-between;
margin-top: 8px;
span{
color: #666666;
font-size: 14px;
}
i{
font-style: normal;
color: #E1001A;
font-size: 18px;
font-weight: bold;
}
}
}
.rc-bottom {
display: flex;
align-items: center;
justify-content: center;
margin-top: 24px;
span {
display: block;
width: 130px;
display: flex;
align-items: center;
line-height: 40px;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
font-weight: bold;
}
span:last-child{
margin-left: 15px;
}
}
}
.rc-title {
height: 52px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 14px;
color: #999999;
margin-left: 8px;
}
em{
font-style: normal;
font-size: 14px;
color: #333333;
}
i{
font-style: normal;
font-size: 14px;
color: #333333;
}
.rc-usertitle strong{
display: none;
}
}
}
}
}
// /* 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;
}
}
}
}
}
}
@import url("../../assets/css/global.less");
@import url("../../assets/css/orderquantity.less");
</style>

View File

@ -7,32 +7,30 @@
<h2>新增收货地址</h2>
<div class="rc-max-width--xl rc-people">
<span>收货人:</span>
<input type="text" placeholder="请输入收货人姓名">
<input type="text" placeholder="请输入收货人姓名" v-model="userpeople">
</div>
<div class="rc-max-width--xl rc-phone">
<span>手机号码:</span>
<input type="text" placeholder="请输入11位手机号码">
<input type="text" placeholder="请输入11位手机号码" v-model="tel" :error-message="usertel">
</div>
<div class="rc-max-width--xl rc-address">
<span>所在地区:</span>
<input type="text" placeholder="请选择所在地区">
<addressInput></addressInput>
<!-- <input type="text" placeholder="请选择所在地区"> -->
<addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1"></addressInput>
</div>
<div class="rc-max-width--xl rc-useaddress">
<span>详细地址:</span>
<input type="text" placeholder="小区、门牌号等" class="userinput">
<input type="text" placeholder="小区、门牌号等" class="userinput" v-model="alladdress">
<textarea rows="10" cols="30" placeholder="请输入详细地址">
</textarea>
</div>
<addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1"></addressInput>
</div>
</div>
<div class="rc-button">
<span @click="openclose()">取消</span>
<em @click="openclose()">确认</em>
</div>
<em @click="register()">确认</em>
</div>
<!-- <div class="rc-button">
<div class="rc-footbutton" @click="onAdd()">
@ -52,14 +50,22 @@
import Myheader from '~/components/header.vue'
import addressInput from '~/components/addressInput.vue'
import MyFooter from '~/components/rc-footer.vue'
import {editaddress} from "../../ajax/getData";
export default {
data() {
return {
chosenAddressId: "1",
usermessage:null,
checked: true,
tel: "",
alladdress:'',
userid: null,
usermessage:null,
dialogInfo1:false,
userpeople:'',
provinceId:'',
cityId:'',
districtId:'',
list: [
{
id: 1,
@ -86,25 +92,67 @@ export default {
methods: {
onGetMenu(values){
console.log(values,+'111111');
let user=values[2].id;
user=user.split('-');
this.provinceId=user[0];
this.cityId=user[1];
this.districtId=user[2];
},
handleClose1(){
this.dialogInfo1 = false
},
onEdit(item, index) {
// let userid = item.id;
console.log(item);
this.$router.push({
path: "/useraddress/editaddress",
query: {
id: item,
},
register(){
console.log(this.tel)
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
message: '手机号码输入有误'
});
return
}else if(this.alladdress===''){
this.$message({
type: 'warning',
message: '请输入详细地址'
});
return
}
else if(this.userpeople===''){
this.$message({
type: 'warning',
message: '请输入姓名'
});
return
}
else if(this.provinceId===''){
this.$message({
type: 'warning',
message: '请选择省区'
});
return
}
else if(this.cityId===''){
this.$message({
type: 'warning',
message: '请选择市区'
});
return
}
else if(this.districtId===''){
this.$message({
type: 'warning',
message: '请选择详细的区域'
});
return
}
else{
this.editaddress();
}
},
onAdd(item, index) {
// let userid = item.id;
// console.log(item);
openclose(){
this.$router.push({
path: "/useraddress/addaddress",
path: "/useraddress/openaddress",
// query: {
// id: userid,
// },
@ -112,14 +160,39 @@ export default {
},
//
async editaddress(item) {
// this.userid
let useradd={
memberId:this.userid,
detailAddress:this.alladdress,
recipient:this.userpeople,
recipientPhone:this.tel,
provinceId:this.provinceId,
cityId:this.cityId,
districtId:this.districtId
//
// async userdelete(item) {
// console.log(item.memberId);
// let data = await editdelete(this.userid, item.id);
// this.editaddress(this.usermessage);
// console.log(data);
}
let data = await editaddress(useradd);
if(data){
console.log(data);
if(data){
this.$message({
type: 'warning',
message: '地址添加成功'
});
this.$router.push({
path: "/useraddress/openaddress",
// query: {
// id: userid,
// },
});
}
}
},
//
// async editaddress(user) {
@ -135,8 +208,23 @@ export default {
MyFooter,
addressInput
},
computed:{
usertel() {
if (this.tel === "") {
return "";
} else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel)) {
return "手机号格式错误";
} else {
return "";
}
},
},
mounted() {
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage);
this.userid = this.usermessage.data.id;
//
// this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage);

View File

@ -2,23 +2,23 @@
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-max-width--xl rc-main">
<div class="usercontend">
<div class="rc-max-width--xl">
<div class="rc-max-width--xl rc-people">
<span>收货人:</span>
<input type="text" placeholder="李某某">
<input type="text" placeholder="" v-model="recipient">
</div>
<div class="rc-max-width--xl rc-phone">
<span>手机号码:</span>
<input type="text" placeholder="15279944631">
<input type="text" placeholder="" v-model="recipientPhone">
</div>
<div class="rc-max-width--xl rc-address">
<span>所在地区:</span>
<input type="text" placeholder="请选择所在地区">
<addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1" :defaultValues="defaultValues"></addressInput>
</div>
<div class="rc-max-width--xl rc-useaddress">
<span>详细地址:</span>
<input type="text" placeholder="天河客运站">
<input type="text" placeholder="" v-model="detailAddress" >
</div>
</div>
@ -27,12 +27,14 @@
<span>新增收货地址</span>
</div>
</div> -->
</div>
<div class="rc-button">
<span @click="openclose()">取消</span>
<em @click="openclose()">确认</em>
<em @click="register()">确认</em>
</div>
<!-- <MyFooter></MyFooter> -->
<MyFooter></MyFooter>
</div>
</template>
@ -40,13 +42,25 @@
import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue'
import { editupdate} from "../../ajax/getData";
import addressInput from '~/components/addressInput.vue'
export default {
data() {
return {
chosenAddressId: "1",
checked: true,
userid: null,
dialogInfo1:false,
usermessage:null,
useradrname:[],
detailAddress:'',
recipientPhone:'',
recipient:'',
addressid:'',
provinceId:'',
cityId:'',
districtId:'',
defaultValues:[],
list: [
{
id: 1,
@ -71,27 +85,117 @@ export default {
};
},
methods: {
onEdit(item, index) {
// let userid = item.id;
console.log(item);
this.$router.push({
path: "/useraddress/editaddress",
query: {
id: item,
onGetMenu(values){
let user;
console.log(values,+'111111');
console.log(typeof(values[2]));
const objToStr = JSON.stringify(values[2]);
console.log(objToStr);
console.log(typeof(objToStr));
if(objToStr.includes('-')){
console.log("===包含符号")
let user=values[2].id;
user=user.split('-');
this.provinceId=user[0];
this.cityId=user[1];
this.districtId=user[2];
}else{
this.provinceId=values[0].id;
this.cityId=values[1].id;
this.districtId=values[2].id;
console.log("---不包含符号");
}
// let user=values[2].id;
// user=user.split('-');
console.log(this.provinceId,this.cityId,this.districtId);
},
openclose(){
this.$router.push({
path: "/useraddress/openaddress",
});
},
onAdd(item, index) {
// let userid = item.id;
// console.log(item);
this.$router.push({
path: "/useraddress/addaddress",
// query: {
// id: userid,
// },
});
handleClose1(){
this.dialogInfo1 = false
},
register(){
console.log(this.tel)
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.recipientPhone) || this.recipientPhone === "") {
this.$message({
type: 'warning',
message: '手机号码输入有误'
});
return
}else if(this.alladdress===''){
this.$message({
type: 'warning',
message: '请输入详细地址'
});
return
}
else if(this.userpeople===''){
this.$message({
type: 'warning',
message: '请输入姓名'
});
return
}
else if(this.provinceId===''){
this.$message({
type: 'warning',
message: '请填写省区'
});
return
}
else if(this.userpeople===''){
this.$message({
type: 'warning',
message: '请填写市区'
});
return
}
else if(this.userpeople===''){
this.$message({
type: '请填写街道',
message: '请输入姓名'
});
return
}
else{
this.edupdate();
}
},
//
async edupdate(item) {
let useradd={
memberId:this.userid,
id:this.id,
provinceId:this.provinceId,//id,
cityId:this.cityId,//id,
districtId:this.districtId,//id,
detailAddress:this.detailAddress, //
recipient:this.recipient, //
recipientPhone:this.recipientPhone, //
}
let data = await editupdate(useradd);
if(data){
this.$message({
type: 'warning',
message: '地址修改成功'
});
this.$router.push({
path: "/useraddress/openaddress",
});
}
},
//
@ -114,13 +218,37 @@ export default {
components: {
Myheader,
MyFooter,
addressInput
},
created(){
let provinceName=this.$route.query.provinceName;
let districtName=this.$route.query.districtName;
let cityName=this.$route.query.cityName
this.provinceId=this.$route.query.provinceId;
this.districtId=this.$route.query.districtId;
this.cityId=this.$route.query.cityId;
this.defaultValues=[
{
id:this.provinceId,
name:provinceName
},
{
id:this.cityId,
name:cityName
},
{
id:this.districtId,
name:districtName
}
];
},
mounted() {
//
// this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage);
// this.userid = this.usermessage.data.id;
this.userid = JSON.parse(localStorage.getItem("userInfo")).data.id;
this.recipient=this.$route.query.recipient
this.recipientPhone=this.$route.query.recipientPhone
this.detailAddress=this.$route.query.detailAddress
this.id=this.$route.query.id;
},
};
</script>

View File

@ -1,20 +1,24 @@
<template>
<div>
<Myheader></Myheader>
<div class="usermain">
<div class="rc-main" v-for="(item, index) in list" :key="index">
<div class="rc-top"></div>
<div class="online bold"></div>
<div class="usercontshow rc-max-width--xl">
<div class="usercontend" v-for="(item, index) in list" :key="index">
<div class="usercontshow usermain" >
<div class="rc-cat" >
<div class="rc-center">
<div class=" rc-title">
<em>
{{ item.name }}
{{ item.recipient }}
</em>
<span>
{{ item.tel }}
{{ item.recipientPhone }}
</span>
</div>
<div class="rc-address">
<span>
{{ item.address }}
{{item.provinceName}}{{ item.districtName }}{{item.detailAddress}}
</span>
</div>
<div class="rc-footer">
@ -32,63 +36,86 @@
</div>
</div>
<div class="online bold rc-md-down"></div>
<!-- <div class="usercontend useradd">
<img src="../../assets/image/userselect.png" alt="">
<span>添加收货地址</span>
</div> -->
</div>
<div class="userdit" ref="marinaddress">
<div class="alledit" @click="onAdd()">
<img src="../../static/images/adddress.png" alt="">
<span>添加收货地址</span>
</div>
</div>
</div>
<div class="rc-button">
<div class="rc-footbutton" @click="onAdd()">
<span>新增收货地址</span>
</div>
</div>
<MyFooter></MyFooter>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue'
import { selectaddress,editupdate,editdelete} from "../../ajax/getData";
export default {
data() {
return {
chosenAddressId: "1",
checked: true,
userid: null,
userlist:[],
usermessage:null,
list: [
{
id: 1,
name: "张三",
tel: "13000000000",
address: "浙江省杭州市西湖区文三路 138 号",
isDefault: true,
},
{
id: 2,
name: "李四",
tel: "1310000000",
isDefault: false,
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
{
id: 3,
name: "李四",
tel: "1310000000",
isDefault: false,
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
],
};
},
methods: {
changeadddress(item,index){
console.log(item)
console.log(item,index);
console.log(item.isDefault)
if(item.isDefault==false){
item.isDefault=true
}else{
item.isDefault=false;
}
this.editupdate(this.userid,item.id,item.isDefault)
setTimeout(() => {
this.editaddress();
}, 200);
//
},
onEdit(item, index) {
// let userid = item.id;
console.log(item);
// debugger
this.$router.push({
path: "/useraddress/editaddress",
query: {
id: item,
recipient: item.recipient,
recipientPhone:item.recipientPhone,
detailAddress:item.detailAddress,
id:item.id,
provinceName:item.provinceName,
districtName:item.cityName,
cityName:item.districtName,
provinceId:item.provinceId,
districtId:item.districtId,
cityId:item.cityId,
},
});
},
@ -103,34 +130,56 @@ export default {
});
},
//
async editupdate(userid,addressid,isDefault) {
let useradd={
memberId:userid,
id:addressid,
isDefault:isDefault,
}
let data = await editupdate(useradd);
if(data){
this.$message({
type: 'warning',
message: '更改成功'
});
}
// if(data){
// this.editaddress();
// }
},
//
// async userdelete(item) {
// console.log(item.memberId);
// let data = await editdelete(this.userid, item.id);
// this.editaddress(this.usermessage);
// console.log(data);
// },
async userdelete(item) {
console.log(item.memberId);
let data = await editdelete(this.userid, item.id);
this.editaddress();
console.log(data);
},
//
// async editaddress(user) {
// user.data.id=844350
// let data = await selectaddress(user.data.id);
// this.list=data.data;
async editaddress(user) {
// user.data.id=844350;
let data = await selectaddress(this.userid);
console.log(data);
this.list=data.data;
// console.log(this.list);
// console.log(data);
// },
console.log(data);
},
},
components: {
Myheader,
MyFooter
},
mounted() {
//
// this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage);
// this.userid = this.usermessage.data.id;
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
this.userid = this.usermessage.data.id;
console.log(this.userid);
this.editaddress(this.userid);
},
};
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -18,20 +18,20 @@ public class AlipayConfig {
//请在这里配置您的基本信息
// 应用ID,您的APPID收款账号既是您的APPID对应支付宝账号
public static String app_id = "2016101800716209";
// public static String app_id = "2021000118668627";
// public static String app_id = "2016101800716209";
public static String app_id = "2021003108690157";
// 商户私钥您的PKCS8格式RSA2私钥
public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDL8350XEsOVVSg8+cKZEl6Jx7Tp63JFimk+lldS8chZ8hv3Netz5iMemQJYH328VEB5sKkIXfDiwT1f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GK2On3Fk0Dc6EAHDDl9F1x/i4izeM43e5tlJHF4gDC0MZC1VSQKBgQDMS1yZXXtV/GJw1mN7y2iK+T/qTjXibx2p/DO6TqDRwjPlkpe/HQXGsdO7TVAr48RZvk8hZnB59+zahu+LECeEUlUUv/6xZd1x+zgUKQ72sEUy1wheG6uiqcSnzfA/SFfDLAXKNZtwcW+WJaWisfAsK1h4+SDHk91MruwerjHZAQKBgH6muiaSlg6DvAUBjtxaOE0bgchI+M/j7N4289syb/6A0iTUNeTREWk2kmBT/ZeZCFtrjJx+TdVauyjkRwKx0wEuf9H+WrUM+6i5j5nTrcUEAUTjCY7IRxGk8uhNLM7cyBNvpsD4olI5j2DmRsZWnv/bNuJH2FHbvXMwanZ22vM5";
// public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDL8350XEsOVVSg8+cKZEl6Jx7Tp63JFimk+lldS8chZ8hv3Netz5iMemQJYH328VEB5sKkIXfDiwT1fxR2cgsGdQgmG25omKM/47QfxTRp9C4II65AlMfLsPWOWefc/enaza/gMMzB5SvvFnbpX/71aJmqU7nJvATY8MwW4SxKXKMTEI/K7+jERReR4SxtGHeFTZ892ljr7IOqJbGPnd2CXzLO05AGGhOrsmtFMh9eysD1WzcDKoADJSi26oMI49mExGo3jMF111AcXSR4CgLsx5bSoe4XtXtVbqEr/tOCt4zAWoUbu/Mviog+60eMr9qaE719aobEZP7aI5ECd86NAgMBAAECggEAXRVBtqvU2bLaUCdhYF3LJ0QpjqIt7+P8l75nAOyv8rAiS+O4UCy6TAskEx+F/im/NiXy2eQofAe7+KvKVBDStVy+nl3Qs05O2776G7HurRjz1WUrh3AgC/g06oZgC32buPA9gA3ltez5c0KGfRcCD1FxKMrTtZ3pfHXSP/L/OuRhobxCZvEL5jcWHkxgOeaL37+UQSHJe3dhCPjjj1VOxBj0RLgcAPJ8/KoglcmWHacYvPxgRo26xahrW3yCofcb+cEzG5WhCc3uBK3eSWNB1knSw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d0w66XvEoatYwbUQ9s/IjDHugS6+3g8CufDj7eVYZ6fLhaEzb+XIlmopmqQKBgHq9EhBzuKDO70M9sc19hOr5MY5MfXAkNr0vRfRNnza4lu7KdjwRDraNKI2CXU2ioS9IfXs2vXGXvq4ER5quwzEBOeEhYi3WFsDpJdXlHx1fnJyh0hk/eQVrd4jS9odAoWqA0HvCEVnjpjRX4jrfHZ0XjHPx6FdSt93q2myb6jo9AoGAEO55XOywOuPi9SjdnPq1dgFiD+KrwxaxjapB2u0wQVdmpDtQEVo4sf30afr2zHZ/zUHGaQpAJwDnvTFhsifzkG0jmErBC+Pp9Xz217/kLN1gPqB/cs24gkyOvm4i8Xc7ofjMhRv1RDg2geFBBhZjc29hhTRwrGB0ST0XRXDsK6A=";
// 支付宝公钥,查看地址https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥
// public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy/N+dFxLDlVUoPPnCmRJeice06etyRYppPpZXUvHIWfIb9zXrc+YjHpkCWB99vFRAebCpCF3w4sE9X8UdnILBnUIJhtuaJijP+O0H8U0afQuCCOuQJTHy7D1jlnn3P3p2s2v4DDMweUr7xZ26V/+9WiZqlO5ybwE2PDMFuEsSlyjExCPyu/oxEUXkeEsbRh3hU2fPdpY6+yDqiWxj53dgl8yztOQBhoTq7JrRTIfXsrA9Vs3AyqAAyUotuqDCOPZhMRqN4zBdddQHF0keAoC7MeW0qHuF7V7VW6hK/7TgreMwFqFG7vzL4qIPutHjK/amhO9fWqGxGT+2iORAnfOjQIDAQAB";
public static String alipay_public_key ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjBThgyJ3SJsx0IYUspiW+R/NDInruz2Tirr0vGmzfaNkBSDmyg2vNLmnkNrxbHApJkIRKWqGbC8yPybyjFz1nXP7oji0d/3sPKZZGdNEqOcZLaki8xPeXfOVu1T/uPH/9S084t94yQPNrD9BqehOlN+I4b/mXJ7tDGRnS2OVrQqDrPbg8pjH3OYa0bELkr71R92EHxCN4V2bSdCS1ag96/etgkodduOCmiBPVSmSRXas/GpRw92NVsRKvesWOatfjEjqST0Bz0nRuOuRnQIy1exxs/D2DHCVa6aO6TNogcPWe3C9dvxjxjw9IOiyhkGThWoWrdk8Ot+V8V8LeomcYwIDAQAB";
// public static String alipay_public_key ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjBThgyJ3SJsx0IYUspiW+R/NDInruz2Tirr0vGmzfaNkBSDmyg2vNLmnkNrxbHApJkIRKWqGbC8yPybyjFz1nXP7oji0d/3sPKZZGdNEqOcZLaki8xPeXfOVu1T/uPH/9S084t94yQPNrD9BqehOlN+I4b/mXJ7tDGRnS2OVrQqDrPbg8pjH3OYa0bELkr71R92EHxCN4V2bSdCS1ag96/etgkodduOCmiBPVSmSRXas/GpRw92NVsRKvesWOatfjEjqST0Bz0nRuOuRnQIy1exxs/D2DHCVa6aO6TNogcPWe3C9dvxjxjw9IOiyhkGThWoWrdk8Ot+V8V8LeomcYwIDAQAB";
// public static String alipay_public_key ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr+fwsHUR8dosvQlrQk1uKu8bzWtt4BHRIK4PsY5IVPUuk/NbcSXH9HC/tyj/L4L68/9pxteG7nGMioveqSMx8d5jhf/1sHsBC2C/BiffjzfiaeKsPqIag2jM0GNVFnrtmx1xeKYwx8T3X87BH7T4lcrOqsjt7JCtXDgWlttEpiIJTLTPOgtMlFPLkwvvp/Dlc0f+t2Bo9bHaCkrOkq3AC9TACEzXCVBKIP670MD0rTLnCEr3E/9oKzQazcCydzj548LAmwSQ660Wh+w6pZrL8p43ODski4sbl5ulidw7MklDHKOdZFj/tWf2NqMQjmAdmthZ5oGilJhiLvHiUR1YyQIDAQAB";
public static String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
// 服务器异步通知页面路径 需http://格式的完整路径不能加?id=123这类自定义参数必须外网可以正常访问
// public static String notify_url = "http://工程公网访问地址/alipay.trade.page.pay-JAVA-UTF-8/notify_url.jsp";
public static String notify_url = "http://localhost:10086/smart-admin-api/royalcanin/notify_url";
public static String notify_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderAliPay";
// 页面跳转同步通知页面路径 需http://格式的完整路径不能加?id=123这类自定义参数必须外网可以正常访问
public static String return_url = "http://工程公网访问地址/alipay.trade.page.pay-JAVA-UTF-8/return_url.jsp";
public static String return_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderAliPay";
// 签名方式
public static String sign_type = "RSA2";
@ -40,7 +40,7 @@ public class AlipayConfig {
public static String charset = "utf-8";
// 支付宝网关
public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
public static String gatewayUrl = "https://openapi.alipay.com/gateway.do";
// 支付宝网关
public static String log_path = "C:\\";

View File

@ -5,6 +5,7 @@ package net.lab1024.smartadmin.module.system.royalcanin.good;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.lab1024.smartadmin.common.anno.OperateLog;
import net.lab1024.smartadmin.common.constant.ResponseCodeConst;
import net.lab1024.smartadmin.common.domain.ResponseDTO;
import net.lab1024.smartadmin.common.heartbeat.StringUtil;
import net.lab1024.smartadmin.constant.SwaggerTagConst;
@ -59,10 +60,11 @@ public class GoodController {
@ApiOperation(value = "处方粮商品", notes = "处方粮商品查询")
@PostMapping("royalcanin/goods")
public List<GoodsEntity> transferGoods(String goodsName) {
return goodService.listGoodsByNameBankNameTagUsedAge(goodsName);
public List<GoodsEntity> transferGoods(String goodsName,String petType) {
return goodService.listGoodsByNameBankNameTagUsedAge(goodsName,petType);
}
@ApiOperation(value = "查询标品信息", notes = "查询标品信息")
@PostMapping("royalcanin/product/query")
public String transferBrand(ProductQueryEntity productQueryEntity) throws Exception {
@ -164,8 +166,10 @@ public class GoodController {
@ApiOperation(value = "插入购物车信息", notes = "插入购物车信息")
@PostMapping("royalcanin/insertCartProductInfo")
public ResponseDTO<String> insertCartProductInfo(@RequestBody CartEntity cartEntity){
public ResponseDTO<String> insertCartProductInfo(@RequestBody CartEntity cartEntity,HttpServletRequest request){
String memberId = SmartJWTUtil.decodeToken(request.getHeader(TOKEN_NAME));
cartEntity.setMemberId(memberId);
if(cartEntity.getProductCode() != null&&cartEntity.getProductCode() != ""&&cartEntity.getProductName() != null&&cartEntity.getProductName() != ""&&cartEntity.getMemberId() != null&&cartEntity.getMemberId() != "") {
CartEntity cartEntityFromDB = cartService.getInfoByProductCodeAndMemberId(cartEntity.getMemberId(), cartEntity.getProductCode());
if (null == cartEntityFromDB) {
if (1 == cartService.insertProductCart(cartEntity))
@ -178,7 +182,10 @@ public class GoodController {
if (1 == cartService.updateInfo(cartEntityFromDB))
return ResponseDTO.succ();
else
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_FAIL);
return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM);
}
}else {
return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM);
}
}

View File

@ -203,6 +203,12 @@ public class OrderController {
wxpayService.orderCallBack(request,response);
}
@ApiOperation(value = "支付宝更新订单", notes = "支付宝更新订单")
@RequestMapping(value = "royalcanin/updateOrderAlipay")
public void updateOrderAlipay(HttpServletRequest request, HttpServletResponse response){
// aliPayService.orderCallBackAliPay(request,response);
}
@ApiOperation(value = "取消订单", notes = "取消订单")
@RequestMapping(value = "royalcanin/cancelOrder",method = RequestMethod.POST)
public ResponseDTO<String> cancelOrder(@RequestBody QueryEntity queryEntity) throws Exception {
@ -213,54 +219,32 @@ public class OrderController {
@ApiOperation(value = "支付宝支付订单", notes = "生成订单")
@PostMapping("royalcanin/generateOrderAlipay")
public ResponseDTO<String> generateOrderAliPay(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
StringBuffer productId = new StringBuffer();
StringBuffer productName = new StringBuffer();
String memberId = "";
String mobile = "";
int buyCount = 0;
double total_fee = 0 ;
public ResponseDTO<String> generateOrderAliPay(String orderNo) throws Exception {
OrderEntity ordersEntity = orderService.findByOrderId(orderNo);
if(ordersEntity != null) {
QueryEntity queryEntity = new QueryEntity();
queryEntity.setOrderNumber(ordersEntity.getOrderNo());
String orderInfo = orderService.query(queryEntity);
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(orderInfo);
JSONObject jsonObject = (JSONObject)jsonArray.get(0);
if(jsonObject.getString("status").equals("0")) {
AliPayEntity aliPayEntity = new AliPayEntity();
OrdersEntity ordersEntity = new OrdersEntity();
JSONArray orderDatilListJson = new JSONArray();
for (OrdersEntity ordersEntitys:ordersEntityList) {
//存储orderDetailList
OrderDatilListEntity orderDatilListEntity= new OrderDatilListEntity();
orderDatilListEntity.setProductName(ordersEntitys.getProductName());
orderDatilListEntity.setPcs(ordersEntitys.getBuyCount());
orderDatilListEntity.setProductCode(ordersEntitys.getProductCode());
orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount());
orderDatilListJson.add(orderDatilListEntity);
productId.append(ordersEntitys.getProductCode()+",");
productName.append(ordersEntitys.getProductName()+",");
if(ordersEntitys.getPayAmount() != "0"){
total_fee = total_fee + (Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount()) - Double.parseDouble(ordersEntitys.getCouponAmount());
}else {
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount())*ordersEntitys.getBuyCount();
}
memberId = ordersEntitys.getMemberId();
mobile = ordersEntitys.getPhoneNumber();
buyCount = buyCount + ordersEntitys.getBuyCount();
}
ordersEntity.setProductCode(productId.substring(0,productId.length()-1));
ordersEntity.setProductName(productName.substring(0,productName.length()-1));
ordersEntity.setOrderAmount(StringUtil.toString(total_fee));
ordersEntity.setMemberId(memberId);
ordersEntity.setPhoneNumber(mobile);
ordersEntity.setBuyCount(buyCount);
ordersEntity.setPayType("2");
ordersEntity.setOrderNo(GenerateSequenceUtil.generateSequenceNo());
ordersEntity.setOrderStatus("0");
if(orderService.generateOrder(ordersEntity,orderDatilListJson) == 1){
if (orderService.updateOrder(ordersEntity) == 1) {
aliPayEntity.setProduct_code(ordersEntity.getProductCode());
aliPayEntity.setTotal_amount(StringUtil.toString(total_fee));
aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount());
aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
return ResponseDTO.succData(aliPayService.generateQRCode(aliPayEntity));
} else {
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
}
}else{
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR);
}
}else{
return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER);
}
}
@PostMapping("royalcanin/updateOrderAliPay")

View File

@ -15,6 +15,6 @@ public interface GoodsDao extends BaseMapper<OrdersEntity> {
GoodsEntity findByProductCode(String productCode);
List<GoodsEntity> selectRoleIdByGoodsNameBankNameTagUsedAge(String goodsName);
List<GoodsEntity> selectRoleIdByGoodsNameBankNameTagUsedAge(@Param("goodsName") String goodsName,@Param("petType")String petType);
}

View File

@ -2,13 +2,17 @@ package net.lab1024.smartadmin.module.system.royalcanin.good.model;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import net.lab1024.smartadmin.util.SmartIPUtil;
@Data
@TableName("t_good_goods")
public class GoodsEntity {
private String productName;
private String basePrice;
private Long id;
private String name;
// private String ecPrice;
private String productCode;
@ -22,7 +26,8 @@ public class GoodsEntity {
private String tagUsedAge;
private String picFile;
private String picture;
private String showImgFile;

View File

@ -9,6 +9,8 @@ import java.util.Date;
@TableName("t_good_orders")
public class OrderEntity {
private Long id;
private String orderNo;
private String orderStatus;

View File

@ -10,10 +10,12 @@ import net.lab1024.smartadmin.module.system.royalcanin.good.model.ProductQueryEn
import net.lab1024.smartadmin.util.AESUtil;
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
import net.lab1024.smartadmin.util.SmartHttpUtil;
import net.lab1024.smartadmin.util.SmartIPUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -34,8 +36,14 @@ public class GoodService {
return goodsDao.findByProductCode(productCode);
}
public List<GoodsEntity> listGoodsByNameBankNameTagUsedAge(String title){
return goodsDao.selectRoleIdByGoodsNameBankNameTagUsedAge(title);
public List<GoodsEntity> listGoodsByNameBankNameTagUsedAge(String title,String petType){
String ip = "https://royalcanincn.escase.cn/jc/royalcanin/";
List<GoodsEntity> goodsList = goodsDao.selectRoleIdByGoodsNameBankNameTagUsedAge(title,petType);
for (GoodsEntity goodsEntity:goodsList) {
goodsEntity.setShowImgFile(ip+goodsEntity.getPicture());
goodsEntity.setPicture(ip+goodsEntity.getPicture());
}
return goodsList;
}
public String brandQuery(ProductQueryEntity productQueryEntity) throws Exception {

View File

@ -269,4 +269,8 @@ public class OrderService {
return ordersDao.findByOrderId(orderNo);
}
public int updateOrder(OrderEntity orderEntity){
return ordersDao.updateById(orderEntity);
}
}

View File

@ -10,17 +10,25 @@
<select id="selectRoleIdByGoodsNameBankNameTagUsedAge" resultMap="GoodsEntity">
select
*
id,
product_code,
t_good_goods.name,
brand_code,
brand_name,
pet_type,
tagUsedAge,
category_name,
picture,
show_img_file
from t_good_goods
<where>
where isShow = 1
<if test="goodsName != null and goodsName != ''">
<bind name="goodsName" value=" '%' + goodsName +'%' "></bind>
AND CONCAT(product_name,brand_name,category_name,tagUsedAge) like #{goodsName}
AND CONCAT(t_good_goods.name,brand_name,category_name,tagUsedAge) like #{goodsName}
</if>
<if test="goodsName == null and goodsName == ''">
AND isShow = 1
<if test="petType != null and petType != ''">
AND pet_type = #{petType}
</if>
</where>
</select>
</mapper>

View File

@ -1653,14 +1653,14 @@ PRIMARY KEY (`id`)
CREATE TABLE `t_good_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product_code` VARCHAR(20) NOT NULL COMMENT '标品编码',
`product_name` varchar(20) DEFAULT NULL COMMENT '产品名称',
`base_price` varchar(11) DEFAULT NULL COMMENT '价格',
`name` varchar(20) DEFAULT NULL COMMENT '产品名称',
`ec_price` varchar(11) DEFAULT NULL COMMENT '价格',
`brand_code` varchar(11) DEFAULT NULL COMMENT '品牌编码',
`brand_name` varchar(11) DEFAULT NULL COMMENT '品牌名称',
`category_name` varchar(11) DEFAULT NULL COMMENT '品类',
`pet_type` int(11) DEFAULT NULL COMMENT '宠物类型1:狗0',
`tagUsedAge` varchar(11) DEFAULT NULL COMMENT '适用阶段',
`pic_file` varchar(200) DEFAULT NULL COMMENT '标品头图',
`picture` varchar(200) DEFAULT NULL COMMENT '标品头图',
`show_img_file` varchar(200) DEFAULT NULL COMMENT '身体头图',
`isSales` int(11) DEFAULT NULL COMMENT '0:未销售1销售',
`isShow` int(11) DEFAULT NULL COMMENT '0:不展示1展示',