[更新]基础框架,登录流程
This commit is contained in:
31
pages/richText/richText.js
Normal file
31
pages/richText/richText.js
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||
*/
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
title : "", //文章标题
|
||||
content : "", //富文本信息
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(e) {
|
||||
wx.$api.publics.richText(e.key).then(res=>{
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.title
|
||||
})
|
||||
this.setData({
|
||||
content: res.content.replace(/\<img/gi, '<img style="max-width:100%; height:auto; display:block;"')
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user