var isEdit; var articleId; mui.plusReady(function() { var self = plus.webview.currentWebview(), articleTitle = self.articleTitle, secondLevelCategoryName = self.secondLevelCategoryName, imgCover = self.imgCover && self.imgCover[0],//封面图 content = self.content,//内容 imgContent = self.imgContent ? self.imgContent : [],//用于未上传图 uploadImgs = self.uploadImgs ? self.uploadImgs : [],//用于已上传图 userScope = self.userScope;//使用范围 for(var i = 0, len = uploadImgs.length; i < len; i++) { content += '内容图' } for(var i = 0, len = imgContent.length; i < len; i++) { content += '内容图' } var articlePreview = { articleTitle: articleTitle, secondLevelCategoryName: secondLevelCategoryName, imgCover: imgCover,//封面图 content: content,//内容 userScope: userScope//使用范围 } var html = template('articlePreview_tmpl',{it:articlePreview}) $('#main').html(html) })