diff --git a/api/order.js b/api/order.js
index 2df401b..842568e 100644
--- a/api/order.js
+++ b/api/order.js
@@ -147,4 +147,13 @@ export function getExpressCompany() {
url: "/common/getExpress",
method: "get",
});
+}
+
+// 取消订单
+export function cancelOrder(data) {
+ return request({
+ url: "/order/cancelOrder",
+ method: "post",
+ data,
+ });
}
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index eedfbbc..dc889ac 100644
--- a/manifest.json
+++ b/manifest.json
@@ -64,7 +64,12 @@
"sdkConfigs" : {
"payment" : {
"alipay" : {
- "__platform__" : [ "ios", "android" ]
+ "__platform__" : [ "ios" ]
+ },
+ "weixin" : {
+ "__platform__" : [ "ios", "android" ],
+ "appid" : "wxb1deb175472de036",
+ "UniversalLinks" : ""
}
}
},
diff --git a/pages/mine_package/mine_order/after-sales/refund-popu.vue b/pages/mine_package/mine_order/after-sales/refund-popu.vue
index 18c84f5..ee82555 100644
--- a/pages/mine_package/mine_order/after-sales/refund-popu.vue
+++ b/pages/mine_package/mine_order/after-sales/refund-popu.vue
@@ -44,7 +44,7 @@
选择快递名称
- {{ cancelForm.expressName || "--" }}
+ {{ product.expressName || "--" }}
填快递单号
@@ -53,7 +53,7 @@
type="text"
:disabled="status != 2"
placeholder="请填写快递单号"
- v-model="cancelForm.expressNo"
+ v-model="product.expressNo"
/>
@@ -63,9 +63,9 @@
'bottom_box',
{
bottom_box_disabled:
- status == 2 && (!cancelForm.expressNo || !cancelForm.expressName),
+ status == 2 && (!product.expressNo || !product.expressName),
},
- { bottom_box_quash: status == 1 || status == 3},
+ { bottom_box_quash: status == 1 || status == 3 },
]"
>
@@ -130,7 +130,7 @@ export default {
this.onCancelApply();
}
if (this.status == 2) {
- if (!this.cancelForm.expressNo || !this.cancelForm.expressName) {
+ if (!this.product.expressNo || !this.product.expressName) {
this.$refs.uToastRef.show({
type: "error",
message: "请填写快递信息",
@@ -193,8 +193,8 @@ export default {
async onReturnGoods() {
const params = {
id: this.product.afterId,
- expressNo: this.cancelForm.expressNo,
- expressId: this.cancelForm.expressId,
+ expressNo: this.product.expressNo,
+ expressId: this.product.expressId,
};
console.log("寄回商品", params);
const { bizcode } = await returnGoodsFeedback(params);
@@ -220,8 +220,8 @@ export default {
onExpressConfirm(item) {
console.log(item);
const val = item.value[0];
- this.cancelForm.expressName = val.name;
- this.cancelForm.expressId = val.id;
+ this.product.expressName = val.name;
+ this.product.expressId = val.id;
this.expressShow = false;
},
onSelectExpress() {
diff --git a/pages/mine_package/mine_order/mine_order.vue b/pages/mine_package/mine_order/mine_order.vue
index 95f2ad8..8c246e6 100644
--- a/pages/mine_package/mine_order/mine_order.vue
+++ b/pages/mine_package/mine_order/mine_order.vue
@@ -1,93 +1,50 @@
-
+
{{ item.title }}
-
+
-
+
@@ -401,6 +261,7 @@ import {
isSignContract,
getMiniProgramSignUrl,
afterSaleDetail,
+ cancelOrder
} from "@/api/order.js";
import dayjs from "dayjs";
import { formatDate1, copyData } from "@/utils/index.js";
@@ -460,6 +321,8 @@ export default {
title: "售后",
},
],
+ surePayShow: false,
+ cancelPayParams: {},
form: {
page: 1,
pageSize: 10,
@@ -508,11 +371,11 @@ export default {
onNextRefund() {
this.salesServer = 2;
-
- this.aftterSalesProduct = {
- ...this.aftterSalesProduct,
- ...{ afterReason: this.cancelForm.afterReason },
-
+
+ this.aftterSalesProduct = {
+ ...this.aftterSalesProduct,
+ ...{ afterReason: this.cancelForm.afterReason },
+
}
},
onSaleAfterTab() {
@@ -521,19 +384,27 @@ export default {
// 售后
onSaleAfter(item) {
console.log("售后---1", item, this.form.type);
- // 未售后
- this.cancelForm.afterReason = "";
- this.salesServer = 1;
- this.activeIndex = 0;
- this.aftterSalesProduct = item;
- this.afterShow = true;
- this.aftterSalesProduct.status = 9;
- this.aftterSalesProduct.afterType = this.form.type - 1;
+
+ if (this.form.type === MINE_ORDER_TYPE.UNPAID) {
+ // 取消支付
+ this.cancelPayParams = { orderId: item.id };
+ this.surePayShow = true;
+
+ } else {
+ // 未售后
+ this.cancelForm.afterReason = "";
+ this.salesServer = 1;
+ this.activeIndex = 0;
+ this.aftterSalesProduct = item;
+ this.afterShow = true;
+ this.aftterSalesProduct.status = 9;
+ this.aftterSalesProduct.afterType = this.form.type - 1;
+ }
},
// 售后订单详情
async onAfterSaleDetail(item) {
- if(item.status === 8){
- this.$refs.uToastRef.show({
+ if (item.status === 8) {
+ this.$refs.uToastRef.show({
type: "success",
message: "订单已作废",
});
@@ -546,6 +417,7 @@ export default {
this.afterShow = true;
}
},
+
// 关闭售后申请
onCloseAfterShow(item) {
// 重新发起
@@ -561,6 +433,22 @@ export default {
this.afterShow = false;
},
+ // 取消支付
+ cancelPay() {
+
+ cancelOrder(this.cancelPayParams).then((res) => {
+ if (res.bizcode == 100) {
+ this.$refs.uToastRef.show({
+ type: "success",
+ message: "取消成功",
+ });
+ this.surePayShow = false;
+ this.form.page = 1;
+ this.orderList = [];
+ this.loadData();
+ }
+ });
+ },
onTipsCancel() {
this.tipsShow = false;
},
@@ -1145,4 +1033,10 @@ export default {
font-size: 30rpx;
color: #ffffff;
}
+
+.sure_pay{
+ ::v-deep(.u-modal__content__text){
+ text-align: center;
+ }
+}
diff --git a/pages/mine_package/mine_purse_recharge/mine_purse_recharge.vue b/pages/mine_package/mine_purse_recharge/mine_purse_recharge.vue
index 697e5ba..7f7b99e 100644
--- a/pages/mine_package/mine_purse_recharge/mine_purse_recharge.vue
+++ b/pages/mine_package/mine_purse_recharge/mine_purse_recharge.vue
@@ -113,7 +113,7 @@ export default {
});
return;
}
- console.log("params", params);
+ console.log("params---", params);
const result = await recharge(params);
console.log("result", result);
if (result && result.bizcode === 100) {
diff --git a/utils/config.js b/utils/config.js
index 8417b90..1340d2b 100644
--- a/utils/config.js
+++ b/utils/config.js
@@ -1,9 +1,9 @@
// export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境
// export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境
-// export const BASE_URL = "https://api.tbmall.xin"; //生产
+export const BASE_URL = "https://api.tbmall.xin"; //生产
// export const BASE_URL ='http://api.hm.a-d.work:6880/api' // 测试
-export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 测试
+// export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 测试
diff --git a/utils/payUtils.js b/utils/payUtils.js
index 9a8b82b..0925595 100644
--- a/utils/payUtils.js
+++ b/utils/payUtils.js
@@ -10,6 +10,7 @@ import { feedback } from '@/api/payment.js';
export function appWxpayFun(alipay, orderId, orderNum) {
const type = alipay.type;
const orderStr = alipay.orderStr;
+ console.log("微信支付---",alipay)
if (type === "app") {// app
const orderInfo = {
"appid": alipay.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致