剛遇到的一個小問題,居然一開始寫不出來,可見忘性是真的。。。
寫在此以做明示。
mui.getJSON('../index.json',null,function(rs){//本地文件相對路徑,參數爲null,回調函數
if(rs.code == 0) {
that.pageData = rs.list;
} else {
console.log(1)
}
});
剛遇到的一個小問題,居然一開始寫不出來,可見忘性是真的。。。
寫在此以做明示。
mui.getJSON('../index.json',null,function(rs){//本地文件相對路徑,參數爲null,回調函數
if(rs.code == 0) {
that.pageData = rs.list;
} else {
console.log(1)
}
});
/* 功能:獲取App根目錄 實例:app.getRoot() 當前訪問路徑:/page/index.html,結果:../ 當前訪問路徑:/page/child/index.html,結果:../.
//打開窗口 mui.openWindow({ url: '../index.html', id:'love_index', extras:{ //傳遞參數 aid:aid,
<div> <div class="mui-content"> <div class="top-tab"> <div id="sliderSegmentedControl" class="