[转让权证加转让价格判断]

This commit is contained in:
2021-10-19 09:15:13 +08:00
parent 9156029027
commit 1b41b40de9
6 changed files with 217 additions and 196 deletions

View File

@@ -33,6 +33,7 @@
</view>
</view>
<button class="buy-btn" type="default" @click="onCreate">确认转让</button>
<u-toast ref="uToast" />
</view>
</template>
@@ -75,26 +76,34 @@
},
// 提交转让市场
onCreate(){
marketsCreate({
symbol : this.$Route.query.symbol,
qty : this.stock,
price : this.pirce || 0
}).then(res => {
uni.showModal({
title : '提示',
content : res,
showCancel : false,
success : () => {
this.$Router.back()
}
if(this.pirce === ''){
this.$refs.uToast.show({
title: '请校验转让价格',
type: 'error',icon:false,
duration: 3000
})
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
}else{
marketsCreate({
symbol : this.$Route.query.symbol,
qty : this.stock,
price : this.pirce || 0
}).then(res => {
uni.showModal({
title : '提示',
content : res,
showCancel : false,
success : () => {
this.$Router.back()
}
})
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
})
})
})
}
}
}
}