商品价格修改

version/0412
shuxiaoquan 9 months ago
parent e2671484c2
commit ed9dd00e7f
  1. 4
      api/goods/index.js
  2. 25
      pages/goods/detail.vue

@ -15,8 +15,8 @@ const api = {
}
// 商品价格修改
export const editPrice = (param, option) => {
return request.get('StoreKeeper/editPrice', param, option)
export const editGoodsPrice = (param, option) => {
return request.get('StoreKeeper/editGoodsPrice', param, option)
}
// 商品浏览记录

@ -292,16 +292,16 @@
<u-line class="u-line"></u-line>
</view>
<view class="msp">
<text>商品价:</text>
<input type="text" disabled v-model="goods.goods_price_min" placeholder="最高价" class="inp" />
<text>原价格:</text>
<input type="text" disabled v-model="goods.goods_price_min" class="inp" />
</view>
<view class="msp">
<text>最高价:</text>
<input type="text" v-model="max_price" placeholder="最高价" class="inp" />
<text>商品价格:</text>
<input type="text" v-model="max_price" placeholder="商品价格" class="inp" />
</view>
<view class="msp">
<text>加价率:</text>
<input type="text" v-model="markup_rate" placeholder="加价率" class="inp" />
<text>划线价格:</text>
<input type="text" v-model="markup_rate" placeholder="划线价格" class="inp" />
</view>
<!-- <view class="qj">
<text class="msQj">秒杀区间:</text>
@ -519,25 +519,24 @@
if(!that.max_price){
uni.showToast({
icon: "none",
title: "最高价不能为空!"
title: "商品价格不能为空!"
})
return ;
}
if(!that.markup_rate){
uni.showToast({
icon: "none",
title: "加价率不能为空!"
title: "划线价格不能为空!"
})
return ;
}
let params={
id: that.goods.goods_id,
max_price: that.max_price,
markup_rate: that.markup_rate,
cat_id: that.goods.category.category_id,
type: 3
goods_price: that.max_price,
line_price: that.markup_rate,
cat_id: that.goods.category.category_id
}
GoodsApi.editPrice(params).then(res => {
GoodsApi.editGoodsPrice(params).then(res => {
if (res.status == 200) {
that.shareCancel();
that.$toast("修改成功");

Loading…
Cancel
Save