From c96612e8a63ecef9590be0f8b5199277ec94e5b9 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 18 九月 2024 18:43:12 +0800 Subject: [PATCH] 云学习购买目录,修改bug --- pages/digitalCourses/index.js | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/pages/digitalCourses/index.js b/pages/digitalCourses/index.js index e7d403b..a99fbbf 100644 --- a/pages/digitalCourses/index.js +++ b/pages/digitalCourses/index.js @@ -21,6 +21,7 @@ activeItem: null, loading: false, contentLoading: false, + noData:false, shoppingCartGetId: [], sorter: { value: "*", @@ -132,7 +133,7 @@ }, getCourseTypeListList() { this.setData({ - loading: true + loading: true, }) const data = { path: '*', @@ -230,6 +231,12 @@ } } app.MG.store.getProductList(obj).then((res) => { + if(!res.datas.length) { + return this.setData({ + noData:true, + contentLoading:false + }) + } res.datas.forEach(item => { item.price = item.price.toFixed(2) item.productLinkInfo = JSON.parse(item.productLinkInfo) -- Gitblit v1.9.1