商品价格修改

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) => { export const editGoodsPrice = (param, option) => {
return request.get('StoreKeeper/editPrice', param, option) return request.get('StoreKeeper/editGoodsPrice', param, option)
} }
// 商品浏览记录 // 商品浏览记录

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

Loading…
Cancel
Save