mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
产品详情页
This commit is contained in:
parent
4809866df6
commit
e7b12f5e0b
@ -144,10 +144,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
/deep/.el-dialog {
|
||||
width: 80%;
|
||||
position: relative;
|
||||
}
|
||||
.rc-discount {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
@ -169,8 +165,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #e1001a;
|
||||
padding-right: 21px;
|
||||
width: 30%;
|
||||
width: 34%;
|
||||
float: left;
|
||||
height: 100%;
|
||||
i {
|
||||
@ -190,7 +185,7 @@
|
||||
.rc-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 36px;
|
||||
padding-left: 20px;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
i {
|
||||
@ -204,7 +199,7 @@
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
em {
|
||||
font-style: normal;
|
||||
@ -405,11 +400,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
/deep/.el-dialog {
|
||||
width: 440px;
|
||||
height: 432px;
|
||||
position: relative;
|
||||
}
|
||||
.rc-discount {
|
||||
position: relative;
|
||||
img {
|
||||
@ -430,8 +420,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #e1001a;
|
||||
padding-right: 21px;
|
||||
width: 30%;
|
||||
width: 34%;
|
||||
float: left;
|
||||
height: 100%;
|
||||
i {
|
||||
@ -451,7 +440,7 @@
|
||||
.rc-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 36px;
|
||||
padding-left: 20px;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
i {
|
||||
@ -465,7 +454,7 @@
|
||||
}
|
||||
span {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
em {
|
||||
font-style: normal;
|
||||
@ -586,4 +575,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.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{
|
||||
width: 100%;
|
||||
max-width: 440px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.el-dialog{
|
||||
width: 100%;
|
||||
|
@ -95,10 +95,10 @@
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%">
|
||||
<div class="tc dl_cont" v-if="dialogAdd">
|
||||
<!-- <myAddress
|
||||
<myAddress
|
||||
@isClose="dialogCtrl"
|
||||
:editAddressData="editAddressData"
|
||||
></myAddress> -->
|
||||
></myAddress>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -108,7 +108,8 @@
|
||||
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 "../address/address.vue";
|
||||
|
||||
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
||||
export default {
|
||||
middleware: "metaTitle",
|
||||
@ -311,7 +312,7 @@ export default {
|
||||
components: {
|
||||
Myheader,
|
||||
tabs,
|
||||
// myAddress,
|
||||
myAddress,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user