mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
commit
ee970415ea
@ -56,7 +56,7 @@ export const getleckCourse = (name, offset) => {
|
||||
* 加入购物车
|
||||
*/
|
||||
|
||||
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment) => {
|
||||
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment, basePiont) => {
|
||||
var data = {
|
||||
buyCount: buyCount,
|
||||
memberId: memberId,
|
||||
@ -66,7 +66,8 @@ export const postCourseId = (productCode, buyCount, memberId, mobile, productImg
|
||||
productName: productName,
|
||||
productPrice: productPrice,
|
||||
specifications: specifications,
|
||||
leftAllotment: leftAllotment
|
||||
leftAllotment: leftAllotment,
|
||||
basePiont: basePiont
|
||||
}
|
||||
return fetch('/insertCartProductInfo', data, 'POST')
|
||||
}
|
||||
@ -78,11 +79,18 @@ export const isexistCart = (id, pet, address) => {
|
||||
return fetch('getCartProductInfo?memberId=' + id, data, 'POST')
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付监听
|
||||
*/
|
||||
export const monitorOrderNotify = (OrderNumber) => {
|
||||
var data = {}
|
||||
return fetch('monitorOrderNotify?OrderNumber=' + OrderNumber, data, 'POST')
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除购物车
|
||||
*/
|
||||
export const deleteCart = ( productCode) => {
|
||||
debugger;
|
||||
var data = {
|
||||
productCode
|
||||
}
|
||||
|
9
rc-busness/app.html
Normal file
9
rc-busness/app.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html {{ HTML_ATTRS }}>
|
||||
<head {{ HEAD_ATTRS }}>
|
||||
{{ HEAD }}
|
||||
</head>
|
||||
<body {{ BODY_ATTRS }}>
|
||||
{{ APP }}
|
||||
</body>
|
||||
</html>
|
56
rc-busness/app/views/error.html
Normal file
56
rc-busness/app/views/error.html
Normal file
@ -0,0 +1,56 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="" style='font-size:16px;'>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type="text/css">
|
||||
html,body{
|
||||
width:100%;
|
||||
height:100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.wrapper{
|
||||
width:100%;
|
||||
height:100%;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
h2{
|
||||
font-size: 2.5rem;
|
||||
line-height: 3.5rem;
|
||||
color:#e2001a;
|
||||
}
|
||||
a{
|
||||
color:#666;
|
||||
text-decoration: none;
|
||||
padding-bottom:.25rem;
|
||||
border-bottom: 1px solid #666;
|
||||
}
|
||||
a:hover {
|
||||
color:#e2001a;
|
||||
border-color: #e2001a;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="wrapper">
|
||||
<img src="./images/default.jpg">
|
||||
<div>
|
||||
<h2>检测到系统错误</h2>
|
||||
<div>
|
||||
请联系管理员或尝试其他操作
|
||||
<br/><br/>
|
||||
<a href="/">回到首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -4,6 +4,12 @@ body {
|
||||
line-height: 1.5;
|
||||
color: #666;
|
||||
}
|
||||
.el-message-box .el-button--primary{
|
||||
background-color: #e1001a !important;
|
||||
color:#fff;
|
||||
border:unset;
|
||||
}
|
||||
|
||||
.rc-menu--xs .rc-screen-reader{
|
||||
left:28%;
|
||||
}
|
||||
@ -311,7 +317,7 @@ picture {
|
||||
height: auto;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 30%;
|
||||
top: 40%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
|
||||
border-radius: .25rem;
|
||||
|
@ -433,7 +433,7 @@ ul li ol li em strong i {
|
||||
text-align: center;
|
||||
li{
|
||||
float: left;
|
||||
|
||||
cursor:pointer;
|
||||
}
|
||||
img{
|
||||
width: 96px;
|
||||
@ -464,6 +464,7 @@ ul li ol li em strong i {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.rc-buy{
|
||||
cursor: pointer;
|
||||
img{
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
|
@ -16,6 +16,9 @@
|
||||
background:#f6f6f6;
|
||||
}
|
||||
}
|
||||
.usercontshow.rc-max-width--xl{
|
||||
min-height:72vh;
|
||||
}
|
||||
.useredit{
|
||||
display: none;
|
||||
}
|
||||
@ -44,12 +47,12 @@ justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
margin:0 auto;
|
||||
|
||||
|
||||
}
|
||||
.rc-max-width--xl{
|
||||
padding: 0px 20px 24px 20px;
|
||||
min-height: 60vh;
|
||||
padding: 0px 20px 0px 20px;
|
||||
.rc-cat{
|
||||
margin-top: 20px;
|
||||
}
|
||||
@ -121,12 +124,17 @@ color: #FFFFFF;
|
||||
{
|
||||
|
||||
.rc-max-width--xl{
|
||||
margin-bottom: 80px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between
|
||||
}
|
||||
.usercontshow{
|
||||
min-height: 20vh;
|
||||
margin-bottom: 2rem;
|
||||
padding-left:.5rem;
|
||||
padding-right:.5rem;
|
||||
}
|
||||
.rc-button{
|
||||
|
||||
display: none;
|
||||
@ -134,8 +142,8 @@ display: none;
|
||||
.usercontend {
|
||||
display:inline-block;
|
||||
width: 48%;
|
||||
margin-top: 40px;
|
||||
padding: 24px 20px;
|
||||
//margin-bottom: 40px;
|
||||
//padding: 24px 20px;
|
||||
}
|
||||
|
||||
.online{
|
||||
@ -230,7 +238,7 @@ display: none;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 20px;
|
||||
font-size: .875rem;
|
||||
color: #333333;
|
||||
|
||||
}
|
||||
@ -253,19 +261,13 @@ display: none;
|
||||
|
||||
}
|
||||
.userdit{
|
||||
width: 45%;
|
||||
width: 48%;
|
||||
height: 164px;
|
||||
display: inline-block;
|
||||
height: 164px;
|
||||
border: 1px solid #D7D7D7;
|
||||
border-radius: 3px;
|
||||
margin-top: 65px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #D7D7D7;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
height: 164px;
|
||||
box-sizing: border-box;
|
||||
margin-left: 20px;
|
||||
|
||||
}
|
||||
|
@ -107,7 +107,7 @@
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
display: block;
|
||||
|
||||
object-fit:contain;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ ul li ol li em strong i {
|
||||
}
|
||||
.rc-main {
|
||||
position: relative;
|
||||
margin-top: 5.25rem;
|
||||
|
||||
.active{
|
||||
border: 2px solid #E2001A;
|
||||
@ -33,7 +32,6 @@ ul li ol li em strong i {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
margin-top: 20px;
|
||||
.ts-scrollable-container{
|
||||
h2{
|
||||
font-weight: bold;
|
||||
@ -382,9 +380,9 @@ border-radius: 100px;
|
||||
@media screen and (min-width: 768px){
|
||||
.usersearch {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
overflow: hidden;
|
||||
margin-top: 40px;
|
||||
.ts-scrollable-container{
|
||||
h2{
|
||||
font-weight: bold;
|
||||
@ -441,7 +439,6 @@ cursor: pointer;
|
||||
|
||||
}
|
||||
.rc-main {
|
||||
margin-top: 7.25rem;
|
||||
|
||||
}
|
||||
.ts-scrollable-container{
|
||||
|
@ -459,11 +459,11 @@ export default {
|
||||
font-size: 16px;
|
||||
margin-left: 2px;
|
||||
width:100%;
|
||||
padding-bottom:.25rem;
|
||||
padding-bottom:.5rem;
|
||||
background:url("../assets/image/ico-location.png") no-repeat 98% center;
|
||||
background-size:16px;
|
||||
position:relative;
|
||||
top:.5rem;
|
||||
top:.45rem;
|
||||
padding-left:.875rem;
|
||||
}
|
||||
.ts-area-picker-mobile{
|
||||
|
@ -14,6 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations } from "vuex";
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
@ -39,6 +40,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
lianxi(item,index){
|
||||
if(item.title=='在线客服'){
|
||||
var option = {
|
||||
@ -85,10 +87,14 @@ export default {
|
||||
this.gotop = false
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
mounted(){
|
||||
//Check login
|
||||
let usernot=JSON.parse(localStorage.getItem("userInfo"));
|
||||
this.checkIsLogin();
|
||||
let usernot = this.$store.state.userInfo;
|
||||
//console.log(usernot);
|
||||
if(usernot==null ||usernot==undefined){
|
||||
this.loginornot=true
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="crumbs" v-if="showTab">
|
||||
<div class="ts-crumbs rc-max-width--xl rc-padding-y--md" v-if="showTab" :style="crumbStyle">
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item to="/" >{{ this.homepageName }}</el-breadcrumb-item>
|
||||
|
||||
<el-breadcrumb-item :to=item.path v-for="(item, index) in crumbs"
|
||||
<el-breadcrumb-item :to=item.path v-for="(item, index) in displayData"
|
||||
:key="index">{{ item.title }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
@ -11,171 +11,76 @@
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
import tabs from "~/components/tabs.vue";
|
||||
export default {
|
||||
props:["crumbs"],
|
||||
props:["crumbs","crumbStyle"],
|
||||
name:"crumbs",
|
||||
data() {
|
||||
return {
|
||||
homepageName:'首页'
|
||||
displayData:[],
|
||||
homepageName:'定制营养方案',
|
||||
nameMapping:{
|
||||
'/productdetails/productlist':'产品分类',
|
||||
'/usersearch/search':'产品搜索',
|
||||
'/personal/mypersonal':'个人中心',
|
||||
'/personal/usermember/':'会员权益',
|
||||
'/personal/integral/':'积分明细',
|
||||
'/personal/settlement/':'订单确认',
|
||||
'/personal/useraddress/':'我的订单',
|
||||
'/myorder/userrecord/':'购物车',
|
||||
'/useraddress/openaddress/':'收货地址',
|
||||
'/personal/discount/':'优惠券'
|
||||
},
|
||||
};
|
||||
},
|
||||
created(){
|
||||
if(this.showTab != false)
|
||||
this.showTab=true;
|
||||
this.build();
|
||||
},
|
||||
watch: {
|
||||
crumbs(val) {
|
||||
this.crumbs = val;
|
||||
this.build();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapMutations(["changemessage",'selectMenu'])
|
||||
//...mapMutations(["changemessage",'selectMenu']),
|
||||
build() {
|
||||
let _self = this;
|
||||
this.displayData=[];
|
||||
if(this.crumbs && this.crumbs.length>0)
|
||||
{
|
||||
this.crumbs.forEach(function(ele,index){
|
||||
let displayObj= {path:'',title:''};
|
||||
if(ele.path) {
|
||||
displayObj.path = ele.path;
|
||||
for(let path in _self.nameMapping) {
|
||||
if(ele.path.indexOf(path)>-1) {
|
||||
displayObj.path = path;
|
||||
displayObj.title = _self.nameMapping[path];
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ele.title) {
|
||||
displayObj.title = ele.title;
|
||||
}
|
||||
_self.displayData.push(displayObj);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.crumbs{
|
||||
width: 93%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
margin-top: 70px;
|
||||
/deep/.el-breadcrumb__inner.is-link:hover {
|
||||
color:#E2001A;
|
||||
}
|
||||
.tags-scroll-content {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 43px;
|
||||
z-index: 0;
|
||||
overflow: hidden;
|
||||
// padding: 0 66px 0 21px;
|
||||
}
|
||||
.tabs {
|
||||
user-select: none;
|
||||
z-index: 20;
|
||||
width: 100%;
|
||||
|
||||
height: 43px;
|
||||
top: 60px;
|
||||
height: 42px;
|
||||
background: white;
|
||||
.tag {
|
||||
display: inline-block;
|
||||
height: 43px;
|
||||
// position: absolute;
|
||||
padding-right: 40px;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tags-scroll-content > i {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
.el-icon-arrow-left {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 21px;
|
||||
box-shadow: 0px 1px 8px 0px rgba(70, 70, 70, 0.32);
|
||||
}
|
||||
.el-icon-arrow-right {
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
width: 21px;
|
||||
}
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: black;
|
||||
background: white;
|
||||
height: 40px;
|
||||
padding-left: 15px;
|
||||
line-height: 40px;
|
||||
width: 40px;
|
||||
border-left: 1px solid #f1f1f1 !important;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.el-tag--dark {
|
||||
background: white;
|
||||
em {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 5px;
|
||||
margin-right: 7px;
|
||||
width: 5px;
|
||||
border-radius: 50%;
|
||||
background-color: #85ef47 !important;
|
||||
box-shadow: 0 0 7px #b7eb8f;
|
||||
}
|
||||
}
|
||||
.el-tag--dark {
|
||||
color: #323233 !important;
|
||||
.el-icon-close {
|
||||
color: black !important;
|
||||
}
|
||||
}
|
||||
.el-tag {
|
||||
.el-icon-close {
|
||||
font-size: 16px;
|
||||
&:hover {
|
||||
color: red !important;
|
||||
background: white !important;
|
||||
}
|
||||
display: inline-block;
|
||||
|
||||
}
|
||||
// width: 140px;
|
||||
em {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 5px;
|
||||
margin-right: 7px;
|
||||
width: 5px;
|
||||
border-radius: 50%;
|
||||
background-color: white;
|
||||
}
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
color: #969799;
|
||||
font-size: 13px;
|
||||
float: left;
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
> span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
i {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
top: 0px;
|
||||
|
||||
}
|
||||
.el-tag__close {
|
||||
right: 0px;
|
||||
color: #777777;
|
||||
&:hover {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
.el-xie{
|
||||
list-style: none;
|
||||
font-style: normal;
|
||||
margin: 0 8px;
|
||||
}
|
||||
}
|
||||
.ts-crumbs{
|
||||
padding-left:1.25rem;
|
||||
}
|
||||
</style>
|
||||
|
67
rc-busness/layouts/error.vue
Normal file
67
rc-busness/layouts/error.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<img src="/images/default.jpg">
|
||||
<div v-if='error.statusCode==404'>
|
||||
<h2>{{ error.statusCode }} 找不到指定页面</h2>
|
||||
<div>
|
||||
<a href="javascript:history.back()">返回上一页</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if='error.statusCode!=404'>
|
||||
<h2>{{ error.statusCode }} 发现未知错误</h2>
|
||||
<div>
|
||||
<nuxt-link to="/">返回首页</nuxt-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['error'],
|
||||
layout: 'error',
|
||||
created(){
|
||||
|
||||
},
|
||||
method:{
|
||||
backToLastPage(){
|
||||
window.history.back();
|
||||
},
|
||||
backToHome(){
|
||||
window.location.href="/";
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped >
|
||||
html,body{
|
||||
width:100%;
|
||||
height:100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.wrapper{
|
||||
width:100%;
|
||||
height:100%;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
h2{
|
||||
font-size: 2.5rem;
|
||||
line-height: 3.5rem;
|
||||
color:#e2001a;
|
||||
}
|
||||
a{
|
||||
color:#666;
|
||||
text-decoration: none;
|
||||
padding-bottom:.25rem;
|
||||
border-bottom: 1px solid #666;
|
||||
}
|
||||
a:hover {
|
||||
color:#e2001a;
|
||||
border-color: #e2001a;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,5 @@
|
||||
|
||||
export default ({store, route, redirect}) => {
|
||||
route.matched.forEach((item, index) => {
|
||||
item.meta.title = route.meta[index].title || '';
|
||||
item.meta.redirect = route.meta[index].redirect || '';//设置重定向
|
||||
})
|
||||
}
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="rc-header">
|
||||
<Myheader></Myheader>
|
||||
</div>
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
|
||||
<div class="rc-main rc-max-width--xl">
|
||||
<div class="cart-list">
|
||||
<div class="header">
|
||||
<div class="list-left">
|
||||
<label class="check-label">
|
||||
<label class="check-label" style="visibility: hidden;">
|
||||
<input type="checkbox" v-model="checkAll" />
|
||||
</label>
|
||||
<span class="name">商品</span>
|
||||
@ -22,7 +22,7 @@
|
||||
<div class="header_ph">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="list-left">
|
||||
<div class="list-left" style="visibility: hidden;">
|
||||
<label class="check-label">
|
||||
<input type="checkbox" v-model="checkAll" />
|
||||
</label>
|
||||
@ -76,7 +76,7 @@
|
||||
<div class="rc-footera">
|
||||
<div class="rc-foote">
|
||||
<div class="rc-shop">
|
||||
<label>
|
||||
<label style="visibility: hidden;">
|
||||
<input type="checkbox" v-model="checkAll" />
|
||||
全选
|
||||
</label>
|
||||
@ -114,12 +114,21 @@
|
||||
import Myheader from "~/components/header.vue";
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import { mapMutations } from "vuex";
|
||||
import { isexistCart, generateOrderWX, deleteCart } from "../../ajax/getData";
|
||||
export default {
|
||||
middleware: "metaTitle",
|
||||
meta: { title: "购物车" },
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
},
|
||||
{
|
||||
path:'/myorder/userrecord/'
|
||||
}
|
||||
],
|
||||
ordersum: 1,
|
||||
usercheckbox: false,
|
||||
shopnum: 0,
|
||||
@ -174,26 +183,26 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.carmessage();
|
||||
this.checkIsLogin();
|
||||
},
|
||||
|
||||
components: {
|
||||
Myheader,
|
||||
tabs,
|
||||
MyFooter,
|
||||
MyFooter
|
||||
},
|
||||
methods: {
|
||||
//请求猫
|
||||
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
async carmessage() {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await isexistCart(user.data.id);
|
||||
this.cartData = data;
|
||||
// this.goldmedal = data;
|
||||
},
|
||||
async userjie(list) {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
console.log(user);
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await generateOrderWX(list);
|
||||
if (data) {
|
||||
@ -201,7 +210,6 @@ export default {
|
||||
type: "warning",
|
||||
message: data.msg,
|
||||
});
|
||||
console.log(data);
|
||||
this.$router.push({
|
||||
path: "/personal/settlement",
|
||||
query: {
|
||||
@ -209,12 +217,11 @@ export default {
|
||||
},
|
||||
});
|
||||
}
|
||||
console.log(data);
|
||||
},
|
||||
|
||||
//删除购物车
|
||||
async deletsmessage(productCode) {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await deleteCart( productCode);
|
||||
if (data) {
|
||||
@ -267,6 +274,15 @@ export default {
|
||||
// });
|
||||
},
|
||||
plus(num, index) {
|
||||
let leftAllotment = this.cartData[index].leftAllotment;
|
||||
if(this.cartData[index].buyCount >= leftAllotment) {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "已达到本品最大购买上限",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.cartData[index].buyCount =
|
||||
parseInt(this.cartData[index].buyCount) + 1;
|
||||
},
|
||||
@ -287,7 +303,6 @@ export default {
|
||||
if (this.ys1 == false) {
|
||||
this.$nextTick(() => {
|
||||
this.userdelete = "删除";
|
||||
console.log(this.userdelete);
|
||||
});
|
||||
} else if (this.ys1 == true) {
|
||||
this.$nextTick(() => {
|
||||
@ -504,10 +519,6 @@ export default {
|
||||
}
|
||||
}
|
||||
.rc-main {
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
padding-top: 60px;
|
||||
max-width: 1400px;
|
||||
.cart-list {
|
||||
width: 100%;
|
||||
border: 1px solid #d7d7d7;
|
||||
@ -775,8 +786,8 @@ export default {
|
||||
width: 100%;
|
||||
}
|
||||
ul {
|
||||
margin-top: -32px;
|
||||
margin-left: 140px;
|
||||
margin-top: -2rem;
|
||||
margin-left: 9.75rem;
|
||||
width: 50%;
|
||||
.del {
|
||||
display: none;
|
||||
@ -796,6 +807,7 @@ export default {
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
margin-bottom:0;
|
||||
.rc-shop {
|
||||
display: none;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
<Myheader></Myheader>
|
||||
<!-- <tabs></tabs> -->
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc-usermain">
|
||||
|
||||
<div class="rc rc-column">
|
||||
@ -17,7 +18,7 @@
|
||||
</span>
|
||||
<!-- <span @click="tanchu()">弹出</span> -->
|
||||
</div>
|
||||
<div class="online bold"></div>
|
||||
<div class="online bold"></div>
|
||||
|
||||
<div class="rs-dis">
|
||||
<div
|
||||
@ -29,7 +30,12 @@
|
||||
<div class="rc-contair">
|
||||
<div class="rc-left" ref="userleft" id="userleft" :style='usercolor'>
|
||||
<div>
|
||||
<i>¥</i><span>{{item.couponTypeId=='4'?parseInt(((item.discount) *10))+ '折':item.couponAmount}}</span>
|
||||
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||
¥
|
||||
</i>
|
||||
<span>
|
||||
{{item.couponTypeId=='4'?parseInt(((item.discount)*10))+'折':item.couponAmount}}
|
||||
</span>
|
||||
</div>
|
||||
<strong>{{ item.couponName }}</strong>
|
||||
</div>
|
||||
@ -59,14 +65,22 @@
|
||||
|
||||
|
||||
<script>
|
||||
import {allConfig,getdraw} from "../../ajax/getData";
|
||||
// import tabs from "@/components/tabs.vue";
|
||||
import {allConfig,getdraw} from "../../ajax/getData";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
export default {
|
||||
// middleware: 'metaTitle',
|
||||
// // middleware: 'metaTitle',
|
||||
// meta: {title: '优惠券'},
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal/',
|
||||
},
|
||||
{
|
||||
path:'/personal/discount/',
|
||||
}
|
||||
],
|
||||
userload: true,
|
||||
pastdue: false,
|
||||
unused: false,
|
||||
@ -209,6 +223,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
tabs
|
||||
},
|
||||
};
|
||||
import Myheader from "~/components/header.vue";
|
||||
|
@ -2,7 +2,8 @@
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<div class="rc-max-width--xl rc-padding-y--md">
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc-max-width--xl rc-padding-bottom--md">
|
||||
<ul>
|
||||
<li v-for="(item,index) in userrecord" :key="index">
|
||||
{{item.title}}
|
||||
@ -36,6 +37,14 @@ import Myheader from '~/components/header.vue'
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal',
|
||||
},
|
||||
{
|
||||
path:'/personal/integral/',
|
||||
}
|
||||
],
|
||||
userrecord:[
|
||||
{
|
||||
title:'日期',
|
||||
|
@ -3,6 +3,7 @@
|
||||
<Myheader></Myheader>
|
||||
<!-- <tabs></tabs> -->
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs" :crumbStyle="`padding-left:0;`"></tabs>
|
||||
<div class="rc-layout-container rc-one-column rc-full-width ts-mypersonal">
|
||||
<div class="rc-column">
|
||||
<!-- <div class="rc-title">
|
||||
@ -152,16 +153,21 @@ export default {
|
||||
meta: {title: '个人中心'},
|
||||
data() {
|
||||
return {
|
||||
userlog:false,
|
||||
islogin:false,
|
||||
dialogInfo1:false,
|
||||
userid:null,
|
||||
usertitle:'',
|
||||
rcvalue:5000,
|
||||
usermessage:'关注皇家爱宠荟,修改个人资料',
|
||||
userimage:require("../../assets/image/rc-new.png"),
|
||||
userlogin:'登录注册',
|
||||
userorder: "新手铲屎官",
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal',
|
||||
}
|
||||
],
|
||||
userlog:false,
|
||||
islogin:false,
|
||||
dialogInfo1:false,
|
||||
userid:null,
|
||||
usertitle:'',
|
||||
rcvalue:5000,
|
||||
usermessage:'关注皇家爱宠荟,修改个人资料',
|
||||
userimage:require("../../assets/image/rc-new.png"),
|
||||
userlogin:'登录注册',
|
||||
userorder: "新手铲屎官",
|
||||
prefecture: [
|
||||
{
|
||||
title: "待付款",
|
||||
|
@ -10,7 +10,7 @@ ul li ol li em strong i {
|
||||
|
||||
|
||||
.settlement {
|
||||
padding-top: 60px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -183,12 +183,13 @@ ul li ol li em strong i {
|
||||
border: 1px solid #d8d8d8;
|
||||
margin-right: 20px;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
height: 96px;
|
||||
|
||||
img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
display: block;
|
||||
object-fit:contain;
|
||||
}
|
||||
}
|
||||
|
||||
@ -465,7 +466,9 @@ ul li ol li em strong i {
|
||||
display: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
|
||||
&.show {
|
||||
display:block;
|
||||
}
|
||||
&.active {
|
||||
display: block;
|
||||
border: none;
|
||||
|
@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div class="settlement">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
</div>
|
||||
<div class="rc-top"></div>
|
||||
<div class="rc_contline"></div>
|
||||
<div class="rc-main">
|
||||
<div class="address-list">
|
||||
@ -28,7 +26,7 @@
|
||||
<span>{{ item.address }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mypersonal add">
|
||||
<div class="mypersonal add" :class="useraddress.length>0?'':'show'">
|
||||
<div
|
||||
class="my-delivery"
|
||||
@click="addAddress"
|
||||
@ -67,10 +65,12 @@
|
||||
<span>配送方式:</span>
|
||||
<i>{{ shopprice.price }}</i>
|
||||
</li>
|
||||
<!--
|
||||
<li>
|
||||
<span> 活动促销:</span>
|
||||
<i>{{ shopprice.distribution }}</i>
|
||||
</li>
|
||||
-->
|
||||
<li>
|
||||
<span>商品总价:</span>
|
||||
<i class="red">{{ sumPrice }}</i>
|
||||
@ -92,7 +92,7 @@
|
||||
<em>{{ sumPrice }}</em>
|
||||
</div>
|
||||
<div style="font-weight: bold">
|
||||
<span @click="jiesuan()">提交订单</span>
|
||||
<span @click="preJiesuan()">提交订单</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -155,13 +155,21 @@ import Myheader from "~/components/header.vue";
|
||||
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import myAddress from "~/components/address.vue";
|
||||
|
||||
import { mapMutations } from "vuex";
|
||||
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
||||
export default {
|
||||
middleware: "metaTitle",
|
||||
meta: { title: "订单结算" },
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
},
|
||||
{
|
||||
path:'/personal/settlement'
|
||||
}
|
||||
],
|
||||
goldmedal: [],
|
||||
dialogAddTitle: "",
|
||||
addressstype: null,
|
||||
@ -208,6 +216,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
async getAddressList() {
|
||||
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
||||
let { data } = await memberAddress("getAll", { memberId: memberId });
|
||||
@ -272,17 +281,42 @@ export default {
|
||||
this.dialogAdd = parm;
|
||||
this.getAddressList();
|
||||
},
|
||||
preJiesuan(){
|
||||
let checkResult=true;
|
||||
if(this.useraddress.length<=0) {
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: '请先添加收件信息',
|
||||
});
|
||||
checkResult=false;
|
||||
}
|
||||
|
||||
if(checkResult)
|
||||
this.jiesuan();
|
||||
},
|
||||
async jiesuan() {
|
||||
let orderAddress = this.useraddress.filter((item) => item.isDefault);
|
||||
let userInfo = this.$store.state.userInfo;
|
||||
if(!userInfo) {
|
||||
this.$router.push({
|
||||
path: "/userlogin/login",
|
||||
query: {
|
||||
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
let postData = [];
|
||||
this.goldmedal.forEach((item) => {
|
||||
let basePoint = (item.basePoint?item.basePoint:0);
|
||||
let oneProduct = {
|
||||
basePoint:basePoint,
|
||||
productName: item.productName,
|
||||
buyCount: item.buyCount,
|
||||
productId: item.productCode,
|
||||
payAmount: item.productPrice,
|
||||
memberId: item.memberId,
|
||||
phoneNumber: item.mobile,
|
||||
memberId: userInfo.data.id,
|
||||
phoneNumber: userInfo.data.mobile,
|
||||
// couponId: "NGQ2022P12",
|
||||
// couponTypeId: "4",
|
||||
// couponName: "内购券",
|
||||
@ -353,7 +387,8 @@ export default {
|
||||
" " +
|
||||
postData[0].orderAddress.addressPhoneNumber,
|
||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
wxPay: res.data,
|
||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
wxPay: res.msg,
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
@ -378,6 +413,7 @@ export default {
|
||||
mounted() {
|
||||
this.goldmedal = JSON.parse(this.$route.query.list);
|
||||
this.getAddressList();
|
||||
this.checkIsLogin();
|
||||
// this.addressstype = this.$route.query.stype;
|
||||
// this.orderNumber = this.$route.query.orderNumber;
|
||||
// this.canceldanhao(this.orderNumber);
|
||||
@ -393,7 +429,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import url("../../assets/css/global.less");
|
||||
//@import url("../../assets/css/global.less");
|
||||
@import "./settlement.less";
|
||||
// @import url("../../assets/css/settlement.less");
|
||||
</style>
|
@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="online bold"></div>
|
||||
<div class="usercontshow rc-max-width--xl">
|
||||
<div class="rc-headera">
|
||||
@ -64,7 +65,7 @@
|
||||
</div>
|
||||
|
||||
<div class="pc-bottom">
|
||||
<span @click="userpay(item, index)">{{
|
||||
<span v-if="item.status!=1" @click="userpay(item, index)">{{
|
||||
item.status == "0"
|
||||
? "取消订单"
|
||||
: item.status == "1"
|
||||
@ -137,11 +138,20 @@
|
||||
|
||||
<script>
|
||||
import Myheader from "~/components/header.vue";
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import MyFooter from '~/components/rc-footer.vue';
|
||||
import tabs from "~/components/tabs.vue";
|
||||
import { customerorders, userindent, canceldanhao,generateOrderWX } from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal/',
|
||||
},
|
||||
{
|
||||
path:'/personal/useraddress/',
|
||||
}
|
||||
],
|
||||
activeIndex: 0,
|
||||
userstype:'',
|
||||
alllist:[],
|
||||
@ -280,7 +290,8 @@ export default {
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
MyFooter
|
||||
MyFooter,
|
||||
tabs
|
||||
},
|
||||
methods: {
|
||||
async indet(mobile, stype) {
|
||||
@ -297,7 +308,6 @@ export default {
|
||||
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
||||
this.allmessage.push(this.goldmedal[i].orderDetailList[0])
|
||||
if(this.goldmedal[i].status==0){
|
||||
console.log("+++++++++++++");
|
||||
this.obligation.push(this.goldmedal[i].orderDetailList[0]);
|
||||
}else if(this.goldmedal[i].status==1){
|
||||
this.receiving.push(this.goldmedal[i].orderDetailList[0]);
|
||||
@ -407,7 +417,10 @@ export default {
|
||||
this.receiving=[];
|
||||
this.pending=[];
|
||||
}, 500);
|
||||
}
|
||||
} else if(item.status == 1) { //确认收货
|
||||
|
||||
}
|
||||
|
||||
if (item.buttontitle == "立即支付") {
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
|
@ -2,7 +2,8 @@
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<div class="rc-full-width rc-max-width--xl rc-padding-y--lg">
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc-full-width rc-max-width--xl rc-padding-bottom--lg">
|
||||
<div class="rc-main">
|
||||
|
||||
<div class="rc-center" >
|
||||
@ -53,15 +54,24 @@
|
||||
<script>
|
||||
import Myheader from '~/components/header.vue'
|
||||
import Myfooter from '~/components/rc-footer.vue'
|
||||
import tabs from "~/components/tabs.vue";
|
||||
export default {
|
||||
data(){
|
||||
|
||||
return{
|
||||
banners:[
|
||||
{src:require("../../assets/image/rc-new.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new1.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new2.png"),link:""},
|
||||
],
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal',
|
||||
},
|
||||
{
|
||||
path:'/personal/usermember/',
|
||||
}
|
||||
],
|
||||
banners:[
|
||||
{src:require("../../assets/image/rc-new.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new1.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new2.png"),link:""},
|
||||
],
|
||||
userid:null,
|
||||
userimage:require("../../assets/image/rc-new.png"),
|
||||
userorder:'新手铲屎官',
|
||||
@ -251,7 +261,8 @@ methods:{
|
||||
},
|
||||
components:{
|
||||
Myheader,
|
||||
Myfooter
|
||||
Myfooter,
|
||||
tabs
|
||||
},
|
||||
mounted(){
|
||||
console.log(this.$refs.userblock);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="page_modules">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top rc-md-up"></div>
|
||||
<div class="cont_modules">
|
||||
<tabs></tabs>
|
||||
<el-row class="order_info">
|
||||
<el-col :span="6" class="ph_hidden">
|
||||
<ul class="li_inline">
|
||||
@ -19,7 +19,7 @@
|
||||
<el-col :span="6" class="ready_right">
|
||||
<div class="inline_right">
|
||||
<p>付款金额:</p>
|
||||
<p class="price">{{ userPayData.userprice }}</p>
|
||||
<p class="price">¥{{ userPayData.userprice }}</p>
|
||||
</div>
|
||||
<div class="inline_right">
|
||||
<p>收货信息:</p>
|
||||
@ -87,24 +87,27 @@ import Myheader from "~/components/header.vue";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import vueQr from 'vue-qr'
|
||||
|
||||
import { generateOrderAlipay, updateOrderWX } from "../../ajax/getData";
|
||||
import { generateOrderAlipay, updateOrderWX, monitorOrderNotify } from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
paymentTimer:undefined,
|
||||
isSucess: false,
|
||||
dialogSuccess: false,
|
||||
paytype: "微信",
|
||||
userpaystype: [
|
||||
{
|
||||
paytype: "微信",
|
||||
payimage: require("../../assets/pay/wx.png"),
|
||||
},
|
||||
/*
|
||||
{
|
||||
paytype: "支付宝",
|
||||
payimage: require("../../assets/pay/zfb.png"),
|
||||
},
|
||||
*/
|
||||
],
|
||||
dialogSuccess: true,
|
||||
dialogFail: false,
|
||||
userPayData: {},
|
||||
qrtext:'',
|
||||
@ -113,15 +116,21 @@ export default {
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||
//this.qrtext=this.userPayData.wxPay
|
||||
this.qrtext=this.userPayData.wxPay;
|
||||
this.payOrderWX()
|
||||
|
||||
},
|
||||
methods: {
|
||||
closeDialogSuccess() {
|
||||
this.qrtext = '';
|
||||
// this.$router.push({
|
||||
// path: "/index",
|
||||
// });
|
||||
this.qrtext = '';
|
||||
this.$router.push({
|
||||
path: "/myorder/usertion",
|
||||
query:{
|
||||
stype:1,
|
||||
orderNumber:this.userPayData.orderId
|
||||
}
|
||||
});
|
||||
},
|
||||
closeDialogFail() {
|
||||
this.qrtext = '';
|
||||
@ -142,15 +151,20 @@ export default {
|
||||
}
|
||||
},
|
||||
//支付监听
|
||||
|
||||
async payOrderWX() {
|
||||
let res = await updateOrderWX();
|
||||
let res = await monitorOrderNotify(this.userPayData.orderId);
|
||||
if (res.success) {
|
||||
this.qrtext = '成功加入群的二维码';
|
||||
this.dialogSuccess = true;
|
||||
|
||||
} else if (res.fail) {
|
||||
this.dialogFail = true;
|
||||
}else{
|
||||
this.payOrderWX()
|
||||
let _self = this;
|
||||
this.paymentTimer = setTimeout(function(){
|
||||
_self.payOrderWX()
|
||||
},5000);
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -290,7 +304,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.paycord {
|
||||
display: none;
|
||||
//display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -2,8 +2,8 @@
|
||||
<div>
|
||||
<div class="user">
|
||||
<Myheader></Myheader>
|
||||
<unlogin></unlogin>
|
||||
<tabs></tabs>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="online" id="fixed-catbar-seperator"></div>
|
||||
<div class="rc-top"></div>
|
||||
<div
|
||||
@ -135,7 +135,7 @@
|
||||
<i class="ts-row-title">商品规格:</i>
|
||||
</div>
|
||||
<div class="ts-tag-list">
|
||||
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[activeIndexa==index?'active':'unactive',item.leftAllotment>0?'':'disabled']">
|
||||
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[(activeIndexa==index && item.leftAllotment>0)?'active':'unactive',item.leftAllotment>0?'':'disabled']">
|
||||
{{ item.specifications }}
|
||||
</em>
|
||||
</div>
|
||||
@ -192,7 +192,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="rc-button" v-if="userbuy">
|
||||
<div class="rc-button" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||
</div>
|
||||
@ -254,7 +254,7 @@
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="rc-button rc-md-down">
|
||||
<div class="rc-button rc-md-down" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||
</div>
|
||||
@ -290,6 +290,8 @@ export default {
|
||||
let mainProductCode = context.route.query.mainProductCode;
|
||||
let productCode = context.route.query.productCode;
|
||||
let activeIndexa = 0;
|
||||
if(!productCode || productCode.length<=0)
|
||||
throw new Error('Empty product code');
|
||||
productCode = productCode.split(",");
|
||||
// console.log(this.productCode);
|
||||
if(isRxGoods){
|
||||
@ -321,10 +323,24 @@ export default {
|
||||
stopIndex++;
|
||||
}
|
||||
}
|
||||
productAttachmentList = newlist[0].productAttachmentList;
|
||||
if(curItem.productAttachmentList != undefined)
|
||||
productAttachmentList = curItem.productAttachmentList;
|
||||
if(curItem.productName == undefined)
|
||||
curItem = newlist[0];
|
||||
userbuy = true;
|
||||
}
|
||||
if(!curItem || curItem.productName == undefined)
|
||||
throw new Error("商品信息错误");
|
||||
let crumbs = [
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
},
|
||||
{
|
||||
title: curItem.productName,
|
||||
}
|
||||
];
|
||||
return {
|
||||
crumbs,
|
||||
activeIndexa,
|
||||
curItem,
|
||||
newlist,
|
||||
@ -373,20 +389,6 @@ export default {
|
||||
catimage: require("../../assets/image/unused.png"),
|
||||
},
|
||||
],
|
||||
fixedlist: [
|
||||
{
|
||||
title: "购物车",
|
||||
catimage: require("../../assets/buy.png"),
|
||||
},
|
||||
{
|
||||
title: "在线客服",
|
||||
catimage: require("../../assets/service.png"),
|
||||
},
|
||||
{
|
||||
title: "营养专家",
|
||||
catimage: require("../../assets/consult.png"),
|
||||
},
|
||||
],
|
||||
|
||||
newlist: [
|
||||
{
|
||||
@ -567,9 +569,10 @@ export default {
|
||||
this.usermessage.data.mobile,
|
||||
item.picFile,
|
||||
item.productName,
|
||||
item.basePrice,
|
||||
item.ecPrice,
|
||||
item.specifications,
|
||||
item.leftAllotment
|
||||
item.leftAllotment,
|
||||
item.basePoint
|
||||
);
|
||||
if (data) {
|
||||
this.productlist = data;
|
||||
@ -597,9 +600,11 @@ export default {
|
||||
productName: item.productName,
|
||||
productImg: item.picFile,
|
||||
specifications: item.specifications,
|
||||
buyCount: item.pcs,
|
||||
memberId: "884258",
|
||||
mobile: "13480231061",
|
||||
leftAllotment: item.leftAllotment,
|
||||
basePoint: item.basePoint,
|
||||
buyCount: this.sales_num,
|
||||
memberId: "",
|
||||
mobile: "",
|
||||
checked: true,
|
||||
},
|
||||
];
|
||||
@ -630,6 +635,8 @@ export default {
|
||||
this.activeIndexa = index;
|
||||
this.curItem = item;
|
||||
this.productAttachmentList = item.productAttachmentList;
|
||||
this.crumbs.pop();
|
||||
this.crumbs.push({title: item.productName});
|
||||
},
|
||||
},
|
||||
|
||||
@ -638,6 +645,5 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import url("../../assets/css/global.less");
|
||||
@import url("../../assets/css/producted.less");
|
||||
</style>
|
@ -325,7 +325,6 @@ export default {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
title:'产品列表',
|
||||
}
|
||||
],
|
||||
value: "",
|
||||
|
@ -21,7 +21,7 @@
|
||||
<div class="rc-max-width--xl rc-people rc-useaddress">
|
||||
<span>详细地址:</span>
|
||||
<input type="text" placeholder="小区、门牌号等" class="userinput" v-model="alladdress">
|
||||
<textarea rows="10" cols="30" placeholder="请输入详细地址">
|
||||
<textarea rows="10" cols="30" placeholder="请输入详细地址" v-model="alladdress">
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
@ -91,20 +91,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onGetMenu(values){
|
||||
console.log(values,+'111111');
|
||||
let user=values[2].id;
|
||||
user=user.split('-');
|
||||
this.provinceId=user[0];
|
||||
this.cityId=user[1];
|
||||
this.districtId=user[2];
|
||||
console.log(values,+'111111');
|
||||
let user=values[2].id;
|
||||
user=user.split('-');
|
||||
this.provinceId=user[0];
|
||||
this.cityId=user[1];
|
||||
this.districtId=user[2];
|
||||
},
|
||||
handleClose1(){
|
||||
this.dialogInfo1 = false
|
||||
this.dialogInfo1 = false
|
||||
},
|
||||
|
||||
register(){
|
||||
console.log(this.tel)
|
||||
if ( this.alladdress==='') {
|
||||
if (this.alladdress==='') {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请输入详细地址 '
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="online bold"></div>
|
||||
<div class="usercontshow rc-max-width--xl">
|
||||
<div class="usercontend" v-for="(item, index) in list" :key="index">
|
||||
@ -67,10 +68,19 @@
|
||||
<script>
|
||||
import Myheader from '~/components/header.vue'
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import tabs from "~/components/tabs.vue";
|
||||
import { selectaddress,editupdate,editdelete} from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal/',
|
||||
},
|
||||
{
|
||||
path:'/useraddress/openaddress/',
|
||||
}
|
||||
],
|
||||
chosenAddressId: "1",
|
||||
checked: true,
|
||||
userid: null,
|
||||
@ -176,7 +186,8 @@ export default {
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
MyFooter
|
||||
MyFooter,
|
||||
tabs
|
||||
},
|
||||
|
||||
mounted() {
|
||||
@ -191,6 +202,5 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped >
|
||||
@import url("../../assets/css/global.less");
|
||||
@import url("../../assets/css/openaddress.less");
|
||||
</style>
|
@ -1,11 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<transition name="fade">
|
||||
<div class="userloding" v-show="isLoading"></div>
|
||||
</transition>
|
||||
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc-max-width--xl rc-main">
|
||||
<div class="usersearch">
|
||||
<div class="form-search">
|
||||
@ -41,7 +38,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="usersearch">
|
||||
<div class="usersearch rc-margin-top--md">
|
||||
<div class="usercontentshow" ref="usercontent">
|
||||
<div class="usercontentshow rc-product">
|
||||
<h2>我想搜</h2>
|
||||
@ -121,7 +118,7 @@
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item)">
|
||||
<span>{{ item.categoryName }}</span>
|
||||
<span>{{ item.name }}</span>
|
||||
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
||||
</div>
|
||||
<strong
|
||||
@ -224,6 +221,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rc-button">
|
||||
<span @click="openclose()">取消</span>
|
||||
<em @click="openclose()">确认</em>
|
||||
@ -308,10 +306,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="rc-button rc-padding-bottom--md">
|
||||
<span @click="openclose()">取消</span>
|
||||
<em @click="openclose()">确认</em>
|
||||
</div>
|
||||
-->
|
||||
</el-dialog>
|
||||
</div>
|
||||
<!-- rc-main end -->
|
||||
@ -329,13 +329,18 @@
|
||||
import Myheader from "~/components/header.vue";
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import FixRight from "~/components/fixed-right.vue";
|
||||
import tabs from "~/components/tabs.vue";
|
||||
import { biaome, userstype, searchchanpin, userquery } from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: "",
|
||||
crumbs:[
|
||||
{
|
||||
path:'/usersearch/search/',
|
||||
}
|
||||
],
|
||||
isLoading: true,
|
||||
|
||||
userserachlist: [
|
||||
{
|
||||
categoryName: [], //专区
|
||||
@ -516,7 +521,8 @@ export default {
|
||||
components: {
|
||||
Myheader,
|
||||
MyFooter,
|
||||
FixRight
|
||||
FixRight,
|
||||
tabs
|
||||
},
|
||||
mounted() {
|
||||
this.usetmessage();
|
||||
|
Loading…
Reference in New Issue
Block a user