wxd
/
MShopWeApp
Toggle navigation
Sign in
Sign in
Project
Files
Commits
Network
Graphs
Milestones
Issues
0
Merge Requests
0
Labels
Wiki
Download as
Email Patches
Plain Diff
Browse Code »
Commit
2a61d132eb24b7373947ea06b1833fdf00f5851d
Authored by
后端研发-倪永富
2020-02-17 11:57:58 +0800
1 parent
ef12cb65
判断ad_code是否存在
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
pages/user/index/index.js
pages/user/index/index.js
View file @
2a61d13
...
...
@@ -66,7 +66,8 @@ Page({
66
66
}).then(res => {
67
67
if(res.data.code==0 && res.data.data){
68
68
var item=res.data.data[0];
69
- th.setData({ad_img:item.ad_code})
69
+ if (item && item.ad_code)
70
+ th.setData({ad_img:item.ad_code})
70
71
}
71
72
})
72
73
},
...
...