!77 2022-1-22 He

Merge pull request !77 from Admin/sit-He-v3
This commit is contained in:
Admin 2022-01-22 07:25:47 +00:00 committed by Gitee
commit 79ff28e63d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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 = {
memberId: memberId,
productCode:productCode
}
return fetch('cancelCartProductInfo',data,'POST')

View File

@ -792,7 +792,15 @@ picture {
max-width: 920px;
}
}
.pop_coupon{
max-width: 440px;
width: 100%;
margin: 0 auto;
.el-dialog{
width: 100%;
}
}
#tns2-iw {
height: 90px;
}
@ -817,6 +825,7 @@ picture {
.el-dialog__title {
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{
i {
font-style: normal;
@ -185,7 +197,7 @@
.rc-right {
display: flex;
flex-direction: column;
padding-left: 20px;
padding: 5px 10px;
justify-content: center;
height: 100%;
i {
@ -425,10 +437,12 @@
height: 100%;
i {
font-style: normal;
font-size: 12px;
font-size: 18px;
font-weight: bold;
}
span {
font-size: 26px;
font-size: 45px;
font-weight: bold;
}
strong {
font-style: normal;
@ -440,7 +454,7 @@
.rc-right {
display: flex;
flex-direction: column;
padding-left: 20px;
padding: 5px 10px;
justify-content: center;
height: 100%;
i {

View File

@ -1,61 +1,41 @@
<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>
<ul class="address">
<li>
<span>收货人:</span>
<input
type="text"
placeholder="请输入收货人姓名"
v-model="userpeople"
/>
</li>
<li>
<span>手机号码:</span>
<input
type="text"
placeholder="请输入11位手机号码"
v-model="tel"
:error-message="usertel"
/>
</li>
<li>
<span>所在地区:</span>
<addressInput
@getmenu="onGetMenu"
@closeDialog="handleClose1"
:dialogInfo1="dialogInfo1"
:defaultValues="defaultValues"
></addressInput>
</li>
<li>
<span>详细地址:</span>
<textarea v-model="alladdress" placeholder="请输入详细地址"></textarea>
</li>
</ul>
<div class="btn_cont">
<span class="btn1" @click="openclose()">取消</span>
<span class="btn2" @click="register()">确认</span>
</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>
@ -80,36 +60,11 @@ export default {
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;
@ -127,7 +82,6 @@ export default {
},
register() {
console.log(this.tel);
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
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: {
addressInput,
@ -276,6 +203,81 @@ export default {
</script>
<style lang="less" scoped >
@import url("../assets/css/global.less");
@import url("../assets/css/addaddress.less");
.address {
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>

View File

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

View File

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

View File

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

View File

@ -43,7 +43,11 @@
<div class="rc-carousel__gallery-thumbnails-wrapper">
<div class="rc-carousel rc-carousel__gallery-thumbnails">
<!-- 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"
:key="index"
>
@ -99,9 +103,9 @@
<div class="productdetails">
<div class="rc-productdetail">
<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"
>{{ item.ecPrice }}
>{{ item.rsp }}
</span>
</div>
<div class="rc-productdetai">
@ -189,8 +193,9 @@
</div>
</div>
</div>
<div class="rc-footimage rc-main">
<!-- <img :src="item.showImgFile" alt="" /> -->
<div class="rc-footimage rc-main" v-for="(item, index) in newlist"
:key="index">
<img :src="item.showImgFile" alt="" />
</div>
<div class="rc-fixright">
<ul>
@ -210,7 +215,7 @@
</div>
<Myfooter v-on:litentop="showmesg"></Myfooter>
</div>
<el-dialog :visible.sync="dialogInfo1" @close="userclose">
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon">
<div class="rs-dis">
<div
class="rc-discount"
@ -593,8 +598,26 @@ export default {
});
}
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({
path: "/myorder/userrecord",
path: "/personal/settlement",
query: {
list: JSON.stringify(list),
},
});
}
}