Browse Source

发布商品,发布竞价去除商品单价必填。全部资讯图片显示优化

featrue/v4.4
DESKTOP-A1SENDA\HUzy 4 years ago
parent
commit
49f12e8195
3 changed files with 54 additions and 30 deletions
  1. 8
      pages/article/article-item/index.wxml
  2. 14
      pages/article/article-item/index.wxss
  3. 62
      pages/goods/create/index.js

8
pages/article/article-item/index.wxml

@ -16,8 +16,12 @@
</view> </view>
<view class="text-black text-bold text-lg" style="padding:0rpx 32rpx 20rpx 32rpx">{{item.title}}</view> <view class="text-black text-bold text-lg" style="padding:0rpx 32rpx 20rpx 32rpx">{{item.title}}</view>
<fold-text content="{{item.content}}"></fold-text> <fold-text content="{{item.content}}"></fold-text>
<view style="padding:0rpx 32rpx;margin-top:16rpx" wx:if="{{item.imageUrlList.length}}">
<sudoku-image image-list="{{item.imageUrlList}}"></sudoku-image>
<view class="imgZt" style="padding:0rpx 32rpx;margin-top:16rpx" wx:if="{{item.imageUrlList.length}}">
<!-- <sudoku-image image-list="{{item.imageUrlList}}"></sudoku-image> -->
<view class="bottomViewRight" wx:for="{{ item.imageUrlList }}" wx:for-item="option" wx:for-index="optionIndex" wx:key="optionIndex" >
<image style="margin-left:10rpx" class="bottomViewRightImg" src="{{option}}" mode="widthFix"></image>
</view>
</view> </view>
<view class="flex flex-justify text-black" style="height:112rpx; padding:0rpx 32rpx"> <view class="flex flex-justify text-black" style="height:112rpx; padding:0rpx 32rpx">
<view> <view>

14
pages/article/article-item/index.wxss

@ -6,4 +6,18 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 50rpx; border-radius: 50rpx;
}
.bottomViewRightImg {
width: 290rpx;
height: 200rpx;
overflow: hidden;
}
.bottomViewRight {
width: 290rpx;
height: 200rpx !important;
overflow: hidden;
}
.imgZt{
display: flex;
justify-content: flex-start;
} }

62
pages/goods/create/index.js

@ -347,33 +347,33 @@ Page({
util.showToast('请选择废纸品类') util.showToast('请选择废纸品类')
return return
} }
if (util.isEmpty(this.data.form.unitPrice)) {
if (this.data.form.bidType == 1) {
util.showToast('请输入商品单价')
} else {
util.showToast('请输入起拍单价')
}
return
}
if(app.globalData.kg){
if(parseFloat(this.data.form.unitPrice) > 100){
if (this.data.form.bidType == 1) {
util.showToast('请检查您输入的商品单价是否合理')
} else {
util.showToast('请检查您输入的起拍单价是否合理')
}
return
}
} else {
if(parseFloat(this.data.form.unitPrice) < 100){
if (this.data.form.bidType == 1) {
util.showToast('请检查您输入的商品单价是否合理')
} else {
util.showToast('请检查您输入的起拍单价是否合理')
}
return
}
}
// if (util.isEmpty(this.data.form.unitPrice)) {
// if (this.data.form.bidType == 1) {
// util.showToast('请输入商品单价')
// } else {
// util.showToast('请输入起拍单价')
// }
// return
// }
// if(app.globalData.kg){
// if(parseFloat(this.data.form.unitPrice) > 100){
// if (this.data.form.bidType == 1) {
// util.showToast('请检查您输入的商品单价是否合理')
// } else {
// util.showToast('请检查您输入的起拍单价是否合理')
// }
// return
// }
// } else {
// if(parseFloat(this.data.form.unitPrice) < 100){
// if (this.data.form.bidType == 1) {
// util.showToast('请检查您输入的商品单价是否合理')
// } else {
// util.showToast('请检查您输入的起拍单价是否合理')
// }
// return
// }
// }
if (util.isEmpty(this.data.form.stock)) { if (util.isEmpty(this.data.form.stock)) {
util.showToast('请输入库存') util.showToast('请输入库存')
return return
@ -410,7 +410,13 @@ Page({
this.setData({ requesting: true }) this.setData({ requesting: true })
wx.showLoading({ title: '加载中', mask: true }) wx.showLoading({ title: '加载中', mask: true })
if(!app.globalData.kg){ if(!app.globalData.kg){
this.data.form.unitPrice = math.divide(this.data.form.unitPrice, 1000)
if(this.data.form.unitPrice>0){
this.data.form.unitPrice = math.divide(this.data.form.unitPrice, 1000)
}else{
this.data.form.unitPrice=''
}
this.data.form.stock = math.times(this.data.form.stock, 1000) this.data.form.stock = math.times(this.data.form.stock, 1000)
if (!util.isEmpty(this.data.form.lowestNum)) { if (!util.isEmpty(this.data.form.lowestNum)) {
this.data.form.lowestNum = math.times(this.data.form.lowestNum, 1000) this.data.form.lowestNum = math.times(this.data.form.lowestNum, 1000)

Loading…
Cancel
Save