查缺补漏

This commit is contained in:
@fawn-nine
2024-06-26 14:15:16 +08:00
parent 0374ef034a
commit ac9364bbf6
19 changed files with 539 additions and 184 deletions

View File

@@ -303,7 +303,13 @@
// console.log(
this.cartList = res.cartList
this.isAddLink(val)
}).catch( e => {
console.log(e,'e')
uni.showToast({
title:`获取数据失败`,
icon:'error'
})
})
}
},
// 加入购物车
@@ -344,7 +350,13 @@
duration: 1000,
});
}
}).catch( e => {
console.log(e,'e')
uni.showToast({
title:`加入失败`,
icon:'error'
})
})
} else {
// 加入购物车
$http.request({
@@ -362,7 +374,13 @@
duration: 1000,
});
}
}).catch( e => {
console.log(e,'e')
uni.showToast({
title:`加入失败`,
icon:'error'
})
})
}
} else {
@@ -381,6 +399,12 @@
duration: 1000,
});
}
}).catch( e => {
console.log(e,'e')
uni.showToast({
title:`加入失败`,
icon:'error'
})
})
}
},
@@ -397,8 +421,8 @@
          },
        ],
        navTitle: this.options.navTitle,
        title: this.options.title,
        navTitle: val.productName,
        title: val.productName,
        typeId: 0,
      }); // 这里转换成 字符串
@@ -420,12 +444,15 @@
this.getMyCourseList()
},
search(res){
console.log('点了搜索')
// if (this.curTagId == 0) {
// console.log('点了搜索')
if(!this.MyCourseList.flag){
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.getMyCourseList()
console.log(this.searchValue,'searchValue')
console.log(this.searchValue,'searchValue')
}else{
console.log('存在未执行完的程序')
}
},
focus(res){
this.oldValue = res
@@ -502,11 +529,17 @@
} else {
this.MyCourseList.status = 3 // 暂无数据
}
console.log('status', this.MyCourseList.status)
// console.log('status--------------------', this.MyCourseList.list)
}
this.MyCourseList.flag = false
}).catch(e => {
this.MyCourseList.flag = false
this.MyCourseList.status = 3
console.log(e, '数据报错')
uni.showToast({
title:`获取数据失败`,
icon:'error'
})
});
},
getLearningCourseList() {
@@ -539,6 +572,11 @@
// this.LearningCourseList.flag = false
}).catch(e => {
console.log(e, '数据报错')
this.LearningCourseList.status = 3 // 暂无数据
uni.showToast({
title:`获取数据失败`,
icon:'error'
})
});
},
getExpiredCourseList() {
@@ -577,6 +615,11 @@
// this.ExpiredCourseList.flag = false
}).catch(e => {
console.log(e, '数据报错')
this.ExpiredCourseList.status = 3
uni.showToast({
title:`获取数据失败`,
icon:'error'
})
});
},
getUserInfo() {
@@ -618,8 +661,12 @@
}
})
.catch(e => {
.catch(e => {
console.log('加入在学习', e)
uni.showToast({
title:'加入失败',
icon:'error'
})
})
},
delCollection(val, index){