|
|
@@ -119,7 +119,7 @@
|
|
|
</div> -->
|
|
|
<div class="btn van-safe-area-bottom" ref="btn">
|
|
|
<div class="btns1">
|
|
|
- <div @click="$router.push('/giveSearch?id' + info.id)">
|
|
|
+ <div @click="$router.push('/giveSearch?id=' + info.id)">
|
|
|
<img
|
|
|
class="img"
|
|
|
src="https://9space-2021.oss-cn-shenzhen.aliyuncs.com/image/2021-11-09-15-17-04hsdZwERv.png"
|
|
|
@@ -130,9 +130,10 @@
|
|
|
<van-button class="btn1" type="primary" block round @click="Exhibition">{{
|
|
|
info.publicShow ? '取消展示' : '公开展示'
|
|
|
}}</van-button>
|
|
|
- <van-button type="primary" block round @click="$router.push('/Consignment?id' + info.id)"
|
|
|
- >寄售上架</van-button
|
|
|
- >
|
|
|
+ <!-- $router.push('/Consignment?id=' + info.id) -->
|
|
|
+ <van-button type="primary" block round @click="Consignment">{{
|
|
|
+ info.consignment ? '取消寄售' : '寄售上架'
|
|
|
+ }}</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -199,6 +200,32 @@ export default {
|
|
|
this.getProduct();
|
|
|
},
|
|
|
methods: {
|
|
|
+ Consignment() {
|
|
|
+ if (!this.info.publicShow) {
|
|
|
+ Dialog.confirm({
|
|
|
+ title: '寄售上架',
|
|
|
+ message: '确定寄售上架吗?'
|
|
|
+ }).then(() => {
|
|
|
+ this.$router.push('/Consignment?id=' + this.info.id);
|
|
|
+ });
|
|
|
+ // .then(res => {
|
|
|
+ // this.getProduct();
|
|
|
+ // this.$message.success('展示成功');
|
|
|
+ // });
|
|
|
+ } else {
|
|
|
+ Dialog.confirm({
|
|
|
+ title: '取消寄售',
|
|
|
+ message: '确定取消寄售吗?'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return this.$http.post(`/asset/cancelConsignment?id=${this.info.id}`);
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.getProduct();
|
|
|
+ this.$message.success('取消寄售');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
Exhibition() {
|
|
|
if (!this.info.publicShow) {
|
|
|
Dialog.confirm({
|