mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 08:55:52 +08:00
适配微服务
This commit is contained in:
@@ -35,12 +35,12 @@ export const delCategdelShopGoodsLabel = id => {
|
||||
|
||||
// 根据goodsId分页获取商品列表
|
||||
export const getQueryGoodsIdGoodsList = goodsId => {
|
||||
return getRequest(`/goods/sku/${goodsId}/list`);
|
||||
return getRequest(`/goods/goods/sku/${goodsId}/list`);
|
||||
};
|
||||
|
||||
// 获取商品分页列表
|
||||
export const getGoodsSkuListDataSeller = params => {
|
||||
return getRequest("/goods/sku/list", params);
|
||||
return getRequest("/goods/goods/sku/list", params);
|
||||
};
|
||||
|
||||
// 获取商品品牌分页列表
|
||||
@@ -139,7 +139,7 @@ export const getGoodsCategory = parent_id => {
|
||||
|
||||
// 获取商品sku分页列表
|
||||
export const getGoodsSkuData = params => {
|
||||
return getRequest("/goods/sku/list", params);
|
||||
return getRequest("/goods/goods/sku/list", params);
|
||||
};
|
||||
|
||||
// 获取商品分页列表
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
|
||||
//获取所有city
|
||||
export const getAllCity = (params) => {
|
||||
return getRequest(commonUrl+'/common/region/allCity', params)
|
||||
return getRequest(commonUrl+'/common/common/region/allCity', params)
|
||||
}
|
||||
|
||||
// 登陆
|
||||
@@ -171,47 +171,47 @@ export const getLogListData = params => {
|
||||
};
|
||||
// 分页获取消息数据
|
||||
export const getMessageData = params => {
|
||||
return getRequest("/message/getByCondition", params);
|
||||
return getRequest("/message/storeMessage/getByCondition", params);
|
||||
};
|
||||
// 获取单个消息详情
|
||||
export const getMessageDataById = (id, params) => {
|
||||
return getRequest(`/message/get/${id}`, params);
|
||||
return getRequest(`/message/storeMessage/get/${id}`, params);
|
||||
};
|
||||
// 添加消息
|
||||
export const addMessage = params => {
|
||||
return postRequest("/message/add", params);
|
||||
return postRequest("/message/storeMessage/add", params);
|
||||
};
|
||||
// 编辑消息
|
||||
export const editMessage = params => {
|
||||
return postRequest("/message/edit", params);
|
||||
return postRequest("/message/storeMessage/edit", params);
|
||||
};
|
||||
// 回收站还原消息
|
||||
export const reductionMessage = (ids, params) => {
|
||||
return putRequest(`/message/${ids}/reduction`, params);
|
||||
return putRequest(`/message/storeMessage/${ids}/reduction`, params);
|
||||
};
|
||||
// 彻底删除消息
|
||||
export const clearMessage = (ids, params) => {
|
||||
return deleteRequest(`/message/${ids}`, params);
|
||||
return deleteRequest(`/message/storeMessage/${ids}`, params);
|
||||
};
|
||||
// 已读消息放入回收站
|
||||
export const deleteMessage = (ids, params) => {
|
||||
return deleteRequest(`/message/${ids}/delete`, params);
|
||||
return deleteRequest(`/message/storeMessage/${ids}/delete`, params);
|
||||
};
|
||||
// 分页获取消息推送数据
|
||||
export const getMessageSendData = params => {
|
||||
return getRequest("/message", params);
|
||||
return getRequest("/message/storeMessage", params);
|
||||
};
|
||||
// 进入消息中心首次加载全部数据
|
||||
export const getAllMessage = params => {
|
||||
return getRequest("/message/all", params);
|
||||
return getRequest("/message/storeMessage/all", params);
|
||||
};
|
||||
// 已读消息
|
||||
export const read = (id) => {
|
||||
return putRequest(`/message/${id}/read`);
|
||||
return putRequest(`/message/storeMessage/${id}/read`);
|
||||
};
|
||||
// 删除发送消息
|
||||
export const deleteMessageSend = (ids, params) => {
|
||||
return deleteRequest(`/messageSend/delByIds/${ids}`, params);
|
||||
return deleteRequest(`/message/storeMessageSend/delByIds/${ids}`, params);
|
||||
};
|
||||
|
||||
// 分页获取文件数据
|
||||
|
||||
@@ -125,10 +125,10 @@ export const getAfterSaleTraces = (sn, params) => {
|
||||
};
|
||||
//获取发票列表
|
||||
export const getReceiptPage = params => {
|
||||
return getRequest(`/receipt`, params);
|
||||
return getRequest(`/trade/receipt`, params);
|
||||
};
|
||||
|
||||
//获取发票列表
|
||||
export const invoicing = id => {
|
||||
return postRequest(`receipt/${id}/invoicing`);
|
||||
return postRequest(`/trade/receipt/${id}/invoicing`);
|
||||
};
|
||||
|
||||
@@ -80,15 +80,15 @@ export const updateArticleCategory = (params, id) => {
|
||||
}
|
||||
//文章添加
|
||||
export const saveArticle = (params) => {
|
||||
return postRequest('/article', params)
|
||||
return postRequest('/other/article', params)
|
||||
}
|
||||
//文章修改
|
||||
export const updateArticle = (params) => {
|
||||
return putRequest(`/article/update/${params.id}`, params)
|
||||
return putRequest(`/other/article/update/${params.id}`, params)
|
||||
}
|
||||
//查看文章
|
||||
export const seeArticle = (id) => {
|
||||
return getRequest(`/article/${id}`)
|
||||
return getRequest(`/other/article/${id}`)
|
||||
}
|
||||
//获取文章列表数据
|
||||
export const getArticle = (params) => {
|
||||
@@ -100,7 +100,7 @@ export const getArticle = (params) => {
|
||||
|
||||
//删除文章数据
|
||||
export const delArticle = (ids) => {
|
||||
return deleteRequest(`/article/delByIds/${ids}`)
|
||||
return deleteRequest(`/other/article/delByIds/${ids}`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export const getBillPage = (params) => {
|
||||
|
||||
// 获取商家结算单流水分页
|
||||
export const getSellerFlow = (id, params) => {
|
||||
return getRequest(`/member/bill/${id}/getStoreFlow`, params)
|
||||
return getRequest(`/order/bill/${id}/getStoreFlow`, params)
|
||||
}
|
||||
|
||||
// 商家核对结算单
|
||||
@@ -29,7 +29,7 @@ export const reconciliation = (id, params) => {
|
||||
|
||||
// 获取商家分销订单流水分页
|
||||
export const getDistributionFlow = (id, params) => {
|
||||
return getRequest(`/member/bill/${id}/getDistributionFlow`, params)
|
||||
return getRequest(`/order/bill/${id}/getDistributionFlow`, params)
|
||||
}
|
||||
|
||||
// 获取商家结算单详细
|
||||
|
||||
@@ -311,7 +311,7 @@ export const result = [{
|
||||
type: 0,
|
||||
title: "分销商品",
|
||||
path: "distributionGoods",
|
||||
component: "distribution/distribution/goods",
|
||||
component: "distribution/distributionGoods",
|
||||
children: null
|
||||
},
|
||||
{
|
||||
@@ -320,7 +320,7 @@ export const result = [{
|
||||
type: 0,
|
||||
title: "分销订单",
|
||||
path: "distributionOrder",
|
||||
component: "distribution/distribution/order",
|
||||
component: "distribution/distributionOrder",
|
||||
children: null
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,9 +3,14 @@
|
||||
<!-- 选择商品类型 -->
|
||||
<Modal v-model="selectGoodsType" width="550" :closable="false">
|
||||
<div class="goods-type-list" v-if="!showGoodsTemplates">
|
||||
<div class="goods-type-item" :class="{'active-goods-type':item.check}" @click="handleClickGoodsType(item)"
|
||||
v-for="(item,index) in goodsTypeWay" :key="index">
|
||||
<img :src="item.img"/>
|
||||
<div
|
||||
class="goods-type-item"
|
||||
:class="{ 'active-goods-type': item.check }"
|
||||
@click="handleClickGoodsType(item)"
|
||||
v-for="(item, index) in goodsTypeWay"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="item.img" />
|
||||
<div>
|
||||
<h2>{{ item.title }}</h2>
|
||||
<p>{{ item.desc }}</p>
|
||||
@@ -14,12 +19,16 @@
|
||||
</div>
|
||||
<div v-else class="goods-type-list">
|
||||
<h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2>
|
||||
<div class="goods-type-item template-item" @click="handleClickGoodsTemplate(item)"
|
||||
v-for="(item,tempIndex) in goodsTemplates" :key="tempIndex">
|
||||
<div
|
||||
class="goods-type-item template-item"
|
||||
@click="handleClickGoodsTemplate(item)"
|
||||
v-for="(item, tempIndex) in goodsTemplates"
|
||||
:key="tempIndex"
|
||||
>
|
||||
<img :src="item.thumbnail" />
|
||||
<div>
|
||||
<h2>{{ item.goodsName }}</h2>
|
||||
<p>{{ item.sellingPoint || '' }}</p>
|
||||
<p>{{ item.sellingPoint || "" }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,22 +37,34 @@
|
||||
<div class="content-goods-publish">
|
||||
<div class="goods-category">
|
||||
<ul v-if="categoryListLevel1.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel1" :class="{ activeClass: category[0].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 1)" :key="index">
|
||||
<li
|
||||
v-for="(item, index) in categoryListLevel1"
|
||||
:class="{ activeClass: category[0].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 1)"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
<span>></span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="categoryListLevel2.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel2" :class="{ activeClass: category[1].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 2)" :key="index">
|
||||
<li
|
||||
v-for="(item, index) in categoryListLevel2"
|
||||
:class="{ activeClass: category[1].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 2)"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
<span>></span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="categoryListLevel3.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel3" :class="{ activeClass: category[2].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 3)" :key="index">
|
||||
<li
|
||||
v-for="(item, index) in categoryListLevel3"
|
||||
:class="{ activeClass: category[2].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 3)"
|
||||
:key="index"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -55,7 +76,7 @@
|
||||
<span v-show="category[2].name">> {{ category[2].name }}</span>
|
||||
</p>
|
||||
<template v-if="selectedTemplate.goodsName">
|
||||
<Divider>已选商品模版:{{selectedTemplate.goodsName}}</Divider>
|
||||
<Divider>已选商品模版:{{ selectedTemplate.goodsName }}</Divider>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 底部按钮 -->
|
||||
@@ -100,19 +121,19 @@ export default {
|
||||
],
|
||||
// 商品分类选择数组
|
||||
category: [
|
||||
{name: '', id: ''},
|
||||
{name: '', id: ''},
|
||||
{name: '', id: ''}
|
||||
{ name: "", id: "" },
|
||||
{ name: "", id: "" },
|
||||
{ name: "", id: "" },
|
||||
],
|
||||
// 商品类型
|
||||
goodsType: '',
|
||||
goodsType: "",
|
||||
/** 1级分类列表*/
|
||||
categoryListLevel1: [],
|
||||
/** 2级分类列表*/
|
||||
categoryListLevel2: [],
|
||||
/** 3级分类列表*/
|
||||
categoryListLevel3: [],
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 点击商品类型
|
||||
@@ -123,26 +144,25 @@ export default {
|
||||
|
||||
val.check = !val.check;
|
||||
if (!val.type) {
|
||||
this.GET_GoodsTemplate()
|
||||
this.GET_GoodsTemplate();
|
||||
this.showGoodsTemplates = true;
|
||||
} else {
|
||||
this.goodsType = val.type;
|
||||
this.selectedTemplate = {}
|
||||
this.selectedTemplate = {};
|
||||
}
|
||||
},
|
||||
// 点击商品模板
|
||||
handleClickGoodsTemplate(val) {
|
||||
console.log(val);
|
||||
this.selectedTemplate = val;
|
||||
this.selectGoodsType = false;
|
||||
this.$emit('change', {tempId: val.id})
|
||||
this.$emit("change", { tempId: val.id });
|
||||
},
|
||||
// 获取商品模板
|
||||
GET_GoodsTemplate() {
|
||||
let searchParams = {
|
||||
saveType: "TEMPLATE",
|
||||
sort: "create_time",
|
||||
order: "desc"
|
||||
order: "desc",
|
||||
};
|
||||
API_GOODS.getDraftGoodsListData(searchParams).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -153,10 +173,9 @@ export default {
|
||||
/** 选择商城商品分类 */
|
||||
handleSelectCategory(row, index, level) {
|
||||
if (level === 1) {
|
||||
this.category.forEach(cate => {
|
||||
cate.name = '',
|
||||
cate.id = ''
|
||||
})
|
||||
this.category.forEach((cate) => {
|
||||
(cate.name = ""), (cate.id = "");
|
||||
});
|
||||
this.category[0].name = row.name;
|
||||
this.category[0].id = row.id;
|
||||
this.categoryListLevel2 = this.categoryListLevel1[index].children;
|
||||
@@ -164,12 +183,12 @@ export default {
|
||||
} else if (level === 2) {
|
||||
this.category[1].name = row.name;
|
||||
this.category[1].id = row.id;
|
||||
this.category[2].name = '';
|
||||
this.category[2].id = '';
|
||||
this.category[2].name = "";
|
||||
this.category[2].id = "";
|
||||
this.categoryListLevel3 = this.categoryListLevel2[index].children;
|
||||
} else {
|
||||
this.category[2].name = row.name
|
||||
this.category[2].id = row.id
|
||||
this.category[2].name = row.name;
|
||||
this.category[2].id = row.id;
|
||||
}
|
||||
},
|
||||
/** 查询下一级 商城商品分类*/
|
||||
@@ -185,8 +204,8 @@ export default {
|
||||
next() {
|
||||
window.scrollTo(0, 0);
|
||||
if (!this.goodsType && !this.selectedTemplate.goodsName) {
|
||||
this.$Message.error('请选择商品类型')
|
||||
return
|
||||
this.$Message.error("请选择商品类型");
|
||||
return;
|
||||
}
|
||||
if (!this.category[0].name) {
|
||||
this.$Message.error("请选择商品分类");
|
||||
@@ -196,19 +215,18 @@ export default {
|
||||
return;
|
||||
} else if (this.category[2].name) {
|
||||
if (this.selectedTemplate.id) {
|
||||
this.$emit('change',{tempId: this.selectedTemplate.id})
|
||||
this.$emit("change", { tempId: this.selectedTemplate.id });
|
||||
} else {
|
||||
this.$emit('change',{category: this.category,goodsType:this.goodsType})
|
||||
this.$emit("change", { category: this.category, goodsType: this.goodsType });
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.GET_NextLevelCategory()
|
||||
|
||||
}
|
||||
}
|
||||
mounted() {
|
||||
this.GET_NextLevelCategory();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./addGoods.scss";
|
||||
</style>
|
||||
@import "./addGoods.scss";
|
||||
</style>
|
||||
|
||||
@@ -1279,6 +1279,9 @@ export default {
|
||||
delete sku.specValueId;
|
||||
return sku;
|
||||
});
|
||||
if (this.firstData.tempId) {
|
||||
delete submit.id;
|
||||
}
|
||||
|
||||
if (submit.goodsGalleryFiles.length > 0) {
|
||||
submit.goodsGalleryList = submit.goodsGalleryFiles.map((i) => i.url);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<Card style="position:relative;">
|
||||
<Card style="position: relative">
|
||||
<Spin size="large" fix v-if="spinShow"></Spin>
|
||||
<Alert type="warning">
|
||||
|
||||
<template slot="desc">
|
||||
为了方便在创建直播间时从选择商品,请尽量提前提审直播商品
|
||||
</template>
|
||||
@@ -11,116 +10,229 @@
|
||||
|
||||
<Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120">
|
||||
<FormItem label="直播标题" prop="name">
|
||||
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.name" style="width:460px"></Input>
|
||||
<div class="tips">直播间名字,最短3个汉字,最长17个汉字,1个汉字相当于2个字符</div>
|
||||
<Input
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
v-model="liveForm.name"
|
||||
style="width: 460px"
|
||||
></Input>
|
||||
<div class="tips">
|
||||
直播间名字,最短3个汉字,最长17个汉字,1个汉字相当于2个字符
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="主播昵称" prop="anchorName">
|
||||
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.anchorName" style="width:360px"></Input>
|
||||
<div class="tips">主播昵称,最短2个汉字,最长15个汉字,1个汉字相当于2个字符</div>
|
||||
<Input
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
v-model="liveForm.anchorName"
|
||||
style="width: 360px"
|
||||
></Input>
|
||||
<div class="tips">
|
||||
主播昵称,最短2个汉字,最长15个汉字,1个汉字相当于2个字符
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="直播时间" prop="startTime">
|
||||
|
||||
<DatePicker :disabled="liveStatus!='NEW'" format="yyyy-MM-dd HH:mm" type="datetimerange" v-model="times" @on-change="handleChangeTime" :options="optionsTime" placeholder="直播计划开始时间-直播计划结束时间"
|
||||
style="width: 300px">
|
||||
<DatePicker
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
type="datetimerange"
|
||||
v-model="times"
|
||||
@on-change="handleChangeTime"
|
||||
:options="optionsTime"
|
||||
placeholder="直播计划开始时间-直播计划结束时间"
|
||||
style="width: 300px"
|
||||
>
|
||||
</DatePicker>
|
||||
<div class="tips">直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间(开播时间和结束时间间隔不得短于30分钟,不得超过24小时)</div>
|
||||
<div class="tips">
|
||||
直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间(开播时间和结束时间间隔不得短于30分钟,不得超过24小时)
|
||||
</div>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="主播微信号" prop="anchorWechat">
|
||||
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.anchorWechat" style="width:360px" placeholder="主播微信号"></Input>
|
||||
<div class="tips">主播微信号,如果未实名认证,需要先前往“小程序直播”小程序进行<a target="_black" href="https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh">实名验证</a></div>
|
||||
<Input
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
v-model="liveForm.anchorWechat"
|
||||
style="width: 360px"
|
||||
placeholder="主播微信号"
|
||||
></Input>
|
||||
<div class="tips">
|
||||
主播微信号,如果未实名认证,需要先前往“小程序直播”小程序进行<a
|
||||
target="_black"
|
||||
href="https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh"
|
||||
>实名验证</a
|
||||
>
|
||||
</div>
|
||||
</FormItem>
|
||||
|
||||
<!-- 分享卡片 -->
|
||||
<FormItem label="分享卡片封面" prop="feedsImg">
|
||||
<div class="upload-list" v-if="liveForm.feedsImg">
|
||||
<template>
|
||||
<img :src="liveForm.feedsImg">
|
||||
<img :src="liveForm.feedsImg" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.feedsImg)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click.native="handleRemove('feedsImg')"></Icon>
|
||||
<Icon
|
||||
type="ios-eye-outline"
|
||||
@click.native="handleView(liveForm.feedsImg)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="ios-trash-outline"
|
||||
@click.native="handleRemove('feedsImg')"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<Upload v-if="liveForm.feedsImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleFeedsImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError"
|
||||
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Upload
|
||||
v-if="liveForm.feedsImg.length == 0"
|
||||
ref="upload"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleFeedsImgSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:max-size="1024"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
type="drag"
|
||||
:action="action"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div style="width: 58px; height: 58px; line-height: 58px">
|
||||
<Icon type="ios-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
<div class="tips">
|
||||
直播间分享图,图片规则:建议像素800*640,大小不超过1M;
|
||||
</div>
|
||||
<div class="tips">直播间分享图,图片规则:建议像素800*640,大小不超过1M;</div>
|
||||
</FormItem>
|
||||
|
||||
<!-- 直播间背景墙 -->
|
||||
<FormItem label="直播间背景墙" prop="coverImg">
|
||||
|
||||
<div class="upload-list" v-if="liveForm.coverImg">
|
||||
<template>
|
||||
<img :src="liveForm.coverImg">
|
||||
<img :src="liveForm.coverImg" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.coverImg)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click.native="handleRemove('coverImg')"></Icon>
|
||||
<Icon
|
||||
type="ios-eye-outline"
|
||||
@click.native="handleView(liveForm.coverImg)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="ios-trash-outline"
|
||||
@click.native="handleRemove('coverImg')"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<Upload v-if="liveForm.coverImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleCoverImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError"
|
||||
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Upload
|
||||
v-if="liveForm.coverImg.length == 0"
|
||||
ref="upload"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleCoverImgSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:max-size="1024"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
type="drag"
|
||||
:action="action"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div style="width: 58px; height: 58px; line-height: 58px">
|
||||
<Icon type="ios-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
<div class="tips"> 直播间背景图,图片规则:建议像素1080*1920,大小不超过1M</div>
|
||||
<div class="tips">直播间背景图,图片规则:建议像素1080*1920,大小不超过1M</div>
|
||||
</FormItem>
|
||||
|
||||
<!-- 直播间背景墙 -->
|
||||
<FormItem label="直播间分享图" prop="shareImg">
|
||||
|
||||
<div class="upload-list" v-if="liveForm.shareImg">
|
||||
<template>
|
||||
<img :src="liveForm.shareImg">
|
||||
<img :src="liveForm.shareImg" />
|
||||
<div class="upload-list-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.shareImg)"></Icon>
|
||||
<Icon type="ios-trash-outline" @click.native="handleRemove('shareImg')"></Icon>
|
||||
<Icon
|
||||
type="ios-eye-outline"
|
||||
@click.native="handleView(liveForm.shareImg)"
|
||||
></Icon>
|
||||
<Icon
|
||||
type="ios-trash-outline"
|
||||
@click.native="handleRemove('shareImg')"
|
||||
></Icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<Upload v-if="liveForm.shareImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleShareImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError"
|
||||
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;">
|
||||
<div style="width: 58px;height:58px;line-height: 58px;">
|
||||
<Upload
|
||||
v-if="liveForm.shareImg.length == 0"
|
||||
ref="upload"
|
||||
:show-upload-list="false"
|
||||
:on-success="handleShareImgSuccess"
|
||||
:format="['jpg', 'jpeg', 'png']"
|
||||
:on-format-error="handleFormatError"
|
||||
:max-size="1024"
|
||||
:on-exceeded-size="handleMaxSize"
|
||||
type="drag"
|
||||
:action="action"
|
||||
:headers="accessToken"
|
||||
style="display: inline-block; width: 58px"
|
||||
>
|
||||
<div style="width: 58px; height: 58px; line-height: 58px">
|
||||
<Icon type="ios-camera" size="20"></Icon>
|
||||
</div>
|
||||
</Upload>
|
||||
<div class="tips"> 直播间分享图,图片规则:建议像素800*640,大小不超过1M</div>
|
||||
<div class="tips">直播间分享图,图片规则:建议像素800*640,大小不超过1M</div>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="商品" v-if="$route.query.id">
|
||||
<Button type="primary" ghost @click="liveGoodsVisible=true" :disabled="liveStatus!='NEW'" icon="md-add">添加商品</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
ghost
|
||||
@click="liveGoodsVisible = true"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
icon="md-add"
|
||||
>添加商品</Button
|
||||
>
|
||||
<Table class="goods-table" :columns="liveColumns" :data="liveData">
|
||||
<template slot-scope="{ row,index }" slot="goodsName">
|
||||
<template slot-scope="{ row, index }" slot="goodsName">
|
||||
<div class="flex-goods">
|
||||
<Badge v-if="index == 0 || index ==1" color="volcano"></Badge>
|
||||
<img class="thumbnail" :src="row.thumbnail || row.goodsImage">
|
||||
<Badge v-if="index == 0 || index == 1" color="volcano"></Badge>
|
||||
<img class="thumbnail" :src="row.thumbnail || row.goodsImage" />
|
||||
{{ row.goodsName || row.name }}
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" class="price" slot="price">
|
||||
<div>
|
||||
<div v-if="row.priceType == 1">{{row.price | unitPrice('¥')}}</div>
|
||||
<div v-if="row.priceType == 2">{{row.price | unitPrice('¥')}}至{{row.price2 | unitPrice('¥')}}</div>
|
||||
<div v-if="row.priceType == 3">{{row.price | unitPrice('¥')}}<span class="original-price">{{row.price2 | unitPrice('¥')}}</span></div>
|
||||
<div v-if="row.priceType == 1">{{ row.price | unitPrice("¥") }}</div>
|
||||
<div v-if="row.priceType == 2">
|
||||
{{ row.price | unitPrice("¥") }}至{{ row.price2 | unitPrice("¥") }}
|
||||
</div>
|
||||
<div v-if="row.priceType == 3">
|
||||
{{ row.price | unitPrice("¥")
|
||||
}}<span class="original-price">{{ row.price2 | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="quantity">
|
||||
<div>{{row.quantity}}</div>
|
||||
<div>{{ row.quantity }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<template slot-scope="{ row, index }" slot="action">
|
||||
<div class="action">
|
||||
<Button size="small" type="primary" :disabled="liveStatus!='NEW'" @click="deleteGoods(row,index)">删除</Button>
|
||||
<Button size="small" ghost type="primary" :disabled="liveStatus!='NEW'" @click="onMove(row.id,1)">上移</Button>
|
||||
<Button size="small" ghost type="primary" :disabled="liveStatus!='NEW'" @click="onMove(row.id,0)">下移</Button>
|
||||
<Button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
@click="deleteGoods(row, index)"
|
||||
>删除</Button
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
ghost
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
@click="onMove(row.id, 1)"
|
||||
>上移</Button
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
ghost
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
@click="onMove(row.id, 0)"
|
||||
>下移</Button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
@@ -130,13 +242,15 @@
|
||||
</FormItem>
|
||||
|
||||
<FormItem>
|
||||
<Button type="primary" v-if="liveStatus=='NEW'" @click="createLives()">保存</Button>
|
||||
<Button type="primary" v-if="liveStatus == 'NEW'" @click="createLives()"
|
||||
>保存</Button
|
||||
>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Card>
|
||||
<!-- 浏览图片 -->
|
||||
<Modal title="查看图片" v-model="imageVisible">
|
||||
<img :src="imageSrc" v-if="imageVisible" style="width: 100%">
|
||||
<img :src="imageSrc" v-if="imageVisible" style="width: 100%" />
|
||||
</Modal>
|
||||
|
||||
<Modal width="800" v-model="liveGoodsVisible" footer-hide>
|
||||
@@ -184,24 +298,16 @@ export default {
|
||||
{ required: true, message: "请输入主播昵称", trigger: "blur" },
|
||||
{ max: 15, min: 2, message: "主播昵称最短2个汉字,最长15个汉字" },
|
||||
],
|
||||
anchorWechat: [
|
||||
{ required: true, message: "请输入主播微信号", trigger: "blur" },
|
||||
],
|
||||
anchorWechat: [{ required: true, message: "请输入主播微信号", trigger: "blur" }],
|
||||
startTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "请正确输入开始时间以及结束时间",
|
||||
},
|
||||
],
|
||||
feedsImg: [
|
||||
{ required: true, message: "分享卡片封面不能为空", trigger: "blur" },
|
||||
],
|
||||
coverImg: [
|
||||
{ required: true, message: "直播间背景墙不能为空", trigger: "blur" },
|
||||
],
|
||||
shareImg: [
|
||||
{ required: true, message: "直播间分享图不能为空", trigger: "blur" },
|
||||
],
|
||||
feedsImg: [{ required: true, message: "分享卡片封面不能为空", trigger: "blur" }],
|
||||
coverImg: [{ required: true, message: "直播间背景墙不能为空", trigger: "blur" }],
|
||||
shareImg: [{ required: true, message: "直播间分享图不能为空", trigger: "blur" }],
|
||||
},
|
||||
liveForm: {
|
||||
name: "", //直播标题
|
||||
@@ -438,16 +544,8 @@ export default {
|
||||
this.times[1] = daterange[1];
|
||||
|
||||
// this.times = daterange;
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"startTime",
|
||||
new Date(daterange[0]).getTime() / 1000
|
||||
);
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"endTime",
|
||||
new Date(daterange[1]).getTime() / 1000
|
||||
);
|
||||
this.$set(this.liveForm, "startTime", new Date(daterange[0]).getTime() / 1000);
|
||||
this.$set(this.liveForm, "endTime", new Date(daterange[1]).getTime() / 1000);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -493,9 +591,7 @@ export default {
|
||||
// 需判断当前是否是添加商品
|
||||
if (this.$route.query.id) {
|
||||
this.spinShow = true;
|
||||
this.liveForm.commodityList = JSON.stringify(
|
||||
this.liveForm.commodityList
|
||||
);
|
||||
this.liveForm.commodityList = JSON.stringify(this.liveForm.commodityList);
|
||||
delete this.liveForm.updateTime;
|
||||
// 将当前直播间修改
|
||||
editLive(this.liveForm).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user