细节优化

This commit is contained in:
summation 2022-01-22 14:08:34 +08:00
parent 1c3d930a35
commit 760fd769c4
8 changed files with 192 additions and 130 deletions

View File

@ -80,9 +80,8 @@ export const postCourseId = (productCode,buyCount,memberId, mobile,productImg,pr
/** /**
* 删除购物车 * 删除购物车
*/ */
export const deleteCart = (memberId, productCode) => { export const deleteCart = ( productCode) => {
var data = { var data = {
memberId: memberId,
productCode:productCode productCode:productCode
} }
return fetch('cancelCartProductInfo',data,'POST') return fetch('cancelCartProductInfo',data,'POST')

View File

@ -764,7 +764,15 @@ picture {
max-width: 920px; max-width: 920px;
} }
} }
.pop_coupon{
max-width: 440px;
width: 100%;
margin: 0 auto;
.el-dialog{
width: 100%;
}
}
#tns2-iw { #tns2-iw {
height: 90px; height: 90px;
} }
@ -789,6 +797,7 @@ picture {
.el-dialog__title { .el-dialog__title {
color: #e1001a; color: #e1001a;
font-weight: bold;
} }
} }

View File

@ -1,3 +1,15 @@
.pop_coupon{
max-width: 440px;
width: 100%;
.el-dialog{
width: 100%;
margin: 0 auto;
}
.rs-dis{
max-height: 290px;
overflow-y: auto;
}
}
.ts-product-detail{ .ts-product-detail{
i { i {
font-style: normal; font-style: normal;
@ -185,7 +197,7 @@
.rc-right { .rc-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-left: 20px; padding: 5px 10px;
justify-content: center; justify-content: center;
height: 100%; height: 100%;
i { i {
@ -425,10 +437,12 @@
height: 100%; height: 100%;
i { i {
font-style: normal; font-style: normal;
font-size: 12px; font-size: 18px;
font-weight: bold;
} }
span { span {
font-size: 26px; font-size: 45px;
font-weight: bold;
} }
strong { strong {
font-style: normal; font-style: normal;
@ -440,7 +454,7 @@
.rc-right { .rc-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-left: 20px; padding: 5px 10px;
justify-content: center; justify-content: center;
height: 100%; height: 100%;
i { i {

View File

@ -1,17 +1,15 @@
<template> <template>
<div> <div>
<div class="usercontend"> <ul class="address">
<div class="rc-max-width--xl"> <li>
<h2>{{ title }}</h2>
<div class="rc-max-width--xl rc-people">
<span>收货人:</span> <span>收货人:</span>
<input <input
type="text" type="text"
placeholder="请输入收货人姓名" placeholder="请输入收货人姓名"
v-model="userpeople" v-model="userpeople"
/> />
</div> </li>
<div class="rc-max-width--xl rc-phone"> <li>
<span>手机号码:</span> <span>手机号码:</span>
<input <input
type="text" type="text"
@ -19,44 +17,26 @@
v-model="tel" v-model="tel"
:error-message="usertel" :error-message="usertel"
/> />
</div> </li>
<div class="rc-max-width--xl rc-address"> <li>
<span>所在地区:</span> <span>所在地区:</span>
<!-- <input type="text" placeholder="请选择所在地区"> -->
<addressInput <addressInput
@getmenu="onGetMenu" @getmenu="onGetMenu"
@closeDialog="handleClose1" @closeDialog="handleClose1"
:dialogInfo1="dialogInfo1" :dialogInfo1="dialogInfo1"
:defaultValues="defaultValues" :defaultValues="defaultValues"
></addressInput> ></addressInput>
</div> </li>
<div class="rc-max-width--xl rc-useaddress"> <li>
<span>详细地址:</span> <span>详细地址:</span>
<!-- <input <textarea v-model="alladdress" placeholder="请输入详细地址"></textarea>
type="text" </li>
placeholder="小区、门牌号等" </ul>
class="userinput" <div class="btn_cont">
<span class="btn1" @click="openclose()">取消</span>
/> --> <span class="btn2" @click="register()">确认</span>
<textarea
rows="10"
v-model="alladdress"
cols="30"
placeholder="请输入详细地址"
></textarea>
</div> </div>
</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> </template>
<script> <script>
@ -80,36 +60,11 @@ export default {
provinceId: "", provinceId: "",
cityId: "", cityId: "",
districtId: "", 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"], props: ["editAddressData"],
methods: { methods: {
onGetMenu(values) { onGetMenu(values) {
// console.log(values, +"111111");
// let user = values[2].id;
// user = user.split("-");
if (this.id == "") { if (this.id == "") {
this.provinceId = values[0].id; this.provinceId = values[0].id;
this.cityId = values[1].id; this.cityId = values[1].id;
@ -127,7 +82,6 @@ export default {
}, },
register() { register() {
console.log(this.tel);
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") { if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({ this.$message({
type: "warning", type: "warning",
@ -200,33 +154,6 @@ export default {
}); });
} }
}, },
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: { components: {
addressInput, addressInput,
@ -276,6 +203,81 @@ export default {
</script> </script>
<style lang="less" scoped > <style lang="less" scoped >
@import url("../assets/css/global.less"); .address {
@import url("../assets/css/addaddress.less"); text-align: left;
font-size: 16px;
color: 333333;
li {
display: flex;
padding: 8px;
span {
display: block;
width: 110px;
font-weight: bold;
margin-top: 12px;
}
}
input {
width: 100%;
height: 45px;
border: 1px solid #808285;
color: #999999;
font-size: 16px;
padding-left: 16px;
}
textarea {
width: 100%;
border: 1px solid #808285;
color: #999999;
font-size: 16px;
padding: 8px 0 0 16px;
height: 118px;
}
.ts-area-picker-containe {
width: 100%;
}
}
.btn_cont {
text-align: center;
padding: 20px;
}
.btn1,
.btn2 {
padding: 10px 62px;
display: inline-block;
cursor: pointer;
font-size: 16px;
font-weight: bold;
border-radius: 30px;
margin: 0 20px;
}
.btn1 {
border: 2px solid #e2001a;
color: #e2001a;
}
.btn2 {
background: #e2001a;
color: #ffffff;
}
//
@media screen and (max-width: 768px) {
.btn1,
.btn2 {
padding: 10px 32px;
margin: 0 10px;
}
.address {
input {
border-top: none;
border-left: none;
border-right: none;
}
textarea {
border-top: none;
border-left: none;
border-right: none;
height: 38px;
}
}
}
</style> </style>

View File

@ -106,11 +106,13 @@
</div> --> </div> -->
</div> </div>
</div> </div>
<MyFooter></MyFooter>
</div> </div>
</template> </template>
<script> <script>
import Myheader from "~/components/header.vue"; import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import tabs from "@/components/tabs.vue"; import tabs from "@/components/tabs.vue";
import { isexistCart, generateOrderWX, deleteCart } from "../../ajax/getData"; import { isexistCart, generateOrderWX, deleteCart } from "../../ajax/getData";
export default { export default {
@ -177,6 +179,7 @@ export default {
components: { components: {
Myheader, Myheader,
tabs, tabs,
MyFooter,
}, },
methods: { methods: {
// //
@ -213,7 +216,7 @@ export default {
async deletsmessage(productCode) { async deletsmessage(productCode) {
let user = JSON.parse(localStorage.getItem("userInfo")); let user = JSON.parse(localStorage.getItem("userInfo"));
this.userid = user.data.id; this.userid = user.data.id;
let data = await deleteCart(this.userid, productCode); let data = await deleteCart( productCode);
if (data) { if (data) {
this.$message({ this.$message({
type: "warning", type: "warning",
@ -422,6 +425,7 @@ export default {
.rc-footera { .rc-footera {
background: #f6f6f6; background: #f6f6f6;
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
margin-bottom:40px;
.rc-foote { .rc-foote {
margin: 0 auto; margin: 0 auto;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1); box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
@ -547,10 +551,14 @@ export default {
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #d7d7d7; border-bottom: 1px solid #d7d7d7;
padding: 15px 0; padding: 15px 0;
.del{
em{ font-style: normal;}
}
.product-price { .product-price {
color: #e1001a; color: #e1001a;
font-weight: bold; font-weight: bold;
font-size: 20px; font-size: 20px;
width: 60px;
} }
.del{ .del{

View File

@ -366,7 +366,7 @@ ul li ol li em strong i {
text-align: center; text-align: center;
color: white; color: white;
font-size: 16px; font-size: 16px;
cursor: pointer;
height: 48px; height: 48px;
border-radius: 30px; border-radius: 30px;

View File

@ -40,7 +40,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="rc_contline"></div> <div class="rc_contline">1</div>
<div class="rc-main" v-for="(item, index) in goldmedal" :key="index"> <div class="rc-main" v-for="(item, index) in goldmedal" :key="index">
<div class="rc-usermain"> <div class="rc-usermain">
<div class="rc-image"> <div class="rc-image">
@ -59,7 +59,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="rc-contline"></div> <div class="rc_contline"></div>
<div class="rc-main"> <div class="rc-main">
<div class="rc-merchandise"> <div class="rc-merchandise">
<ul> <ul>
@ -83,7 +83,7 @@
</div> </div>
</div> </div>
<div class="rc-contline"></div> <div class="rc_contline"></div>
<div class="rc-main"> <div class="rc-main">
<div class="rc-foot"> <div class="rc-foot">
<div class="rc-foo"> <div class="rc-foo">
@ -97,7 +97,7 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%"> <el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%" :title="dialogAddTitle">
<div class="tc dl_cont" v-if="dialogAdd"> <div class="tc dl_cont" v-if="dialogAdd">
<myAddress <myAddress
@isClose="dialogCtrl" @isClose="dialogCtrl"
@ -155,6 +155,7 @@ export default {
data() { data() {
return { return {
goldmedal: [], goldmedal: [],
dialogAddTitle:"",
addressstype: null, addressstype: null,
orderstatus: "", orderstatus: "",
userisdelivery: "待收货", userisdelivery: "待收货",
@ -212,6 +213,7 @@ export default {
this.useraddress = data; this.useraddress = data;
}, },
editAddress(item) { editAddress(item) {
this.dialogAddTitle='修改收货地址'
this.editAddressData = { this.editAddressData = {
memberId: item.memberId, memberId: item.memberId,
name: item.recipient, name: item.recipient,
@ -229,6 +231,7 @@ export default {
this.dialogAdd = true; this.dialogAdd = true;
}, },
addAddress() { addAddress() {
this.dialogAddTitle='新增收货地址'
this.editAddressData = {}; this.editAddressData = {};
this.dialogAdd = true; this.dialogAdd = true;
}, },
@ -349,6 +352,11 @@ export default {
userPayData: JSON.stringify(userPayData), userPayData: JSON.stringify(userPayData),
}, },
}); });
}else{
this.$message({
type: "warning",
message: res.msg,
});
} }
}, },
async canceldanhao(orderNumber) { async canceldanhao(orderNumber) {
@ -360,7 +368,6 @@ export default {
}, },
mounted() { mounted() {
this.goldmedal = JSON.parse(this.$route.query.list); this.goldmedal = JSON.parse(this.$route.query.list);
console.log(this.$route);
this.getAddressList(); this.getAddressList();
// this.addressstype = this.$route.query.stype; // this.addressstype = this.$route.query.stype;
// this.orderNumber = this.$route.query.orderNumber; // this.orderNumber = this.$route.query.orderNumber;

View File

@ -43,7 +43,11 @@
<div class="rc-carousel__gallery-thumbnails-wrapper"> <div class="rc-carousel__gallery-thumbnails-wrapper">
<div class="rc-carousel rc-carousel__gallery-thumbnails"> <div class="rc-carousel rc-carousel__gallery-thumbnails">
<!-- Thunb images--> <!-- Thunb images-->
<div class="rc-carousel__gallery-thumbnail tns-item tns-slide-active" <div
class="
rc-carousel__gallery-thumbnail
tns-item tns-slide-active
"
v-for="(item, index) in productAttachmentList" v-for="(item, index) in productAttachmentList"
:key="index" :key="index"
> >
@ -99,9 +103,9 @@
<div class="productdetails"> <div class="productdetails">
<div class="rc-productdetail"> <div class="rc-productdetail">
<i class="ts-row-title">商品价格</i> <i class="ts-row-title">商品价格</i>
<span class="ts-realprice">{{ item.rsp }}</span> <span class="ts-realprice">{{ item.ecPrice }}</span>
<span class="ts-remove ts-ecprice" <span class="ts-remove ts-ecprice"
>{{ item.ecPrice }} >{{ item.rsp }}
</span> </span>
</div> </div>
<div class="rc-productdetai"> <div class="rc-productdetai">
@ -189,8 +193,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="rc-footimage rc-main"> <div class="rc-footimage rc-main" v-for="(item, index) in newlist"
<!-- <img :src="item.showImgFile" alt="" /> --> :key="index">
<img :src="item.showImgFile" alt="" />
</div> </div>
<div class="rc-fixright"> <div class="rc-fixright">
<ul> <ul>
@ -210,7 +215,7 @@
</div> </div>
<Myfooter v-on:litentop="showmesg"></Myfooter> <Myfooter v-on:litentop="showmesg"></Myfooter>
</div> </div>
<el-dialog :visible.sync="dialogInfo1" @close="userclose"> <el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon">
<div class="rs-dis"> <div class="rs-dis">
<div <div
class="rc-discount" class="rc-discount"
@ -593,8 +598,26 @@ export default {
}); });
} }
if (orderm == 1) { if (orderm == 1) {
let list = [
{
id: item.id,
productCode: item.productCode,
productPrice: item.ecPrice,
productName: item.productName,
productImg: item.picFile,
specifications: item.specifications,
buyCount: item.pcs,
memberId: "884258",
mobile: "13480231061",
checked: true,
},
];
this.$router.push({ this.$router.push({
path: "/myorder/userrecord", path: "/personal/settlement",
query: {
list: JSON.stringify(list),
},
}); });
} }
} }