feat(订单): 添加预售商品提示功能
- 在订单提交组件中添加预售商品提示弹窗 - 新增预售商品备注接口调用 - 修改VIP购买提示文本,明确不包含论坛权益 - 调整开发环境API配置
This commit is contained in:
@@ -2,8 +2,9 @@ let baseUrl = "";
|
|||||||
let socketUrl = "";
|
let socketUrl = "";
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// 开发环境
|
// 开发环境
|
||||||
baseUrl = "https://api.nuttyreading.com/"; //线上正式'
|
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
|
||||||
// baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
|
// baseUrl = "https://api.nuttyreading.com/"; //线上正式'
|
||||||
|
baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
// 生产环境11
|
// 生产环境11
|
||||||
baseUrl = "https://api.nuttyreading.com/"; //线上正式
|
baseUrl = "https://api.nuttyreading.com/"; //线上正式
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
"src" : "图片路径"
|
"src" : "图片路径"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versionName" : "2.0.45",
|
"versionName" : "2.0.46",
|
||||||
"versionCode" : 2045,
|
"versionCode" : 2046,
|
||||||
"sassImplementationName" : "node-sass",
|
"sassImplementationName" : "node-sass",
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"nvueCompiler" : "uni-app",
|
"nvueCompiler" : "uni-app",
|
||||||
|
|||||||
@@ -519,6 +519,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>
|
||||||
|
|
||||||
@@ -616,6 +627,9 @@
|
|||||||
|
|
||||||
orderModalShowInfo: {},
|
orderModalShowInfo: {},
|
||||||
orderModalShow: false,
|
orderModalShow: false,
|
||||||
|
presaleRemarkModalShow: false,
|
||||||
|
presaleRemarkModalContent: "",
|
||||||
|
presaleRemarkModalResolve: null,
|
||||||
payType: 1,
|
payType: 1,
|
||||||
freightNum: 0,
|
freightNum: 0,
|
||||||
addressData: {
|
addressData: {
|
||||||
@@ -1350,6 +1364,62 @@
|
|||||||
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") {
|
||||||
@@ -1457,6 +1527,11 @@
|
|||||||
});
|
});
|
||||||
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 &&
|
||||||
@@ -2437,4 +2512,4 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -1308,7 +1308,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const joinedText = this.textList.join('/');
|
const joinedText = this.textList.join('/');
|
||||||
this.goBuyTitle = '购买'+joinedText+'VIP,即可畅享更多专属权益';
|
this.goBuyTitle = '购买'+joinedText+'VIP,即可畅享更多专属权益(不包含论坛)';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -132,6 +132,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",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user