This commit is contained in:
chenjiajun
2021-06-25 16:43:25 +08:00
parent 064fa6dc34
commit 88f5ab4329
11 changed files with 69 additions and 44 deletions

View File

@ -8,6 +8,14 @@ export function add(data) {
}) })
} }
export function edit(data) {
return request({
url: 'api/yxStoreCombination',
method: 'put',
data
})
}
export function del(id) { export function del(id) {
return request({ return request({
url: 'api/yxStoreCombination/' + id, url: 'api/yxStoreCombination/' + id,

View File

@ -105,7 +105,7 @@
:src="item.url" :src="item.url"
fit="contain" fit="contain"
:preview-src-list="[item.url]" :preview-src-list="[item.url]"
:z-index="999" :z-index="9999"
/> />
<div> <div>
<el-checkbox class="material-name" :label="item.url"> <el-checkbox class="material-name" :label="item.url">

View File

@ -8,10 +8,6 @@
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<Github class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="全屏缩放" effect="dark" placement="bottom"> <el-tooltip content="全屏缩放" effect="dark" placement="bottom">
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip>

View File

@ -25,7 +25,7 @@ export default {
}, },
data() { data() {
return { return {
title: 'YSHOP-后台管理', title: '乐享美酒-后台管理',
logo: Logo logo: Logo
} }
} }

View File

@ -2,7 +2,7 @@ module.exports = {
/** /**
* @description 网站标题 * @description 网站标题
*/ */
title: 'YSHOP-3.2', title: '乐享美酒',
/** /**
* @description 是否显示 tagsView * @description 是否显示 tagsView
*/ */
@ -42,9 +42,9 @@ module.exports = {
/** /**
* 底部文字支持html语法 * 底部文字支持html语法
*/ */
footerTxt: '© 2019-2021 YSHOP <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">All Rights Reserved</a>', footerTxt: '',
/** /**
* 备案号 * 备案号
*/ */
caseNumber: '豫ICP备17049587-2号' caseNumber: ''
} }

View File

@ -118,6 +118,11 @@ export default {
templateList: [], templateList: [],
form1: { form1: {
good:{ good:{
productId: null,
storeName: null,
image: null,
otPrice: null,
price: null,
} }
}, },
form: { form: {
@ -168,10 +173,10 @@ export default {
} }
}, },
watch: { watch: {
'form.imageArr': function(val) { 'form.image': function(val) {
if (val && Array.isArray(val)) { this.form1.good.image = this.form.image
this.form.image = val.join(',') this.form1.good.productId = this.form.productId
}
}, },
'form.sliderImageArr': function(val) { 'form.sliderImageArr': function(val) {
console.log("aaa:"+val) console.log("aaa:"+val)
@ -179,13 +184,16 @@ export default {
this.form.images = val.join(',') this.form.images = val.join(',')
} }
}, },
'form1.good': { 'form1.good.productId': {
handler(val,oldVal){ handler(val,oldVal){
this.getInfoChooseGood (val.cform.id) if(val){
this.getInfoChooseGood (val)
}
}, },
deep:true//对象内部的属性监听,也叫深度监听 deep:true//对象内部的属性监听,也叫深度监听
}, },
}, },
methods: { methods: {
// 详情选择商品生成规格用 // 详情选择商品生成规格用
getInfoChooseGood (id) { getInfoChooseGood (id) {

View File

@ -248,7 +248,12 @@ export default {
}, },
form1: { form1: {
good:{ good:{
productId: null,
storeName: null,
image: null,
otPrice: null,
price: null,
} }
}, },
formValidate: { formValidate: {
@ -389,10 +394,13 @@ export default {
this.formValidate.images = val.join(',') this.formValidate.images = val.join(',')
} }
}, },
'form1.good': { 'form1.good.productId': {
handler(val,oldVal){ handler(val,oldVal){
console.log(val) console.info("val:"+val)
this.getInfoChooseGood (val.productId) console.info("oldval:"+oldVal)
if(val){
this.getInfoChooseGood (val)
}
}, },
}, },
}, },
@ -515,6 +523,8 @@ export default {
// 详情选择商品生成规格用 // 详情选择商品生成规格用
getInfoChooseGood (id) { getInfoChooseGood (id) {
let that = this; let that = this;
let cid = that.$route.params.id || 0;
getInfo(id==null?0:id).then(async res => { getInfo(id==null?0:id).then(async res => {
let data = res.productInfo; let data = res.productInfo;
if(data){ if(data){
@ -523,7 +533,8 @@ export default {
Object.keys(that.formValidate).forEach(key=>{ Object.keys(that.formValidate).forEach(key=>{
if(data[key]) that.formValidate[key] = data[key]; if(data[key]) that.formValidate[key] = data[key];
}) })
that.formValidate.id = 0; that.formValidate.id = cid;
//that.formValidate.id = 0;
that.formValidate.productId = id that.formValidate.productId = id
that.formValidate.title = data.store_name that.formValidate.title = data.store_name
that.formValidate.info = data.store_info that.formValidate.info = data.store_info
@ -572,6 +583,7 @@ export default {
getInfo () { getInfo () {
let that = this; let that = this;
let id = that.$route.params.id || 0; let id = that.$route.params.id || 0;
that.formValidate.id = id;
getCombinationInfo(id).then(async res => { getCombinationInfo(id).then(async res => {
let data = res.productInfo; let data = res.productInfo;
if(data){ if(data){
@ -634,7 +646,7 @@ export default {
if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){ if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){
return this.$message.warning('请点击生成规格!'); return this.$message.warning('请点击生成规格!');
} }
add(this.formValidate).then(async res => { edit(this.formValidate).then(async res => {
this.$message({ this.$message({
message:'操作成功', message:'操作成功',
type: 'success' type: 'success'

View File

@ -254,7 +254,12 @@ export default {
}, },
form1: { form1: {
good:{ good:{
productId: null,
storeName: null,
image: null,
otPrice: null,
price: null,
cform: null
} }
}, },
formValidate: { formValidate: {
@ -391,9 +396,12 @@ export default {
this.formValidate.images = val.join(',') this.formValidate.images = val.join(',')
} }
}, },
'form1.good': { 'form1.good.productId': {
handler(val,oldVal){ handler(val,oldVal){
this.getInfoChooseGood (val.cform.id) if(val){
this.getInfoChooseGood (val)
}
}, },
}, },
}, },
@ -519,6 +527,7 @@ export default {
// 详情选择商品生成规格用 // 详情选择商品生成规格用
getInfoChooseGood (id) { getInfoChooseGood (id) {
let that = this; let that = this;
let cid = that.$route.params.id || 0;
getInfo(id).then(async res => { getInfo(id).then(async res => {
let data = res.productInfo; let data = res.productInfo;
console.log('data:'+data) console.log('data:'+data)
@ -529,7 +538,7 @@ export default {
Object.keys(that.formValidate).forEach(key=>{ Object.keys(that.formValidate).forEach(key=>{
if(data[key]) that.formValidate[key] = data[key]; if(data[key]) that.formValidate[key] = data[key];
}) })
that.formValidate.id = 0; that.formValidate.id = cid;
that.formValidate.productId = id that.formValidate.productId = id
that.formValidate.cate_id = cate_id; that.formValidate.cate_id = cate_id;
that.oneFormValidate = [data.attr]; that.oneFormValidate = [data.attr];
@ -644,7 +653,7 @@ export default {
if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){ if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){
return this.$message.warning('请点击生成规格!'); return this.$message.warning('请点击生成规格!');
} }
add(this.formValidate).then(async res => { edit(this.formValidate).then(async res => {
this.$message({ this.$message({
message:'操作成功', message:'操作成功',
type: 'success' type: 'success'

View File

@ -2,24 +2,11 @@
<div class="login"> <div class="login">
<div style="display:flex;justify-content:space-between;align-items: center;"> <div style="display:flex;justify-content:space-between;align-items: center;">
<div style="padding: 0 60px 0 0"> <div style="padding: 0 60px 0 0">
<h3 style="color: #ffffff;font-size: 24px;padding: 0;margin-bottom: 10px">
YSHOP单商户B2C电商系统
</h3>
<ul style="margin: 0;color: #ffffff;font-size: 15px;line-height: 25px;padding-left: 20px">
<li>Springboot2</li>
<li>MybatisPlus</li>
<li>SpringSecurity</li>
<li>Jwt</li>
<li>Redis</li>
<li>Vue</li>
</ul>
<h3 style="color: #ffffff;">
官网:https://www.yixiang.co
</h3>
</div> </div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
<h3 class="title"> <h3 class="title">
YSHOP后台管理系统-3.2 乐享美酒管理后台
</h3> </h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号"> <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">

View File

@ -46,8 +46,8 @@
</el-form-item> </el-form-item>
<el-form-item v-show="form.type.toString() !== '2'" label="外链菜单" prop="iframe"> <el-form-item v-show="form.type.toString() !== '2'" label="外链菜单" prop="iframe">
<el-radio-group v-model="form.iframe" size="mini"> <el-radio-group v-model="form.iframe" size="mini">
<el-radio-button label="true">是</el-radio-button> <el-radio-button :label="true">是</el-radio-button>
<el-radio-button label="false">否</el-radio-button> <el-radio-button :label="false"></el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-show="form.type.toString() === '1'" label="菜单缓存" prop="cache"> <el-form-item v-show="form.type.toString() === '1'" label="菜单缓存" prop="cache">

View File

@ -28,6 +28,10 @@
<el-form-item label="直播间分享图片" prop="shareImg" > <el-form-item label="直播间分享图片" prop="shareImg" >
<MaterialList v-model="form.shareImgArr" style="width: 370px" type="image" :num="1" :width="150" :height="150":disabled="isDisabled" /> <MaterialList v-model="form.shareImgArr" style="width: 370px" type="image" :num="1" :width="150" :height="150":disabled="isDisabled" />
</el-form-item> </el-form-item>
<el-form-item label="封面图" prop="feedsImg" >
<MaterialList v-model="form.feedsImgArr" style="width: 370px" type="image" :num="1" :width="150" :height="150":disabled="isDisabled" />
<p style="color: #cf0f0f">购物直播封面图 建议尺寸800*800</p>
</el-form-item>
<el-form-item label="计划直播开始时间" prop="startDate" > <el-form-item label="计划直播开始时间" prop="startDate" >
<el-date-picker v-model="form.startDate" type="datetime" style="width: 370px;" :disabled="isDisabled"/> <el-date-picker v-model="form.startDate" type="datetime" style="width: 370px;" :disabled="isDisabled"/>
<p style="color: #cf0f0f">开播时间需要在当前时间的10分钟后,并且开始时间不能在6个月后</p> <p style="color: #cf0f0f">开播时间需要在当前时间的10分钟后,并且开始时间不能在6个月后</p>
@ -221,7 +225,7 @@ const defaultCrud = CRUD({ optShow: {
del: false, del: false,
download: true download: true
},title: '直播房间', url: 'api/yxWechatLive', sort: 'room_id,desc', crudMethod: { ...crudYxWechatLive }}) },title: '直播房间', url: 'api/yxWechatLive', sort: 'room_id,desc', crudMethod: { ...crudYxWechatLive }})
const defaultForm = { product: [],roomId: null,productId: null, name: null, coverImge: null, startDate: null, endDate : null,shareImge: null, liveStatus: null, coverImgArr: [],shareImgArr: [],anchorImgArr: [],startTime: null, endTime: null, anchorName: null, anchorWechat: null, anchorImge: null, type: 0, screenType: 0, closeLike: 0,closeGoods: 0, closeComment: 0,closeReplay: 0,closeShare:0,closeKf:0 } const defaultForm = { product: [],roomId: null,productId: null,feedsImg: null, name: null, coverImge: null, startDate: null, endDate : null,shareImge: null, liveStatus: null, coverImgArr: [],shareImgArr: [],anchorImgArr: [],feedsImgArr:[],startTime: null, endTime: null, anchorName: null, anchorWechat: null, anchorImge: null, type: 0, screenType: 0, closeLike: 0,closeGoods: 0, closeComment: 0,closeReplay: 0,closeShare:0,closeKf:0 }
export default { export default {
name: 'YxWechatLive', name: 'YxWechatLive',
components: { pagination, crudOperation, rrOperation ,MaterialList,udOperation,LiveGoods}, components: { pagination, crudOperation, rrOperation ,MaterialList,udOperation,LiveGoods},
@ -341,6 +345,7 @@ export default {
this.form.coverImge = this.form.coverImgArr.join(',') this.form.coverImge = this.form.coverImgArr.join(',')
this.form.shareImge = this.form.shareImgArr.join(',') this.form.shareImge = this.form.shareImgArr.join(',')
this.form.anchorImge = this.form.anchorImgArr.join(',') this.form.anchorImge = this.form.anchorImgArr.join(',')
this.form.feedsImg = this.form.feedsImgArr.join(',')
}, },
// 新增与编辑前做的操作 // 新增与编辑前做的操作
[CRUD.HOOK.beforeToAdd](crud, form) { [CRUD.HOOK.beforeToAdd](crud, form) {