合并部分代码 回滚规格

master
lemon橪 2022-02-16 11:22:35 +08:00
commit 0994b6659a
27 changed files with 606 additions and 627 deletions

View File

@ -1 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.3.0.1 .
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.4.1 .

View File

@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
seller: "http://127.0.0.1:8889",
manager: "http://127.0.0.1:8887",
buyer: "http://127.0.0.1:8888",
common: "http://127.0.0.1:8890",
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
API_PROD: {
common: "https://common-api.pickmall.cn",

View File

@ -10,7 +10,7 @@ $warning_color: #ff9900;
$error_color: #ed3f14;
$handle-btn-color: #438cde;
$theme_color: #ff5c58;
$theme_color: #e4393c;
$border_color: #dddee1;
$title_color: #8c8c8c;

View File

@ -147,9 +147,11 @@ export default {
cursor: pointer;
}
.store-search{
width:63px;
padding: 0 9px;
border-radius: 0;
&:nth-child(2){
width:62px;
margin-left: -5px;
}
}

View File

@ -43,7 +43,7 @@
{{config.icpCard}}
</a>
</li>
<li v-if="config.icpMessage">
<li v-if="config.icpMessage" class="footer-bottmom">
<a href="https://beian.miit.gov.cn/" target="_blank">
{{config.icpMessage}}
</a>
@ -51,7 +51,7 @@
</div>
</div>
<div class="information">
<div class="information footer-bottmom">
<a class="flex " :href="config.company.href">
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.name}}
@ -173,12 +173,19 @@ export default {
cursor: pointer;
line-height: 26px;
}
.servece-type-info li:hover{
color:#b8b8be;
}
.servece-type-info li:first-child {
font-size: 16px;
line-height: 28px;
font-weight: bold;
}
.servece-type-info li:first-child:hover{
// font-size:15px;
// font-weight: bold;
color:#b8b8be;
}
.friend-link {
display: flex;
align-items: flex-start;
@ -207,6 +214,17 @@ export default {
padding: 5px 0px;
float: left;
}
.friend-link-item li:hover{
color:#b8b8be;
margin-top:-2px;
}
.footer-bottmom:hover{
margin-top:0 !important;
}
.footer-bottmom>a:hover{
color:#e4393c;
}
.link-item {
padding: 0px 8px;
cursor: pointer;

View File

@ -61,12 +61,9 @@ export default {
<style lang="scss" scoped>
.content {
width: 1200px;
height: 100%;
margin: auto;
position: fixed;
top: 0;
left: 50%;
margin-left: -600px;
height: 40px;
margin: 10px auto;
position: relative;
}
.cate {
float: left;

View File

@ -2,13 +2,19 @@
<div class="model-item" v-if="element && element.key">
<!-- 轮播图模块包括个人信息快捷导航模块 -->
<template v-if="element.type == 'carousel'">
<model-carousel :data="element" class="mb_20 width_1200_auto"></model-carousel>
<model-carousel
:data="element"
class="mb_20 width_1200_auto"
></model-carousel>
</template>
<template v-if="element.type == 'carousel1'">
<model-carousel1 :data="element" class="mb_20"></model-carousel1>
</template>
<template v-if="element.type == 'carousel2'">
<model-carousel2 :data="element" class="mb_20 width_1200_auto"></model-carousel2>
<model-carousel2
:data="element"
class="mb_20 width_1200_auto"
></model-carousel2>
</template>
<!-- 热门广告 -->
<template v-if="element.type == 'hotAdvert'">
@ -37,13 +43,16 @@
</template>
<!-- 限时秒杀 待完善 -->
<template v-if="element.type == 'seckill' && element.options.list.length">
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
</template>
<!-- 折扣广告 -->
<template v-if="element.type == 'discountAdvert'">
<div
class="discountAdvert"
:style="{'backgroundImage' :'url(' + require('@/assets/images/decorate.png') + ')'}"
:style="{
backgroundImage:
'url(' + require('@/assets/images/decorate.png') + ')',
}"
>
<img
@click="linkTo(item.url)"
@ -74,44 +83,53 @@
</template>
<!-- 新品排行 -->
<template v-if="element.type == 'newGoodsSort'">
<new-goods-sort :data="element" class="mb_20 width_1200_auto"></new-goods-sort>
<new-goods-sort
:data="element"
class="mb_20 width_1200_auto"
></new-goods-sort>
</template>
<!-- 首页广告 -->
<template v-if="element.type == 'firstAdvert'">
<first-page-advert :data="element" class="mb_20 width_1200_auto"></first-page-advert>
<first-page-advert
:data="element"
class="mb_20 width_1200_auto"
></first-page-advert>
</template>
<!-- 横幅广告 -->
<template v-if="element.type == 'bannerAdvert'">
<div style="width:100%; text-align: center;">
<img
width="1200"
class="hover-pointer mb_20"
@click="linkTo(element.options.url)"
:src="element.options.img"
alt=""
/>
<template v-if="element.type == 'bannerAdvert'">
<div style="width: 100%; text-align: center">
<img
width="1200"
class="hover-pointer mb_20"
@click="linkTo(element.options.url)"
:src="element.options.img"
alt=""
/>
</div>
</template>
<template v-if="element.type == 'notEnough'">
<not-enough :data="element" class="mb_20 width_1200_auto"></not-enough>
<template v-if="element.type == 'notEnough'"
>
<not-enough
:data="element"
class="mb_20 width_1200_auto"
></not-enough>
</template>
</div>
</template>
<script>
import ModelCarousel from './modelList/Carousel.vue';
import ModelCarousel1 from './modelList/Carousel1.vue';
import ModelCarousel2 from './modelList/Carousel2.vue';
import FirstPageAdvert from './modelList/FirstPageAdvert.vue';
import NewGoodsSort from './modelList/NewGoodsSort.vue';
import Recommend from './modelList/Recommend.vue';
import NotEnough from './modelList/NotEnough.vue';
import Seckill from './modelList/Seckill.vue';
import ModelCarousel from "./modelList/Carousel.vue";
import ModelCarousel1 from "./modelList/Carousel1.vue";
import ModelCarousel2 from "./modelList/Carousel2.vue";
import FirstPageAdvert from "./modelList/FirstPageAdvert.vue";
import NewGoodsSort from "./modelList/NewGoodsSort.vue";
import Recommend from "./modelList/Recommend.vue";
import NotEnough from "./modelList/NotEnough.vue";
import Seckill from "./modelList/Seckill.vue";
export default {
name: 'modelFormItem',
props: ['element', 'select', 'index', 'data'],
name: "modelFormItem",
props: ["element", "select", "index", "data"],
components: {
ModelCarousel,
ModelCarousel1,
@ -120,18 +138,17 @@ export default {
NewGoodsSort,
FirstPageAdvert,
NotEnough,
Seckill
Seckill,
},
data () {
data() {
return {
showModal: false, //
selected: {} //
selected: {}, //
};
}
},
};
</script>
<style lang="scss" scoped>
.model-item {
position: relative;
margin-bottom: 10px;
@ -181,7 +198,7 @@ export default {
}
}
.width_1200_auto{
.width_1200_auto {
width: 1200px;
margin: 0 auto;
background-color: #fff;

View File

@ -23,12 +23,18 @@
<div class="person-msg">
<img :src="userInfo.face" v-if="userInfo.face" alt />
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
<div>Hi{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
<div>
Hi, {{
userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile
}}
</div>
<div v-if="userInfo.id">
<Button type="error" shape="circle" @click="$router.push('home')"></Button>
<Button class="btns" shape="circle" @click="$router.push('home')"
>会员中心</Button
>
</div>
<div v-else>
<Button type="error" @click="$router.push('login')" shape="circle"
<Button class="btns" @click="$router.push('login')" shape="circle"
>请登录</Button
>
</div>
@ -37,8 +43,14 @@
<div>
<span>常见问题</span>
<ul class="article-list">
<li class="ellipsis" :alt="article.title" v-for="(article, index) in articleList" :key="index" @click="goArticle(article.id)">
{{article.title}}
<li
class="ellipsis"
:alt="article.title"
v-for="(article, index) in articleList"
:key="index"
@click="goArticle(article.id)"
>
{{ article.title }}
</li>
</ul>
</div>
@ -49,45 +61,48 @@
</template>
<script>
import {articleList} from '@/api/common.js'
import storage from '@/plugins/storage';
import { articleList } from "@/api/common.js";
import storage from "@/plugins/storage";
export default {
name: 'modelCarousel',
props: ['data'],
data () {
name: "modelCarousel",
props: ["data"],
data() {
return {
config:require('@/config'),
config: require("@/config"),
userInfo: {}, //
articleList: [], //
params: { //
params: {
//
pageNumber: 1,
pageSize: 5,
type: 'ANNOUNCEMENT',
sort: 'sort'
}
type: "ANNOUNCEMENT",
sort: "sort",
},
};
},
methods: {
getArticleList () { //
articleList(this.params).then(res => {
getArticleList() {
//
articleList(this.params).then((res) => {
if (res.success) {
this.articleList = res.result.records
this.articleList = res.result.records;
}
})
},
goArticle (id) { //
let routeUrl = this.$router.resolve({
path: '/article',
query: {id}
});
window.open(routeUrl.href, '_blank');
}
},
goArticle(id) {
//
let routeUrl = this.$router.resolve({
path: "/article",
query: { id },
});
window.open(routeUrl.href, "_blank");
},
},
mounted() {
if (storage.getItem("userInfo"))
this.userInfo = JSON.parse(storage.getItem("userInfo"));
this.getArticleList();
},
mounted () {
if (storage.getItem('userInfo')) this.userInfo = JSON.parse(storage.getItem('userInfo'));
this.getArticleList()
}
};
</script>
@ -98,6 +113,16 @@ export default {
overflow: hidden;
}
.btns {
background-color:#363634 ;
line-height:30px;
color: white !important;
}
.btns:hover {
background-color: #363634;
line-height:32px !important;
color: #e5d790 !important;
}
/* 导航主体 */
.nav-body {
width: 1200px;
@ -130,12 +155,14 @@ export default {
flex-direction: column;
margin: 20px auto;
button {
height: 25px !important;
height: 30px !important;
margin-top: 10px;
line-height: 30px;
border: none;
}
.ivu-btn-default {
color: $theme_color;
border-color: $theme_color;
// color: $theme_color;
// border-color: $theme_color;
}
img {
margin-bottom: 10px;

View File

@ -1,16 +1,18 @@
<template>
<div class="not-enough">
<ul class="nav-bar">
<li
v-for="(item, index) in conData.options.navList"
:class="currentIndex === index ? 'curr' : ''"
@click="changeCurr(index)"
:key="index"
>
<p>{{ item.title }}</p>
<p>{{ item.desc }}</p>
</li>
</ul>
<div class="not-enough" ref="obtain" id="demo">
<Affix :offset-top="62" @on-change="change">
<ul class="nav-bar" v-show="topSearchShow">
<li
v-for="(item, index) in conData.options.navList"
:class="currentIndex === index ? 'curr' : ''"
@click="changeCurr(index)"
:key="index"
>
<p @click="gotoDemo">{{ item.title }}</p>
<p @click="gotoDemo">{{ item.desc }}</p>
</li>
</ul>
</Affix>
<div class="content" v-if="showContent">
<div
v-for="(item, index) in conData.options.list[currentIndex]"
@ -29,17 +31,26 @@
</template>
<script>
export default {
mounted() {
window.addEventListener('scroll',this.handleScrollx,true)
},
props: {
data: {
type: Object,
default: null
}
default: null,
},
},
data () {
data() {
return {
screenHeight:document.body.clientHeight,
scrollHieght:0,
topSearchShow: true, //
topIndex: 0, //
scrollTops: 0,
open:'',
currentIndex: 0, //
conData: this.data, //
showContent: true //
showContent: true, //
};
},
watch: {
@ -47,14 +58,40 @@ export default {
this.conData = val;
},
conData: function (val) {
this.$emit('content', val);
}
this.$emit("content", val);
},
},
methods: {
changeCurr (index) { //
this.currentIndex = index;
handleScrollx(){
// console.log('',window.pageYOffset) //
// console.log(this.$refs.obtain.getBoundingClientRect().top) //
this.scrollHieght = Number(window.pageYOffset);//
this.scrollTops = Number(this.$refs.obtain.getBoundingClientRect().top); //
this.topSearchShow = true; //
if(this.scrollTops < -660){ //
this.topSearchShow = false;
}
},
toguid(path,id){
var path =path;
var Id = id;
localStorage.setItem('toId',Id);
this.$router.push(path);
},
change(status){ //
this.open = status
},
gotoDemo(){ // demo
if(this.open){ //
document.querySelector("#demo").scrollIntoView(true);
}
}
//scrollIntoView()HTML
},
changeCurr(index) {
//
this.currentIndex = index;
},
},
};
</script>
<style lang="scss" scoped>
@ -63,10 +100,13 @@ export default {
justify-content: center;
width: 100%;
margin-bottom: 10px;
background-color: #f3f5f7;
background-color: #f8f8f8;
height: 60px;
align-items: center;
position: relative;
position: sticky;
position: -webkit-sticky;
top: 0;
li {
padding: 0 30px;
text-align: center;
@ -140,5 +180,6 @@ export default {
}
}
}
}
</style>

View File

@ -1,28 +1,54 @@
<template>
<div class="cate-nav">
<div class="nav-con">
<div class="all-categories hover-pointer" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">全部商品分类</div>
<div
class="all-categories hover-pointer"
@mouseenter="showFirstList = true"
@mouseleave="showFirstList = false"
>
全部商品分类
</div>
<ul class="nav-item" v-if="showNavBar">
<li
class ="nav-lis"
class="nav-lis"
v-for="(item, index) in navList.list"
:key="index"
@click="linkTo(item.url)"
>
{{ item.name }}
</li>
</ul>
</div> <hr style="width:1200px;height:2px;background:#e4393c;margin-top:-1px;margin-bottom:5px;"/>
</ul>
</div>
<!-- 全部商品分类 -->
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
<div
class="cate-list"
v-show="showAlways || showFirstList"
@mouseenter="showFirstList = true"
@mouseleave="showFirstList = false"
>
<!-- 第一级分类 -->
<div class="nav-side" :class="{'large-nav': large, 'opacity-nav': opacity}" @mouseleave="panel = false">
<div
class="nav-side"
:class="{ 'large-nav': large, 'opacity-nav': opacity }"
@mouseleave="panel = false"
>
<ul>
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" >
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
<li
v-for="(item, index) in cateList"
:key="index"
@mouseenter="showDetail(index)"
>
<span class="nav-side-item" @click="goGoodsList(item.id)">{{
item.name
}}</span>
<span v-for="(second, secIndex) in item.children" :key="secIndex">
<span v-if="secIndex < 2" > / </span>
<span @click="goGoodsList(second.id, second.parentId)" class="nav-side-item" v-if="secIndex < 2">{{second.name}}</span>
<span v-if="secIndex < 2"> / </span>
<span
@click="goGoodsList(second.id, second.parentId)"
class="nav-side-item"
v-if="secIndex < 2"
>{{ second.name }}</span
>
</span>
</li>
</ul>
@ -30,14 +56,19 @@
<!-- 展开分类 -->
<div
class="detail-item-panel"
:style="{'minHeight': large?'470px':'340px'}"
:style="{ minHeight: large ? '470px' : '340px' }"
v-show="panel"
@mouseenter="panel = true"
@mouseleave="panel = false"
>
<div class="nav-detail-item">
<template v-for="(item, index) in panelData">
<span @click="goGoodsList(item.id, item.parentId)" v-if="index < 8" :key="index">{{ item.name }}<Icon type="ios-arrow-forward" /></span>
<span
@click="goGoodsList(item.id, item.parentId)"
v-if="index < 8"
:key="index"
>{{ item.name }}<Icon type="ios-arrow-forward"
/></span>
</template>
</div>
<ul>
@ -46,13 +77,21 @@
:key="index"
class="detail-item-row"
>
<span class="detail-item-title" @click="goGoodsList(items.id,items.parentId)">
<span
class="detail-item-title"
@click="goGoodsList(items.id, items.parentId)"
>
{{ items.name }} <Icon type="ios-arrow-forward" />
<span class="glyphicon glyphicon-menu-right"></span>
</span>
<div>
<span v-for="(item, subIndex) in items.children" @click="goGoodsList(item.id,items.id,items.parentId)"
:key="subIndex" class="detail-item">{{ item.name }}</span>
<span
v-for="(item, subIndex) in items.children"
@click="goGoodsList(item.id, items.id, items.parentId)"
:key="subIndex"
class="detail-item"
>{{ item.name }}</span
>
</div>
</li>
</ul>
@ -62,105 +101,116 @@
</template>
<script>
import { getCategory } from '@/api/goods';
import storage from '@/plugins/storage.js'
import { getCategory } from "@/api/goods";
import storage from "@/plugins/storage.js";
export default {
name: 'GoodsListNav',
name: "GoodsListNav",
props: {
showAlways: { //
showAlways: {
//
default: false,
type: Boolean
type: Boolean,
},
showNavBar: { //
showNavBar: {
//
default: true,
type: Boolean
type: Boolean,
},
hover: {
default: false,
type: Boolean
type: Boolean,
},
large: { //
large: {
//
default: false,
type: Boolean
type: Boolean,
},
opacity: { //
opacity: {
//
default: false,
type: Boolean
}
type: Boolean,
},
},
data () {
data() {
return {
panel: false, //
panelData: [], //
showFirstList: false, //
cateList: [] //
}
cateList: [], //
};
},
computed: {
navList () { //
if (storage.getItem('navList')) {
return JSON.parse(storage.getItem('navList'))
navList() {
//
if (storage.getItem("navList")) {
return JSON.parse(storage.getItem("navList"));
} else {
return []
return [];
}
}
},
},
methods: {
getCate () { //
getCate() {
//
if (this.hover) return false;
getCategory(0).then(res => {
getCategory(0).then((res) => {
if (res.success) {
this.cateList = res.result;
this.$store.commit('SET_CATEGORY', res.result)
this.$store.commit("SET_CATEGORY", res.result);
//
var expirationTime = new Date().setHours(new Date().getHours() + 1);
//
localStorage.setItem('category_expiration_time', expirationTime);
localStorage.setItem("category_expiration_time", expirationTime);
//
localStorage.setItem('category', JSON.stringify(res.result))
localStorage.setItem("category", JSON.stringify(res.result));
}
});
},
showDetail (index) { //
this.panel = true
this.panelData = this.cateList[index].children
showDetail(index) {
//
this.panel = true;
this.panelData = this.cateList[index].children;
},
goGoodsList (id, secondId, firstId) { //
const arr = [firstId, secondId, id]
goGoodsList(id, secondId, firstId) {
//
const arr = [firstId, secondId, id];
if (!arr[1]) {
arr.splice(0, 2)
arr.splice(0, 2);
}
if (!arr[0]) {
arr.shift()
arr.shift();
}
let routerUrl = this.$router.resolve({
path: '/goodsList',
query: {categoryId: arr.toString()}
})
window.open(routerUrl.href, '_blank')
}
path: "/goodsList",
query: { categoryId: arr.toString() },
});
window.open(routerUrl.href, "_blank");
},
},
mounted () {
if (localStorage.getItem('category') && localStorage.getItem('category_expiration_time')) {
mounted() {
if (
localStorage.getItem("category") &&
localStorage.getItem("category_expiration_time")
) {
//
if (new Date() > localStorage.getItem('category_expiration_time')) {
if (new Date() > localStorage.getItem("category_expiration_time")) {
this.getCate();
return;
}
this.cateList = JSON.parse(localStorage.getItem('category'))
this.cateList = JSON.parse(localStorage.getItem("category"));
} else {
this.getCate()
this.getCate();
}
}
},
};
</script>
<style scoped lang="scss">
.nav-lis:hover{
color:#e4393c !important;
.nav-lis:hover {
color: $theme_color !important;
cursor: pointer;
}
.cate-nav{
.cate-nav {
width: 1200px;
position: relative;
margin: 0 auto;
@ -175,10 +225,10 @@ export default {
width: 200px;
line-height: 40px;
color: #fff;
background-color: #e4393c;
background-color: $theme_color;
text-align: center;
font-size: 16px;
border-bottom:none;
border-bottom: none;
}
.nav-item {
width: 1000px;
@ -195,13 +245,13 @@ export default {
color: rgb(129, 127, 127);
font-size: 15px;
&:hover {
color: $theme_color;
color: #e1251b;
}
}
}
}
//
.cate-list{
.cate-list {
margin: 0 auto;
position: absolute;
z-index: 1000;
@ -216,14 +266,14 @@ export default {
height: 335px;
overflow: hidden;
}
.large-nav{
.large-nav {
height: 470px;
ul>li{
ul > li {
line-height: 20px;
}
}
.opacity-nav{
background-color:rgba(0,0,0,.5);
.opacity-nav {
background-color: rgba(0, 0, 0, 0.5);
}
.nav-side ul {
width: 100%;
@ -236,13 +286,13 @@ export default {
padding-left: 12px;
font-size: 13px;
line-height: 18px;
&:hover{
&:hover {
background: #999395;
}
}
.nav-side-item:hover {
cursor: pointer;
color: $theme_color;
color: #e1251b;
}
/*显示商品详细信息*/
@ -271,7 +321,7 @@ export default {
background-color: #6e6568;
}
.nav-detail-item span:hover {
background-color: $theme_color;
background-color: #e1251b;
}
.detail-item-panel li {
line-height: 30px;
@ -286,11 +336,13 @@ export default {
text-align: right;
}
.detail-item-title:hover {
color: $theme_color;
color: #e1251b;
}
.detail-item-row {
.detail-item-row {
display: flex;
>div{flex: 1;}
> div {
flex: 1;
}
}
.detail-item {
font-size: 12px;
@ -298,12 +350,12 @@ export default {
padding-right: 8px;
cursor: pointer;
border-left: 1px solid #ccc;
&:first-child{
&:first-child {
border: none;
padding-left: 0;
}
}
.detail-item:hover {
color: $theme_color;
color: #e1251b;
}
</style>

View File

@ -414,7 +414,7 @@ export default {
font-size: 18px;
font-weight: bold;
&:hover {
color: #e4393c;
color: $theme_color;
cursor: pointer;
}
}
@ -428,8 +428,8 @@ export default {
text-align: center;
margin: 0 3px;
&:hover {
color: #e4393c;
border-color: #e4393c;
color: $theme_color;
border-color: $theme_color;
border-bottom-color: #fff;
cursor: pointer;
ul {
@ -447,7 +447,7 @@ export default {
width: 300px;
padding: 5px 10px;
background: #fff;
border: 1px solid #e4393c;
border: 1px solid $theme_color;
z-index: 1;
&::before {
content: "";
@ -470,7 +470,7 @@ export default {
margin: 3px 0;
text-align: left;
&:hover {
color: #e4393c;
color: $theme_color;
cursor: pointer;
}
}
@ -489,23 +489,23 @@ export default {
background-color: #f3f3f3;
border: 1px solid #ddd;
&:hover {
border-color: #e4393c;
border-color: $theme_color;
background-color: #fff;
.ivu-icon {
color: #fff;
background-color: #e4393c;
background-color: $theme_color;
}
}
span:nth-child(2) {
color: #e4393c;
color: $theme_color;
}
.ivu-icon {
position: absolute;
right: 0;
top: 0;
color: #e4393c;
color: $theme_color;
line-height: 22px;
width: 21px;
height: 22px;
@ -557,8 +557,8 @@ export default {
}
&:hover {
border-color: #e4393c;
border: 2px solid #e4393c;
border-color: $theme_color;
border: 2px solid $theme_color;
top: 0;
left: 0;
position: relative;
@ -572,7 +572,7 @@ export default {
display: inline-block;
width: 100%;
height: 100%;
color: #e4393c;
color: $theme_color;
text-align: center;
font-size: 12px;
cursor: pointer;
@ -585,7 +585,7 @@ export default {
div {
width: 0;
border-top: 20px solid transparent;
border-right: 20px solid #e4393c;
border-right: 20px solid $theme_color;
}
.ivu-icon {
font-size: 12px;
@ -598,7 +598,7 @@ export default {
}
}
.border-color {
border-color: #e4393c;
border-color: $theme_color;
z-index: 1;
}
}
@ -620,8 +620,8 @@ export default {
font-size: 12px;
&:hover {
cursor: pointer;
color: #e4393c;
border-color: #e4393c;
color: $theme_color;
border-color: $theme_color;
}
}
}
@ -674,7 +674,7 @@ export default {
padding: 2px;
cursor: pointer;
&:hover {
color: #e4393c;
color: $theme_color;
}
}
}
@ -696,8 +696,8 @@ export default {
font-size: 12px;
&:hover {
cursor: pointer;
color: #e4393c;
border-color: #e4393c;
color: $theme_color;
border-color: $theme_color;
}
}
}

View File

@ -295,7 +295,7 @@ export default {
.item-as-title {
width: 100%;
height: 36px;
color: #e4393c;
color: $theme_color;
line-height: 36px;
font-size: 18px;
}
@ -396,7 +396,7 @@ export default {
background-color: #fff;
}
.goods-list-tool span:hover {
border-color: #e4393c;
border-color: $theme_color;
position: relative;
text-decoration: none;
z-index: 1;
@ -408,7 +408,7 @@ export default {
.goods-list-tool-active {
color: #fff;
border-left: 1px solid #ccc;
background-color: #e4393c !important;
background-color: $theme_color !important;
}
/* ---------------商品栏结束------------------- */

View File

@ -15,10 +15,15 @@
>
<div class="user-icon">
<div class="user-img">
<img :src="userInfo.face" style="width:100%;height:100%;" v-if="userInfo.face" alt />
<img
:src="userInfo.face"
style="width: 100%; height: 100%"
v-if="userInfo.face"
alt
/>
<Avatar icon="ios-person" class="mb_10" v-else size="96" />
</div>
<p>{{userInfo.nickName}}</p>
<p>{{ userInfo.nickName }}</p>
</div>
<!-- 循环导航栏 -->
@ -38,7 +43,6 @@
>{{ chlidren.title }}</MenuItem
>
</Submenu>
</Menu>
</Sider>
<Layout class="layout ml_10">
@ -54,47 +58,33 @@
</template>
<script>
import menuList from './menu';
import Storage from '@/plugins/storage.js';
import menuList from "./menu";
import Storage from "@/plugins/storage.js";
export default {
name: 'Home',
data () {
name: "Home",
data() {
return {
menuList //
menuList, //
};
},
computed: {
userInfo () { //
if(Storage.getItem('userInfo')){
return JSON.parse(Storage.getItem('userInfo'));
} else{
this.$Modal.confirm({
title:'请登录',
content:"<p>请登录后执行此操作</p>",
okText: '立即登录',
cancelText: '继续浏览',
onOk:()=>{
if(true){
this.$router.push('/login');
}
}
})
return {}
}
}
userInfo() {
//
if (Storage.getItem("userInfo")) {
return JSON.parse(Storage.getItem("userInfo"));
} else {
return {};
}
},
},
methods: {
// barcallback
onSelect (name) {
this.$router.push({name: name});
onSelect(name) {
this.$router.push({ name: name });
},
//
toUserMain () {
this.$router.push(`/home`);
}
}
},
};
</script>

View File

@ -5,7 +5,7 @@ import Storage from './storage';
import router from '../router/index.js';
import store from '../vuex/store';
import { handleRefreshToken } from '@/api/index';
import {v4 as uuidv4} from 'uuid';
import { v4 as uuidv4} from 'uuid';
const qs = require('qs');
// api地址
@ -88,7 +88,7 @@ service.interceptors.request.use(
}
);
async function refresh (error) {
async function refresh(error) {
const getTokenRes = await refreshToken();
if (getTokenRes === 'success') {
// 刷新token
@ -121,7 +121,8 @@ async function refresh (error) {
});
},
onCancel: () => {
router.go(0)
// router.go(0)
router.push("/");
Modal.remove();
}
});

View File

@ -1,5 +1,5 @@
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.3.0.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.3.0.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.3.0.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.3.0.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.4.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.2.4.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.4.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.4.1

View File

@ -1 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.3.0.1 .
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.4.1 .

View File

@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
seller: "http://127.0.0.1:8889",
manager: "http://127.0.0.1:8887",
buyer: "http://127.0.0.1:8888",
common: "http://127.0.0.1:8890",
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
API_PROD: {
common: "https://common-api.pickmall.cn",

View File

@ -58,7 +58,7 @@ export const logout = () => {
// 刷新token
export const handleRefreshToken = (token) => {
return getRequestWithNoToken(`/user/refresh/${token}`);
return getRequestWithNoToken(`/passport/user/refresh/${token}`);
};
// 获取用户登录信息
export const userInfo = (params) => {

View File

@ -4,12 +4,12 @@
<Form ref="searchForm" :model="searchForm" class="search-form">
<Form-item label="会员名称" class="flex" prop="memberName">
<Input
type="text" v-model="searchForm.memberName"
type="text" v-model="searchForm.memberName" clearable
style="width: 200px"></Input>
</Form-item>
<Form-item label="编号" class="flex">
<Input
type="text" v-model="searchForm.sn"
type="text" v-model="searchForm.sn" clearable
style="width: 200px"></Input>
</Form-item>
<Form-item label="状态"

View File

@ -62,9 +62,11 @@ export default {
};
},
props: {
selectedWay: {
selectedWay: {
type: Array,
default: new Array()
default: function(){
return new Array()
}
}
},
watch: {

View File

@ -22,7 +22,7 @@
<Table height="350" border tooltip :loading="loading" :columns="activeColumns" :data="showPromotionList"></Table>
<Page @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" class="mt_10" :total="totals" size="small" show-elevator />
<Page @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" class="mt_10" :total="Number(totals)" size="small" show-elevator />
</div>
@ -187,6 +187,7 @@ export default {
on: {
click: () => {
this.selectedPromotion(params);
console.log(this.index)
},
},
},

View File

@ -1,15 +1,36 @@
<template>
<div class="layout">
<div class="goods-cell-title">
<div class="goods-item-title" :class="{ selected: selected.index == index }" @click="handleClickTitle(title, index)" v-for="(title, index) in res.list[0].titleWay" :key="index">
<div
class="goods-item-title"
:class="{ selected: selected.index == index }"
@click="handleClickTitle(title, index)"
v-for="(title, index) in res.list[0].titleWay"
:key="index"
>
<h4>{{ title.title }}</h4>
<div>{{ title.desc }}</div>
</div>
</div>
<div class="goods-list">
<div v-if="item.___index != undefined ? (selected.index == item.___index) : ( selected.val == item.type)" class="goods-item" v-for="(item, item_index) in res.list[0].listWay" :key="item_index">
<div
v-if="
item.___index != undefined
? selected.index == item.___index
: selected.val == item.type
"
class="goods-item"
v-for="(item, item_index) in res.list[0].listWay"
:key="item_index"
>
<div class="goods-img">
<Icon size="20" color="#e1251b" @click="closeGoods(item, item_index)" class="goods-icon" type="ios-close-circle" />
<Icon
size="20"
color="#e1251b"
@click="closeGoods(item, item_index)"
class="goods-icon"
type="ios-close-circle"
/>
<img :src="item.img" alt />
</div>
<div class="goods-desc">
@ -70,7 +91,7 @@ export default {
}
> div {
font-weight: bold;
color: #e4393c !important;
color: $theme_color !important;
}
}
.goods-cell-title {
@ -137,7 +158,7 @@ export default {
display: flex;
> .goods-price {
line-height: 2;
color: #e4393c;
color: $theme_color;
}
}
}

View File

@ -32,7 +32,7 @@
</div>
<div class="no-more" v-if="list.length ==0"></div>
</div>
<Page :total="total" size="small" @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" />
<Page :total="total" size="small" @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" show-sizer :page-size-opts="[10, 20, 50]" @on-page-size-change="changePageSize"/>
</Card>
@ -74,8 +74,8 @@ export default {
params: { //
pageNumber: 1,
pageSize: 10,
sort: "",
order: "asc",
sort: "createTime",
order: "desc",
pageType: "INDEX",
pageClientType: "H5",
},
@ -147,6 +147,12 @@ export default {
this.$router.push({
path: "/floorList/main",
});
},
//
changePageSize(v) {
this.params.pageNumber = 1;
this.params.pageSize = v;
this.init();
},
//
handleDel(val) {

View File

@ -1 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.3.0.1 .
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.4.1 .

View File

@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
seller: "http://127.0.0.1:8889",
manager: "http://127.0.0.1:8887",
buyer: "http://127.0.0.1:8888",
common: "http://127.0.0.1:8890",
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
API_PROD: {
common: "https://common-api.pickmall.cn",

View File

@ -181,11 +181,11 @@
<Button
type="primary"
slot="extra"
@click="handleCloseSkuItem(item, $index)"
@click="handleCloseSkuItem($index)"
>
删除规格
</Button>
<Form :model="item" class="flex">
<div>
<FormItem
label="规格名"
class="sku-item-content-val flex"
@ -197,11 +197,11 @@
placeholder="请输入规格项名称"
:filter-method="filterMethod"
:data="skuData"
@on-change="handleSkuTitle($event, $index)"
@on-change="editSkuItem"
>
</AutoComplete>
</FormItem>
</Form>
</div>
<div class="flex sku-val">
<Form :model="item" class="flex">
<!--规格值文本列表-->
@ -222,12 +222,7 @@
:data="skuVal"
@on-focus="changeSkuVals(item.name)"
@on-change="
handleSkuValue(
val.value,
$index,
val,
index
)
skuValueChange(val.value, $index, item)
"
>
</AutoComplete>
@ -263,97 +258,9 @@
规格详细
<div slot="content">
<div slot="content">
<ul class="flex sku-ul">
<li
v-for="(item, index) in skuTableColumn"
:key="index"
>
{{ item.title }}
</li>
</ul>
<div
class="mt_10 flex sku-editor"
v-for="(item, index) in skuTableData"
:key="index"
>
<div
v-for="(spec, specIndex) in skuTableColumn.filter(
(val) => {
return val.key;
}
)"
:key="specIndex"
>
{{
skuTableData[index][
spec.title || spec.key || spec.___key
]
}}
</div>
<div
v-if="
skuTableColumn.find((val) => {
return val.slot == 'weight';
})
"
>
<Input
clearable
:min="0"
v-model="item.weight"
placeholder="请输入重量"
@on-change="updateSkuTable(item, 'weight', index)"
/>
</div>
<div>
<Input
clearable
v-model="item.sn"
placeholder="请输入货号"
@on-change="updateSkuTable(item, 'sn', index)"
/>
</div>
<div>
<InputNumber
clearable
class="input-number"
:min="0"
v-model="item.quantity"
placeholder="请输入库存"
@on-change="updateSkuTable(item, 'quantity', index)"
/>
</div>
<div>
<InputNumber
clearable
class="input-number"
:min="0"
v-model="item.cost"
placeholder="请输入成本价"
@on-change="updateSkuTable(item, 'cost', index)"
/>
</div>
<div>
<InputNumber
class="input-number"
clearable
:min="0"
v-model="item.price"
placeholder="请输入价格"
@on-change="updateSkuTable(item, 'price', index)"
/>
</div>
<div>
<Button @click="editSkuPicture(item)"
>编辑图片</Button
>
</div>
</div>
<!-- #TODO 此处有待优化 -->
<!-- <Table
<Table
class="mt_10"
:columns="skuTableColumn"
:data="skuTableData"
style="
@ -409,73 +316,74 @@
</template>
<template slot-scope="{ row }" slot="images">
<Button @click="editSkuPicture(row)"></Button>
<Modal
v-model="showSkuPicture"
:styles="{ top: '30px' }"
class-name="sku-preview-modal"
title="编辑图片"
ok-text="结束编辑"
@on-ok="updateSkuPicture()"
cancel-text="取消"
>
<div class="preview-picture">
<img
v-if="previewPicture !== ''"
:src="previewPicture"
/>
</div>
<Divider />
<vuedraggable
:list="selectedSku.images"
:animation="200"
style="display: inline-block"
>
<div
class="sku-upload-list"
v-for="(img, __index) in selectedSku.images"
:key="__index"
>
<template>
<img :src="img.url" />
<div class="sku-upload-list-cover">
<Icon
type="md-search"
@click="handleView(img.url)"
></Icon>
<Icon
type="md-trash"
@click="handleRemove(img, __index)"
></Icon>
</div>
</template>
</div>
</vuedraggable>
<Upload
ref="uploadSku"
:show-upload-list="false"
:on-success="handleSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:on-exceeded-size="handleMaxSize"
:max-size="1024"
:before-upload="handleBeforeUpload"
multiple
type="drag"
:action="uploadFileUrl"
:headers="{ ...accessToken }"
style="display: inline-block; width: 58px"
>
<div>
<Icon type="ios-camera" size="55"></Icon>
</div>
</Upload>
</Modal>
</template>
</Table> -->
</Table>
</div>
</div>
</Panel>
</Collapse>
</div>
<Modal
v-model="showSkuPicture"
:styles="{ top: '30px' }"
class-name="sku-preview-modal"
title="编辑图片"
ok-text="结束编辑"
@on-ok="updateSkuPicture()"
cancel-text="取消"
>
<div class="preview-picture">
<img v-if="previewPicture !== ''" :src="previewPicture" />
</div>
<Divider />
<vuedraggable
:list="selectedSku.images"
:animation="200"
style="display: inline-block"
>
<div
class="sku-upload-list"
v-for="(img, __index) in selectedSku.images"
:key="__index"
>
<template>
<img :src="img.url" />
<div class="sku-upload-list-cover">
<Icon
type="md-search"
@click="handleView(img.url)"
></Icon>
<Icon
type="md-trash"
@click="handleRemove(img, __index)"
></Icon>
</div>
</template>
</div>
</vuedraggable>
<Upload
ref="uploadSku"
:show-upload-list="false"
:on-success="handleSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:on-exceeded-size="handleMaxSize"
:max-size="1024"
:before-upload="handleBeforeUpload"
multiple
type="drag"
:action="uploadFileUrl"
:headers="{ ...accessToken }"
style="display: inline-block; width: 58px"
>
<div>
<Icon type="ios-camera" size="55"></Icon>
</div>
</Upload>
</Modal>
</div>
<h4>商品详情描述</h4>
<div class="form-item-view">
@ -799,7 +707,6 @@ export default {
],
};
},
methods: {
/**
* 选择参数
@ -852,8 +759,7 @@ export default {
},
// sku
editSkuPicture(row) {
console.log(row);
if (row.images && row.images.length) {
if (row.images && row.images.length > 0) {
this.previewPicture = row.images[0].url;
}
this.selectedSku = row;
@ -909,6 +815,7 @@ export default {
},
//
handleSuccessGoodsPicture(res, file) {
console.log(res);
if (file.response) {
file.url = file.response.result;
this.baseInfoForm.goodsGalleryFiles.push(file);
@ -1040,18 +947,12 @@ export default {
cost: e.cost,
quantity: e.quantity,
weight: e.weight,
// ___keys: [],
};
e.specList.forEach((u) => {
if (u.specName === "images") {
sku.images = u.specImage;
} else {
sku[u.specName] = u.specValue;
// keys
// sku.___keys.push({
// key: u.specName,
// value: u.specValue,
// });
if (
!skusInfo.some((s) => s.name === u.specName) &&
!this.ignoreColumn.includes(u.specName)
@ -1064,7 +965,6 @@ export default {
id: u.specValueId,
name: u.specName,
value: u.specValue || "",
___key: u.specValue || "",
},
],
});
@ -1078,7 +978,6 @@ export default {
id: u.specValueId,
name: u.specName,
value: u.specValue || "",
___key: u.specValue || "",
});
}
if (!sk.spec_id && u.specName === "specId") {
@ -1093,7 +992,6 @@ export default {
});
this.skuInfo = skusInfo;
this.renderTableData();
this.skuTableData = skus;
},
@ -1144,11 +1042,18 @@ export default {
//
this.$set(this.skuInfo, this.skuInfo.length, {
spec_values: [],
name: "规格名" + (this.skuInfo.length + 1),
name: "规格名",
});
// this.renderTableData();
this.renderTableData();
},
//
editSkuItem() {
this.renderTableData();
},
//
async skuValueChange(val, index, item) {
this.renderTableData();
},
//
changeSkuVals(name) {
if (name) {
@ -1161,7 +1066,14 @@ export default {
});
}
},
/** 移除当前规格项 进行数据变化*/
handleCloseSkuItem($index) {
this.skuInfo.splice($index, 1);
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
//
validateEmpty(params) {
let flag = true;
@ -1187,7 +1099,6 @@ export default {
this.$set(item.spec_values, item.spec_values.length, {
name: item.name,
value: "",
___key: "",
});
this.baseInfoForm.regeneratorSkuFlag = true;
/**
@ -1197,99 +1108,27 @@ export default {
}
},
/** 移除当前规格项 进行数据变化*/
handleCloseSkuItem(item, $index) {
console.log(item);
let oldsSkuTableData = cloneObj(this.skuTableData);
oldsSkuTableData.forEach((sku, i) => {
if (sku[item.name]) {
delete sku[item.name];
}
});
this.skuTableData = oldsSkuTableData;
this.skuTableColumn.forEach((column, i) => {
if (column.key == item.name) {
this.skuTableColumn.splice(i, 1);
}
});
this.skuInfo.splice($index, 1);
},
/**
* 移除当前规格值
* 找到一样规格的值进行移出
*/
/** 移除当前规格值 */
handleCloseSkuValue(item, index) {
let oldsSkuTableData = cloneObj(this.skuTableData);
console.log("oldsSkuTableData", oldsSkuTableData);
this.skuTableData = oldsSkuTableData.filter((sku, i) => {
if (
sku[item.spec_values[index].name] != item.spec_values[index].value
) {
return sku;
}
});
item.spec_values.splice(index, 1);
this.baseInfoForm.regeneratorSkuFlag = true;
},
/**
* 编辑规格值
* 根据当前___keys的索引指定需修改的值
* @param {*} change 返回input更改的值
* @param {*} index 修改规格名的索引
* @param {*} item 当前规格值
*/
async handleSkuValue(change, index, item) {
this.skuTableData.map((sku, i) => {
// key
if (sku[item.name] == item.___key) {
sku[item.name] = change;
console.log(1);
} else if (!item.___key && !sku[item.name]) {
//
sku[item.name] = change;
console.log("赋值", sku);
}
});
item.___key = change;
},
/**
* 编辑规格名
* 根据修改的规格名将skuTableData的key(规格名)进行修改
* @param {*} change 返回input更改的值
* @param {*} index 修改规格名的索引
*/
handleSkuTitle(change, index) {
let oldSkuTableColumn = cloneObj(this.skuTableColumn);
this.skuTableData.forEach((sku, i) => {
Object.keys(sku).forEach((key) => {
if (oldSkuTableColumn[index].key == key) {
// sku
sku = {
[change]: sku[key],
...sku,
};
delete sku[key];
this.skuTableData[i] = sku;
}
});
});
this.skuTableColumn[index].key = change;
this.skuTableColumn[index].title = change;
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/**
* 渲染table所需要的column data
*/
renderTableData() {
this.skuTableColumn = [];
this.skuTableData = [];
let pushData = [];
//
this.skuInfo.forEach((sku) => {
// !sku.name ? (sku.name = "") : "";
//
let columnName = sku.name;
pushData.push({
@ -1330,20 +1169,14 @@ export default {
this.skuTableColumn = pushData;
//
let cloneTemp = cloneObj(this.skuInfo);
if (cloneTemp.length) {
cloneTemp.map((temp) => {
return {
[temp.name]: temp.value,
images: this.baseInfoForm.goodsGalleryFiles || [],
};
});
}
//
this.$set(this, "skuTableData", []);
//
if (cloneTemp[0]) {
//
let result = [];
//
// sku
cloneTemp[0].spec_values.forEach((specItem) => {
result.push({
[cloneTemp[0].name]: specItem.value,
@ -1352,14 +1185,8 @@ export default {
});
cloneTemp.splice(0, 1);
result = this.specIterator(result, cloneTemp);
// skuTable
let oldData = cloneObj(this.skuTableData);
this.skuTableData = result;
// skuTable
this.skuTableData = Object.assign(this.skuTableData, oldData);
console.log(result, this.skuTableData);
console.log(this.skuTableData);
}
},
/**
@ -1371,25 +1198,16 @@ export default {
//
if (cloneTemp.length > 0) {
let table = [];
let newVal = []; //
result.forEach((resItem, i) => {
result.forEach((resItem) => {
cloneTemp[0].spec_values.forEach((valItem) => {
let obj = cloneObj(resItem);
obj[cloneTemp[0].name] = valItem.value;
if (valItem.value) {
table.push(obj);
} else {
newVal.push(obj);
}
table.push(obj);
});
});
result = [];
table.push(...newVal);
table.forEach((t) => {
console.log("t", t);
result.push(t);
});
//
@ -1399,7 +1217,6 @@ export default {
}
return this.specIterator(result, cloneTemp);
},
/** 根据分类id获取系统设置规格信息*/
Get_SkuInfoByCategory(categoryId) {
if (categoryId) {
@ -1419,7 +1236,8 @@ export default {
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
},
/** 数据改变之后 抛出数据 */
updateSkuTable(row, item, index) {
updateSkuTable(row, item, type = "deafult") {
let index = row._index;
this.baseInfoForm.regeneratorSkuFlag = true;
/** 进行自定义校验 判断是否是数字(小数也能通过)重量 */
if (item === "weight") {
@ -1457,7 +1275,6 @@ export default {
}
}
this.$nextTick(() => {
console.log(index, item);
this.skuTableData[index][item] = row[item];
});
// this.$set(this.skuTableData,[index][item],row[item])
@ -1522,9 +1339,6 @@ export default {
delete sku.specValueId;
return sku;
});
if (this.firstData.tempId) {
delete submit.id;
}
if (submit.goodsGalleryFiles.length > 0) {
submit.goodsGalleryList = submit.goodsGalleryFiles.map(
@ -1661,30 +1475,4 @@ export default {
</script>
<style lang="scss" scoped>
@import "./addGoods.scss";
.sku-ul {
align-items: center;
padding: 10px 0;
border-radius: 0.4em;
background: #f3f5f7;
> li {
flex: 1;
text-align: center;
font-weight: bold;
padding: 10px;
}
}
.sku-editor {
> div {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
padding: 10px;
}
}
.input-number {
width: 100%;
}
</style>

View File

@ -96,27 +96,27 @@
</td>
<td></td>
<td>
<Input class="text w40" type="text" v-model="item.firstCompany" maxlength="3" clearable />
<InputNumber class="text w40" type="text" v-model="item.firstCompany" :max="999" :min="0" :step="0.1" clearable/>
</td>
<td>
<Input class="text w60" type="text" v-model="item.firstPrice" maxlength="6" clearable>
<span slot="append"></span>
</Input>
<InputNumber class="text w60" type="text" v-model="item.firstPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
</InputNumber>
</td>
<td>
<Input class="text w40" type="text" v-model="item.continuedCompany" maxlength="6"
clearable />
<InputNumber class="text w40" type="text" v-model="item.continuedCompany" :max="999" :min="0" :step="0.1"
/>
</td>
<td>
<Input class="text w60" type="text" v-model="item.continuedPrice" maxlength="6" clearable>
<span slot="append"></span>
</Input>
<InputNumber class="text w60" type="text" v-model="item.continuedPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
</InputNumber>
</td>
<td class="nscs-table-handle">
<Button @click="editRegion(item,index)" type="info" size="small"
style="margin-bottom: 5px">修改
</Button>
<Button @click="removeTemplateChildren(index)" :loading="submitLoading" type="error"
<Button @click="removeTemplateChildren(index)" type="error"
size="small" style="margin-bottom: 5px">删除
</Button>
</td>
@ -145,7 +145,7 @@
<Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'"
icon="ios-create-outline">为指定城市设置运费模板
</Button>
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">保存
<Button @click="handleSubmit" type="primary" style="margin-right:5px">保存
</Button>
</Form-item>
</Form>
@ -170,12 +170,15 @@ export default {
},
data() {
return {
gotop: false,
index:'0',
selectedIndex: 0, //
item: "", //
shipInfo: {}, //
title: "添加运费模板", //
operation: "add", //
currentTab: "", // tab
// submitLoading:false,
saveError: false, //
csTab: false, //
form: {
@ -234,15 +237,19 @@ export default {
{
area: "",
areaId: "",
firstCompany: "1",
firstPrice: "",
continuedCompany: "1",
continuedPrice: "",
firstCompany: 0,
firstPrice: 0,
continuedCompany: 0,
continuedPrice: 0,
selectedAll: false,
},
],
};
},
handleScroll(){
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
scrolltop > 30 ? (this.gotop = true) : (this.gotop = false);
},
//
edit(item) {
this.title = "修改运费模板";
@ -252,6 +259,15 @@ export default {
this.saveError = false;
//form
this.form = item;
let top = document.documentElement.scrollTop || document.body.scrollTop;
//
const timeTop = setInterval(() => {
document.body.scrollTop = document.documentElement.scrollTop = top -= 50;
if (top <= 0) {
clearInterval(timeTop);
}
}, 0);
},
//
editRegion(item, index) {
@ -268,7 +284,6 @@ export default {
});
});
});
this.$store.state.shipTemplate = this.form.freightTemplateChildList;
this.$refs.region.open(item, index);
@ -328,9 +343,9 @@ export default {
};
this.$refs.form.validate((valid) => {
const regNumber = /^\+?[1-9][0-9]*$/;
const regMoney =
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
// const regNumber = /^\+?[1-9][0-9]*$/;
// const regMoney =
// /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
if (valid) {
if (this.form.pricingMethod != "FREE") {
//
@ -349,23 +364,23 @@ export default {
this.saveError = true;
return;
}
if (
regNumber.test(
this.form.freightTemplateChildList[i].firstCompany
) == false ||
regNumber.test(
this.form.freightTemplateChildList[i].continuedCompany
) == false ||
regMoney.test(
this.form.freightTemplateChildList[i].firstPrice
) == false ||
regMoney.test(
this.form.freightTemplateChildList[i].continuedPrice
) == false
) {
this.saveError = true;
return;
}
// if (
// regNumber.test(
// this.form.freightTemplateChildList[i].firstCompany
// ) == false ||
// regNumber.test(
// this.form.freightTemplateChildList[i].continuedCompany
// ) == false ||
// regMoney.test(
// this.form.freightTemplateChildList[i].firstPrice
// ) == false ||
// regMoney.test(
// this.form.freightTemplateChildList[i].continuedPrice
// ) == false
// ) {
// this.saveError = true;
// return;
// }
}
}
@ -400,10 +415,10 @@ export default {
const params = {
area: "",
areaId: "",
firstCompany: "1",
firstPrice: "",
continuedCompany: "1",
continuedPrice: "",
firstCompany: 0,
firstPrice: 0,
continuedCompany: 0,
continuedPrice: 0,
selectedAll: false,
};
this.form.freightTemplateChildList.push(params);
@ -437,6 +452,7 @@ export default {
},
mounted() {
this.init();
window.addEventListener("scroll", this.handleScroll, true);
},
};
</script>