|
|
@@ -97,8 +97,9 @@
|
|
|
<span>赠送好友</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-button class="buy" type="primary" size="default"
|
|
|
- ><i class="font_family icon-icon-zhuanrang1"></i><span>寄售上架</span></el-button
|
|
|
+ <el-button @click="Consignment" class="buy" type="primary" size="default"
|
|
|
+ ><i class="font_family icon-icon-zhuanrang1"></i
|
|
|
+ ><span>{{ info.consignment ? '取消寄售' : '寄售上架' }}</span></el-button
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -174,10 +175,12 @@
|
|
|
</div>
|
|
|
|
|
|
<send ref="send"></send>
|
|
|
+ <consignment-info ref="refFn"></consignment-info>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
|
|
|
+import ConsignmentInfo from '../components/ConsignmentInfo';
|
|
|
import asset from '../mixins/asset';
|
|
|
import product from '../mixins/product';
|
|
|
import 'swiper/css/swiper.css';
|
|
|
@@ -186,7 +189,7 @@ import { mapState } from 'vuex';
|
|
|
import Send from './Send.vue';
|
|
|
import Share from '../components/Share.vue';
|
|
|
export default {
|
|
|
- components: { Swiper, SwiperSlide, CollectionInfo, Send, Share },
|
|
|
+ components: { Swiper, SwiperSlide, CollectionInfo, Send, Share, ConsignmentInfo },
|
|
|
mixins: [asset, product],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -230,15 +233,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // aaa() {
|
|
|
- // this.$http
|
|
|
- // .post('/identityAuth/apply', {
|
|
|
- // ...form
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
- // this.$store.dispatch('getUserInfo');
|
|
|
- // });
|
|
|
- // },
|
|
|
getDetail() {
|
|
|
this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
|
|
|
this.info = res;
|
|
|
@@ -299,12 +293,32 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ Consignment() {
|
|
|
+ if (!this.info.consignment) {
|
|
|
+ this.$refs.refFn.isShow = true;
|
|
|
+ } else {
|
|
|
+ this.$confirm('寄售将取消上架', '取消寄售', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ customClass: 'myClass',
|
|
|
+ center: true
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return this.$http.post(`/asset/cancelConsignment?id=${this.info.id}`);
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.getProduct();
|
|
|
+ this.$message.success('取消寄售');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
changeShow() {
|
|
|
if (!this.info.publicShow) {
|
|
|
console.log(this.info);
|
|
|
this.$confirm('藏品将公开展示,无报价', '公开展示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
+ customClass: 'myClass',
|
|
|
center: true
|
|
|
})
|
|
|
.then(() => {
|
|
|
@@ -318,6 +332,7 @@ export default {
|
|
|
this.$confirm('藏品将取消展示', '取消展示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
+ customClass: 'myClass',
|
|
|
center: true
|
|
|
})
|
|
|
.then(() => {
|
|
|
@@ -337,6 +352,20 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+<style lang="less">
|
|
|
+.myClass {
|
|
|
+ .el-button {
|
|
|
+ background: linear-gradient(133deg, @prim 0%, @warn 100%);
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ .el-button:nth-last-child(2) {
|
|
|
+ background: #c4c7cc;
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: 13px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
<style lang="less" scoped>
|
|
|
.container {
|
|
|
padding: 50px 50px 200px;
|