1234567891011121314151617181920212223242526272829 |
- 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 += '<img style="display: block;max-width: 100%;" src="' + getImgUrl(uploadImgs[i]) + '" alt="内容图" />'
- }
- for(var i = 0, len = imgContent.length; i < len; i++) {
- content += '<img style="display: block;max-width: 100%;" src="' + imgContent[i] + '" alt="内容图" />'
- }
- var articlePreview = {
- articleTitle: articleTitle,
- secondLevelCategoryName: secondLevelCategoryName,
- imgCover: imgCover,//封面图
- content: content,//内容
- userScope: userScope//使用范围
- }
- var html = template('articlePreview_tmpl',{it:articlePreview})
- $('#main').html(html)
- })
|