|
@@ -956,9 +956,9 @@ export default {
|
|
|
option.informId && this.clickOfficial(option.informId);
|
|
|
},
|
|
|
async onShow() {
|
|
|
- if(uni.getStorageSync('nofresh')){
|
|
|
- uni.removeStorageSync('nofresh')
|
|
|
- return
|
|
|
+ if (uni.getStorageSync("nofresh")) {
|
|
|
+ uni.removeStorageSync("nofresh");
|
|
|
+ return;
|
|
|
}
|
|
|
if (this.option.skipPort) {
|
|
|
await this.$method.skipLogin(this.option.skipPort);
|
|
@@ -3428,19 +3428,19 @@ export default {
|
|
|
return this.$api
|
|
|
.checkFinishRequiredCourse({
|
|
|
businessId: this.goodsData.businessId,
|
|
|
+ goodsId: this.goodsId,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- if (res.data.data == 0) {
|
|
|
- // uni.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // confirmText: "确定",
|
|
|
- // content:
|
|
|
- // "请先学完必修课程!",
|
|
|
- // success: function (resultst) {
|
|
|
- // uni.navigateBack();
|
|
|
- // },
|
|
|
- // });
|
|
|
- // return Promise.reject()
|
|
|
+ if (res.data.data > 0) {
|
|
|
+ uni.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: "确定",
|
|
|
+ content: "该业务层次下有未学完的商品,无法学习新商品!",
|
|
|
+ success: function (resultst) {
|
|
|
+ uni.navigateBack();
|
|
|
+ },
|
|
|
+ });
|
|
|
+ return Promise.reject();
|
|
|
}
|
|
|
return Promise.resolve();
|
|
|
});
|
|
@@ -3450,8 +3450,7 @@ export default {
|
|
|
// '/goods/'+ data,
|
|
|
this.$api.goodsDetail(this.goodsId).then(async (res) => {
|
|
|
this.goodsData = res.data.data;
|
|
|
- this.goodsData.categoryName != "必修" &&
|
|
|
- (await this.checkFinishRequiredCourse());
|
|
|
+ await this.checkFinishRequiredCourse();
|
|
|
if (self.goodsData.buyNote) {
|
|
|
this.baseHandoutTipList();
|
|
|
}
|