|
|
@@ -48,7 +48,7 @@
|
|
|
</van-cell-group>
|
|
|
<div class="box-con">
|
|
|
<div class="label">卡牌细节图</div>
|
|
|
- <van-uploader :file-list="images[0]" :after-read="afterRead" @delete="deleteImg(images)" />
|
|
|
+ <van-uploader :file-list="images" :after-read="afterRead" @delete="deleteImg(images)" />
|
|
|
<div v-if="!showId">
|
|
|
<div class="box-top">
|
|
|
<div class="top">
|
|
|
@@ -159,9 +159,10 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
form: {
|
|
|
- collectionId: 0,
|
|
|
- seriesId: 0,
|
|
|
+ collectionId: '',
|
|
|
+ seriesId: '',
|
|
|
code: 1,
|
|
|
+ id: '',
|
|
|
postage: 10,
|
|
|
boxesCount: '',
|
|
|
boxPrice: '',
|
|
|
@@ -169,6 +170,7 @@ export default {
|
|
|
description: '',
|
|
|
packagesCount: null,
|
|
|
caseStatus: 'PROGRESS',
|
|
|
+ cardCaseId: '',
|
|
|
groupDTOS: []
|
|
|
},
|
|
|
name: '',
|
|
|
@@ -292,6 +294,7 @@ export default {
|
|
|
return info.sold;
|
|
|
},
|
|
|
cartBox() {
|
|
|
+ console.log(this.form.caseStatus);
|
|
|
this.$http.get('/cardCase/getCardCase', { id: this.$mp.query.id }).then(res => {
|
|
|
console.log(res);
|
|
|
this.showId = res.id;
|
|
|
@@ -300,6 +303,11 @@ export default {
|
|
|
groupDTOS: res.groupDTOS,
|
|
|
startTime: res.startTime,
|
|
|
description: res.description,
|
|
|
+ id: res.id,
|
|
|
+ collectionId: res.collectionId,
|
|
|
+ images: res.images,
|
|
|
+ caseStatus: res.caseStatus,
|
|
|
+ packagesCount: res.packagesCount,
|
|
|
boxesCount: res.boxesCount || 0,
|
|
|
postage: res.postage || 10
|
|
|
};
|
|
|
@@ -396,47 +404,47 @@ export default {
|
|
|
// this.images.splice(this.imagesList, 1);
|
|
|
},
|
|
|
submit() {
|
|
|
- // if (!this.name) {
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: '请选择卡牌名称'
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (!this.form.boxPrice) {
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: '请填写价格'
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (!this.form.startTime) {
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: '请选择结束时间'
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (!this.form.boxesCount) {
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: '请选拼箱人数'
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (this.images.length == 0) {
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: '请添加图片'
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
+ if (!this.name) {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选择卡牌名称'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.form.boxPrice) {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请填写价格'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.form.startTime) {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选择结束时间'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.form.boxesCount) {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选拼箱人数'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.images.length == 0) {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请添加图片'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
let cardCaseInputDTO = { ...this.form };
|
|
|
let images = this.imageUrls.join(',');
|
|
|
cardCaseInputDTO.images = images;
|
|
|
- console.log(this.form.groupDTOS);
|
|
|
- console.log('=========');
|
|
|
- console.log(cardCaseInputDTO);
|
|
|
+ // console.log(this.form.groupDTOS);
|
|
|
+ // console.log('=========');
|
|
|
+ // console.log(cardCaseInputDTO);
|
|
|
this.showLoading();
|
|
|
this.$http
|
|
|
.post('/cardCase/save', cardCaseInputDTO, {
|
|
|
@@ -453,11 +461,14 @@ export default {
|
|
|
groupDTOS: res.groupDTOS,
|
|
|
startTime: res.startTime,
|
|
|
description: res.description,
|
|
|
+ id: res.id,
|
|
|
+ collectionId: res.collectionId,
|
|
|
+ images: res.images,
|
|
|
+ caseStatus: res.caseStatus,
|
|
|
+ packagesCount: res.packagesCount,
|
|
|
boxesCount: res.boxesCount || 0,
|
|
|
postage: res.postage || 10
|
|
|
};
|
|
|
- console.log('++++++++++++');
|
|
|
- console.log(this.form);
|
|
|
wx.showToast({
|
|
|
title: '商品上架成功'
|
|
|
});
|