|
@@ -218,9 +218,20 @@
|
|
|
editSchoolApi
|
|
|
} from '@/api/discover.js';
|
|
|
import {
|
|
|
+ getSecondHandDetail,
|
|
|
+ secondHandTake,
|
|
|
+ secondHandDel,
|
|
|
+ secondHandCancel,
|
|
|
+ secondHandStatusImgApi,
|
|
|
+ secondHandSend,
|
|
|
+ secondHandOrderList
|
|
|
+ } from '@/api/secondHand.js';
|
|
|
+ import {
|
|
|
ProductTypeEnum,
|
|
|
} from "@/enums/productEnums";
|
|
|
- import {secondHandOrderList} from '@/api/secondHand.js';
|
|
|
+ import {
|
|
|
+ Debounce
|
|
|
+ } from '@/utils/validate.js';
|
|
|
import {
|
|
|
toLogin
|
|
|
} from '@/libs/login.js';
|
|
@@ -445,7 +456,7 @@
|
|
|
if (that.loaded || that.loading) return;
|
|
|
that.loading = true;
|
|
|
that.loadTitle = '';
|
|
|
- that.where.status = 1;
|
|
|
+ that.where.status = -1;
|
|
|
secondHandOrderList(that.where).then(res => {
|
|
|
let list = res.data.list;
|
|
|
let goods = that.$util.SplitArray(list, that.list);
|
|
@@ -550,7 +561,57 @@
|
|
|
icon: 'none'
|
|
|
})
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 取消订单
|
|
|
+ *
|
|
|
+ */
|
|
|
+ cancelOrder: function(index, orderNo) {
|
|
|
+ let that = this;
|
|
|
+ if (!orderNo) return that.$util.Tips({
|
|
|
+ title: '缺少订单号无法取消订单'
|
|
|
+ });
|
|
|
+ uni.showModal({
|
|
|
+ content: '确定取消该订单',
|
|
|
+ cancelText: "取消",
|
|
|
+ confirmText: "确定",
|
|
|
+ showCancel: true,
|
|
|
+ confirmColor: '#f55850',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '正在取消中'
|
|
|
+ });
|
|
|
+ secondHandCancel(orderNo).then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: '取消成功',
|
|
|
+ icon: 'success'
|
|
|
+ }, function() {
|
|
|
+ that.getAllOrder();
|
|
|
+ });
|
|
|
+ }).catch(err => {
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: err
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 打开支付组件
|
|
|
+ *
|
|
|
+ */
|
|
|
+ goPay: Debounce(function(item) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
+ });
|
|
|
+ // 其他商品走正常流程,去支付收银台页面
|
|
|
+ this.getToPayment('', item, 'secondHand')
|
|
|
+ }),
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
// if (this.id) {
|