Compare commits

...

2 Commits

Author SHA1 Message Date
tianyi 802ce78def 1 1 month ago
tianyi 21d56db0e0 1 1 month ago
  1. 29
      pages/shop/addGoods.vue
  2. 2
      pages/shop/shopEvaluate.vue
  3. 2
      pages/shop/transferDeliveryOrderList.vue

29
pages/shop/addGoods.vue

@ -31,9 +31,8 @@
<input type="digit" class="content-input" v-model="formData.orderFiled" placeholder="请输入排名">
</uni-forms-item>
<uni-forms-item label="商品分类" name="editTitle">
<view style="border: 4rpx solid #eee;display: flex;flex: 1;border-radius: 10rpx;">
<text @click="goGategoryLow" placeholder="请选择商品分类"
class="content-input" style="border: 0;flex: 1;">{{typeItem.categoryName}}</text>
<view @click="goGategoryLow" style="height:70rpx;border: 4rpx solid #eee;display: flex;flex: 1;border-radius: 10rpx;">
<text class="content-input" style="height:70rpx;border: 0;">{{typeItem.categoryName}}</text>
<uni-icons type="right" size="16"
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons>
</view>
@ -117,7 +116,6 @@
<uni-forms-item label="详细图文" name="startPayNum">
<view class="xiangxi-box">
<sp-editor
@init="initEditor"
@input="inputOver"
@upinImage="upinImage"
@ -374,7 +372,6 @@
},
//
goGategoryLow() {
console.log("111111111111")
uni.navigateTo({
url: '/pages/shop/addType'
})
@ -388,10 +385,7 @@
this.productCategoryList = Array.isArray(res.result) ? res.result : []
this.syncSelectedCategory()
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
this.tui.toast(res.message)
}
})
},
@ -433,6 +427,7 @@
submit() {
let that = this;
this.syncLunchBoxByMoreBuy()
this.normalizeGroupBuyPrices()
if (!this.validateProductSpecs()) {
return
}
@ -517,7 +512,6 @@
}
const startPayNum = String(this.formData.startPayNum).trim()
if (startPayNum !== '' && !this.isValidInteger(startPayNum)) {
uni.showToast({
title: '起售数量只能输入整数',
icon: 'none'
@ -555,6 +549,17 @@
}
return true
},
normalizeGroupBuyPrices() {
if (!Array.isArray(this.formData.productGroupBuyPrices)) {
this.formData.productGroupBuyPrices = []
return
}
this.formData.productGroupBuyPrices = this.formData.productGroupBuyPrices.filter((item) => {
const groupCount = item && item.groupCount !== undefined && item.groupCount !== null ? String(item.groupCount).trim() : ''
const groupPrice = item && item.groupPrice !== undefined && item.groupPrice !== null ? String(item.groupPrice).trim() : ''
return groupCount !== '' || groupPrice !== ''
})
},
isValidPrice(value) {
return /^\d+(\.\d{1,2})?$/.test(value) && Number(value) > 0
},
@ -845,7 +850,9 @@
},
getCateGorySon(id){
let that = this
this.NB.sendRequest("/app/productAttributeValue/selectByAttributeId", {}, false, 'get', 'application/x-www-form-urlencoded').then((res) => {
this.NB.sendRequest("/app/productAttributeValue/selectByAttributeId", {
id: id,
}, false, 'get', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) {
that.categorySonData = res.result
for (var i = 0; i < that.categorySonData.length; i++) {

2
pages/shop/shopEvaluate.vue

@ -361,7 +361,7 @@
let that = this;
let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({
url: that.tui.interfaceUrl() + '/upload/file',
url: getApp().globalData.mainurl + '/upload/file',
filePath: path,
name: 'file',
header: {

2
pages/shop/transferDeliveryOrderList.vue

@ -205,7 +205,7 @@
},
uploadImage(index, filePath) {
uni.uploadFile({
url: this.tui.interfaceUrl() + '/upload/file',
url: getApp().globalData.mainurl + '/upload/file',
filePath,
name: 'file',
header: {

Loading…
Cancel
Save