参数修改
This commit is contained in:
parent
4bc0294829
commit
674e656d5b
|
@ -205,30 +205,61 @@
|
||||||
|
|
||||||
// 发布榴莲果交易信息
|
// 发布榴莲果交易信息
|
||||||
function release() {
|
function release() {
|
||||||
durianlApi.fruitForSale({
|
// 验证必填项
|
||||||
query: {
|
if (!form.fruitAmount) {
|
||||||
totalPrice: form.totalPrice,
|
util.alert('请输入榴莲果数量')
|
||||||
sellNum: form.sellNum,
|
return
|
||||||
type: typeList[typeIndex.value].id
|
}
|
||||||
|
if (!form.fruitAmount) {
|
||||||
|
util.alert('请输入总价')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!form.orderPaytype) {
|
||||||
|
util.alert('请选择支付方式')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
1: {
|
||||||
|
userId: userinfo.value.id,
|
||||||
|
// 买方用户id
|
||||||
|
targetUserId: form.targetUserId,
|
||||||
|
},
|
||||||
|
2: {
|
||||||
|
userId: userinfo.value.id,
|
||||||
|
// 买方用户id
|
||||||
|
targetUserId: form.targetUserId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 榴莲果交易
|
||||||
|
api.durian.consume({
|
||||||
|
data: {
|
||||||
|
// 卖方id
|
||||||
|
userId: config[type].userId,
|
||||||
|
// 买方用户id
|
||||||
|
targetUserId: config[type].targetUserId,
|
||||||
|
// 交易类型
|
||||||
|
transactionType: 10,
|
||||||
|
// 榴莲果交易数量
|
||||||
|
fruitAmount: form.fruitAmount,
|
||||||
|
// 对方姓名
|
||||||
|
name: `${form.first}${form.name}`,
|
||||||
|
// 对方账号
|
||||||
|
account: form.account,
|
||||||
|
// 二级密码
|
||||||
|
secondPassword: ev
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code === 200) {
|
if (rs.code === 200) {
|
||||||
// 关闭弹窗
|
|
||||||
proxy.$refs.saleRef.close()
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
Object.assign(form, new Form())
|
|
||||||
}, 500)
|
|
||||||
|
|
||||||
util.getPurse()
|
|
||||||
//
|
//
|
||||||
getList()
|
util.getPurse()
|
||||||
} else {
|
return
|
||||||
|
}
|
||||||
util.alert({
|
util.alert({
|
||||||
content: rs.msg,
|
content: rs.msg,
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue