mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
commit
cf87ca57bc
@ -144,10 +144,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/.el-dialog {
|
|
||||||
width: 80%;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.rc-discount {
|
.rc-discount {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -169,8 +165,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #e1001a;
|
color: #e1001a;
|
||||||
padding-right: 21px;
|
width: 34%;
|
||||||
width: 30%;
|
|
||||||
float: left;
|
float: left;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
i {
|
i {
|
||||||
@ -190,7 +185,7 @@
|
|||||||
.rc-right {
|
.rc-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-left: 36px;
|
padding-left: 20px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
i {
|
i {
|
||||||
@ -204,7 +199,7 @@
|
|||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 8px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
em {
|
em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -405,11 +400,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/.el-dialog {
|
|
||||||
width: 440px;
|
|
||||||
height: 432px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.rc-discount {
|
.rc-discount {
|
||||||
position: relative;
|
position: relative;
|
||||||
img {
|
img {
|
||||||
@ -430,8 +420,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #e1001a;
|
color: #e1001a;
|
||||||
padding-right: 21px;
|
width: 34%;
|
||||||
width: 30%;
|
|
||||||
float: left;
|
float: left;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
i {
|
i {
|
||||||
@ -451,7 +440,7 @@
|
|||||||
.rc-right {
|
.rc-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-left: 36px;
|
padding-left: 20px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
i {
|
i {
|
||||||
@ -465,7 +454,7 @@
|
|||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 8px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
em {
|
em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -587,3 +576,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rc-carousel__gallery-thumbnail{
|
||||||
|
display: inline;
|
||||||
|
.rc-img--square{
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
&.rc-carousel__gallery-thumbnail--active{
|
||||||
|
.rc-img--square{
|
||||||
|
border: 1px solid #E2001A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
127
rc-busness/pages/address/address.vue
Normal file
127
rc-busness/pages/address/address.vue
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<van-address-edit
|
||||||
|
:area-list="areaList"
|
||||||
|
:address-info="{
|
||||||
|
name: editAddressData.name,
|
||||||
|
tel: editAddressData.tel,
|
||||||
|
addressDetail: editAddressData.detailAddress,
|
||||||
|
areaCode: areaCode,
|
||||||
|
}"
|
||||||
|
show-delete
|
||||||
|
show-set-default
|
||||||
|
show-search-result
|
||||||
|
:search-result="searchResult"
|
||||||
|
@save="onSave"
|
||||||
|
@delete="onDelete"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { Toast } from "vant";
|
||||||
|
import { areaList } from "@vant/area-data";
|
||||||
|
var _ = require("lodash");
|
||||||
|
import { memberAddress } from "../../ajax/getData";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
areaList,
|
||||||
|
searchResult: [],
|
||||||
|
areaCode: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: ["editAddressData"],
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
async onSave(content) {
|
||||||
|
// Toast('save');
|
||||||
|
let provinceId = Number(content.areaCode.substring(0, 2)); //省份id
|
||||||
|
let cityId = Number(content.areaCode.substring(2, 4)); //城市id
|
||||||
|
let districtId = Number(content.areaCode.substring(4, 7)); //区域编码
|
||||||
|
//id 详细地址 /收货人姓名 电话号码 省份id/城市id/区域编码
|
||||||
|
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
||||||
|
let postData = {
|
||||||
|
memberId,
|
||||||
|
provinceId: 25,
|
||||||
|
cityId: 36,
|
||||||
|
districtId: 418,
|
||||||
|
// provinceId,
|
||||||
|
// cityId,
|
||||||
|
// districtId,
|
||||||
|
detailAddress: content.addressDetail,
|
||||||
|
recipient: content.name,
|
||||||
|
recipientPhone: content.tel,
|
||||||
|
default: content.default,
|
||||||
|
};
|
||||||
|
let saveType = this.editAddressData.saveType ? "update" : "add";
|
||||||
|
let data = await memberAddress(saveType, postData);
|
||||||
|
if (data) {
|
||||||
|
this.$message({
|
||||||
|
type: "warning",
|
||||||
|
message: data.msg,
|
||||||
|
});
|
||||||
|
if (data.code == "0") {
|
||||||
|
this.$emit("isClose", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onDelete() {
|
||||||
|
// Toast("delete");
|
||||||
|
let postData = {
|
||||||
|
ids: this.editAddressData.id,
|
||||||
|
memberId: this.editAddressData.memberId,
|
||||||
|
};
|
||||||
|
let data = await memberAddress("delete", postData);
|
||||||
|
if (data) {
|
||||||
|
this.$message({
|
||||||
|
type: "warning",
|
||||||
|
message: data.msg,
|
||||||
|
});
|
||||||
|
if (data.code == "0") {
|
||||||
|
this.$emit("isClose", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async areaCodeInit() {
|
||||||
|
var city = this.editAddressData.city;
|
||||||
|
var district = this.editAddressData.district;
|
||||||
|
this.areaCode = "1310001";
|
||||||
|
// _.forEach(this.areaList.city_list, (o, c) => {
|
||||||
|
// if (o == city) {
|
||||||
|
// // let cityId = String(_.take(c, 2));
|
||||||
|
// let cityId = c.substring(0, 4);
|
||||||
|
// _.forEach(this.areaList.county_list, (i, a) => {
|
||||||
|
// if (i == district) {
|
||||||
|
// // let districtId = String(_.take(a, 2));
|
||||||
|
// let districtId = a.substring(0, 4);
|
||||||
|
// if (cityId == districtId) {
|
||||||
|
// this.areaCode = a;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.areaCodeInit();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.van-area {
|
||||||
|
width: 400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border: 1px solid #808285;
|
||||||
|
}
|
||||||
|
.van-popup {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.van-overlay {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.v-modal {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
@ -366,6 +366,7 @@ ul li ol li em strong i {
|
|||||||
.diallog_width{
|
.diallog_width{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 440px;
|
max-width: 440px;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.el-dialog{
|
.el-dialog{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -95,10 +95,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%">
|
<el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%">
|
||||||
<div class="tc dl_cont" v-if="dialogAdd">
|
<div class="tc dl_cont" v-if="dialogAdd">
|
||||||
<!-- <myAddress
|
<myAddress
|
||||||
@isClose="dialogCtrl"
|
@isClose="dialogCtrl"
|
||||||
:editAddressData="editAddressData"
|
:editAddressData="editAddressData"
|
||||||
></myAddress> -->
|
></myAddress>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -108,7 +108,8 @@
|
|||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
// import myAddress from "../address/address.vue";
|
import myAddress from "../address/address.vue";
|
||||||
|
|
||||||
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
||||||
export default {
|
export default {
|
||||||
middleware: "metaTitle",
|
middleware: "metaTitle",
|
||||||
@ -311,7 +312,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
tabs,
|
tabs,
|
||||||
// myAddress,
|
myAddress,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user