mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
回退 'Pull Request !42 : 1-19 He'
This commit is contained in:
parent
e78a843e89
commit
4bfd884a9b
@ -72,18 +72,22 @@ export const postCourseId = (productCode, buyCount, memberId, mobile, productImg
|
|||||||
/**
|
/**
|
||||||
* 是否存在购物车
|
* 是否存在购物车
|
||||||
*/
|
*/
|
||||||
export const isexistCart = (id) => {
|
export const isexistCart = (id, pet,address) => {
|
||||||
var data = {
|
var data = {
|
||||||
|
memberId: id,
|
||||||
}
|
}
|
||||||
return fetch('getCartProductInfo', data, 'POST')
|
return fetch('getCartProductInfo?memberId='+id,data,'POST')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除购物车
|
* 删除购物车
|
||||||
*/
|
*/
|
||||||
export const deleteCart = (memberId, productCode) => {
|
export const deleteCart = (memberId, productCode) => {
|
||||||
return fetch('cancelCartProductInfo?memberId=' + memberId, productCode, 'POST')
|
var data = {
|
||||||
|
memberId: memberId,
|
||||||
|
productCode:productCode
|
||||||
|
}
|
||||||
|
return fetch('cancelCartProductInfo',data,'POST')
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 购物车批量提交
|
* 购物车批量提交
|
||||||
@ -237,8 +241,14 @@ export const searchchanpin = (stype,usertype,curPage,curRow) => {
|
|||||||
})
|
})
|
||||||
var str = "&";
|
var str = "&";
|
||||||
for(var key in list){
|
for(var key in list){
|
||||||
|
|
||||||
str = str + key + "=" + list[key] + "&";
|
str = str + key + "=" + list[key] + "&";
|
||||||
}
|
}
|
||||||
|
str = str.substr(0,str.length-1);
|
||||||
|
var data = {
|
||||||
|
page:1,
|
||||||
|
row:10
|
||||||
|
}
|
||||||
|
|
||||||
return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' )
|
return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' )
|
||||||
}
|
}
|
||||||
@ -446,17 +456,12 @@ export const getdraw = (mobile, states) => {
|
|||||||
|
|
||||||
//微信支付
|
//微信支付
|
||||||
export const generateOrderWX = (list) => {
|
export const generateOrderWX = (list) => {
|
||||||
|
var data = [{
|
||||||
|
|
||||||
|
|
||||||
|
}]
|
||||||
return fetch('generateOrderWX', list, 'POST' )
|
return fetch('generateOrderWX', list, 'POST' )
|
||||||
}
|
}
|
||||||
//微信支付返回
|
|
||||||
export const updateOrderWX = (data) => {
|
|
||||||
return fetch('updateOrderWX', data, 'POST')
|
|
||||||
}
|
|
||||||
//支付宝支付
|
|
||||||
export const generateOrderAlipay = (list) => {
|
|
||||||
return fetch('generateOrderAlipay', list, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
//用户所有的优惠券
|
//用户所有的优惠券
|
||||||
export const allConfig = (memberId,channelSecurity,mobile) => {
|
export const allConfig = (memberId,channelSecurity,mobile) => {
|
||||||
var data = {
|
var data = {
|
||||||
@ -500,11 +505,6 @@ export const userConfig = (memberId, couponId) => {
|
|||||||
// return fetch('generateOrderWX', data, 'POST' )
|
// return fetch('generateOrderWX', data, 'POST' )
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//地址的查询
|
|
||||||
export const memberAddress = (type, data) => {
|
|
||||||
return fetch('memberAddress?type=' + type, data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//地址的查询
|
//地址的查询
|
||||||
export const selectaddress = (memberId, pet,address) => {
|
export const selectaddress = (memberId, pet,address) => {
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB |
@ -1,78 +0,0 @@
|
|||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
line-height: 160%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc_contline {
|
|
||||||
border-bottom: 3px solid #f6f6f6;
|
|
||||||
height: 0px;
|
|
||||||
margin: 0;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_modules {
|
|
||||||
padding-top: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cont_modules {
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 1400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inline_right {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inline_mid {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inline_left {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-evenly;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.li_inline {
|
|
||||||
li {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.color_red {
|
|
||||||
color: #E2001A;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tc {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tr {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
.el-dialog{
|
|
||||||
width: 90%;
|
|
||||||
max-width: 440px;
|
|
||||||
}
|
|
||||||
#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%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -38,10 +38,8 @@ export default {
|
|||||||
css: [
|
css: [
|
||||||
'vant/lib/index.css',
|
'vant/lib/index.css',
|
||||||
'element-ui/lib/theme-chalk/index.css',
|
'element-ui/lib/theme-chalk/index.css',
|
||||||
'@/assets/style/default.less',
|
|
||||||
{ src:'@/assets/css/global.less'},
|
{ src:'@/assets/css/global.less'},
|
||||||
{ src:'@/assets/css/royalcanin-custom.css'},
|
{ src:'@/assets/css/royalcanin-custom.css'},
|
||||||
|
|
||||||
{ src: "swiper/css/swiper.css" }
|
{ src: "swiper/css/swiper.css" }
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -75,7 +73,7 @@ export default {
|
|||||||
],
|
],
|
||||||
|
|
||||||
styleResources: {
|
styleResources: {
|
||||||
less: '/assets/style/default.less' // less文件路径
|
less: '@/assets/style/less/default.less' // less文件路径
|
||||||
},
|
},
|
||||||
// Build Configuration: https://go.nuxtjs.dev/config-build
|
// Build Configuration: https://go.nuxtjs.dev/config-build
|
||||||
build: {
|
build: {
|
||||||
|
@ -1,127 +0,0 @@
|
|||||||
<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>
|
|
@ -1,83 +1,89 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="rc-header">
|
<div class="rc-header">
|
||||||
<Myheader></Myheader>
|
|
||||||
</div>
|
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
|
<Myheader></Myheader>
|
||||||
<tabs></tabs>
|
<tabs></tabs>
|
||||||
<div class="cart-list">
|
<div class="rc-commodity">
|
||||||
<div class="header">
|
<div class="rc-commondi">
|
||||||
<div class="list-left">
|
<img src="../../assets/image/rc-select.png" alt="" />
|
||||||
<label class="check-label">
|
<span>商品</span>
|
||||||
<input type="checkbox" v-model="checkAll" />
|
|
||||||
</label>
|
|
||||||
<span class="name">商品</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>单价</li>
|
<li>单价</li>
|
||||||
<li>数量</li>
|
<li>数量</li>
|
||||||
<li>操作</li>
|
<li>操作</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="header_ph">
|
|
||||||
<el-row>
|
<div class="rc-select">
|
||||||
<el-col :span="12">
|
<label>
|
||||||
<div class="list-left">
|
<input type="checkbox" v-model="checkAll">
|
||||||
<label class="check-label">
|
全选
|
||||||
<input type="checkbox" v-model="checkAll" />
|
|
||||||
</label>
|
</label>
|
||||||
<span class="name">全选</span>
|
|
||||||
|
<div class="select-right">
|
||||||
|
<img src="../../assets/image/userupdate.png" alt="" />
|
||||||
|
<span @click="useredit">编辑</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</div>
|
||||||
<el-col :span="12" class="tr">
|
<div>
|
||||||
<span @click="editList()"
|
<div v-for="(item, index) in goldmedal"
|
||||||
><i class="el-icon-edit"></i>{{ editState }}</span
|
:key="index"
|
||||||
></el-col
|
class="rc-userdemand"
|
||||||
|
|
||||||
>
|
>
|
||||||
</el-row>
|
<div class="rc-userdeman">
|
||||||
</div>
|
<label>
|
||||||
<div class="list" v-for="(item, index) in cartData" :key="index">
|
<input type="checkbox" v-model="item.checked">
|
||||||
<div class="list-left">
|
|
||||||
<label class="check-label">
|
|
||||||
<input type="checkbox" v-model="item.checked" />
|
|
||||||
</label>
|
</label>
|
||||||
<div class="product">
|
|
||||||
<div class="product-img">
|
<!-- <img :src="item.image" /> -->
|
||||||
<img :src="item.productImg" alt="" />
|
<!-- <img :src="checkone?require('../../assets/image/rc-unselect.png'):require('../../assets/image/rc-select.png')" @click="userclick(checkone,index)"/> -->
|
||||||
|
<img :src="item.productImg" alt="" class="re-message" />
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="rc-userdem">
|
||||||
<p class="product-title" v-text="item.productName"></p>
|
<div class="rc-userdema">
|
||||||
<p class="specifications">规格:{{ item.specifications }}</p>
|
<span>{{ item.productName }}</span>
|
||||||
|
<em>规格:{{ item.specifications }}</em>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="rc-userd">
|
||||||
</div>
|
<i>¥{{ item.productPrice }}</i>
|
||||||
<ul>
|
|
||||||
<li class="product-price">¥{{ item.productPrice }}</li>
|
|
||||||
<li>
|
|
||||||
<div class="rc-jia">
|
<div class="rc-jia">
|
||||||
<img
|
<img src="../../assets/image/userjian.png" alt="" @click="sub(item.buyCount,index)"/>
|
||||||
src="../../assets/image/userjian.png"
|
<strong> {{item.buyCount}} </strong>
|
||||||
alt=""
|
<img src="../../assets/image/userjia.png" alt="" @click="plus(item.buyCount,index)" />
|
||||||
@click="sub(item.buyCount, index)"
|
|
||||||
/>
|
|
||||||
<input type="text" v-model="item.buyCount" />
|
|
||||||
<img
|
|
||||||
src="../../assets/image/userjia.png"
|
|
||||||
alt=""
|
|
||||||
@click="plus(item.buyCount, index)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
<em @click="userdele(item,index)">删除</em>
|
||||||
<li class="del"><em @click="userdele(item)">删除</em></li>
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
|
|
||||||
|
<div class="rc-footer">
|
||||||
|
<div class="rc-foote">
|
||||||
|
<div class="rc-shop">
|
||||||
|
<i>总计:</i>
|
||||||
|
<span>¥{{ sumPrice }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="rc-delete" @click="usejiesuan(item,index)">
|
||||||
|
<span>
|
||||||
|
{{ userdelete }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rc-footera">
|
<div class="rc-footera">
|
||||||
<div class="rc-foote">
|
<div class="rc-foote">
|
||||||
|
|
||||||
<div class="rc-shop">
|
<div class="rc-shop">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" v-model="checkAll" />
|
<input type="checkbox" v-model="checkAll">
|
||||||
全选
|
全选
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -91,8 +97,9 @@
|
|||||||
<em>共选择{{sumlength}}件商品</em>
|
<em>共选择{{sumlength}}件商品</em>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<strong @click="usejiesuan()">{{ mustpay }}</strong>
|
<strong @click="usejiesuan(item,index)" >{{mustpay}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="rc-shop">
|
<!-- <div class="rc-shop">
|
||||||
@ -107,15 +114,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { List } from 'vant';
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
|
import instance from "@/config/request";
|
||||||
import {isexistCart,generateOrderWX,deleteCart} from "../../ajax/getData";
|
import {isexistCart,generateOrderWX,deleteCart} from "../../ajax/getData";
|
||||||
|
import accMul from "../../config/setDec.js"
|
||||||
export default {
|
export default {
|
||||||
middleware: "metaTitle",
|
middleware: 'metaTitle',
|
||||||
meta: { title: "购物车" },
|
meta: {title: '购物车'},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ordersum: 1,
|
ordersum: 1,
|
||||||
@ -126,49 +137,13 @@ export default {
|
|||||||
ys1: true,
|
ys1: true,
|
||||||
ys2: true,
|
ys2: true,
|
||||||
userdelete: "结算",
|
userdelete: "结算",
|
||||||
orderprice: "¥199.00",
|
orderprice:'¥199.00',
|
||||||
mustpay: "立即结算",
|
mustpay:'立即结算',
|
||||||
editState: "编辑",
|
totalMoney:'',
|
||||||
dellist: [],
|
|
||||||
totalMoney: "",
|
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
userid:null,
|
userid:null,
|
||||||
cartData: [
|
|
||||||
// {
|
|
||||||
// buyCount: 3,
|
|
||||||
// id: 1,
|
|
||||||
// memberId: "1",
|
|
||||||
// productCode: "432434",
|
|
||||||
// productImg: require("../../assets/image/rc-select.png"),
|
|
||||||
// productName: "测试商品",
|
|
||||||
// productPrice: 399.0,
|
|
||||||
// specifications: "5KG",
|
|
||||||
// checked: false,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// buyCount: 1,
|
|
||||||
// id: 2,
|
|
||||||
// memberId: "2",
|
|
||||||
// productCode: "432434",
|
|
||||||
// productImg: require("../../assets/image/rc-select.png"),
|
|
||||||
// productName: "测试商品222",
|
|
||||||
// productPrice: "199.00",
|
|
||||||
// specifications: "5KG",
|
|
||||||
// checked: true,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// buyCount: 4,
|
|
||||||
// id: 3,
|
|
||||||
// memberId: "3",
|
|
||||||
// productCode: "432434",
|
|
||||||
// productImg: require("../../assets/image/rc-select.png"),
|
|
||||||
// productName: "测试商品3333",
|
|
||||||
// productPrice: 69.01,
|
|
||||||
// specifications: "5KG",
|
|
||||||
// checked: true,
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
goldmedal: [
|
goldmedal: [
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// ordernumber: "1111111111111111111",
|
// ordernumber: "1111111111111111111",
|
||||||
// orderstype: 1,
|
// orderstype: 1,
|
||||||
@ -181,14 +156,18 @@ export default {
|
|||||||
// buttontitle: "立即支付",
|
// buttontitle: "立即支付",
|
||||||
// checked:true,
|
// checked:true,
|
||||||
// userprice: "167",
|
// userprice: "167",
|
||||||
|
|
||||||
// catimage: require("../../assets/image/rc-win.png"),
|
// catimage: require("../../assets/image/rc-win.png"),
|
||||||
// },
|
// },
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// ordernumber: "1111111111111111111",
|
// ordernumber: "1111111111111111111",
|
||||||
// sales_num:1,
|
// sales_num:1,
|
||||||
// usereat: "每年4次免积分产品试吃",
|
// usereat: "每年4次免积分产品试吃",
|
||||||
// image:require('../../assets/image/rc-select.png'),
|
// image:require('../../assets/image/rc-select.png'),
|
||||||
|
|
||||||
// checked:true,
|
// checked:true,
|
||||||
|
|
||||||
// ordernum: 0,
|
// ordernum: 0,
|
||||||
// buttontitle: "再次购买",
|
// buttontitle: "再次购买",
|
||||||
// catimage: require("../../assets/image/usereat.png"),
|
// catimage: require("../../assets/image/usereat.png"),
|
||||||
@ -199,28 +178,31 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log("---");
|
console.log('---');
|
||||||
this.goldmedal.forEach((item) => {
|
this.goldmedal.forEach(item=>{
|
||||||
item.checked=true;
|
item.checked=true;
|
||||||
});
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.carmessage();
|
this.carmessage();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
tabs,
|
tabs
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
//请求猫
|
//请求猫
|
||||||
|
|
||||||
async carmessage() {
|
async carmessage() {
|
||||||
|
console.log(this.goldmedal);
|
||||||
let user= JSON.parse(localStorage.getItem("userInfo"));
|
let user= JSON.parse(localStorage.getItem("userInfo"));
|
||||||
|
console.log(user);
|
||||||
this.userid=user.data.id;
|
this.userid=user.data.id;
|
||||||
let data = await isexistCart(user.data.id);
|
let data = await isexistCart(user.data.id);
|
||||||
this.cartData = data;
|
this.goldmedal=data;
|
||||||
// this.goldmedal = data;
|
|
||||||
},
|
},
|
||||||
async userjie(list) {
|
async userjie(list) {
|
||||||
let user= JSON.parse(localStorage.getItem("userInfo"));
|
let user= JSON.parse(localStorage.getItem("userInfo"));
|
||||||
@ -229,43 +211,39 @@ export default {
|
|||||||
let data = await generateOrderWX(list);
|
let data = await generateOrderWX(list);
|
||||||
if(data){
|
if(data){
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
message: data.msg,
|
message: data.msg
|
||||||
});
|
});
|
||||||
console.log(data);
|
console.log(data);
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/settlement",
|
path: "/personal/settlement",
|
||||||
query: {
|
query: {
|
||||||
wxdata: data.data,
|
wxdata:data.data
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//删除购物车
|
//删除购物车
|
||||||
async deletsmessage(productCode) {
|
async deletsmessage(productCode) {
|
||||||
let user= JSON.parse(localStorage.getItem("userInfo"));
|
let user= JSON.parse(localStorage.getItem("userInfo"));
|
||||||
|
console.log(user);
|
||||||
this.userid=user.data.id;
|
this.userid=user.data.id;
|
||||||
let data = await deleteCart(this.userid, productCode);
|
let data = await deleteCart(user.data.id,productCode);
|
||||||
|
|
||||||
if(data){
|
if(data){
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
message: data.msg,
|
message: data.msg
|
||||||
});
|
});
|
||||||
this.carmessage();
|
this.carmessage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
editList() {
|
|
||||||
if (this.editState == "完成") {
|
|
||||||
this.mustpay = "立即结算";
|
|
||||||
this.editState = " 编辑";
|
|
||||||
} else {
|
|
||||||
this.mustpay = "删除";
|
|
||||||
this.editState = "完成";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// checkBox(){
|
// checkBox(){
|
||||||
|
|
||||||
// console.log(event.target.checked)
|
// console.log(event.target.checked)
|
||||||
@ -275,113 +253,107 @@ export default {
|
|||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
|
|
||||||
userdele(item) {
|
// userdele(index){
|
||||||
let delform = [];
|
|
||||||
if (item.length > 0) {
|
// this.goldmedal.splice(index,1);
|
||||||
delform = item;
|
// },
|
||||||
} else {
|
|
||||||
delform = [item.productCode];
|
|
||||||
}
|
|
||||||
this.$confirm("确定删除", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "success",
|
|
||||||
callback: (action) => {
|
|
||||||
if (action === "confirm") {
|
|
||||||
this.deletsmessage(delform);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
// this.$message({
|
|
||||||
// type: "warning",
|
|
||||||
// message: data.msg,
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
plus(num,index){
|
plus(num,index){
|
||||||
this.cartData[index].buyCount =
|
console.log(index);
|
||||||
parseInt(this.cartData[index].buyCount) + 1;
|
this.goldmedal[index].buyCount = parseInt(this.goldmedal[index].buyCount) + 1;
|
||||||
} ,
|
} ,
|
||||||
// 数量减方法
|
// 数量减方法
|
||||||
sub(num,index){
|
sub(num,index){
|
||||||
if(parseInt(num) <= 1){
|
if(parseInt(num) <= 1){
|
||||||
this.cartData[index].buyCount = 1;
|
this.goldmedal[index].buyCount = 1;
|
||||||
} else {
|
|
||||||
this.cartData[index].buyCount =
|
|
||||||
parseInt(this.cartData[index].buyCount) - 1;
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.goldmedal[index].buyCount = parseInt(this.goldmedal[index].buyCount) - 1;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 求总价
|
// 求总价
|
||||||
|
|
||||||
useredit(e){
|
useredit(e){
|
||||||
this.ys1 = !this.ys1;
|
this.ys1 = !this.ys1
|
||||||
if(this.ys1==false){
|
if(this.ys1==false){
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.userdelete = "删除";
|
this.userdelete='删除';
|
||||||
console.log(this.userdelete);
|
console.log(this.userdelete);
|
||||||
});
|
|
||||||
|
|
||||||
|
})
|
||||||
}else if(this.ys1==true){
|
}else if(this.ys1==true){
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.userdelete = "结算";
|
this.userdelete='结算';
|
||||||
|
|
||||||
console.log(this.userdelete);
|
console.log(this.userdelete);
|
||||||
});
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.userdelete=="删除"){
|
if(this.userdelete=="删除"){
|
||||||
}
|
|
||||||
},
|
|
||||||
usejiesuan() {
|
|
||||||
// let procode = [];
|
|
||||||
// let list = [];
|
|
||||||
// let menulist = [];
|
|
||||||
// this.cartData.filter((item) => {
|
|
||||||
// if (item.checked) {
|
|
||||||
// list.push(item);
|
|
||||||
// console.log(item);
|
|
||||||
// procode.push(item.productCode);
|
|
||||||
// } else {
|
|
||||||
// list.splice(index, 1);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// let list = [];
|
|
||||||
// list = this.cartData.filter((item) => item.checked);
|
|
||||||
|
|
||||||
// list.forEach((item) => {
|
}
|
||||||
// menulist.push({
|
|
||||||
// productName: item.productName,
|
},
|
||||||
// buyCount: item.buyCount,
|
usejiesuan(item,index){
|
||||||
// productId: item.productCode,
|
|
||||||
// payAmount: item.productPrice,
|
let procode=[];
|
||||||
// memberId: item.memberId,
|
|
||||||
// phoneNumber: item.mobile,
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
let list=[];
|
let list=[];
|
||||||
list = this.cartData.filter((item) => item.checked);
|
let menulist=[];
|
||||||
|
this.goldmedal.filter(item=>{
|
||||||
|
if(item.checked){
|
||||||
|
list.push(item);
|
||||||
|
console.log(item);
|
||||||
|
procode.push(item.productCode)
|
||||||
|
}else{
|
||||||
|
list.splice(index,1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
list=this.goldmedal.filter(item =>
|
||||||
|
item.checked
|
||||||
|
);
|
||||||
|
|
||||||
|
list.forEach(item => {
|
||||||
|
menulist.push({
|
||||||
|
productName:item.productName,
|
||||||
|
buyCount:item.buyCount,
|
||||||
|
productId: item.productCode,
|
||||||
|
payAmount: item.productPrice,
|
||||||
|
memberId:item.memberId,
|
||||||
|
phoneNumber:item.mobile
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if(this.ys1==false){
|
||||||
if(list.length==0){
|
if(list.length==0){
|
||||||
|
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
message: "你还未选择商品",
|
message: '你还未选择商品'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}else{
|
}else{
|
||||||
if (this.editState == "完成") {
|
this.deletsmessage(procode);
|
||||||
let delList=[]
|
}
|
||||||
list.forEach(item=>{
|
|
||||||
delList.push(item.productCode)
|
|
||||||
})
|
|
||||||
this.userdele(delList);
|
|
||||||
}else{
|
}else{
|
||||||
this.$router.push({
|
if(list.length==0){
|
||||||
path: "/personal/settlement",
|
|
||||||
query: {
|
this.$message({
|
||||||
list: list,
|
type: 'warning',
|
||||||
},
|
message: '你还未选择商品'
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
this.userjie(menulist)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// list=[
|
// list=[
|
||||||
// {
|
// {
|
||||||
// "productName":"幼猫全价粮",
|
// "productName":"幼猫全价粮",
|
||||||
@ -406,6 +378,10 @@ export default {
|
|||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// async userdelete(item) {
|
// async userdelete(item) {
|
||||||
@ -418,43 +394,242 @@ export default {
|
|||||||
checkAll: {
|
checkAll: {
|
||||||
// 设置值,当点击全选按钮的时候触发
|
// 设置值,当点击全选按钮的时候触发
|
||||||
set(v) {
|
set(v) {
|
||||||
this.cartData.forEach((item) => {
|
this.goldmedal.forEach(item => {
|
||||||
item.checked = v;
|
item.checked = v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取值,当列表中的选择改变之后触发
|
// 取值,当列表中的选择改变之后触发
|
||||||
get() {
|
get() {
|
||||||
return (
|
return this.goldmedal.length === this.goldmedal.filter(item => item.checked == true).length;
|
||||||
this.cartData.length ===
|
|
||||||
this.cartData.filter((item) => item.checked == true).length
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// 总价计算
|
// 总价计算
|
||||||
sumPrice() {
|
sumPrice() {
|
||||||
return this.cartData
|
return this.goldmedal
|
||||||
.filter((item) => item.checked)
|
.filter(item => item.checked)
|
||||||
.reduce((pre, cur) => {
|
.reduce((pre, cur) => {
|
||||||
console.log(pre);
|
console.log(pre);
|
||||||
return pre + cur.buyCount * cur.productPrice;
|
return pre + cur.buyCount * cur.productPrice;
|
||||||
|
|
||||||
}, 0);
|
}, 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
sumlength(){
|
sumlength(){
|
||||||
return this.cartData.filter((item) => item.checked == true).length;
|
return this.goldmedal.filter(item => item.checked == true).length;
|
||||||
},
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
// 手机端
|
||||||
|
@media screen and(min-width: 320px) and(max-width:768px) {
|
||||||
|
.rc-header{
|
||||||
|
|
||||||
|
}
|
||||||
|
.rc-footera{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.rc-footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.rc-foote {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
height: 80px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.rc-shop {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #E1001A;
|
||||||
|
display: block;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-delete {
|
||||||
|
span {
|
||||||
|
width: 100px;
|
||||||
|
height: 48px;
|
||||||
|
background: #e2001a;
|
||||||
|
border-radius: 30px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 40px;
|
||||||
|
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-header {
|
||||||
|
width: 100%;
|
||||||
|
.rc-main {
|
||||||
|
width: 92%;
|
||||||
|
margin: 0 auto;
|
||||||
|
.rc-commodity{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.rc-select {
|
||||||
|
border-bottom: 1px solid #d8d8d8;
|
||||||
|
height: 56px;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.select-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
img {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333333;
|
||||||
|
display: block;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.select-right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
img {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: block;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rc-userdemand {
|
||||||
|
width: 100%;
|
||||||
|
height: 180px;
|
||||||
|
border-bottom: 1px solid #d8d8d8;
|
||||||
|
display: flex;
|
||||||
|
.rc-userdeman {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.re-message {
|
||||||
|
width: 96px;
|
||||||
|
height: 96px;
|
||||||
|
display: block;
|
||||||
|
border: 1px solid #d8d8d8;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-userdem {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
margin-left: 8px;
|
||||||
|
justify-content: center;
|
||||||
|
span {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #e1001a;
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 14px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
.rc-userd {
|
||||||
|
em{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 8px;
|
||||||
|
i {
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
width: 74%;
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: 23px;
|
||||||
|
height: 23px;
|
||||||
|
display: block;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
img:last-child {
|
||||||
|
width: 23px;
|
||||||
|
height: 23px;
|
||||||
|
display: block;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-style: normal;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
list-style: none;
|
||||||
|
align-items: center;
|
||||||
|
width: 24px;
|
||||||
|
|
||||||
|
color: #666666;
|
||||||
|
height: 24px;
|
||||||
|
border: 1px solid #d7d7d7;
|
||||||
|
font-size: 12px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.rc-jia{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// /* 最小768px最大1920 *pc端/
|
||||||
|
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
||||||
.rc-footer{
|
.rc-footer{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.rc-footera {
|
.rc-footera {
|
||||||
background: #f6f6f6;
|
position: fixed;
|
||||||
border: 1px solid #d7d7d7;
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.rc-foote {
|
.rc-foote {
|
||||||
|
width: 92%;
|
||||||
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);
|
||||||
height: 102px;
|
height: 102px;
|
||||||
@ -464,7 +639,6 @@ export default {
|
|||||||
.rc-shop {
|
.rc-shop {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: 24px;
|
|
||||||
img{
|
img{
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
@ -506,7 +680,7 @@ export default {
|
|||||||
}
|
}
|
||||||
span{
|
span{
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #e1001a;
|
color: #E1001A;
|
||||||
}
|
}
|
||||||
em{
|
em{
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -531,92 +705,42 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.rc-header {
|
||||||
|
width: 100%;
|
||||||
.rc-main {
|
.rc-main {
|
||||||
width: 92%;
|
width: 92%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding-top: 60px;
|
.rc-commodity {
|
||||||
max-width: 1400px;
|
|
||||||
.cart-list {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid #d7d7d7;
|
border: 1px solid #d7d7d7;
|
||||||
font-size: 16px;
|
|
||||||
color: #666666;
|
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.header {
|
|
||||||
background: #f6f6f6;
|
|
||||||
border-radius: 3px 3px 0px 0px;
|
border-radius: 3px 3px 0px 0px;
|
||||||
border-bottom: 1px solid #d7d7d7;
|
background: #f6f6f6;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #666666;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
.rc-commondi {
|
||||||
.header_ph {
|
display: flex;
|
||||||
display: none;
|
align-items: center;
|
||||||
}
|
img {
|
||||||
.check-label {
|
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
.name {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: 56px;
|
margin-left: 56px;
|
||||||
}
|
}
|
||||||
.list-left {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
ul {
|
ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 70%;
|
width: 80%;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.list {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
border-bottom: 1px solid #d7d7d7;
|
|
||||||
padding: 15px 0;
|
|
||||||
.product-price {
|
|
||||||
color: #e1001a;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
.product {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-left: 56px;
|
|
||||||
.product-title {
|
|
||||||
color: #e1001a;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-img {
|
|
||||||
margin-right: 10px;
|
|
||||||
width: 96px;
|
|
||||||
height: 96px;
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 24px;
|
||||||
height: 100%;
|
height: 24px;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.rc-jia {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
img,
|
|
||||||
input {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 5px;
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
border: 1px solid #d7d7d7;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rc-select {
|
.rc-select {
|
||||||
@ -704,6 +828,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 10%;
|
width: 10%;
|
||||||
|
|
||||||
}
|
}
|
||||||
.rc-userd {
|
.rc-userd {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -735,10 +860,10 @@ export default {
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 1px solid #e2001a;
|
border-bottom: 1px solid #E2001A;
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
color: #e1001a;
|
color: #E1001A;
|
||||||
}
|
}
|
||||||
strong {
|
strong {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@ -758,66 +883,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//手机端
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.rc-main {
|
|
||||||
width: 100%;
|
|
||||||
.cart-list {
|
|
||||||
border: none;
|
|
||||||
.header {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.header_ph {
|
|
||||||
display: block;
|
|
||||||
border-bottom: 2px solid #d8d8d8;
|
|
||||||
padding: 20px 10px 20px 0;
|
|
||||||
border-top: 5px solid #f6f6f6;
|
|
||||||
}
|
|
||||||
.check-label {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
.name {
|
|
||||||
margin-left: 16px;
|
|
||||||
}
|
|
||||||
.list {
|
|
||||||
display: block;
|
|
||||||
.product {
|
|
||||||
margin-left: 16px;
|
|
||||||
}
|
|
||||||
ul {
|
|
||||||
margin-top: -32px;
|
|
||||||
margin-left: 128px;
|
|
||||||
width: 60%;
|
|
||||||
.del {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.rc-footera {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
.rc-shop {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.rc-delete {
|
|
||||||
margin-right: 0;
|
|
||||||
width: 100%;
|
|
||||||
.rc-num {
|
|
||||||
width: 100%;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
strong {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.el-message-box{
|
|
||||||
width: 300px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -1,414 +0,0 @@
|
|||||||
ul li ol li em strong i {
|
|
||||||
list-style: none;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-header {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.settlement {
|
|
||||||
padding-top: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.rc-main {
|
|
||||||
width: 92%;
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 1400px;
|
|
||||||
|
|
||||||
.rc-userbottomm {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-border {
|
|
||||||
width: 100%;
|
|
||||||
border-bottom: 1px solid #d7d7d7;
|
|
||||||
margin-top: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-receiving {
|
|
||||||
width: 100%;
|
|
||||||
height: 80px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
em {
|
|
||||||
font-style: normal;
|
|
||||||
color: #e1001a;
|
|
||||||
font-size: 26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: #666666;
|
|
||||||
font-size: 16px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.delivery {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 140px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.viewdetails {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-end;
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: #444444;
|
|
||||||
font-size: 18px;
|
|
||||||
display: block;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 8px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.to-delivery {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-style: normal;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
// margin-left: 16px;
|
|
||||||
font-size: 18px;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-style: normal;
|
|
||||||
margin-left: 8px;
|
|
||||||
display: block;
|
|
||||||
font-size: 18px;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bo-delivery {
|
|
||||||
span {
|
|
||||||
font-size: 16px;
|
|
||||||
color: #666666;
|
|
||||||
display: block;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.address-list {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.mypersonal {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
border: 1px solid #808285;
|
|
||||||
height: 118px;
|
|
||||||
width: 320px;
|
|
||||||
padding: 15px;
|
|
||||||
color: #333333;
|
|
||||||
margin: 20px 40px 20px 0;
|
|
||||||
position: relative;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
border: 1px solid #E2001A;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edit {
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
right: 8px;
|
|
||||||
display: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
.edit {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-delivery {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-style: normal;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
margin-left: 3px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-style: normal;
|
|
||||||
margin-left: 3px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.per-delivery {
|
|
||||||
span {
|
|
||||||
color: #666666;
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.rc-usermain {
|
|
||||||
display: flex;
|
|
||||||
padding: 20px 0;
|
|
||||||
|
|
||||||
.rc-image {
|
|
||||||
border: 1px solid #d8d8d8;
|
|
||||||
margin-right: 20px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 96px;
|
|
||||||
height: 96px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-right {
|
|
||||||
.rc-usercenter {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
h3,
|
|
||||||
.price {
|
|
||||||
font-style: normal;
|
|
||||||
display: block;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-top: 17px;
|
|
||||||
color: #e1001a;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-userright {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
color: #666666;
|
|
||||||
font-size: 16px;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
margin-top: 16px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-userbottom {
|
|
||||||
display: flex;
|
|
||||||
width: 60%;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.price {
|
|
||||||
font-style: normal;
|
|
||||||
color: #e1001a;
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-merchandise {
|
|
||||||
|
|
||||||
padding: 15px 0;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
display: block;
|
|
||||||
content: '';
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
width: 25%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
line-height: 40px;
|
|
||||||
float: right;
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-style: normal;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
list-style: none;
|
|
||||||
font-style: normal;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
li .red {
|
|
||||||
color: #e1001a;
|
|
||||||
font-size: 20px;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-payment {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 80px;
|
|
||||||
|
|
||||||
.u-trackingnumber {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-size: 18px;
|
|
||||||
font-style: normal;
|
|
||||||
margin-right: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 8px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
line-height: 40px;
|
|
||||||
font-size: 18px;
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-style: normal;
|
|
||||||
color: #666666;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
list-style: none;
|
|
||||||
font-style: normal;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-foot {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.rc-foo {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: self-end;
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-style: normal;
|
|
||||||
color: #333333;
|
|
||||||
font-size: 20px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
em {
|
|
||||||
font-style: normal;
|
|
||||||
color: #e1001a;
|
|
||||||
font-size: 26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
width: 164px;
|
|
||||||
margin-top: 36px;
|
|
||||||
background: #e2001a;
|
|
||||||
line-height: 48px;
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
font-size: 16px;
|
|
||||||
|
|
||||||
height: 48px;
|
|
||||||
|
|
||||||
border-radius: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.diallog_width{
|
|
||||||
width: 100%;
|
|
||||||
max-width: 440px;
|
|
||||||
}
|
|
||||||
.el-dialog{
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
//手机端
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
|
|
||||||
.diallog_width{
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
}
|
|
||||||
.rc-main {
|
|
||||||
.address-list {
|
|
||||||
display: contents;
|
|
||||||
|
|
||||||
.mypersonal {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.rc-usermain {
|
|
||||||
.rc-right { display: table}
|
|
||||||
}
|
|
||||||
.rc-merchandise{
|
|
||||||
padding: 15px 0 120px;
|
|
||||||
ul{
|
|
||||||
float: none;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.rc-foot{
|
|
||||||
.rc-foo{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: self-end;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
background: #fff;
|
|
||||||
width: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="settlement">
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<tabs></tabs>
|
<tabs></tabs>
|
||||||
<div class="online"></div>
|
<div class="online"></div>
|
||||||
@ -8,55 +8,52 @@
|
|||||||
<div class="rc-border"></div>
|
<div class="rc-border"></div>
|
||||||
<div
|
<div
|
||||||
class="mypersonal"
|
class="mypersonal"
|
||||||
v-for="(item, index) in useraddress"
|
v-for="(dataaddress, index) in useraddress"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="item.isDefault ? 'active' : ''"
|
|
||||||
@click="selectAddress(item)"
|
|
||||||
>
|
>
|
||||||
<div class="edit" @click="editAddress(item)">
|
|
||||||
<i class="el-icon-edit"></i>编辑
|
|
||||||
</div>
|
|
||||||
<div class="my-delivery">
|
<div class="my-delivery">
|
||||||
<span>{{ item.recipient }}</span>
|
<span>{{ dataaddress.state }}</span>
|
||||||
<i>{{ item.recipientPhone }}</i>
|
<i>{{ dataaddress.tel }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="per-delivery">
|
<div class="per-delivery">
|
||||||
<span>{{ item.address }}</span>
|
<span>{{ dataaddress.address }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mypersonal">
|
<div class="online" style="height:3px;width:100%;background:#DDDDDD;"></div>
|
||||||
<div
|
<div>
|
||||||
class="my-delivery"
|
<div class="rc-center">
|
||||||
@click="addAddress"
|
|
||||||
style="justify-content: center"
|
|
||||||
>
|
|
||||||
<i class="el-icon-plus"></i>
|
|
||||||
<span>添加收货地址</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="rc-contline"></div>
|
|
||||||
<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">
|
||||||
<img :src="item.productImg" alt="" />
|
<img :src="item.catimage" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
<h3>{{ item.productName }}</h3>
|
<em>{{ item.usereat }}</em>
|
||||||
<p>规格:{{ item.specifications }}</p>
|
<div class="rc-userright">
|
||||||
|
<span>规格:{{ item.num }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<p>¥{{ item.productPrice }}</p>
|
<span>数量:{{ item.specification }}件</span>
|
||||||
<p>X{{ item.buyCount }}</p>
|
<i>¥{{ item.userprice }}</i>
|
||||||
<p class="price">¥{{ item.productPrice }}</p>
|
<div class="rc-bottom">
|
||||||
|
<span>联系客服申请售后</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="rc-bottomm">
|
||||||
|
<span>联系客服申请售后</span>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="rc-userbottomm">
|
||||||
|
<i>¥{{ item.userprice }}</i>
|
||||||
|
<span>{{ item.orderstype }}</span>
|
||||||
|
<i>¥{{ item.userprice }}</i>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-contline"></div>
|
|
||||||
<div class="rc-main">
|
</div>
|
||||||
|
|
||||||
<div class="rc-merchandise">
|
<div class="rc-merchandise">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -69,38 +66,40 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>商品总价:</span>
|
<span>商品总价:</span>
|
||||||
<i class="red">{{ sumPrice }}</i>
|
<i>{{ shopprice.promotion }}</i>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>配送费用:</span>
|
<span>配送费用:</span>
|
||||||
<i class="red">{{ shopprice.payment }}</i>
|
<i>{{ shopprice.payment }}</i>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="rc-contline"></div>
|
|
||||||
<div class="rc-main">
|
|
||||||
<div class="rc-foot">
|
<div class="rc-foot">
|
||||||
<div class="rc-foo">
|
<div class="rc-foo">
|
||||||
<div>
|
<div style="padding-top:55px">
|
||||||
<i>合计金额:</i>
|
<i>合计金额:</i>
|
||||||
<em>{{ sumPrice }}</em>
|
<em>¥167.00</em>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-weight: bold">
|
<div style="padding-bottom:40px">
|
||||||
<span @click="jiesuan()">提交订单</span>
|
<span>再次购买</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%">
|
|
||||||
<div class="tc dl_cont" v-if="dialogAdd">
|
<div class="rc-button">
|
||||||
<myAddress
|
<div class="rc-left">
|
||||||
@isClose="dialogCtrl"
|
<span>总计:</span>
|
||||||
:editAddressData="editAddressData"
|
<em>¥167.00</em>
|
||||||
></myAddress>
|
</div>
|
||||||
|
<strong ref="rccolor" @click="jiesuan">结算</strong>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -115,16 +114,21 @@ export default {
|
|||||||
return {
|
return {
|
||||||
goldmedal:[],
|
goldmedal:[],
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
orderstatus: "",
|
orderstatus: '',
|
||||||
userisdelivery: "待收货",
|
userisdelivery:'待收货',
|
||||||
userdelivery: "派送中",
|
userdelivery: "派送中",
|
||||||
isshow:true,
|
isshow:true,
|
||||||
leftico: require("../../assets/image/rc-left.png"),
|
leftico: require("../../assets/image/rc-left.png"),
|
||||||
orderNumber: "",
|
orderNumber:'',
|
||||||
dialogAdd: false,
|
|
||||||
editAddressData: {},
|
// delivery: [
|
||||||
curAddress: {},
|
// {
|
||||||
saveType: "",
|
// state: "派送中",
|
||||||
|
// time: "2021-11-21",
|
||||||
|
// address: "广州天河—刘某某【15124617917】正在派送中",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
|
||||||
useraddress: [
|
useraddress: [
|
||||||
{
|
{
|
||||||
state: "李某某",
|
state: "李某某",
|
||||||
@ -166,149 +170,26 @@ export default {
|
|||||||
promotion: "¥167.00",
|
promotion: "¥167.00",
|
||||||
payment: "¥0.00 ",
|
payment: "¥0.00 ",
|
||||||
},
|
},
|
||||||
|
information: {
|
||||||
|
reference: "1111111111111111",
|
||||||
|
ordertime: "2012-12-01 11:20:00",
|
||||||
|
paymentmethod: "微信支付",
|
||||||
|
distribution: "快递",
|
||||||
|
trackingnumber: "11111111111111",
|
||||||
|
catimage: require("../../assets/image/rc-left.png"),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
// 总价计算
|
|
||||||
sumPrice() {
|
|
||||||
return this.goldmedal
|
|
||||||
.reduce((pre, cur) => {
|
|
||||||
console.log(pre);
|
|
||||||
return pre + cur.buyCount * cur.productPrice;
|
|
||||||
}, 0);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
async getAddressList() {
|
jiesuan(){
|
||||||
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
// let userdata=this.$route.query.wxdata
|
||||||
let { data } = await memberAddress("getAll", { memberId: memberId });
|
|
||||||
data.forEach((item) => {
|
|
||||||
item.address =
|
|
||||||
item.provinceName +
|
|
||||||
item.cityName +
|
|
||||||
item.districtName +
|
|
||||||
item.detailAddress;
|
|
||||||
});
|
|
||||||
this.useraddress = data;
|
|
||||||
console.log(data);
|
|
||||||
},
|
|
||||||
editAddress(item) {
|
|
||||||
this.editAddressData = {
|
|
||||||
memberId: item.memberId,
|
|
||||||
name: item.recipient,
|
|
||||||
tel: item.recipientPhone,
|
|
||||||
detailAddress: item.detailAddress,
|
|
||||||
id: item.id,
|
|
||||||
city: item.cityName,
|
|
||||||
districtId: item.districtName,
|
|
||||||
saveType: "edit",
|
|
||||||
};
|
|
||||||
this.dialogAdd = true;
|
|
||||||
},
|
|
||||||
addAddress() {
|
|
||||||
this.editAddressData = {};
|
|
||||||
this.dialogAdd = true;
|
|
||||||
},
|
|
||||||
selectAddress(cur) {
|
|
||||||
this.useraddress.forEach((item) => {
|
|
||||||
if (item.id == cur.id) {
|
|
||||||
item.isDefault = true;
|
|
||||||
} else {
|
|
||||||
item.isDefault = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
dialogCtrl(parm) {
|
|
||||||
this.dialogAdd = parm;
|
|
||||||
this.getAddressList();
|
|
||||||
},
|
|
||||||
async jiesuan() {
|
|
||||||
let orderAddress = this.useraddress.filter(item=>item.isDefault)
|
|
||||||
let postData =[]
|
|
||||||
this.goldmedal.forEach(item=>{
|
|
||||||
let oneProduct={
|
|
||||||
productName: item.productName,
|
|
||||||
buyCount: item.buyCount,
|
|
||||||
productId:item. productCode,
|
|
||||||
payAmount: item.productPrice,
|
|
||||||
memberId: item.memberId,
|
|
||||||
phoneNumber: item.mobile,
|
|
||||||
// couponId: "NGQ2022P12",
|
|
||||||
// couponTypeId: "4",
|
|
||||||
// couponName: "内购券",
|
|
||||||
// couponAmount: "0.3175",
|
|
||||||
// couponCode: "0007792402",
|
|
||||||
orderAddress: {
|
|
||||||
addressPhoneNumber:orderAddress[0].recipientPhone,
|
|
||||||
addressUserName:orderAddress[0].recipient,
|
|
||||||
addressProvinceName: orderAddress[0].provinceName,
|
|
||||||
addressCityName:orderAddress[0].cityName,
|
|
||||||
addressCountyName: orderAddress[0].districtName,
|
|
||||||
addressDetailInfo: orderAddress[0].detailAddress,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
postData.push(oneProduct)
|
|
||||||
})
|
|
||||||
// let postData = [
|
|
||||||
// {
|
|
||||||
// productName: this.goldmedal.productName,
|
|
||||||
// buyCount: "2",
|
|
||||||
// productId: "20030200",
|
|
||||||
// payAmount: "147.00",
|
|
||||||
// memberId: "844350",
|
|
||||||
// phoneNumber: "18112621098",
|
|
||||||
// couponId: "NGQ2022P12",
|
|
||||||
// couponTypeId: "4",
|
|
||||||
// couponName: "内购券",
|
|
||||||
// couponAmount: "0.3175",
|
|
||||||
// couponCode: "0007792402",
|
|
||||||
// orderAddress: {
|
|
||||||
// addressPhoneNumber:orderAddress[0].recipientPhone,
|
|
||||||
// addressUserName:orderAddress[0].recipient,
|
|
||||||
// addressProvinceName: orderAddress[0].provinceName,
|
|
||||||
// addressCityName:orderAddress[0].cityName,
|
|
||||||
// addressCountyName: orderAddress[0].districtName,
|
|
||||||
// addressDetailInfo: orderAddress[0].detailAddress,
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// // {
|
|
||||||
// // productName: "幼猫全价粮",
|
|
||||||
// // buyCount: "2",
|
|
||||||
// // productId: "20030200",
|
|
||||||
// // payAmount: "147.00",
|
|
||||||
// // memberId: "844350",
|
|
||||||
// // phoneNumber: "18112621098",
|
|
||||||
// // couponId: "NGQ2022P12",
|
|
||||||
// // couponTypeId: "4",
|
|
||||||
// // couponName: "内购券",
|
|
||||||
// // couponAmount: "0.3175",
|
|
||||||
// // couponCode: "0007792402",
|
|
||||||
// // orderAddress: {
|
|
||||||
// // addressPhoneNumber: "13602898745",
|
|
||||||
// // addressUserName: "张三",
|
|
||||||
// // addressProvinceName: "江苏省",
|
|
||||||
// // addressCityName: "无锡市",
|
|
||||||
// // addressCountyName: "江阴市",
|
|
||||||
// // addressDetailInfo: "东苑一村",
|
|
||||||
// // },
|
|
||||||
// // },
|
|
||||||
// ];
|
|
||||||
// let res = await generateOrderWX(postData);
|
|
||||||
// if (res.success) {
|
|
||||||
// let payData=res.data
|
|
||||||
let userPayData={
|
|
||||||
postData:postData,
|
|
||||||
wxPay:'weixin://wxpay/bizpayurl?pr=4RJbokxzz'
|
|
||||||
|
|
||||||
}
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
userPayData: userPayData,
|
wxdata:userdata
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
async canceldanhao(orderNumber){
|
async canceldanhao(orderNumber){
|
||||||
let data=await userin(orderNumber);
|
let data=await userin(orderNumber);
|
||||||
@ -318,14 +199,11 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.goldmedal = this.$route.query.list;
|
this.addressstype = this.$route.query.stype;
|
||||||
console.log(this.$route.query.list);
|
this.orderNumber=this.$route.query.orderNumber;
|
||||||
this.getAddressList();
|
this.canceldanhao(this.orderNumber)
|
||||||
// this.addressstype = this.$route.query.stype;
|
console.log(this.$refs.rccolor)
|
||||||
// this.orderNumber = this.$route.query.orderNumber;
|
this.$refs.rccolor.style.background='gray';
|
||||||
// this.canceldanhao(this.orderNumber);
|
|
||||||
// console.log(this.$refs.rccolor);
|
|
||||||
// this.$refs.rccolor.style.background = "gray";
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
|
@ -1,320 +1,578 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page_modules">
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="cont_modules">
|
<div class="rc-main">
|
||||||
<tabs></tabs>
|
<div class="online" style="height:3px;width:93%;margin:0 auto;background:#DDDDDD;margin-top:0.23rem"></div>
|
||||||
<el-row class="order_info">
|
<div class="rc-hearder">
|
||||||
<el-col :span="6" class="ph_hidden">
|
<div class="rc-userpay">
|
||||||
<ul class="li_inline">
|
<div class="paysucess">
|
||||||
<li class="sucess_img">
|
<span>订单提交成功等待付款</span>
|
||||||
<img src="../../assets/image/usersucess.png" alt="" />
|
|
||||||
</li>
|
|
||||||
<li class="ready">
|
|
||||||
<p>订单提交成功</p>
|
|
||||||
<p>等待付款</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" class="ph_hidden"> </el-col>
|
|
||||||
<el-col :span="6" class="ready_right">
|
|
||||||
<div class="inline_right">
|
|
||||||
<p>付款金额:</p>
|
|
||||||
<p class="price">{{ info.userprice }}</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="inline_right">
|
<div class="rc-all">
|
||||||
<p>收货信息:</p>
|
<div class="rc-payprice">
|
||||||
<p>{{ info.userinformation }}</p>
|
<span>付款金额:</span>
|
||||||
|
<i>{{ userprice }}</i>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
<div class="rc-receiving">
|
||||||
</el-row>
|
<span>收货信息:</span>
|
||||||
|
<i>{{ userinformation }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc_contline"></div>
|
|
||||||
<div class="cont_modules">
|
|
||||||
<div class="pay_title color_red">请选择支付方式</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc_contline"></div>
|
<div class="online" style="height:3px;width:100%;background:#DDDDDD;"></div>
|
||||||
<div class="cont_modules">
|
<div class="rc-usermaina">
|
||||||
<div class="pay_list">
|
<div class="rc-title" id="qrcode" ref="qrcode" >
|
||||||
<ul>
|
</div>
|
||||||
<li
|
</div>
|
||||||
class="pay_item"
|
|
||||||
|
</div>
|
||||||
|
<div class="rc-paystype">
|
||||||
|
<span>请选择支付方式</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="online" style="height:3px;width:100%;background:#DDDDDD;"></div>
|
||||||
|
<div class="paystype">
|
||||||
|
<div
|
||||||
|
class="payAlipay"
|
||||||
v-for="(item, index) in userpaystype"
|
v-for="(item, index) in userpaystype"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="selectGoods(item, index)"
|
@click="selectGoods(item, index)"
|
||||||
:class="activeIndex == index ? 'active' : ''"
|
:class="activeIndex == index ? 'active' : 'unactive'"
|
||||||
>
|
>
|
||||||
|
<div class="rc-payype">
|
||||||
<img :src="item.payimage" alt="" />
|
<img :src="item.payimage" alt="" />
|
||||||
<span>{{ item.paytype }}支付</span>
|
<span>{{ item.price }}</span>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
<div class="user-righticon">
|
||||||
|
<img src="../../assets/image/rc-left.png" alt="" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="paycord">
|
|
||||||
<div id="qrcode" ref="qrcode" class="qrcode"></div>
|
<div class="paycord" @click="usershow()" id="qrcode" ref="qrcode">
|
||||||
<span>{{ paytype }}扫一扫立即支付</span>
|
<!-- <img src="../../assets/image/rc-discount.png" alt="" />
|
||||||
|
<span>微信扫一扫立即支付</span> -->
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogSuccess"
|
:visible.sync="dialogInfo1"
|
||||||
@close="closeDialogSuccess"
|
hegight="700px"
|
||||||
|
@close='closeDialog'
|
||||||
>
|
>
|
||||||
<div class="tc dl_cont">
|
|
||||||
<div class="dl_img">
|
<div class="rc-header">
|
||||||
<img src="../../assets/image/usersucess.png" alt="" />
|
<div class="rc-titled" >
|
||||||
|
<img src="../../assets/image/usersucess.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<h3 class="title">支付成功</h3>
|
<div class="rc-logmain">
|
||||||
<p>您的商品我们正在抓紧打包,请耐心等候!</p>
|
<h3>支付成功</h3>
|
||||||
<div class="line_dashed"></div>
|
<span>{{usermessage}}</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="userer">
|
<div class="userer">
|
||||||
<img
|
|
||||||
width="210"
|
<img src="../../assets/image/rc-discount.png" alt="">
|
||||||
height="210"
|
<span>微信扫一扫,识别二维码</span>
|
||||||
src="../../assets/image/rc-discount.png"
|
<i>加入社群0元试用商品随单发放</i>
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
<p>微信扫一扫,识别二维码</p>
|
|
||||||
<p class="tips">加入社群0元试用商品随单发放</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
|
||||||
<el-dialog
|
|
||||||
:visible.sync="dialogFail"
|
|
||||||
@close="closeDialogFail"
|
|
||||||
>
|
|
||||||
<div class="tc dl_cont">
|
|
||||||
<div class="dl_img">
|
|
||||||
<img src="../../assets/pay/fail.png" alt="" />
|
|
||||||
</div>
|
|
||||||
<h3 class="title">支付失败</h3>
|
|
||||||
<p>请返回商品结算页面重新支付</p>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import tabs from "@/components/tabs.vue";
|
import QRCode from 'qrcodejs2'
|
||||||
import QRCode from "qrcodejs2";
|
import { generateOrderWX } from "../../ajax/getData";
|
||||||
|
|
||||||
import { generateOrderAlipay, updateOrderWX } from "../../ajax/getData";
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
userdata:null,
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
isSucess: false,
|
usermessage:'您的商品我们正在抓紧打包,请耐心等候!',
|
||||||
paytype: "微信",
|
userprice: "¥167.00",
|
||||||
|
userinformation: "李某某 151****7917",
|
||||||
userpaystype: [
|
userpaystype: [
|
||||||
{
|
{
|
||||||
paytype: "微信",
|
price: "支付宝支付",
|
||||||
payimage: require("../../assets/pay/wx.png"),
|
payimage: require("../../assets/image/rc-cat.png"),
|
||||||
|
catimage: require("../../assets/image/rc-left.png"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
paytype: "支付宝",
|
price: "微信支付",
|
||||||
payimage: require("../../assets/pay/zfb.png"),
|
payimage: require("../../assets/image/rc-cat.png"),
|
||||||
|
catimage: require("../../assets/image/rc-left.png"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
dialogSuccess: true,
|
dialogInfo1:false,
|
||||||
dialogFail: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
// 总价计算
|
|
||||||
info() {
|
|
||||||
let obj = {
|
|
||||||
userprice: this.$route.query.userPayData.postData[0].payAmount,
|
|
||||||
userinformation:
|
|
||||||
this.$route.query.userPayData.postData[0].orderAddress
|
|
||||||
.addressUserName +
|
|
||||||
" " +
|
|
||||||
this.$route.query.userPayData.postData[0].orderAddress
|
|
||||||
.addressPhoneNumber,
|
|
||||||
};
|
|
||||||
return obj;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.qrcode(this.$route.query.userPayData.wxPay);
|
this.userdata=this.$route.query.wxdata;
|
||||||
|
this.userpay(this.userdata);
|
||||||
|
console.log(this.userdata);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
|
||||||
|
this.userpay();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeDialogSuccess() {
|
|
||||||
|
closeDialog(){
|
||||||
this.qrcode=null;
|
this.qrcode=null;
|
||||||
this.$router.push({
|
console.log('关闭的')
|
||||||
path: "/index",
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
closeDialogFail() {
|
|
||||||
this.qrcode = null;
|
async userpay(userdata) {
|
||||||
this.$router.push({
|
|
||||||
path: "/personal/useraddress",
|
console.log("-----");
|
||||||
});
|
let data = await generateOrderWX();
|
||||||
|
console.log();
|
||||||
|
this.qrcode(userdata);
|
||||||
},
|
},
|
||||||
qrcode (e) {
|
qrcode (e) {
|
||||||
let qrcode = new QRCode("qrcode", {
|
console.log(e);
|
||||||
width: 260, // 设置宽度,单位像素
|
let qrcode = new QRCode('qrcode',{
|
||||||
height: 260, // 设置高度,单位像素
|
width: 150, // 设置宽度,单位像素
|
||||||
text: e, // 设置二维码内容或跳转地址
|
height: 150, // 设置高度,单位像素
|
||||||
});
|
text: e// 设置二维码内容或跳转地址
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
async selectGoods(item, index) {
|
selectGoods(item,index){
|
||||||
this.activeIndex = index;
|
let _that=this
|
||||||
this.paytype = item.paytype;
|
_that.dialogInfo1=true;
|
||||||
if (index == 1) {
|
_that.activeIndex=index;
|
||||||
//支付宝
|
if(item.price=='微信支付'){
|
||||||
let res = await generateOrderAlipay(
|
// this.userpay();
|
||||||
this.$route.query.userPayData.postData
|
|
||||||
);
|
|
||||||
if (res.success) {
|
|
||||||
this.qrcode(res.data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//支付监听
|
usershow(){
|
||||||
async updateOrderWX() {
|
console.log('这是支付')
|
||||||
let res = await updateOrderWX();
|
this.dialogInfo1=true;
|
||||||
if (res.success) {
|
|
||||||
this.dialogSuccess = true;
|
|
||||||
clearInterval(this.time);
|
|
||||||
} else {
|
|
||||||
this.dialogFail = true;
|
|
||||||
clearInterval(this.time);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
tabs,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped >
|
<style lang="less" scoped >
|
||||||
.sucess_img {
|
@media screen and (max-width: 768px) {
|
||||||
|
|
||||||
|
.rc-usermaina{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.rc-userpay{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
/deep/.el-dialog {
|
||||||
|
width:80%;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
.rc-header{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
h3{
|
||||||
|
color:#333333;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
.rc-title{
|
||||||
|
display: flex;
|
||||||
|
margin-top: 30px;
|
||||||
|
display: none;
|
||||||
|
img{
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
margin-right: 10px;
|
margin-left: 40px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.order_info {
|
|
||||||
padding: 10px 0;
|
|
||||||
}
|
}
|
||||||
.info {
|
.rc-titled{
|
||||||
|
img{
|
||||||
|
width: 96px;
|
||||||
|
height: 96px;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.userer{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
flex-direction: column;
|
||||||
}
|
align-items: center;
|
||||||
.ready {
|
img{
|
||||||
font-size: 20px;
|
width: 96px;
|
||||||
color: #e2001a;
|
height: 96px;
|
||||||
}
|
|
||||||
.ready_right {
|
|
||||||
line-height: 200%;
|
|
||||||
padding-top: 8px;
|
|
||||||
}
|
|
||||||
.price {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #e2001a;
|
|
||||||
}
|
|
||||||
.pay_title {
|
|
||||||
font-size: 26px;
|
|
||||||
padding: 26px 0;
|
|
||||||
border-bottom: 1px solid #d7d7d7;
|
|
||||||
}
|
|
||||||
.pay_list {
|
|
||||||
padding: 20px 0;
|
|
||||||
.pay_item {
|
|
||||||
float: left;
|
|
||||||
margin-right: 20px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 1px solid #333333;
|
flex-direction: column;
|
||||||
padding: 5px 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
&.active {
|
|
||||||
border: 1px solid #e2001a;
|
|
||||||
color: #e2001a;
|
|
||||||
}
|
}
|
||||||
img {
|
|
||||||
margin-right: 5px;
|
span{
|
||||||
width: 24px;
|
font-size: 16px;
|
||||||
height: 24px;
|
|
||||||
|
color: #333333;
|
||||||
}
|
}
|
||||||
}
|
i{
|
||||||
&::after {
|
font-size: 18px;
|
||||||
content: "";
|
font-style: normal;
|
||||||
display: block;
|
display: block;
|
||||||
clear: both;
|
margin-top: 32px;
|
||||||
|
color: #E1001A;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.rc-main {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 24%;
|
||||||
|
.paysucess{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.paycord{
|
.paycord{
|
||||||
padding: 10px;
|
display: none;
|
||||||
text-align: center;
|
|
||||||
.qrcode {
|
|
||||||
margin: 0 auto 10px;
|
|
||||||
width: 260px;
|
|
||||||
height: 260px;
|
|
||||||
}
|
}
|
||||||
}
|
.rc-hearder {
|
||||||
.dl_width {
|
width: 93%;
|
||||||
width: 440px;
|
|
||||||
}
|
|
||||||
.dl_cont {
|
|
||||||
color: #333;
|
|
||||||
margin-top: -10px;
|
|
||||||
.title {
|
|
||||||
font-size: 26px;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
}
|
|
||||||
.line_dashed {
|
|
||||||
border-bottom: 2px dashed #999999;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
.dl_img {
|
|
||||||
img {
|
|
||||||
width: 90px;
|
|
||||||
height: 90px;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
i em {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
.rc-userpay {
|
||||||
|
width: 100%;
|
||||||
|
// height: 96px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
.rc-all{
|
||||||
|
height: 96px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
// display: none;
|
||||||
|
}
|
||||||
|
.rc-payprice {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
span {
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-size: 14px;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-receiving {
|
||||||
|
margin-top: 8px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
span {
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
color: #666666;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-size: 16px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 53px;
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rc-paystype {
|
||||||
|
height:64px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.payAlipay {
|
||||||
|
.user-righticon{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
img{
|
||||||
|
width: 8px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 80px;
|
||||||
|
border-bottom: 1px solid #d8d8d8;
|
||||||
|
.rc-payype {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
img {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
||||||
|
.rc-usermaina{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/.el-dialog {
|
||||||
|
width: 440px;
|
||||||
|
height: 677px;
|
||||||
|
}
|
||||||
|
.rc-header{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
h3{
|
||||||
|
color:#333333;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
.rc-titled{
|
||||||
|
img{
|
||||||
|
width: 96px;
|
||||||
|
height: 96px;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rc-title{
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -75px;
|
||||||
|
display: block;
|
||||||
|
top: 59%;
|
||||||
|
img{
|
||||||
|
width: 96px;
|
||||||
|
height: 96px;
|
||||||
|
|
||||||
}
|
}
|
||||||
padding: 0px 0 20px;
|
|
||||||
}
|
}
|
||||||
.userer{
|
.userer{
|
||||||
img{
|
img{
|
||||||
margin: 0 auto;
|
width: 210px;
|
||||||
|
height: 210px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span{
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
color: #333333;
|
||||||
}
|
}
|
||||||
.tips {
|
i{
|
||||||
color: #e2001a;
|
|
||||||
margin-top: 30px;
|
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
display: block;
|
||||||
|
margin-top: 32px;
|
||||||
|
color: #E1001A;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.ph_hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
.ready_right {
|
.rc-main {
|
||||||
|
.active {
|
||||||
|
border: 1px solid #E2001A;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 200px;
|
||||||
|
height: 56px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.unactive {
|
||||||
|
border:1px solid #3D3D3D;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 200px;
|
||||||
|
height: 56px;
|
||||||
|
}
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px;
|
.rc-hearder {
|
||||||
|
width: 93%;
|
||||||
|
margin: 0 auto;
|
||||||
|
i em {
|
||||||
|
font-style: normal;
|
||||||
}
|
}
|
||||||
.pay_title {
|
.rc-userpay {
|
||||||
padding: 10px;
|
width: 100%;
|
||||||
}
|
height: 96px;
|
||||||
.pay_list {
|
// display: flex;
|
||||||
padding: 0;
|
// justify-content: space-between;
|
||||||
.pay_item {
|
.paysucess{
|
||||||
float: none;
|
|
||||||
border: none;
|
display: flex;
|
||||||
border-bottom: 1px solid #d7d7d7;
|
|
||||||
height: 50px;;
|
|
||||||
margin-right: 0;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: left;
|
span{
|
||||||
justify-content: left; &.active {
|
font-size: 20px;
|
||||||
border: none;
|
display: block;
|
||||||
border-bottom: 1px solid #d7d7d7;
|
width: 61%;
|
||||||
|
color: #E2001A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-all{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.rc-payprice {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
span {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-receiving {
|
||||||
|
margin-top: 8px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
span {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
color: #666666;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-size: 16px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 53px;
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.paystype{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.rc-paystype {
|
||||||
|
height: 100px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
font-size: 26px;
|
||||||
|
|
||||||
|
color: #E2001A;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.payAlipay {
|
||||||
|
|
||||||
|
margin-left: 20px;
|
||||||
|
.user-righticon{
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
img{
|
||||||
|
width: 8px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 56px;
|
||||||
|
|
||||||
|
.rc-payype {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #E2001A;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
img {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.paycord{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
img{
|
||||||
|
width: 260px;
|
||||||
|
height: 260px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
font-size: 20px;
|
||||||
|
display: block;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.paycord{ display:none;}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -73,64 +73,6 @@
|
|||||||
<div class="online"></div>
|
<div class="online"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<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
|
|
||||||
"
|
|
||||||
v-for="(item, index) in productAttachmentList"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<div class="rc-img--square">
|
|
||||||
<img :src="item.attachmentPath" alt="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Thunb images end-->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="ts-product-header rc-column"
|
|
||||||
id="328b2e5f-6904-4cac-9709-51ed18d2500f"
|
|
||||||
>
|
|
||||||
<div class="usermain" v-for="(item, index) in newlist" :key="index">
|
|
||||||
<div class="online bold rc-md-down"></div>
|
|
||||||
<div class="rc-main">
|
|
||||||
<div class="rc-title">
|
|
||||||
<h2>{{ item.productName }}</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="online rc-md-down"></div>
|
|
||||||
<div class="rc-main">
|
|
||||||
<div class="productdetails">
|
|
||||||
<div class="rc-productdetail">
|
|
||||||
<i class="ts-row-title">商品价格:</i>
|
|
||||||
<span class="ts-realprice">¥{{ item.rsp }}</span>
|
|
||||||
<span class="ts-remove ts-ecprice"
|
|
||||||
>¥{{ item.ecPrice }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="rc-productdetai">
|
|
||||||
<div>
|
|
||||||
<i class="ts-row-title">活动促销:</i>
|
|
||||||
<span>全场商品限时优惠</span>
|
|
||||||
</div>
|
|
||||||
<em class="ts-right-arr" @click="userget()">立即领取</em>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="online bold rc-md-down"></div>
|
|
||||||
<div class="rc-main rc-md-up">
|
|
||||||
<div class="online"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="rc-productdeta" v-if="userbuy">
|
<div class="rc-productdeta" v-if="userbuy">
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<div class="rc-prodtop">
|
<div class="rc-prodtop">
|
||||||
@ -141,7 +83,7 @@
|
|||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</em> -->
|
</em> -->
|
||||||
|
|
||||||
<em class="active">
|
<em class='active'>
|
||||||
{{ item.specifications }}
|
{{ item.specifications }}
|
||||||
</em>
|
</em>
|
||||||
</div>
|
</div>
|
||||||
@ -149,17 +91,9 @@
|
|||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<div class="rc-produnnum">
|
<div class="rc-produnnum">
|
||||||
<div><i class="ts-row-title">商品数量:</i></div>
|
<div><i class="ts-row-title">商品数量:</i></div>
|
||||||
<img
|
<img src="../../assets/image/userjian.png" alt="" @click="sub()" />
|
||||||
src="../../assets/image/userjian.png"
|
|
||||||
alt=""
|
|
||||||
@click="sub()"
|
|
||||||
/>
|
|
||||||
<strong>{{sales_num}}</strong>
|
<strong>{{sales_num}}</strong>
|
||||||
<img
|
<img src="../../assets/image/userjia.png" alt="" @click="plus()" />
|
||||||
src="../../assets/image/userjia.png"
|
|
||||||
alt=""
|
|
||||||
@click="plus()"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-main rc-md-up">
|
<div class="rc-main rc-md-up">
|
||||||
@ -167,63 +101,60 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="online rc-md-down"></div>
|
<div class="online rc-md-down"></div>
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<div class="rc-button" v-if="userbuy">
|
|
||||||
<span @click="usertanchu(item, 0)">加入购物车</span>
|
|
||||||
<span @click="usertanchu(item, 1)">立即购买</span>
|
|
||||||
</div>
|
|
||||||
<div class="certification">
|
<div class="certification">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span
|
<span
|
||||||
><i class="ts-row-title">服务说明:</i
|
><i class="ts-row-title">服务说明:</i><i>当天14点前完成付款即日安排发货;当天14点后完成付款次日安排发货(周日及国家法定节假日顺延至下一个工作日发货,活动期间发货或有延迟敬请理解)</i></span
|
||||||
><i
|
|
||||||
>当天14点前完成付款即日安排发货;当天14点后完成付款次日安排发货(周日及国家法定节假日顺延至下一个工作日发货,活动期间发货或有延迟敬请理解)</i
|
|
||||||
></span
|
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span
|
<span
|
||||||
><i class="ts-row-title">商品运费:</i
|
><i class="ts-row-title">商品运费:</i><i>全场包邮(港澳除外)</i></span
|
||||||
><i>全场包邮(港澳除外)</i></span
|
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span
|
<span
|
||||||
><i class="ts-row-title">商品编号:</i
|
><i class="ts-row-title">商品编号:</i><i>{{ item.brandCode }}</i></span
|
||||||
><i>{{ item.brandCode }}</i></span
|
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="rc-button" v-if="!userbuy">
|
||||||
|
<span @click="usertanchu(item,0)">加入购物车</span>
|
||||||
|
<span @click="usertanchu(item,1)">立即购买</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold rc-md-down"></div>
|
<div class="online bold rc-md-down"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-footimage rc-main">
|
<div class="rc-footimage rc-main">
|
||||||
<!-- <img :src="item.showImgFile" alt="" /> -->
|
<img :src=item.showImgFile alt="">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-fixright" >
|
<div class="rc-fixright" >
|
||||||
<ul >
|
<ul >
|
||||||
<li
|
<li v-for="(userfixed,index) in fixedlist" :key="index" @click="lianxi(userfixed,index)">
|
||||||
v-for="(userfixed, index) in fixedlist"
|
<img :src="userfixed.catimage" alt="">
|
||||||
:key="index"
|
|
||||||
@click="lianxi(userfixed, index)"
|
|
||||||
>
|
|
||||||
<img :src="userfixed.catimage" alt="" />
|
|
||||||
<span> {{userfixed.title}}</span>
|
<span> {{userfixed.title}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tuntop" @click="toTop" v-show="gotop">
|
<div class="tuntop" @click="toTop" v-show="gotop">
|
||||||
<img src="../../assets/image/turntop.png" alt="" />
|
<img src="../../assets/image/turntop.png" alt="">
|
||||||
<span>回到顶部</span>
|
<span>回到顶部</span>
|
||||||
</div>
|
</div>
|
||||||
</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"
|
||||||
|
hegight="700px"
|
||||||
|
@close='userclose'
|
||||||
|
>
|
||||||
<div class="rs-dis">
|
<div class="rs-dis">
|
||||||
<div
|
<div
|
||||||
class="rc-discount"
|
class="rc-discount"
|
||||||
@ -233,40 +164,52 @@
|
|||||||
<img :src="userimage" alt="" />
|
<img :src="userimage" alt="" />
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<div class="rc-left">
|
<div class="rc-left">
|
||||||
<div><i>¥</i><span v-text="item.price"></span></div>
|
<div>
|
||||||
<p v-text="item.pricestype"></p>
|
<i>¥</i><span>{{ item.couponAmount }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<i>
|
<i>
|
||||||
{{ item.special }}
|
{{ item.couponDesc }}
|
||||||
</i>
|
</i>
|
||||||
<div >
|
<div class="rc-main" id="rc-main">
|
||||||
<span>有效期</span>
|
<span>有效期</span>
|
||||||
<em>{{ item.starttime }}</em>
|
<em>{{ item.validTo }}</em>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-footer">
|
<div class="rc-footer">
|
||||||
<span @click="usergetconf(item)">立即领取</span>
|
<span @click="usergetconf(item)">立即领取</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :visible.sync="dialogInfo2" @close="userclose">
|
<el-dialog
|
||||||
|
:visible.sync="dialogInfo2"
|
||||||
|
@close='userclose'
|
||||||
|
>
|
||||||
<div class="rc-headera">
|
<div class="rc-headera">
|
||||||
<div class="rc-title">
|
<div class="rc-title">
|
||||||
<img src="../../assets/error.png" alt="" />
|
<img src="../../assets/error.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-logmain">
|
<div class="rc-logmain">
|
||||||
<h3>温馨提示</h3>
|
<h3>温馨提示</h3>
|
||||||
<span>请先点击下方进行登录/注册</span>
|
<span>请先点击下方进行登录/注册</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<nuxt-link :to="`/userlogin/login/`">
|
<nuxt-link :to="`/userlogin/login/`">
|
||||||
<div class="userer">
|
<div class="userer">
|
||||||
<span>立即登录</span>
|
<span>立即登录</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<div class="rc-button rc-md-down">
|
<div class="rc-button rc-md-down">
|
||||||
<span @click="usertanchu(item,0)">加入购物车</span>
|
<span @click="usertanchu(item,0)">加入购物车</span>
|
||||||
@ -281,13 +224,7 @@ import tabs from "@/components/tabs.vue";
|
|||||||
import unlogin from "~/components/unlogin.vue";
|
import unlogin from "~/components/unlogin.vue";
|
||||||
import { mapMutations } from "vuex";
|
import { mapMutations } from "vuex";
|
||||||
import Myfooter from "~/components/rc-footer.vue";
|
import Myfooter from "~/components/rc-footer.vue";
|
||||||
import {
|
import { goodsmessage,getConfig,postCourseId,getdraw,alldiscount } from "../../ajax/getData";
|
||||||
goodsmessage,
|
|
||||||
getConfig,
|
|
||||||
postCourseId,
|
|
||||||
getdraw,
|
|
||||||
alldiscount,
|
|
||||||
} from "../../ajax/getData";
|
|
||||||
const settings = require("@/config");
|
const settings = require("@/config");
|
||||||
export default {
|
export default {
|
||||||
// middleware: 'metaTitle',
|
// middleware: 'metaTitle',
|
||||||
@ -335,53 +272,23 @@ export default {
|
|||||||
{
|
{
|
||||||
title: "购物车",
|
title: "购物车",
|
||||||
catimage: require("../../assets/buy.png"),
|
catimage: require("../../assets/buy.png"),
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "在线客服",
|
title: "在线客服",
|
||||||
catimage: require("../../assets/service.png"),
|
catimage: require("../../assets/service.png"),
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "营养专家",
|
title: "营养专家",
|
||||||
catimage: require("../../assets/consult.png"),
|
catimage: require("../../assets/consult.png"),
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
productAttachmentList: [
|
|
||||||
{
|
|
||||||
id: 15901,
|
|
||||||
attachmentType: 1,
|
|
||||||
attachmentPath:
|
|
||||||
"https://miniapp-product.royalcanin.com.cn/rcmini/upload/1574384849415_BLUWOs.jpg",
|
|
||||||
sort: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 15902,
|
|
||||||
attachmentType: 1,
|
|
||||||
attachmentPath:
|
|
||||||
"https://miniapp-product.royalcanin.com.cn/rcmini/upload/1574384851821_jFleXA.jpg",
|
|
||||||
sort: 2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 15903,
|
|
||||||
attachmentType: 1,
|
|
||||||
attachmentPath:
|
|
||||||
"https://miniapp-product.royalcanin.com.cn/rcmini/upload/1574384853824_GrxAIp.jpg",
|
|
||||||
sort: 3,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 15904,
|
|
||||||
attachmentType: 1,
|
|
||||||
attachmentPath:
|
|
||||||
"https://miniapp-product.royalcanin.com.cn/rcmini/upload/1574384856077_9FbE1z.jpg",
|
|
||||||
sort: 4,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 15905,
|
|
||||||
attachmentType: 1,
|
|
||||||
attachmentPath:
|
|
||||||
"https://miniapp-product.royalcanin.com.cn/rcmini/upload/1574384859055_iPkFXi.jpg",
|
|
||||||
sort: 5,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
newlist: [
|
newlist: [
|
||||||
{
|
{
|
||||||
price: "167.00",
|
price: "167.00",
|
||||||
@ -402,8 +309,10 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
tabs,
|
tabs,
|
||||||
@ -436,32 +345,8 @@ this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tabs,
|
|
||||||
magnifier,
|
|
||||||
unlogin,
|
|
||||||
Myfooter,
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
// window.addEventListener("scroll", this.handleScroll, true);
|
|
||||||
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
|
||||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
|
||||||
let stype = this.$route.query.stype;
|
|
||||||
this.productCode = this.$route.query.productCode;
|
|
||||||
console.log(this.productCode);
|
|
||||||
this.userquery(this.productCode);
|
|
||||||
console.log(this.userlistmenu);
|
|
||||||
this.$nextTick(() => {});
|
|
||||||
if (stype == 1) {
|
|
||||||
this.userbuy = true;
|
|
||||||
} else if (stype == 2) {
|
|
||||||
console.log("这是要消失的");
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.userbuy = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["changemessage"]),
|
...mapMutations(["changemessage"]),
|
||||||
handleScroll(e)
|
handleScroll(e)
|
||||||
@ -482,62 +367,46 @@ this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
|||||||
},
|
},
|
||||||
lianxi(item,index){
|
lianxi(item,index){
|
||||||
console.log(item,index);
|
console.log(item,index);
|
||||||
if (item.title == "在线客服") {
|
if(item.title=='在线客服'){
|
||||||
var option = {
|
var option = {
|
||||||
customer: {
|
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||||
id: "",
|
}
|
||||||
name: "",
|
|
||||||
email: "",
|
|
||||||
mobile: "",
|
|
||||||
memberId: "999999",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
dis_livchat(option);
|
dis_livchat(option);
|
||||||
}
|
}
|
||||||
if (item.title == "购物车") {
|
if(item.title=='购物车'){
|
||||||
console.log("---12314");
|
console.log('---12314');
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "../../myorder/userrecord",
|
path: "../../myorder/userrecord",
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (item.title == "营养专家") {
|
if(item.title=='营养专家'){
|
||||||
var option = {
|
var option = {
|
||||||
customer: {
|
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||||
id: "",
|
}
|
||||||
name: "",
|
|
||||||
email: "",
|
|
||||||
mobile: "",
|
|
||||||
memberId: "999999",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
dis_livchat(option);
|
dis_livchat(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
toTop() {
|
toTop() {
|
||||||
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
// 实现滚动效果
|
// 实现滚动效果
|
||||||
const timeTop = setInterval(() => {
|
const timeTop = setInterval(() => {
|
||||||
document.body.scrollTop =
|
document.body.scrollTop = document.documentElement.scrollTop = top -= 400;
|
||||||
document.documentElement.scrollTop =
|
|
||||||
top -=
|
|
||||||
400;
|
|
||||||
if (top <= 0) {
|
if (top <= 0) {
|
||||||
clearInterval(timeTop);
|
clearInterval(timeTop);
|
||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
showmesg(){
|
showmesg(){
|
||||||
console.log("-----");
|
console.log('-----');
|
||||||
this.toTop();
|
this.toTop();
|
||||||
},
|
},
|
||||||
toTop() {
|
toTop() {
|
||||||
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
// 实现滚动效果
|
// 实现滚动效果
|
||||||
const timeTop = setInterval(() => {
|
const timeTop = setInterval(() => {
|
||||||
document.body.scrollTop =
|
document.body.scrollTop = document.documentElement.scrollTop = top -= 400;
|
||||||
document.documentElement.scrollTop =
|
|
||||||
top -=
|
|
||||||
400;
|
|
||||||
if (top <= 0) {
|
if (top <= 0) {
|
||||||
clearInterval(timeTop);
|
clearInterval(timeTop);
|
||||||
}
|
}
|
||||||
@ -547,7 +416,7 @@ this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
|||||||
//领取优惠券
|
//领取优惠券
|
||||||
usergetconf(item){
|
usergetconf(item){
|
||||||
console.log(item);
|
console.log(item);
|
||||||
if (this.usermessage.data !== "" || this.usermessage.data !== undefined) {
|
if(this.usermessage.data!==''||this.usermessage.data!==undefined){
|
||||||
this.getconf(this.usermessage.data.id,item.couponId);
|
this.getconf(this.usermessage.data.id,item.couponId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -556,37 +425,45 @@ this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
|||||||
async getconf(memberId,couponId) {
|
async getconf(memberId,couponId) {
|
||||||
let data = await getConfig(memberId,couponId);
|
let data = await getConfig(memberId,couponId);
|
||||||
if(data){
|
if(data){
|
||||||
|
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
message: data.msg,
|
message: data.msg
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// changeName(newName){
|
// changeName(newName){
|
||||||
// this.name = newName;
|
// this.name = newName;
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
userclose(){
|
userclose(){
|
||||||
console.log("这是关闭的");
|
console.log('这是关闭的');
|
||||||
this.userlist=[];
|
this.userlist=[];
|
||||||
},
|
},
|
||||||
async userquery() {
|
async userquery() {
|
||||||
|
console.log("-----");
|
||||||
|
|
||||||
let data = await goodsmessage(this.productCode);
|
let data = await goodsmessage(this.productCode);
|
||||||
if(data){
|
if(data){
|
||||||
this.newlist=data.data;
|
this.newlist=data.data;
|
||||||
|
|
||||||
}
|
}
|
||||||
this.productAttachmentList = this.newlist[0].productAttachmentList;
|
|
||||||
|
|
||||||
this.userlistmenu=this.newlist[0].productAttachmentList;
|
this.userlistmenu=this.newlist[0].productAttachmentList;
|
||||||
let changemess=JSON.stringify(this.userlistmenu);
|
let changemess=JSON.stringify(this.userlistmenu);
|
||||||
// console.log(changemess);
|
console.log(changemess);
|
||||||
// this.productAttachmentList = this.userlistmenu;
|
|
||||||
this.changemessage({ data: changemess });
|
this.changemessage({ data: changemess });
|
||||||
this.parent_msg=this.userlistmenu;
|
this.parent_msg=this.userlistmenu;
|
||||||
// console.log(this.userlistmenu);
|
console.log( this.userlistmenu)
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取用户领取的优惠券
|
//获取用户领取的优惠券
|
||||||
@ -595,6 +472,7 @@ this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
|||||||
if(data){
|
if(data){
|
||||||
this.drawlist=data.data;
|
this.drawlist=data.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取所有的优惠券
|
//获取所有的优惠券
|
||||||
@ -608,33 +486,40 @@ this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
|||||||
let alllist=[];
|
let alllist=[];
|
||||||
this.userlist=this.alldraw.data;
|
this.userlist=this.alldraw.data;
|
||||||
this.userlist.forEach((element,index)=>{
|
this.userlist.forEach((element,index)=>{
|
||||||
if (typeof element.productCodes == "string") {
|
if(typeof element.productCodes=='string'){
|
||||||
userlist.push(element);
|
userlist.push(element);
|
||||||
// let s=element.productCodes.split(',');
|
// let s=element.productCodes.split(',');
|
||||||
// console.log(s.indexOf(this.productCode) != -1 )
|
// console.log(s.indexOf(this.productCode) != -1 )
|
||||||
// console.log('这是字符串')
|
// console.log('这是字符串')
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
})
|
||||||
let menualist=[];
|
let menualist=[];
|
||||||
userlist.filter((item) => {
|
userlist.filter(item=>{
|
||||||
console.log(item);
|
console.log(item);
|
||||||
item.productCodes = item.productCodes.split(",");
|
item.productCodes=item.productCodes.split(',')
|
||||||
item.productCodes.forEach((element) => {
|
item.productCodes.forEach(element=>{
|
||||||
if(element==this.productCode &&item.activityId!==10){
|
if(element==this.productCode &&item.activityId!==10){
|
||||||
console.log(element);
|
console.log(element)
|
||||||
console.log(this.productCode);
|
console.log(this.productCode)
|
||||||
menualist.push(item);
|
menualist.push(item);
|
||||||
|
|
||||||
console.log("----");
|
console.log('----');
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
|
||||||
// this.usernewlist = menualist;
|
|
||||||
// console.log(this.usernewlist);
|
})
|
||||||
|
this.usernewlist=menualist;
|
||||||
|
console.log(this.usernewlist);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
plus(num,index){
|
plus(num,index){
|
||||||
|
|
||||||
this.sales_num= parseInt(this.sales_num) + 1;
|
this.sales_num= parseInt(this.sales_num) + 1;
|
||||||
console.log( this.sales_num);
|
console.log( this.sales_num);
|
||||||
} ,
|
} ,
|
||||||
@ -642,9 +527,24 @@ this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
|||||||
sub(num,index){
|
sub(num,index){
|
||||||
if( this.sales_num <= 1){
|
if( this.sales_num <= 1){
|
||||||
this.sales_num = 1;
|
this.sales_num = 1;
|
||||||
} else {
|
}
|
||||||
|
else{
|
||||||
this.sales_num = parseInt(this.sales_num) - 1;
|
this.sales_num = parseInt(this.sales_num) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
async courseId(item) {
|
||||||
|
console.log(item);
|
||||||
|
console.log(this.usermessage);
|
||||||
|
// let userid=JSON.parse(location.getItem('userInfo'));
|
||||||
|
// let mobile=JSON.parse(location.getItem('userInfo'));
|
||||||
|
// console.log(userid,mobile);
|
||||||
|
let data = await postCourseId( this.productCode,this.sales_num,this.usermessage.data.id,this.usermessage.data.mobile,item.picFile,item.productName,item.basePrice,item.specifications);
|
||||||
|
if(data){
|
||||||
|
this.productlist=data;
|
||||||
|
}
|
||||||
|
console.log(data);
|
||||||
},
|
},
|
||||||
usertanchu(item,orderm){
|
usertanchu(item,orderm){
|
||||||
|
|
||||||
@ -688,44 +588,19 @@ usertanchu(item,orderm){
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
usertanchu(item, orderm) {
|
|
||||||
let user = localStorage.getItem("userInfo");
|
|
||||||
if (user == undefined || user == null || user == "") {
|
|
||||||
this.dialogInfo2 = true;
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.courseId(item);
|
|
||||||
if (orderm == 0) {
|
|
||||||
this.$message({
|
|
||||||
type: "warning",
|
|
||||||
message: "加入购物车成功",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (orderm == 1) {
|
|
||||||
this.$router.push({
|
|
||||||
path: "/myorder/userrecord",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
userget() {
|
|
||||||
let user = localStorage.getItem("userInfo");
|
|
||||||
if (user == undefined || user == null || user == "") {
|
|
||||||
this.dialogInfo2 = true;
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.userdraw(this.usermessage.data.mobile);
|
|
||||||
this.alldrawlist(this.usermessage.data.id);
|
|
||||||
this.dialogInfo1 = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectsearch(item, index) {
|
selectsearch(item, index) {
|
||||||
|
|
||||||
this.activeIndexa=index;
|
this.activeIndexa=index;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
onceproduct() {},
|
onceproduct(){
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user