|
|
@@ -31,7 +31,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="btns">
|
|
|
- <van-button color="#939599" @click.prevent="" plain size="mini" round> 删除订单 </van-button>
|
|
|
+ <van-button color="#939599" @click.prevent="del" plain size="mini" round> 删除订单 </van-button>
|
|
|
</div>
|
|
|
</router-link>
|
|
|
</template>
|
|
|
@@ -39,6 +39,7 @@
|
|
|
<script>
|
|
|
import order from '../../mixins/order';
|
|
|
import product from '../../mixins/product';
|
|
|
+import list from '../../mixins/list';
|
|
|
export default {
|
|
|
props: {
|
|
|
info: {
|
|
|
@@ -50,13 +51,43 @@ export default {
|
|
|
},
|
|
|
setup() {
|
|
|
const click = function () {
|
|
|
- console.log('wyt6w');
|
|
|
+ // console.log('wyt6w');
|
|
|
};
|
|
|
|
|
|
return { click };
|
|
|
},
|
|
|
- mixins: [order, product],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ url: '/order/all'
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mixins: [order, product, list],
|
|
|
methods: {
|
|
|
+ beforeData() {
|
|
|
+ return {
|
|
|
+ search: this.search,
|
|
|
+ query: {
|
|
|
+ userId: this.userInfo.id,
|
|
|
+ status: this.type,
|
|
|
+ hide: false,
|
|
|
+ del: false
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ del() {
|
|
|
+ this.$http
|
|
|
+ .post('/order/hide/', {
|
|
|
+ id: this.info.id
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getData();
|
|
|
+ //hide:false
|
|
|
+ // this.$message.success('删除成功');
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.getData();
|
|
|
+ // }, 1000);
|
|
|
+ });
|
|
|
+ },
|
|
|
likeProduct() {
|
|
|
if (!this.info.liked) {
|
|
|
this.$http.get(`/collection/${this.info.id}/like`).then(() => {
|