mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-21 10:25:53 +08:00
优化店铺段报错问题,后续会配置开发环境以及生产环境动态CDN优化
This commit is contained in:
@@ -46,6 +46,7 @@ export default {
|
||||
name: "coupon",
|
||||
data() {
|
||||
return {
|
||||
selectDate:[],
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
|
||||
@@ -118,6 +118,8 @@ export default {
|
||||
name: 'full-cut',
|
||||
data() {
|
||||
return {
|
||||
total:0,
|
||||
selectDate:[],
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: { // 列表请求参数
|
||||
pageNumber: 1,
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<Upload v-if="liveForm.feedsImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleFeedsImgSuccess" :default-file-list="defaultImgList" :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;">
|
||||
<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>
|
||||
@@ -66,8 +66,8 @@
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<Upload v-if="liveForm.coverImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleCoverImgSuccess" :default-file-list="defaultImgList" :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;">
|
||||
<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>
|
||||
@@ -87,8 +87,8 @@
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<Upload v-if="liveForm.shareImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleShareImgSuccess" :default-file-list="defaultImgList" :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;">
|
||||
<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>
|
||||
@@ -235,7 +235,7 @@ export default {
|
||||
width: 250,
|
||||
},
|
||||
],
|
||||
liveData: [] //直播商品集合
|
||||
liveData: [], //直播商品集合
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -496,7 +496,7 @@ export default {
|
||||
this.liveForm.commodityList = JSON.stringify(
|
||||
this.liveForm.commodityList
|
||||
);
|
||||
delete this.liveForm.updateTime
|
||||
delete this.liveForm.updateTime;
|
||||
// 将当前直播间修改
|
||||
editLive(this.liveForm).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<div>
|
||||
<Tabs v-model="params.auditStatus">
|
||||
<TabPane v-for="(item,index) in liveTabWay" :key="index" :label="item.label" :name="item.type">
|
||||
<TabPane v-for="(item,index) in liveTabWay" :key="index" :label="item.label" :name="item.type+''">
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
@@ -63,7 +63,7 @@
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<Button v-if="params.auditStatus == 99" type="primary" @click="()=>{liveGoodsData.splice(index,1)}">删除</Button>
|
||||
<Button v-if="params.auditStatus != 99 && !reviewed" ghost type="primary" @click="()=>{$router.push({path:'/goods-operation-edit',query:{id:row.goodsId}})}">查看</Button>
|
||||
<Button v-if="reviewed" :type="row.___selected ? 'primary' : ''" @click="selectedLiveGoods(row,index)">{{row.___selected ? '已':''}}选择</Button>
|
||||
<Button v-if="reviewed" :type="row.___selected ? 'primary' : 'default'" @click="selectedLiveGoods(row,index)">{{row.___selected ? '已':''}}选择</Button>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="flex">
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
goodsTotal: "", //商品总数
|
||||
goodsTotal: 0, //商品总数
|
||||
saveGoodsLoading: false, //保存商品加载
|
||||
tableLoading: false, //表格是否加载
|
||||
params: {
|
||||
@@ -209,7 +209,6 @@ export default {
|
||||
* 回调参数补充
|
||||
*/
|
||||
selectedLiveGoods(val, index) {
|
||||
|
||||
this.$emit("selectedGoods", val);
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -9,65 +9,43 @@
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="活动时间" prop="rangeTime">
|
||||
<DatePicker
|
||||
type="datetimerange"
|
||||
v-model="form.rangeTime"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择"
|
||||
:options="options"
|
||||
style="width: 260px"
|
||||
>
|
||||
<DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" :options="options" style="width: 260px">
|
||||
</DatePicker>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="参团人数" prop="requiredNum" :label-width="130">
|
||||
<Input v-model="form.requiredNum" style="width: 260px" max="8">
|
||||
<span slot="append">人</span>
|
||||
<span slot="append">人</span>
|
||||
</Input>
|
||||
<span style="color: #cccccc"
|
||||
>参团人数不少于2人,不得超过10人。</span
|
||||
>
|
||||
<span style="color: #cccccc">参团人数不少于2人,不得超过10人。</span>
|
||||
</FormItem>
|
||||
<FormItem label="限购数量" prop="limitNum" :label-width="130">
|
||||
<Input v-model="form.limitNum" type="number" style="width: 260px">
|
||||
<span slot="append">件/人</span>
|
||||
<span slot="append">件/人</span>
|
||||
</Input>
|
||||
<span style="color: #cccccc">如果设置为0则视为不限制购买数量</span>
|
||||
</FormItem>
|
||||
<FormItem label="虚拟成团" prop="fictitious">
|
||||
<RadioGroup type="button" button-style="solid" v-model="form.fictitious">
|
||||
<Radio title="开启" :label="true">
|
||||
<Radio title="开启" :label="1">
|
||||
<span>开启</span>
|
||||
</Radio>
|
||||
<Radio title="关闭" :label="false">
|
||||
<Radio title="关闭" :label="0">
|
||||
<span>关闭</span>
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
<br />
|
||||
<span style="color: #cccccc"
|
||||
>开启虚拟成团后,24小时人数未满的团,系统将会模拟匿名买家凑满人数,使该团成团;您只需要对已付款参团的真实买家发货;建议合理开启以提高</span
|
||||
>
|
||||
<span style="color: #cccccc">开启虚拟成团后,24小时人数未满的团,系统将会模拟匿名买家凑满人数,使该团成团;您只需要对已付款参团的真实买家发货;建议合理开启以提高</span>
|
||||
</FormItem>
|
||||
<FormItem label="拼团规则" prop="pintuanRule">
|
||||
<Input
|
||||
v-model="form.pintuanRule"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
clearable
|
||||
maxlength="255"
|
||||
style="width: 260px"
|
||||
/>
|
||||
<Input v-model="form.pintuanRule" type="textarea" :rows="4" clearable maxlength="255" style="width: 260px" />
|
||||
<br />
|
||||
<span style="color: #cccccc"
|
||||
>拼团规则描述不能为空且不能大于255个字,会在WAP拼团详情页面显示</span
|
||||
>
|
||||
<span style="color: #cccccc">拼团规则描述不能为空且不能大于255个字,会在WAP拼团详情页面显示</span>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div>
|
||||
<Button type="text" @click="closeCurrentPage">返回</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
@@ -84,7 +62,7 @@ export default {
|
||||
promotionTitle: "",
|
||||
pintuanRule: "",
|
||||
requiredNum: "",
|
||||
fictitious: false,
|
||||
fictitious: 0,
|
||||
limitNum: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
@@ -109,7 +87,8 @@ export default {
|
||||
rangeTime: [{ required: true, message: "请选择活动时间" }],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
options: { // 不可选取时间
|
||||
options: {
|
||||
// 不可选取时间
|
||||
disabledDate(date) {
|
||||
return date && date.valueOf() < Date.now() - 86400000;
|
||||
},
|
||||
@@ -136,7 +115,10 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
let params = JSON.parse(JSON.stringify(this.form))
|
||||
let params = JSON.parse(JSON.stringify(this.form));
|
||||
params.fictitious
|
||||
? (params.fictitious = true)
|
||||
: (params.fictitious = false);
|
||||
params.startTime = this.$options.filters.unixToDate(
|
||||
this.form.rangeTime[0] / 1000
|
||||
);
|
||||
@@ -144,18 +126,18 @@ export default {
|
||||
params.endTime = this.$options.filters.unixToDate(
|
||||
this.form.rangeTime[1] / 1000
|
||||
);
|
||||
if(params.startTime === '' || params.endTime ===''){
|
||||
if (params.startTime === "" || params.endTime === "") {
|
||||
this.$Message.error("活动时间不能为空");
|
||||
this.submitLoading = false;
|
||||
return
|
||||
return;
|
||||
}
|
||||
if(params.startTime < new Date()){
|
||||
if (params.startTime < new Date()) {
|
||||
this.$Message.error("拼团活动开始时间不能小于当前时间");
|
||||
this.submitLoading = false;
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
delete params.rangeTime
|
||||
delete params.rangeTime;
|
||||
if (!this.id) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete params.id;
|
||||
@@ -189,14 +171,17 @@ export default {
|
||||
data.rangeTime = [];
|
||||
data.rangeTime.push(new Date(data.startTime), new Date(data.endTime));
|
||||
this.form = data;
|
||||
}
|
||||
// 此处将值转换为 1 true ,0 false 不然ivew radio组件会报错
|
||||
this.form.fictitious ? this.$set(this.form, "fictitious", 1) : this.$set(this.form, "fictitious", 0);
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .ivu-form-item{
|
||||
/deep/ .ivu-form-item {
|
||||
padding: 18px 10px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -68,6 +68,7 @@ export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
selectDate:[],
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
v-for="(tab, tabIndex) in goodsList"
|
||||
:key="tabIndex"
|
||||
:label="tab.hour"
|
||||
:name="tabIndex"
|
||||
:name="tabIndex + ''"
|
||||
>
|
||||
<Table
|
||||
:loading="loading"
|
||||
|
||||
Reference in New Issue
Block a user