feat: 新增预售书重复购买提示
- 将manifest.json中的版本号更新至1.0.60 - 在订单提交页面中新增预售备注弹窗功能,支持用户确认预售备注 - 添加presaleRemark API接口以获取预售备注内容 - 删除不再使用的订单页面副本文件
This commit is contained in:
@@ -13,8 +13,8 @@
|
|||||||
"src" : "图片路径"
|
"src" : "图片路径"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versionName" : "1.0.59",
|
"versionName" : "1.0.60",
|
||||||
"versionCode" : 1059,
|
"versionCode" : 1060,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"nvueCompiler" : "weex",
|
"nvueCompiler" : "weex",
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
|
|||||||
@@ -520,6 +520,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-modal
|
||||||
|
:show="presaleRemarkModalShow"
|
||||||
|
title="提示"
|
||||||
|
:content="presaleRemarkModalContent"
|
||||||
|
:showCancelButton="true"
|
||||||
|
confirmText="继续购买"
|
||||||
|
cancelText="取消"
|
||||||
|
@confirm="handlePresaleRemarkConfirm"
|
||||||
|
@cancel="handlePresaleRemarkCancel"
|
||||||
|
@close="handlePresaleRemarkCancel"
|
||||||
|
></u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -621,6 +632,9 @@ export default {
|
|||||||
|
|
||||||
orderModalShowInfo: {},
|
orderModalShowInfo: {},
|
||||||
orderModalShow: false,
|
orderModalShow: false,
|
||||||
|
presaleRemarkModalShow: false,
|
||||||
|
presaleRemarkModalContent: "",
|
||||||
|
presaleRemarkModalResolve: null,
|
||||||
payType: 1,
|
payType: 1,
|
||||||
freightNum: 0,
|
freightNum: 0,
|
||||||
addressData: {
|
addressData: {
|
||||||
@@ -1344,6 +1358,62 @@ export default {
|
|||||||
this.content = this.remark;
|
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() {
|
async goBuyJie() {
|
||||||
if (this.pageType == "vip") {
|
if (this.pageType == "vip") {
|
||||||
if (this.radioValue != "1") {
|
if (this.radioValue != "1") {
|
||||||
@@ -1449,6 +1519,11 @@ export default {
|
|||||||
});
|
});
|
||||||
thisproduct = thisproduct.join(",");
|
thisproduct = thisproduct.join(",");
|
||||||
}
|
}
|
||||||
|
const passPresaleRemark = await this.checkPresaleRemark();
|
||||||
|
if (!passPresaleRemark) {
|
||||||
|
this.buyingFlag = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
this.historyOrderInfo &&
|
this.historyOrderInfo &&
|
||||||
thisproduct == this.historyOrderInfo.product &&
|
thisproduct == this.historyOrderInfo.product &&
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -145,6 +145,7 @@ export default {
|
|||||||
list: "app/phone.do?getCourseDetail_new",
|
list: "app/phone.do?getCourseDetail_new",
|
||||||
initPrepareOrder: "common/buyOrder/initPrepareOrder",
|
initPrepareOrder: "common/buyOrder/initPrepareOrder",
|
||||||
buyOrder: "book/buyOrder/placeOrder",
|
buyOrder: "book/buyOrder/placeOrder",
|
||||||
|
presaleRemark: "book/buyOrder/presaleRemark",
|
||||||
curriculumInfo: "app/phone.do?getCourseInfo",
|
curriculumInfo: "app/phone.do?getCourseInfo",
|
||||||
detailInfo: "app/phoneDoctor.do?getTaiHuClassInfo_new",
|
detailInfo: "app/phoneDoctor.do?getTaiHuClassInfo_new",
|
||||||
userInfo: "common/user/getUserInfo",
|
userInfo: "common/user/getUserInfo",
|
||||||
|
|||||||
Reference in New Issue
Block a user