feat: 新增预售书重复购买提示

- 将manifest.json中的版本号更新至1.0.60
- 在订单提交页面中新增预售备注弹窗功能,支持用户确认预售备注
- 添加presaleRemark API接口以获取预售备注内容
- 删除不再使用的订单页面副本文件
This commit is contained in:
2026-03-25 11:39:44 +08:00
parent 1f01ceb3ee
commit bb1d9ef281
4 changed files with 78 additions and 2598 deletions

View File

@@ -520,6 +520,17 @@
</view>
</view>
</u-popup>
<u-modal
:show="presaleRemarkModalShow"
title="提示"
:content="presaleRemarkModalContent"
:showCancelButton="true"
confirmText="继续购买"
cancelText="取消"
@confirm="handlePresaleRemarkConfirm"
@cancel="handlePresaleRemarkCancel"
@close="handlePresaleRemarkCancel"
></u-modal>
</view>
</template>
@@ -621,6 +632,9 @@ export default {
orderModalShowInfo: {},
orderModalShow: false,
presaleRemarkModalShow: false,
presaleRemarkModalContent: "",
presaleRemarkModalResolve: null,
payType: 1,
freightNum: 0,
addressData: {
@@ -1344,6 +1358,62 @@ export default {
this.content = this.remark;
}
},
openPresaleRemarkModal(content) {
this.presaleRemarkModalContent = content;
this.presaleRemarkModalShow = true;
return new Promise((resolve) => {
this.presaleRemarkModalResolve = resolve;
});
},
handlePresaleRemarkConfirm() {
this.presaleRemarkModalShow = false;
if (this.presaleRemarkModalResolve) {
const resolve = this.presaleRemarkModalResolve;
this.presaleRemarkModalResolve = null;
resolve(true);
}
},
handlePresaleRemarkCancel() {
this.presaleRemarkModalShow = false;
if (this.presaleRemarkModalResolve) {
const resolve = this.presaleRemarkModalResolve;
this.presaleRemarkModalResolve = null;
resolve(false);
}
},
async checkPresaleRemark() {
if (this.pageType != "goods") {
return true;
}
const productIds = this.goodsDataList
.map((e) => e.productId)
.filter((id) => id)
.join(",");
if (!productIds || !this.urlList.presaleRemark) {
return true;
}
try {
const res = await this.$http.request({
url: `${this.urlList.presaleRemark}`,
method: "POST",
data: {
productIds,
},
header: {
"Content-Type": "application/json",
},
});
const remark =
res && typeof res.remark == "string" ? res.remark.trim() : "";
if (!remark) {
return true;
}
return await this.openPresaleRemarkModal(remark);
} catch (error) {
console.log("presaleRemark error:", error);
return true;
}
},
async goBuyJie() {
if (this.pageType == "vip") {
if (this.radioValue != "1") {
@@ -1449,6 +1519,11 @@ export default {
});
thisproduct = thisproduct.join(",");
}
const passPresaleRemark = await this.checkPresaleRemark();
if (!passPresaleRemark) {
this.buyingFlag = false;
return;
}
if (
this.historyOrderInfo &&
thisproduct == this.historyOrderInfo.product &&

File diff suppressed because it is too large Load Diff

View File

@@ -145,6 +145,7 @@ export default {
list: "app/phone.do?getCourseDetail_new",
initPrepareOrder: "common/buyOrder/initPrepareOrder",
buyOrder: "book/buyOrder/placeOrder",
presaleRemark: "book/buyOrder/presaleRemark",
curriculumInfo: "app/phone.do?getCourseInfo",
detailInfo: "app/phoneDoctor.do?getTaiHuClassInfo_new",
userInfo: "common/user/getUserInfo",