编辑时间,积分抵用,列表

This commit is contained in:
faiz 2024-12-07 18:17:04 +08:00
parent d15c719d48
commit 41b993cc9a
5 changed files with 1218 additions and 952 deletions

View File

@ -499,6 +499,10 @@ export function updatetProductLabel(id, data) {
export function updatetSeckillLabel(id, data) {
return request.post(`seckill/product/labels/${id}`, data)
}
/** 秒杀列表 -- 编辑时间 */
export function updatetSeckillUpdate(id, data) {
return request.post(`seckill/product/update/day/${id}`, data)
}
/** 预售列表 -- 编辑标签 */
export function updatetPresellLabel(id, data) {
return request.post(`store/product/presell/labels/${id}`, data)

View File

@ -1,21 +1,47 @@
<template>
<div style="padding: 0 10px;">
<div class="mobile-page paddingBox" :class="bgStyle===0?'':'pageOn'" :style="{marginTop:slider+'px',background:activeColor}">
<div style="padding: 0 10px">
<div
class="mobile-page paddingBox"
:class="bgStyle === 0 ? '' : 'pageOn'"
:style="{ marginTop: slider + 'px', background: activeColor }"
>
<div class="home_product">
<!-- 单列 -->
<template v-if="itemStyle == 0">
<div class="list-wrapper itemA" v-if="list.length > 0">
<div class="item" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index">
<div
class="item"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box">
<img v-if="item.image" :src="item.image" alt="">
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line2" v-if="titleShow">{{item.store_name}}</div>
<div class="title line2" v-if="titleShow">
{{ item.store_name }}
</div>
<div class="text">
<div class="label" :style="{background:labelColor}">旗舰店</div>
<div class="coupon" v-if="item.couponId && item.couponId.length && couponShow" :style="'border:1px solid '+labelColor+';color:'+labelColor">领券</div>
<div class="label" :style="{ background: labelColor }">
旗舰店
</div>
<div
class="coupon"
v-if="item.couponId && item.couponId.length && couponShow"
:style="
'border:1px solid ' +
labelColor +
';color:' +
labelColor
"
>
领券
</div>
<div class="ship">包邮</div>
</div>
</div>
@ -26,7 +52,7 @@
<!-- <div class="old-price" v-if="opriceShow">¥{{item.ot_price}}</div> -->
</div>
<div v-if="grabShow" class="right">
<img src="@/assets/images/aq-btn.png" alt="">
<img src="@/assets/images/aq-btn.png" alt="" />
</div>
</div>
</div>
@ -34,42 +60,62 @@
<div class="list-wrapper itemA" v-else>
<div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div>
</div>
<div class="text">
<div class="label" :style="{background:labelColor}">旗舰店</div>
<div class="coupon" v-if="couponShow" :style="'border:1px solid '+labelColor+';color:'+labelColor">领券</div>
<div class="label" :style="{ background: labelColor }">
旗舰店
</div>
<div
class="coupon"
v-if="couponShow"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
>
领券
</div>
<div class="ship">包邮</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
¥<span>199</span>
</div>
<div class="num" v-if="priceShow">¥<span>199</span></div>
<!-- <div class="old-price" v-if="opriceShow">¥399</div> -->
</div>
</div>
</div>
<div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div>
</div>
<div class="text">
<div class="label" :style="{background:labelColor}">旗舰店</div>
<div class="coupon" v-if="couponShow" :style="'border:1px solid '+labelColor+';color:'+labelColor">领券</div>
<div class="label" :style="{ background: labelColor }">
旗舰店
</div>
<div
class="coupon"
v-if="couponShow"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
>
领券
</div>
<div class="ship">包邮</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
¥<span>199</span>
</div>
<div class="num" v-if="priceShow">¥<span>199</span></div>
<!-- <div class="old-price" v-if="opriceShow">¥399</div> -->
</div>
</div>
@ -79,14 +125,23 @@
<!-- 二列 -->
<template v-if="itemStyle == 1">
<div class="list-wrapper itemC" v-if="list.length > 0">
<div class="item" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index">
<div
class="item"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box">
<img v-if="item.image" :src="item.image" alt="">
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line2" v-if="titleShow">{{item.store_name}}</div>
<div class="title line2" v-if="titleShow">
{{ item.store_name }}
</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
@ -96,7 +151,16 @@
</div>
<div class="text">
<!-- <div class="label" :style="{background:labelColor}" v-if="index==0">官方旗舰店</div> -->
<div class="coupon" :style="'border:1px solid '+labelColor+';color:'+labelColor" :class="priceShow?'':'on'" v-if="item.couponId && item.couponId.length && couponShow">领券</div>
<div
class="coupon"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
:class="priceShow ? '' : 'on'"
v-if="item.couponId && item.couponId.length && couponShow"
>
领券
</div>
</div>
</div>
</div>
@ -104,41 +168,57 @@
<div class="list-wrapper itemC" v-else>
<div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
¥<span>66.66</span>
</div>
<div class="num" v-if="priceShow">¥<span>66.66</span></div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div>
<div class="text">
<!-- <div class="label" :style="{background:labelColor}">官方旗舰店</div> -->
<div class="coupon" :style="'border:1px solid '+labelColor+';color:'+labelColor" v-if="couponShow">领券</div>
<div
class="coupon"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
v-if="couponShow"
>
领券
</div>
</div>
</div>
</div>
<div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line2" v-if="titleShow">商品名称</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
<span>66.66</span>
</div>
<div class="num" v-if="priceShow"><span>66.66</span></div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div>
<div class="text">
<!-- <div class="label" :style="{background:labelColor}">官方旗舰店</div> -->
<div class="coupon" :style="'border:1px solid '+labelColor+';color:'+labelColor" v-if="couponShow">领券</div>
<div
class="coupon"
:style="
'border:1px solid ' + labelColor + ';color:' + labelColor
"
v-if="couponShow"
>
领券
</div>
</div>
</div>
</div>
@ -147,14 +227,23 @@
<!-- 三列 -->
<template v-if="itemStyle == 2">
<div class="list-wrapper itemB" v-if="list.length > 0">
<div class="item" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index">
<div
class="item"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box">
<img v-if="item.image" :src="item.image" alt="">
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line1" v-if="titleShow">{{item.store_name}}</div>
<div class="title line1" v-if="titleShow">
{{ item.store_name }}
</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
@ -168,48 +257,48 @@
<div class="list-wrapper itemB" v-else>
<div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line1" v-if="titleShow">商品名称</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
¥<span>66.66</span>
</div>
<div class="num" v-if="priceShow">¥<span>66.66</span></div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div>
</div>
</div>
<div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line1" v-if="titleShow">商品名称</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
¥<span>66.66</span>
</div>
<div class="num" v-if="priceShow">¥<span>66.66</span></div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div>
</div>
</div>
<div class="item" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
</div>
<div class="info">
<div class="hd">
<div class="title line1" v-if="titleShow">商品名称</div>
</div>
<div class="price" :style="{ color: fontColor }">
<div class="num" v-if="priceShow">
¥<span>66.66</span>
</div>
<div class="num" v-if="priceShow">¥<span>66.66</span></div>
<!-- <div class="old-price" v-if="opriceShow">¥99.99</div> -->
</div>
</div>
@ -219,13 +308,25 @@
<!-- 大图 -->
<template v-if="itemStyle == 3">
<div class="listBig" v-if="list.length > 0">
<div class="itemBig" :class="conStyle?'':'itemOn'" v-for="(item,index) in list" :key="index">
<div
class="itemBig"
:class="conStyle ? '' : 'itemOn'"
v-for="(item, index) in list"
:key="index"
>
<div class="img-box">
<img v-if="item.image" :src="item.image" alt="">
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<img v-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
<div class="name line2"><span v-if="titleShow">{{item.store_name}}</span></div>
<div class="price" :style="{color:fontColor}"><span v-if="priceShow"><span class="num">{{item.price}}</span></span>
</div>
<div class="name line2">
<span v-if="titleShow">{{ item.store_name }}</span>
</div>
<div class="price" :style="{ color: fontColor }">
<span v-if="priceShow"
><span class="num">{{ item.price }}</span></span
>
<!-- <span class="old-price" v-if="opriceShow">¥{{item.ot_price}}</span> -->
</div>
</div>
@ -233,19 +334,29 @@
<div class="listBig" v-else>
<div class="itemBig" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
<div class="name line2"><span v-if="titleShow">商品名称</span></div>
<div class="price" :style="{color:fontColor}"><span v-if="priceShow">¥<span class="num">66.66</span></span>
</div>
<div class="name line2">
<span v-if="titleShow">商品名称</span>
</div>
<div class="price" :style="{ color: fontColor }">
<span v-if="priceShow">¥<span class="num">66.66</span></span>
<!-- <span class="old-price" v-if="opriceShow">¥99.99</span> -->
</div>
</div>
<div class="itemBig" :class="conStyle ? '' : 'itemOn'">
<div class="img-box">
<div class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="empty-box">
<span class="iconfont-diy icontupian"></span>
</div>
<div class="name line2"><span v-if="titleShow">商品名称</span></div>
<div class="price" :style="{color:fontColor}"><span v-if="priceShow">¥<span class="num">66.66</span></span>
</div>
<div class="name line2">
<span v-if="titleShow">商品名称</span>
</div>
<div class="price" :style="{ color: fontColor }">
<span v-if="priceShow">¥<span class="num">66.66</span></span>
<!-- <span class="old-price" v-if="opriceShow">¥99.99</span> -->
</div>
</div>
@ -257,241 +368,246 @@
</template>
<script>
import { mapState } from 'vuex'
import { getProduct } from '@/api/diy'
import { mapState } from "vuex";
import { getProduct } from "@/api/diy";
export default {
name: 'home_goods_list',
cname: '商品列表',
configName: 'c_home_goods_list',
icon: 'iconshangpinliebiao2',
name: "home_goods_list",
cname: "商品列表",
configName: "c_home_goods_list",
icon: "iconshangpinliebiao2",
type: 0, // 0 1 2
defaultName: 'goodList', //
defaultName: "goodList", //
props: {
index: {
type: null
type: null,
},
num: {
type: null
}
type: null,
},
},
computed: {
...mapState('mobildConfig', ['defaultArray'])
...mapState("mobildConfig", ["defaultArray"]),
},
watch: {
pageData: {
handler(nVal, oVal) {
this.setConfig(nVal)
this.setConfig(nVal);
},
deep: true
deep: true,
},
num: {
handler(nVal, oVal) {
let data = this.$store.state.mobildConfig.defaultArray[nVal]
this.setConfig(data)
},
deep: true
},
'defaultArray': {
handler (nVal, oVal) {
let data = this.$store.state.mobildConfig.defaultArray[this.num]
let data = this.$store.state.mobildConfig.defaultArray[nVal];
this.setConfig(data);
},
deep: true
}
deep: true,
},
defaultArray: {
handler(nVal, oVal) {
let data = this.$store.state.mobildConfig.defaultArray[this.num];
this.setConfig(data);
},
deep: true,
},
},
data() {
return {
//
defaultConfig: {
name: 'goodList',
name: "goodList",
timestamp: this.num,
setUp: {
tabVal: '0'
tabVal: "0",
},
tabConfig: {
title: '选择模板',
title: "选择模板",
tabVal: 0,
type: 1,
tabList: [
{
name: '自动选择',
icon: 'iconzidongxuanze'
name: "自动选择",
icon: "iconzidongxuanze",
},
{
name: '手动选择',
icon: 'iconshoudongxuanze'
}
]
name: "手动选择",
icon: "iconshoudongxuanze",
},
],
},
titleShow: {
title: '是否显示名称',
val: true
title: "是否显示名称",
val: true,
},
// opriceShow: {
// title: '',
// val: true
// },
priceShow: {
title: '是否显示价格',
val: true
title: "是否显示价格",
val: true,
},
couponShow: {
title: '是否显示优惠券',
val: true
title: "是否显示优惠券",
val: true,
},
grabShow: {
title: '是否显示抢',
val: false
title: "是否显示抢",
val: false,
},
selectConfig: {
title: '商品分类',
title: "商品分类",
activeValue: [],
list: [
{
value: '',
label: ''
value: "",
label: "",
},
{
value: '',
label: ''
}
]
value: "",
label: "",
},
],
},
goodsSort: {
title: '商品排序',
name: 'goodsSort',
title: "商品排序",
name: "goodsSort",
type: 0,
list: [
{
val: '综合',
icon: 'iconComm_whole'
val: "综合",
icon: "iconComm_whole",
},
{
val: '销量',
icon: 'iconComm_number'
val: "销量",
icon: "iconComm_number",
},
{
val: '价格',
icon: 'iconComm_Price'
}
]
val: "价格",
icon: "iconComm_Price",
},
],
},
numConfig: {
val: 6
val: 6,
},
themeColor: {
title: '背景颜色',
name: 'themeColor',
default: [{
item: '#fff'
}],
title: "背景颜色",
name: "themeColor",
default: [
{
item: "#fff",
},
],
color: [
{
item: '#fff'
}
]
item: "#fff",
},
],
},
fontColor: {
title: '价格颜色',
name: 'fontColor',
default: [{
item: '#e93323'
}],
title: "价格颜色",
name: "fontColor",
default: [
{
item: "#e93323",
},
],
color: [
{
item: '#e93323'
}
]
item: "#e93323",
},
],
},
labelColor: {
title: '活动标签',
name: 'labelColor',
default: [{
item: '#e93323'
}],
title: "活动标签",
name: "labelColor",
default: [
{
item: "#e93323",
},
],
color: [
{
item: '#e93323'
}
]
item: "#e93323",
},
],
},
itemStyle: {
title: '显示类型',
name: 'itemSstyle',
title: "显示类型",
name: "itemSstyle",
type: 0,
list: [
{
val: '单列',
icon: 'iconzuoyoutuwen'
val: "单列",
icon: "iconzuoyoutuwen",
},
{
val: '两列',
icon: 'iconlianglie'
val: "两列",
icon: "iconlianglie",
},
{
val: '三列',
icon: 'iconsanlie'
val: "三列",
icon: "iconsanlie",
},
{
val: '大图',
icon: 'icondanlie'
}
]
val: "大图",
icon: "icondanlie",
},
],
},
bgStyle: {
title: '背景样式',
name: 'bgStyle',
title: "背景样式",
name: "bgStyle",
type: 0,
list: [
{
val: '直角',
icon: 'iconPic_square'
val: "直角",
icon: "iconPic_square",
},
{
val: '圆角',
icon: 'iconPic_fillet'
}
]
val: "圆角",
icon: "iconPic_fillet",
},
],
},
conStyle: {
title: '内容样式',
name: 'conStyle',
title: "内容样式",
name: "conStyle",
type: 1,
list: [
{
val: '直角',
icon: 'iconPic_square'
val: "直角",
icon: "iconPic_square",
},
{
val: '圆角',
icon: 'iconPic_fillet'
}
]
val: "圆角",
icon: "iconPic_fillet",
},
],
},
mbConfig: {
title: '页面间距',
title: "页面间距",
val: 0,
min: 0
min: 0,
},
productList: {
title:'商品列表',
list:[]
title: "商品列表",
list: [],
},
goodsList: {
max: 20,
list:[]
}
list: [],
},
},
navlist: [],
imgStyle: '',
txtColor: '',
slider: '',
imgStyle: "",
txtColor: "",
slider: "",
tabCur: 0,
list: [],
activeColor: '',
fontColor: '',
labelColor:'',
activeColor: "",
fontColor: "",
labelColor: "",
pageData: {},
itemStyle: 0,
titleShow: true,
@ -500,18 +616,18 @@ export default {
grabShow: true,
couponShow: true,
bgStyle: 0,
conStyle:1
}
conStyle: 1,
};
},
mounted() {
this.$nextTick(() => {
this.pageData = this.$store.state.mobildConfig.defaultArray[this.num]
this.getProductList(this.pageData)
})
this.pageData = this.$store.state.mobildConfig.defaultArray[this.num];
this.getProductList(this.pageData);
});
},
methods: {
setConfig(data) {
if(!data) return
if (!data) return;
if (data.mbConfig) {
this.itemStyle = data.itemStyle.type || 0;
this.activeColor = data.themeColor.color[0].item;
@ -521,7 +637,7 @@ export default {
this.titleShow = data.titleShow.val;
// this.opriceShow = data.opriceShow.val;
this.priceShow = data.priceShow.val;
this.grabShow = data.grabShow.val;
this.grabShow = data.grabShow?.val;
this.couponShow = data.couponShow.val;
this.bgStyle = data.bgStyle.type;
this.conStyle = data.conStyle.type;
@ -531,12 +647,11 @@ export default {
} else {
this.list = data.productList.list;
}
}
},
/**获取之前选择的商品 */
getProductList(data) {
if(!data)return
if (!data) return;
// if (!data.name && data == 1) {
// this.pageData.goodsList.list = []
// return
@ -545,35 +660,42 @@ export default {
// this.pageData.goodsList.list = []
// return
// }
let activeValue = this.pageData.selectConfig.activeValue
let parmas = {}
if(data.tabConfig.tabVal){ //
parmas = { product_ids:data.goodsList.ids.toString() }
let activeValue = this.pageData.selectConfig.activeValue;
let parmas = {};
if (data.tabConfig.tabVal) {
//
parmas = { product_ids: data.goodsList.ids.toString() };
} else {
parmas = {
cate_pid: activeValue,
page: 1,
limit: this.pageData.numConfig.val,
order: this.pageData.goodsSort.type == 2 ? 'price_asc' : this.pageData.goodsSort.type == 1 ? 'sales' : '',
order:
this.pageData.goodsSort.type == 2
? "price_asc"
: this.pageData.goodsSort.type == 1
? "sales"
: "",
};
}
}
getProduct(parmas).then(res => {
this.list = res.data.list
getProduct(parmas).then((res) => {
this.list = res.data.list;
if (data.tabConfig.tabVal) {
this.pageData.goodsList.list = res.data.list;
} else {
this.pageData.productList.list = res.data.list;
}
this.setConfig(this.pageData)
})
}
}
}
this.setConfig(this.pageData);
});
},
},
};
</script>
<style scoped lang="scss">
.itemOn {
border-radius: 0 !important;
img,.empty-box{
img,
.empty-box {
border-radius: 0 !important;
}
.img-box {
@ -692,14 +814,17 @@ export default {
font-size: 12px;
&.active {
.title {
color: #FF4444;
color: #ff4444;
}
.label {
color: #fff;
background:linear-gradient(270deg,rgba(255,84,0,1) 0%,rgba(255,0,0,1) 100%);
background: linear-gradient(
270deg,
rgba(255, 84, 0, 1) 0%,
rgba(255, 0, 0, 1) 100%
);
}
}
}
}
}
@ -716,7 +841,8 @@ export default {
position: relative;
width: 100%;
height: 173px;
img,.box{
img,
.box {
width: 100%;
height: 100%;
border-radius: 10px;
@ -728,7 +854,7 @@ export default {
}
.box {
background: #D8D8D8;
background: #d8d8d8;
}
}
.info {
@ -750,7 +876,8 @@ export default {
text-align: center;
line-height: 15px;
}
.coupon,.ship{
.coupon,
.ship {
padding: 0 5px;
line-height: 13px;
border-radius: 2px;
@ -758,8 +885,8 @@ export default {
margin-left: 3px;
}
.ship {
color: #FF9000;
border: 1px solid #FF9000;
color: #ff9000;
border: 1px solid #ff9000;
}
.old-price {
color: #aaa;
@ -799,7 +926,9 @@ export default {
position: relative;
width: 110px;
height: 110px;
img,.box,.empty-box{
img,
.box,
.empty-box {
border-radius: 10px;
}
}
@ -838,7 +967,9 @@ export default {
position: relative;
width: 100%;
height: 110px;
img,.box,.empty-box{
img,
.box,
.empty-box {
border-radius: 10px;
}
}
@ -852,7 +983,9 @@ export default {
&.itemC {
.item {
background-color: #fff;
img,.box,.empty-box{
img,
.box,
.empty-box {
border-radius: 10px;
}
.price {

View File

@ -38,7 +38,7 @@
</el-select>
</el-select>
</el-form-item>
<el-form-item label="提现方式:" prop="extract_type">
<el-form-item label="方式:" prop="extract_type">
<el-select
v-model="tableFrom.extract_type"
clearable
@ -106,7 +106,7 @@
<el-table-column prop="extract_price" label="提现金额" min-width="90" />
<el-table-column prop="tx_price" label="到账金额" min-width="90" />
<el-table-column prop="ratio_price" label="手续费" min-width="90" />
<el-table-column label="提现方式" min-width="100">
<el-table-column label="方式" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.extract_type | extractTypeFilter }}</span>
</template>
@ -250,7 +250,7 @@
</div>
</div>
<div class="list-count">
<div class="title">提现方式</div>
<div class="title">方式</div>
<div class="acea-row">
<div class="list">
<label class="name">审核状态</label

View File

@ -13,58 +13,96 @@
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="积分:" prop="integral_status">
<el-radio-group
v-model="formValidate.integral_status">
<el-radio-group v-model="formValidate.integral_status">
<el-radio :label="0" class="radio">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
<span class="label_tip">指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span>
<span class="label_tip"
>指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span
>
</el-form-item>
</el-col>
<el-col :span="24" v-if="formValidate.integral_status > 0">
<el-form-item label="积分赠送:" prop="integral_give_status">
<el-radio-group
v-model="formValidate.integral_give_status">
<el-radio-group v-model="formValidate.integral_give_status">
<el-radio :label="0" class="radio">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
<!-- <span class="label_tip">指平台积分功能的开启或关闭开启积分功能正常启用关闭积分功能不可使用且前端不展示</span> -->
</el-form-item>
</el-col>
<!-- <el-col v-if="formValidate.integral_status>0">
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分抵用金额:" prop="integral_money">
<el-input-number :min="0" v-model="formValidate.integral_money" size="small" placeholder="积分抵用金额" />
<el-input-number
:min="0"
v-model="formValidate.integral_money"
size="small"
placeholder="积分抵用金额"
/>
<span class="label_tip">指1积分抵用多少金额单位 </span>
</el-form-item>
</el-col> -->
</el-col>
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="订单返还积分比例(%)" prop="integral_price_return_rate">
<el-input-number :min="0" v-model="formValidate.integral_price_return_rate" size="small" placeholder="订单返还积分比例(%)" />
<el-form-item
label="订单返还积分比例(%)"
prop="integral_price_return_rate"
>
<el-input-number
:min="0"
v-model="formValidate.integral_price_return_rate"
size="small"
placeholder="订单返还积分比例(%)"
/>
<span class="label_tip">订单支付价格返还比例%</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分兑现倍数:" prop="integral_money_time">
<el-input-number :min="0" v-model="formValidate.integral_money_time" size="small" placeholder="积分兑现倍数" />
<el-input-number
:min="0"
v-model="formValidate.integral_money_time"
size="small"
placeholder="积分兑现倍数"
/>
<span class="label_tip">一元兑积分数量</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="积分签到返还天数:" prop="integral_return_day">
<el-input-number :min="0" v-model="formValidate.integral_return_day" size="small" placeholder="积分签到返还天数" />
<el-input-number
:min="0"
v-model="formValidate.integral_return_day"
size="small"
placeholder="积分签到返还天数"
/>
<span class="label_tip">积分连续签到返还结束天数</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="每日签到封顶积分:" prop="integral_sign_max">
<el-input-number :min="0" v-model="formValidate.integral_sign_max" size="small" placeholder="每日签到封顶积分" />
<el-input-number
:min="0"
v-model="formValidate.integral_sign_max"
size="small"
placeholder="每日签到封顶积分"
/>
<span class="label_tip">每个用户日签到获得积分上限</span>
</el-form-item>
</el-col>
<el-col v-if="formValidate.integral_status > 0">
<el-form-item label="每日签到积分递减(%)" prop="integral_sign_dec_rate">
<el-input-number :min="0" v-model="formValidate.integral_sign_dec_rate" size="small" placeholder="每日签到积分递减(%)" />
<span class="label_tip">每个用户日签到获得每单返还积分逐日递减%</span>
<el-form-item
label="每日签到积分递减(%)"
prop="integral_sign_dec_rate"
>
<el-input-number
:min="0"
v-model="formValidate.integral_sign_dec_rate"
size="small"
placeholder="每日签到积分递减(%)"
/>
<span class="label_tip"
>每个用户日签到获得每单返还积分逐日递减%</span
>
</el-form-item>
</el-col>
<!-- <el-col v-if="formValidate.integral_status>0">
@ -104,9 +142,24 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item style="margin-top:30px;">
<el-button v-if="formValidate.integral_status>0" :loading="loading" type="primary" class="submission" size="small" @click="preview">预览</el-button>
<el-button :loading="loading" type="primary" class="submission" size="small" @click="handleSubmit('formValidate')">提交</el-button>
<el-form-item style="margin-top: 30px">
<el-button
v-if="formValidate.integral_status > 0"
:loading="loading"
type="primary"
class="submission"
size="small"
@click="preview"
>预览</el-button
>
<el-button
:loading="loading"
type="primary"
class="submission"
size="small"
@click="handleSubmit('formValidate')"
>提交</el-button
>
</el-form-item>
</el-form>
</el-card>
@ -131,14 +184,13 @@
</template>
<script>
import ueditorFrom from "@/components/ueditorFrom";
import VueUeditorWrap from "vue-ueditor-wrap";
import { mapState } from 'vuex'
import { mapState } from "vuex";
import { getIntegralConfig, updateIntegralConfig } from "@/api/marketing";
import { roterPre } from "@/settings";
import SettingMer from '@/libs/settingMer';
import { getToken } from '@/utils/auth'
import SettingMer from "@/libs/settingMer";
import { getToken } from "@/utils/auth";
const defaultObj = {
integral_status: 1,
@ -153,26 +205,27 @@ const defaultObj = {
integral_money_time: 0,
integral_return_day: 0,
integral_sign_max: 0,
integral_sign_dec_rate:0
integral_sign_dec_rate: 0,
};
export default {
name: "ProductProductAdd",
components: { ueditorFrom, VueUeditorWrap },
data() {
const url = SettingMer.https + '/upload/image/0/file?ueditor=1&token=' + getToken()
const url =
SettingMer.https + "/upload/image/0/file?ueditor=1&token=" + getToken();
return {
myConfig: {
autoHeightEnabled: false, //
initialFrameHeight: 500, //
initialFrameWidth: "100%", //
UEDITOR_HOME_URL: '/UEditor/',
'serverUrl': url,
'imageUrl': url,
'imageFieldName': 'file',
imageUrlPrefix: '',
'imageActionName': 'upfile',
'imageMaxSize': 2048000,
'imageAllowFiles': ['.png', '.jpg', '.jpeg', '.gif', '.bmp']
UEDITOR_HOME_URL: "/UEditor/",
serverUrl: url,
imageUrl: url,
imageFieldName: "file",
imageUrlPrefix: "",
imageActionName: "upfile",
imageMaxSize: 2048000,
imageAllowFiles: [".png", ".jpg", ".jpeg", ".gif", ".bmp"],
},
roterPre: roterPre,
fullscreenLoading: false,
@ -181,36 +234,45 @@ export default {
modals: false,
ruleValidate: {
integral_status: [
{ required: true, message: "请选择是否开启积分功能", trigger: "blur" }
{
required: true,
message: "请选择是否开启积分功能",
trigger: "blur",
},
],
integral_money: [
{ required: true, message: "请输入积分抵用金额", trigger: "blur" }
{ required: true, message: "请输入积分抵用金额", trigger: "blur" },
],
integral_order_rate: [
{ required: true, message: "请输入下单赠送积分比例", trigger: "blur" }
{
required: true,
message: "请输入下单赠送积分比例",
trigger: "blur",
},
],
integral_freeze: [
{ required: true, message: "请输入下单赠送积分冻结期", trigger: "blur" }
{
required: true,
message: "请输入下单赠送积分冻结期",
trigger: "blur",
},
],
integral_clear_time: [
{ required: true, message: "请输入积分清除时间", trigger: "blur" }
{ required: true, message: "请输入积分清除时间", trigger: "blur" },
],
integral_user_give: [
{ required: true, message: "请输入邀请好友赠送积分数", trigger: "blur" }
]
{
required: true,
message: "请输入邀请好友赠送积分数",
trigger: "blur",
},
],
},
};
},
computed: {
},
watch: {
},
created() {
},
computed: {},
watch: {},
created() {},
mounted() {
this.getInfo();
},
@ -219,11 +281,11 @@ export default {
getInfo() {
this.fullscreenLoading = true;
getIntegralConfig()
.then(async res => {
this.formValidate = res.data
.then(async (res) => {
this.formValidate = res.data;
this.fullscreenLoading = false;
})
.catch(res => {
.catch((res) => {
this.fullscreenLoading = false;
this.$message.error(res.message);
});
@ -234,17 +296,17 @@ export default {
//
handleSubmit(name) {
this.$refs[name].validate(valid => {
this.$refs[name].validate((valid) => {
if (valid) {
this.fullscreenLoading = true;
this.loading = true;
updateIntegralConfig(this.formValidate)
.then(async res => {
.then(async (res) => {
this.fullscreenLoading = false;
this.$message.success(res.message);
this.loading = false;
})
.catch(res => {
.catch((res) => {
this.fullscreenLoading = false;
this.loading = false;
this.$message.error(res.message);
@ -269,7 +331,7 @@ export default {
editor: editor,
name: uiName,
title: "上传图片",
cssRules: "width:1200px;height:500px;padding:20px;"
cssRules: "width:1200px;height:500px;padding:20px;",
});
this.dialog = dialog;
let btn = new window.UE.ui.Button({
@ -280,7 +342,7 @@ export default {
// dialog
dialog.render();
dialog.open();
}
},
});
return btn;
},
@ -294,7 +356,7 @@ export default {
editor: editor,
name: uiName,
title: "上传视频",
cssRules: "width:600px;height:420px;padding:10px 20px 20px;"
cssRules: "width:600px;height:420px;padding:10px 20px 20px;",
});
this.dialog = dialog;
let btn = new window.UE.ui.Button({
@ -305,14 +367,14 @@ export default {
// dialog
dialog.render();
dialog.open();
}
},
});
return btn;
},
38
);
}
}
},
},
};
</script>
<style scoped lang="scss">
@ -327,7 +389,8 @@ export default {
.selWidthd {
width: 300px;
}
.dialog-scustom,.addDia{
.dialog-scustom,
.addDia {
min-width: 400px;
height: 900px;
.el-dialog {
@ -344,7 +407,7 @@ export default {
.agreement {
width: 350px;
margin: 0 auto;
box-shadow: 1px 5px 5px 2px rgba(0,0,0,.2);
box-shadow: 1px 5px 5px 2px rgba(0, 0, 0, 0.2);
padding: 26px;
border-radius: 15px;
.content {
@ -418,5 +481,4 @@ export default {
left: 46px;
top: -4px;
}
</style>

View File

@ -325,6 +325,9 @@
@click="onEdit(scope.row.product_id)"
>编辑</el-button
>
<el-button type="text" size="small" @click="onEditDate(scope.row)"
>编辑时间</el-button
>
<el-button type="text" size="small" @click="onAuditFree(scope.row)"
>价格编辑</el-button
>
@ -692,6 +695,39 @@
>
</span>
</el-dialog>
<!--编辑时间-->
<el-dialog
v-if="dialogDate"
title="编辑时间"
:visible.sync="dialogDate"
width="470px"
:before-close="handleClose"
>
<el-form
ref="dateForm"
:model="dateForm"
size="small"
@submit.native.prevent
>
<el-form-item prop="date">
<el-date-picker
v-model="dateForm.date"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogDate = false">取消</el-button>
<el-button
type="primary"
size="small"
@click="submitDateForm('dateForm')"
>提交</el-button
>
</span>
</el-dialog>
<edit-attr ref="editAttr" />
</div>
</template>
@ -708,6 +744,7 @@ import {
seckillProductOffApi,
getProductLabelApi,
updatetSeckillLabel,
updatetSeckillUpdate,
exportSeckillApi,
} from "@/api/product";
import { seckillDetailApi } from "@/api/marketing";
@ -781,6 +818,9 @@ export default {
timeVal: [],
dialogVisible: false,
detailDialog: false,
dateForm: {
date: "",
},
checkboxGroup: [],
formValidate: {
is_hot: 0,
@ -851,6 +891,8 @@ export default {
previewKey: "",
labelList: [],
dialogLabel: false,
dialogDate: false,
seckill_active_id: "",
labelForm: {},
};
},
@ -988,6 +1030,14 @@ export default {
sys_labels: row.sys_labels,
};
},
//
onEditDate(row) {
this.dialogDate = true;
this.seckill_active_id = row.seckillActive.seckill_active_id;
this.dateForm = {
date: row.seckillActive.start_day,
};
},
submitForm(name) {
this.$refs[name].validate((valid) => {
if (valid) {
@ -1003,6 +1053,21 @@ export default {
}
});
},
submitDateForm(name) {
this.$refs[name].validate((valid) => {
if (valid) {
updatetSeckillUpdate(this.seckill_active_id, this.dateForm).then(
({ message }) => {
this.$message.success(message);
this.getList("");
this.dialogDate = false;
}
);
} else {
return;
}
});
},
//
handleSubmit(name) {
this.$refs[name].validate((valid) => {
@ -1040,8 +1105,10 @@ export default {
: (this.formValidate.is_hot = 0 && this.checkboxGroup.remove("is_hot"));
},
handleClose() {
this.$refs["dateForm"].resetFields();
this.dialogVisible = false;
this.dialogLabel = false;
this.dialogDate = false;
},
watCh(val) {
const tmp = {};