index.wxml
<text class="user-motto" id="user-{{userId}}">{{motto}}</text>
index.js
//index.js
//获取应用实例
const app = getApp()
Page({
data: {
motto: 'Hello World1',
userId: '123'
},
onLoad: function () {
},
onShow: function(){
// app.globalData.userInfo="wxopen.club";
}
})