mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
Merge branch 'sit-Carl' of gitee.com:carl_Ming_1/smart-admin into sit-Leung
This commit is contained in:
commit
791bca1277
@ -73,9 +73,7 @@ export const postCourseId = (productCode,buyCount,memberId, mobile,productImg,pr
|
||||
* 是否存在购物车
|
||||
*/
|
||||
export const isexistCart = (id, pet,address) => {
|
||||
var data = {
|
||||
memberId: id,
|
||||
}
|
||||
var data = { }
|
||||
return fetch('getCartProductInfo?memberId='+id,data,'POST')
|
||||
}
|
||||
|
||||
|
@ -14,10 +14,12 @@ body{
|
||||
.fade-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.ts-no-data {
|
||||
text-align: center;
|
||||
margin: 3rem 0;
|
||||
}
|
||||
|
||||
.ts-mask {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -80,20 +82,21 @@ label {
|
||||
-webkit-animation: rolling 4s infinite;
|
||||
}
|
||||
|
||||
@keyframe rolling
|
||||
{
|
||||
@keyframe rolling {
|
||||
from {
|
||||
transform: rotateZ(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes rolling
|
||||
{
|
||||
|
||||
@-webkit-keyframes rolling {
|
||||
from {
|
||||
transform: rotateZ(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
@ -103,6 +106,7 @@ label {
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
//用户光点
|
||||
.rc-screen-reader {
|
||||
width: 0.81rem;
|
||||
@ -116,11 +120,14 @@ label {
|
||||
width: 0.37rem;
|
||||
height: 0.37rem;
|
||||
}
|
||||
img, picture {
|
||||
|
||||
img,
|
||||
picture {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.rc-main {
|
||||
padding-left: 1.25rem;
|
||||
padding-right: 1.25rem;
|
||||
@ -128,28 +135,31 @@ img, picture {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.ts-remove {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.ts-product-list {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
&:after{
|
||||
|
||||
}
|
||||
&:after {}
|
||||
|
||||
li {
|
||||
border: 1px solid #D7D7D7;
|
||||
display: inline-flex;
|
||||
border-radius: 4px;
|
||||
flex-direction: column;
|
||||
max-width: 10rem;
|
||||
.rc-column
|
||||
{
|
||||
|
||||
.rc-column {
|
||||
text-align: center;
|
||||
padding: 0 1rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
span {
|
||||
height: 2.75rem;
|
||||
font-size: 1rem;
|
||||
@ -164,6 +174,7 @@ img, picture {
|
||||
white-space: normal;
|
||||
color: #E2001A;
|
||||
}
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
font-size: 1.125rem;
|
||||
@ -181,21 +192,25 @@ img, picture {
|
||||
margin: 0 auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #E2001A;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.unactive {
|
||||
color: #999999;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.rc-container {
|
||||
height: 100%;
|
||||
max-width: 1400px;
|
||||
background-color: #fff;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.ts-standard-btn {
|
||||
font-style: normal;
|
||||
width: 8.125rem;
|
||||
@ -209,15 +224,18 @@ img, picture {
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
background: #E2001A;
|
||||
|
||||
&.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
&.ts-standard-btn--two {
|
||||
background-color: transparent;
|
||||
color: #e2001a;
|
||||
border-color: #e2001a;
|
||||
}
|
||||
|
||||
&.ts-standard-btn--max-width {
|
||||
width: 100%;
|
||||
}
|
||||
@ -233,14 +251,17 @@ img, picture {
|
||||
width: 100%;
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
.ts-scrollable-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ts-scrollable {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
@ -250,16 +271,19 @@ img, picture {
|
||||
flex-wrap: nowrap;
|
||||
text-align: center;
|
||||
width: 86%;
|
||||
|
||||
li {
|
||||
border-radius: 100px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #E2001A;
|
||||
cursor: pointer;
|
||||
border: 2px solid #E2001A;
|
||||
}
|
||||
|
||||
.unactive {
|
||||
color: #999999;
|
||||
cursor: pointer;
|
||||
@ -272,11 +296,13 @@ img, picture {
|
||||
background: #d7d7d7;
|
||||
margin-top: 1.5rem;
|
||||
height: .06rem;
|
||||
|
||||
&.bold {
|
||||
height: .32rem;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
}
|
||||
|
||||
/*Body end*/
|
||||
|
||||
/* 头部 */
|
||||
@ -296,6 +322,7 @@ img, picture {
|
||||
background-color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
li {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -304,18 +331,22 @@ img, picture {
|
||||
align-items: center;
|
||||
margin-top: 1.125rem;
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 1.25rem;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 0.12rem;
|
||||
}
|
||||
|
||||
.tuntop {
|
||||
width: 100%;
|
||||
height: 4.125rem;
|
||||
@ -340,18 +371,20 @@ img, picture {
|
||||
height: 3rem;
|
||||
border-radius: 4px;
|
||||
padding: .875rem 0 .875rem 1rem;
|
||||
|
||||
&::-webkit-input-placeholder {
|
||||
text-align: left;
|
||||
}
|
||||
&.ts-standard-input--two{
|
||||
|
||||
&.ts-standard-input--two {}
|
||||
}
|
||||
}
|
||||
|
||||
.ts-right-arr {
|
||||
font-style: normal;
|
||||
line-height: 22px;
|
||||
color: #E2001A;
|
||||
font-weight: bold;
|
||||
|
||||
&.ts-right-arr--two:after {
|
||||
content: " ";
|
||||
width: .5rem;
|
||||
@ -366,8 +399,7 @@ img, picture {
|
||||
}
|
||||
|
||||
/* 手机端 */
|
||||
@media screen and (max-width: 768px)
|
||||
{
|
||||
@media screen and (max-width: 768px) {
|
||||
html {
|
||||
//font-size:100px;
|
||||
}
|
||||
@ -383,48 +415,56 @@ img, picture {
|
||||
left:7%;
|
||||
top:22%;
|
||||
}
|
||||
|
||||
.rc-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.rc-top {
|
||||
margin-top: 90px;
|
||||
}
|
||||
.rc-list__header {
|
||||
|
||||
}
|
||||
.rc-list__header {}
|
||||
|
||||
.ts-right-arr {
|
||||
border-bottom: 1px solid #E1001A;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.rc-home-header {
|
||||
width: 100%;
|
||||
.rc-main
|
||||
{
|
||||
|
||||
.rc-main {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 70px;
|
||||
background-color: #fff;
|
||||
|
||||
.rc-center {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.c-left img {
|
||||
width: 19px;
|
||||
height: 14px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.c-right img {
|
||||
width: 97px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rc-search img {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&.fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@ -432,15 +472,19 @@ img, picture {
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
|
||||
.ts-scrollable-container {
|
||||
margin-bottom: 1.25rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
margin-right: .1rem;
|
||||
}
|
||||
|
||||
.ts-scrollable {
|
||||
li {
|
||||
width: 6rem;
|
||||
@ -453,6 +497,7 @@ img, picture {
|
||||
white-space: nowrap;
|
||||
line-height: 1.625rem;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@ -460,12 +505,11 @@ img, picture {
|
||||
}
|
||||
|
||||
}
|
||||
/* pc端 */
|
||||
@media screen and (min-width: 769px)
|
||||
{
|
||||
|
||||
/deep/.van-tabs__wrap
|
||||
{
|
||||
/* pc端 */
|
||||
@media screen and (min-width: 769px) {
|
||||
|
||||
/deep/.van-tabs__wrap {
|
||||
max-width: 768px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
@ -473,9 +517,11 @@ img, picture {
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.rc-top {
|
||||
margin-top: 124px;
|
||||
}
|
||||
|
||||
.ts-product-list {
|
||||
text-align: left;
|
||||
//display:block;
|
||||
@ -485,30 +531,36 @@ img, picture {
|
||||
min-width:18.75rem;
|
||||
width:22.8vw;
|
||||
box-sizing: border-box;
|
||||
|
||||
.rc-column {
|
||||
span {
|
||||
font-size: 1.875rem;
|
||||
height: 5.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(4n+1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:nth-child(4n) {
|
||||
//margin-right:0;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
max-width: 320px;
|
||||
min-width: 160px;
|
||||
}
|
||||
}
|
||||
|
||||
.ts-right-arr {
|
||||
cursor: pointer;
|
||||
border-bottom: unset;
|
||||
padding-right: 1rem;
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
content: " ";
|
||||
width: .5rem;
|
||||
@ -521,30 +573,38 @@ img, picture {
|
||||
top: .25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.rc-main {
|
||||
width: 100%;
|
||||
max-width: 1400px;
|
||||
}
|
||||
|
||||
.rc-list--inline:not([role=tablist]):not([role=menubar]) {
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.layout-container, .rc-layout-container {
|
||||
|
||||
.layout-container,
|
||||
.rc-layout-container {
|
||||
margin-left: -1rem;
|
||||
margin-right: -1rem;
|
||||
}
|
||||
|
||||
.rc-fixright {
|
||||
width: 5.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
ul {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
li {
|
||||
margin-top: .5rem;
|
||||
height: 4.125rem;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 22px;
|
||||
height: auto;
|
||||
@ -552,10 +612,11 @@ img, picture {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rc-home-header {
|
||||
height: 120px;
|
||||
.rc-main
|
||||
{
|
||||
|
||||
.rc-main {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
// position: fixed;
|
||||
@ -566,13 +627,13 @@ img, picture {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
height: 120px;
|
||||
ul
|
||||
{
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
li
|
||||
{
|
||||
|
||||
li {
|
||||
margin-right: 25px;
|
||||
color: #666666;
|
||||
cursor: pointer;
|
||||
@ -580,18 +641,21 @@ img, picture {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.c-left {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rc-search {
|
||||
display: none;
|
||||
}
|
||||
.c-left img
|
||||
{
|
||||
|
||||
.c-left img {
|
||||
width: 19px;
|
||||
height: 14px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.c-right img {
|
||||
width: 120px;
|
||||
height: 45px;
|
||||
@ -599,22 +663,23 @@ img, picture {
|
||||
}
|
||||
}
|
||||
|
||||
.ts-scrollable-container
|
||||
{
|
||||
.ts-scrollable-container {
|
||||
margin-top: 1.25rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
.ts-scrollable
|
||||
{
|
||||
|
||||
.ts-scrollable {
|
||||
padding-bottom: 1rem;
|
||||
scrollbar-width: thin;
|
||||
li
|
||||
{
|
||||
|
||||
li {
|
||||
margin-left: 30px;
|
||||
width: 8.125rem;
|
||||
height: 2.5rem;
|
||||
@ -628,32 +693,35 @@ img, picture {
|
||||
width: 50%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background-color: #d7d7d7;
|
||||
border-radius: 10px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
//background-color:#ddd;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-button {
|
||||
background: unset;
|
||||
}
|
||||
|
||||
/* */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 960px)
|
||||
{
|
||||
@media (max-width: 960px) {
|
||||
.rc-lg-up {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px)
|
||||
{
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.rc-xl-down {
|
||||
display: none !important;
|
||||
}
|
||||
@ -662,6 +730,7 @@ img, picture {
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
.rc_contline {
|
||||
border-bottom: 3px solid #f6f6f6;
|
||||
height: 0px;
|
||||
@ -716,27 +785,39 @@ img, picture {
|
||||
.tr {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.diallog_width {
|
||||
.el-dialog {
|
||||
width: 90%;
|
||||
max-width: 440px;
|
||||
max-width: 920px;
|
||||
}
|
||||
#tns2-iw{ height: 90px;}
|
||||
.rc-carousel:not(.rc-carousel--loaded){visibility:visible!important}
|
||||
}
|
||||
|
||||
#tns2-iw {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.rc-carousel:not(.rc-carousel--loaded) {
|
||||
visibility: visible !important
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.el-message-box {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.diallog_width {
|
||||
.el-dialog {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
color: #e1001a;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
281
rc-busness/components/address.vue
Normal file
281
rc-busness/components/address.vue
Normal file
@ -0,0 +1,281 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="usercontend">
|
||||
<div class="rc-max-width--xl">
|
||||
<h2>{{ title }}</h2>
|
||||
<div class="rc-max-width--xl rc-people">
|
||||
<span>收货人:</span>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入收货人姓名"
|
||||
v-model="userpeople"
|
||||
/>
|
||||
</div>
|
||||
<div class="rc-max-width--xl rc-phone">
|
||||
<span>手机号码:</span>
|
||||
<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
|
||||
@getmenu="onGetMenu"
|
||||
@closeDialog="handleClose1"
|
||||
:dialogInfo1="dialogInfo1"
|
||||
:defaultValues="defaultValues"
|
||||
></addressInput>
|
||||
</div>
|
||||
<div class="rc-max-width--xl rc-useaddress">
|
||||
<span>详细地址:</span>
|
||||
<!-- <input
|
||||
type="text"
|
||||
placeholder="小区、门牌号等"
|
||||
class="userinput"
|
||||
|
||||
/> -->
|
||||
<textarea
|
||||
rows="10"
|
||||
v-model="alladdress"
|
||||
cols="30"
|
||||
placeholder="请输入详细地址"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-button">
|
||||
<span @click="openclose()">取消</span>
|
||||
<em @click="register()">确认</em>
|
||||
</div>
|
||||
<!-- <div class="rc-button">
|
||||
<div class="rc-footbutton" @click="onAdd()">
|
||||
<span>新增收货地址</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import addressInput from "~/components/addressInput.vue";
|
||||
import { memberAddress } from "../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: "新增收货地址",
|
||||
defaultValues: [],
|
||||
chosenAddressId: "1",
|
||||
usermessage: null,
|
||||
checked: true,
|
||||
tel: "",
|
||||
id: "",
|
||||
alladdress: "",
|
||||
userid: null,
|
||||
usermessage: null,
|
||||
dialogInfo1: false,
|
||||
userpeople: "",
|
||||
provinceId: "",
|
||||
cityId: "",
|
||||
districtId: "",
|
||||
list: [
|
||||
{
|
||||
id: 1,
|
||||
name: "张三",
|
||||
tel: "13000000000",
|
||||
address: "浙江省杭州市西湖区文三路 138 号",
|
||||
isDefault: true,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "李四",
|
||||
tel: "1310000000",
|
||||
address: "浙江省杭州市拱墅区莫干山路 50 号",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "李四",
|
||||
tel: "1310000000",
|
||||
address: "浙江省杭州市拱墅区莫干山路 50 号",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
props: ["editAddressData"],
|
||||
methods: {
|
||||
onGetMenu(values) {
|
||||
// console.log(values, +"111111");
|
||||
// let user = values[2].id;
|
||||
// user = user.split("-");
|
||||
|
||||
if (this.id == "") {
|
||||
this.provinceId = values[0].id;
|
||||
this.cityId = values[1].id;
|
||||
this.districtId = values[2].id;
|
||||
} else {
|
||||
let user = values[2].id;
|
||||
user = user.split("-");
|
||||
this.provinceId = user[0];
|
||||
this.cityId = user[1];
|
||||
this.districtId = user[2];
|
||||
}
|
||||
},
|
||||
handleClose1() {
|
||||
this.dialogInfo1 = false;
|
||||
},
|
||||
|
||||
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();
|
||||
}
|
||||
},
|
||||
openclose() {
|
||||
this.$emit("isClose", false);
|
||||
},
|
||||
|
||||
//添加
|
||||
async editaddress(item) {
|
||||
let useradd = {
|
||||
memberId: this.userid,
|
||||
detailAddress: this.alladdress,
|
||||
recipient: this.userpeople,
|
||||
recipientPhone: this.tel,
|
||||
provinceId: this.provinceId,
|
||||
cityId: this.cityId,
|
||||
districtId: this.districtId,
|
||||
};
|
||||
if (this.id != "") useradd["id"] = this.id;
|
||||
let saveType = this.editAddressData.saveType ? "update" : "add";
|
||||
let res = await memberAddress(saveType, useradd);
|
||||
if (res.msg == "SUCCESS") {
|
||||
let typemess = saveType == "update" ? "修改地址成功" : "地址添加成功";
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: typemess,
|
||||
});
|
||||
this.$emit("isClose", false);
|
||||
} else {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: res.msg,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
editInfo() {
|
||||
if (this.editAddressData.saveType == "edit") {
|
||||
this.title = "修改收货地址";
|
||||
this.tel = this.editAddressData.tel;
|
||||
this.alladdress = this.editAddressData.detailAddress;
|
||||
this.userid = this.editAddressData.memberId;
|
||||
this.userpeople = this.editAddressData.name;
|
||||
this.provinceId = this.editAddressData.provinceId;
|
||||
this.cityId = this.editAddressData.cityId;
|
||||
this.districtId = this.editAddressData.districtId;
|
||||
this.defaultValues = [
|
||||
{
|
||||
id: this.provinceId,
|
||||
name: this.editAddressData.provinceName,
|
||||
},
|
||||
{
|
||||
id: this.cityId,
|
||||
name: this.editAddressData.cityName,
|
||||
},
|
||||
{
|
||||
id: this.districtId,
|
||||
name: this.editAddressData.districtName,
|
||||
},
|
||||
];
|
||||
}
|
||||
},
|
||||
},
|
||||
components: {
|
||||
addressInput,
|
||||
},
|
||||
computed: {
|
||||
usertel() {
|
||||
if (this.tel === "") {
|
||||
return "";
|
||||
} else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel)) {
|
||||
return "手机号格式错误";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.title =
|
||||
this.editAddressData.saveType == "edit" ? "修改收货地址" : "新增收货地址";
|
||||
this.tel = this.editAddressData.tel;
|
||||
this.alladdress = this.editAddressData.detailAddress;
|
||||
this.userid = this.editAddressData.memberId;
|
||||
this.userpeople = this.editAddressData.name;
|
||||
this.provinceId = this.editAddressData.provinceId;
|
||||
this.cityId = this.editAddressData.cityId;
|
||||
this.districtId = this.editAddressData.districtId;
|
||||
this.defaultValues = [
|
||||
{
|
||||
id: this.provinceId,
|
||||
name: this.editAddressData.provinceName,
|
||||
},
|
||||
{
|
||||
id: this.cityId,
|
||||
name: this.editAddressData.cityName,
|
||||
},
|
||||
{
|
||||
id: this.districtId,
|
||||
name: this.editAddressData.districtName,
|
||||
},
|
||||
];
|
||||
},
|
||||
mounted() {
|
||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||
this.userid = this.usermessage.data.id;
|
||||
this.id = this.editAddressData.id;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped >
|
||||
@import url("../assets/css/global.less");
|
||||
@import url("../assets/css/addaddress.less");
|
||||
</style>
|
@ -184,6 +184,8 @@ ul li ol li em strong i {
|
||||
.rc-image {
|
||||
border: 1px solid #d8d8d8;
|
||||
margin-right: 20px;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
|
||||
img {
|
||||
width: 96px;
|
||||
@ -375,17 +377,34 @@ ul li ol li em strong i {
|
||||
|
||||
.diallog_width {
|
||||
width: 100%;
|
||||
max-width: 440px;
|
||||
max-width: 920px;
|
||||
margin: 0 auto;
|
||||
|
||||
.el-dialog {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__header {
|
||||
color: #e1001a;
|
||||
}
|
||||
|
||||
//手机端
|
||||
@media screen and (max-width: 768px) {
|
||||
.settlement {
|
||||
padding-top: 0;
|
||||
.popnewaddr{
|
||||
position: absolute;
|
||||
bottom: -14px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
.btn{
|
||||
display: block;
|
||||
background: #e2001a;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
}
|
||||
.diallog_width {
|
||||
width: 100%;
|
||||
@ -401,17 +420,44 @@ ul li ol li em strong i {
|
||||
}
|
||||
|
||||
.pop_list {
|
||||
p{ padding: 0; margin: 0; line-height: 180%;}
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: 180%;
|
||||
}
|
||||
|
||||
.mypersonal {
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
padding: 15px 0;
|
||||
}
|
||||
input,.el-icon-edit{
|
||||
|
||||
input,
|
||||
.el-icon-edit {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.settlement {
|
||||
.rc-main {
|
||||
padding-top: 0;
|
||||
|
||||
.rc-usermain {
|
||||
|
||||
h3,
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.rc-usercenter h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rc-main {
|
||||
width: 100%;
|
||||
|
||||
.address-list {
|
||||
display: contents;
|
||||
|
||||
@ -463,6 +509,7 @@ ul li ol li em strong i {
|
||||
flex-direction: row;
|
||||
align-items: self-end;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
@ -470,5 +517,6 @@ ul li ol li em strong i {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div class="settlement">
|
||||
<Myheader></Myheader>
|
||||
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
</div>
|
||||
<div class="rc_contline"></div>
|
||||
<div class="rc-main">
|
||||
<div class="address-list">
|
||||
@ -110,17 +111,16 @@
|
||||
width="'100%"
|
||||
title="选择收货地址"
|
||||
>
|
||||
<div class="tc dl_cont">
|
||||
<div class="tc dl_cont" style="padding-bottom: 50px;position: relative;">
|
||||
<div class="pop_list">
|
||||
<el-row
|
||||
class="mypersonal"
|
||||
v-for="(item, index) in useraddress"
|
||||
:key="index"
|
||||
:class="item.isDefault ? 'active' : ''"
|
||||
@click="selectAddress(item)"
|
||||
>
|
||||
<el-col :span="4"
|
||||
><input type="checkbox" v-model="item.checked"
|
||||
><input type="checkbox" v-model="item.checked" @click="selectPopAddress(item)"
|
||||
/></el-col>
|
||||
<el-col :span="16" class="tl">
|
||||
<div >
|
||||
@ -130,9 +130,12 @@
|
||||
<p> {{ item.address }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<i class="el-icon-edit"></i>
|
||||
<i @click="editAddress(item)" class="el-icon-edit"></i>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="popnewaddr">
|
||||
<span class="btn" @click="addAddress">新增收货地址</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -143,7 +146,7 @@
|
||||
import Myheader from "~/components/header.vue";
|
||||
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import myAddress from "../address/address.vue";
|
||||
import myAddress from "~/components/address.vue";
|
||||
|
||||
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
||||
export default {
|
||||
@ -215,8 +218,12 @@ export default {
|
||||
tel: item.recipientPhone,
|
||||
detailAddress: item.detailAddress,
|
||||
id: item.id,
|
||||
city: item.cityName,
|
||||
districtId: item.districtName,
|
||||
cityId: item.cityId,
|
||||
districtId: item.districtId,
|
||||
provinceId:item.provinceId,
|
||||
provinceName: item.provinceName,
|
||||
cityName: item.cityName,
|
||||
districtName: item.districtName,
|
||||
saveType: "edit",
|
||||
};
|
||||
this.dialogAdd = true;
|
||||
@ -229,7 +236,20 @@ export default {
|
||||
this.useraddress.forEach((item) => {
|
||||
if (item.id == cur.id) {
|
||||
item.isDefault = true;
|
||||
item.checked=true
|
||||
} else {
|
||||
item.checked=false
|
||||
item.isDefault = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
selectPopAddress(cur) {
|
||||
this.useraddress.forEach((item) => {
|
||||
if (item.id == cur.id) {
|
||||
item.isDefault = true;
|
||||
item.checked=true
|
||||
} else {
|
||||
item.checked=false
|
||||
item.isDefault = false;
|
||||
}
|
||||
});
|
||||
|
@ -75,6 +75,9 @@ public class OrderController {
|
||||
ordersEntity.setCouponCode(ordersEntitys.getCouponCode());
|
||||
ordersEntity.setCouponName(ordersEntitys.getCouponName());
|
||||
ordersEntity.setCouponId(ordersEntitys.getCouponId());
|
||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||
}else{
|
||||
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
||||
}
|
||||
orderAddress.setAddressCityName(ordersEntitys.getOrderAddress().getAddressCityName());
|
||||
orderAddress.setAddressCountyName(ordersEntitys.getOrderAddress().getAddressCountyName());
|
||||
@ -84,7 +87,6 @@ public class OrderController {
|
||||
orderAddress.setAddressProvinceName(ordersEntitys.getOrderAddress().getAddressProvinceName());
|
||||
productId.append(ordersEntitys.getProductCode()+",");
|
||||
productName.append(ordersEntitys.getProductName()+",");
|
||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||
memberId = ordersEntitys.getMemberId();
|
||||
mobile = ordersEntitys.getPhoneNumber();
|
||||
buyCount = buyCount + ordersEntitys.getBuyCount();
|
||||
@ -136,6 +138,9 @@ public class OrderController {
|
||||
ordersEntity.setCouponCode(ordersEntitys.getCouponCode());
|
||||
ordersEntity.setCouponName(ordersEntitys.getCouponName());
|
||||
ordersEntity.setCouponId(ordersEntitys.getCouponId());
|
||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||
}else{
|
||||
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
||||
}
|
||||
orderAddress.setAddressCityName(ordersEntitys.getOrderAddress().getAddressCityName());
|
||||
orderAddress.setAddressCountyName(ordersEntitys.getOrderAddress().getAddressCountyName());
|
||||
@ -145,7 +150,7 @@ public class OrderController {
|
||||
orderAddress.setAddressProvinceName(ordersEntitys.getOrderAddress().getAddressProvinceName());
|
||||
productId.append(ordersEntitys.getProductCode()+",");
|
||||
productName.append(ordersEntitys.getProductName()+",");
|
||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||
|
||||
memberId = ordersEntitys.getMemberId();
|
||||
mobile = ordersEntitys.getPhoneNumber();
|
||||
buyCount = buyCount + ordersEntitys.getBuyCount();
|
||||
|
Loading…
Reference in New Issue
Block a user