Commit e3b7c13e by chenwq

feat(平台商品): 添加商品置顶功能

新增商品置顶API接口及前端确认弹窗逻辑,支持将指定商品置顶显示
1 parent 100a66f0
......@@ -85,6 +85,16 @@ const modifyPriceApi = params => {
sign: true
})
}
// 平台商品置顶
const goodsUpdatePoinnt = params => {
params.method = 'scrm.api.shopmall.scrm.glgoods.updatePoinnted'
return http({
url,
data: params,
sign: true,
returnAll: true
})
}
// 订单列表
const getOrderList = params => {
......@@ -303,6 +313,7 @@ export default {
batchOffApi,
goodsDetailApi,
modifyPriceApi,
goodsUpdatePoinnt,
getOrderList,
getOrderDetail,
subOrderExpress,
......
......@@ -509,7 +509,31 @@ export default {
resolve()
})
},
handleUp(row) { },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
handleUp(row) {
this.secondConfirm('提示', '是否将此商品置顶?', 'platformGoods', 'goodsUpdatePoinnt', { id: row.id, pinnedFlag: '1' })
},
handleJumpView(row) {
this.$router.push({
path: '/pointProducts/browseRecordList',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!