| | |
| | | <view class="goods-price" style="flex: 1;">¥{{ goods.price }}</view> |
| | | <view @click.stop="() => {}" style="flex: 1;display: flex;justify-content: center;align-items: center;"> |
| | | <view style="width: 90rpx">数量:</view> |
| | | <uni-number-box v-model="goods.goodsNum" :min="0"/> |
| | | <uni-number-box v-model="goods.goodsNum" :min="1"/> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | videoFileKey: '', |
| | | videoDuration: 0, |
| | | videoFit: 'cover', |
| | | goodsId: '', |
| | | videoContentType: 'video', |
| | | videoImgs: [], |
| | | tags: [], |
| | |
| | | // 选择商品 |
| | | chooseGoods() { |
| | | if(this.selectedGoodsList.length > 0) { |
| | | const selectedGoodsIds = new Set(this.selectedGoodsList.map(i => i.goodsId)); |
| | | console.log(selectedGoodsIds, "mimade"); |
| | | const selectedGoodsSkuIds = new Set(this.selectedGoodsList.map(i => i.id)); |
| | | this.goodsList?.forEach(goods => { |
| | | this.$set(goods, 'selected', selectedGoodsIds.has(goods.goodsId)); |
| | | this.$set(goods, 'selected', selectedGoodsSkuIds.has(goods.id)); |
| | | }); |
| | | } |
| | | this.showGoodsPicker = true; |
| | |
| | | if (valid && this.canPublish) { |
| | | this.loading = true; |
| | | this.formData.fileInfo = this.videoInfo; |
| | | this.formData["goodsList"] = this.selectedGoodsList.map(item => {return {goodsId: item.goodsId, goodsNum: item.goodsNum}}); |
| | | this.formData["goodsList"] = this.selectedGoodsList.map(item => {return {goodsId: item.goodsId, goodsSkuId: item.id, goodsNum: item.goodsNum}}); |
| | | publish(this.formData).then(res => { |
| | | uni.showToast({ |
| | | title: '视频已提交审核~', |
| | |
| | | cover: '', |
| | | videoFit: 'cover', |
| | | videoDuration: 0, |
| | | goodsId: '', |
| | | videoContentType: 'video', |
| | | videoImgs: [], |
| | | tags: [], |