diff --git a/app.js b/app.js index f5e353a..311303e 100644 --- a/app.js +++ b/app.js @@ -20,7 +20,7 @@ App({ "src_sele": t.imghost+"/miniapp/images/bar/fl_on.png" }, { - "weappurl": "packageA/pages/distribution/main/main", + "weappurl": "pages/temp/temp", "nav_name": "分销", "src": t.imghost+"/miniapp/images/bar/fx.png", "src_sele": t.imghost+"/miniapp/images/bar/fx_on.png" @@ -369,7 +369,7 @@ App({ "/pages/goods/categoryList/categoryList?type=2", "/pages/goods/categoryList/categoryList?type=1", "/pages/cart/cart/cart","/pages/user/index/index", - "/packageA/pages/distribution/main/main"]; + "/pages/temp/temp"]; if(arr_tabbar.indexOf(url)!=-1){ if(url.indexOf("categoryList?type=1")!=-1) this.globalData.cat_type=1; if(url.indexOf("categoryList?type=2")!=-1) this.globalData.cat_type=2; diff --git a/app.json b/app.json index 3a60530..f35d5ac 100644 --- a/app.json +++ b/app.json @@ -92,7 +92,8 @@ "pages/user/collect_list/collect_list", "pages/user/deposit/deposit", "pages/user/deposit/prepaid/msg/msg", - "pages/user/deposit/prepaid/prepaid" + "pages/user/deposit/prepaid/prepaid", + "pages/temp/temp" ], "plugins": { "live-player-plugin": { @@ -171,7 +172,7 @@ "selectedIconPath": "packageA/images/bar/fl_on.png" }, { - "pagePath": "packageA/pages/distribution/main/main", + "pagePath": "pages/temp/temp", "text": "分销", "iconPath": "packageA/images/bar/fx.png", "selectedIconPath": "packageA/images/bar/fx_on.png" diff --git a/components/nodata/nodata.wxss b/components/nodata/nodata.wxss index 731dd83..903d6a2 100644 --- a/components/nodata/nodata.wxss +++ b/components/nodata/nodata.wxss @@ -29,4 +29,5 @@ padding-top: 40rpx; padding-bottom: 40rpx; color: #bbb; + font-size: 28rpx; } \ No newline at end of file diff --git a/pages/temp/temp.js b/pages/temp/temp.js new file mode 100644 index 0000000..c8866ee --- /dev/null +++ b/pages/temp/temp.js @@ -0,0 +1,69 @@ +// pages/temp/temp.js +const app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let url = '/packageA/pages/distribution/main/main'; + app.goto(url); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/temp/temp.json b/pages/temp/temp.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/temp/temp.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/temp/temp.wxml b/pages/temp/temp.wxml new file mode 100644 index 0000000..7d63edd --- /dev/null +++ b/pages/temp/temp.wxml @@ -0,0 +1,2 @@ + + diff --git a/pages/temp/temp.wxss b/pages/temp/temp.wxss new file mode 100644 index 0000000..239d688 --- /dev/null +++ b/pages/temp/temp.wxss @@ -0,0 +1 @@ +/* pages/temp/temp.wxss */ \ No newline at end of file diff --git a/utils/filter.wxs b/utils/filter.wxs index 7bb6dce..92527a9 100644 --- a/utils/filter.wxs +++ b/utils/filter.wxs @@ -58,9 +58,28 @@ var filters = { }, + // show_default: function (value, placeholder, multiple) { + // if(typeof value === 'number') { + // if(isNaN(value) || value === 0) { + // return placeholder || '0'; + // } else { + // if(multiple) { + // return value / multiple; + // } else { + // return value; + // } + // }; + // } else if(value === '' || value === undefined || value === null) { + // return placeholder || '-'; + // } else { + // return value; + // } + // }, show_default: function (value, placeholder, multiple) { if(typeof value === 'number') { - if(isNaN(value) || value === 0) { + if(isNaN(value)) { + return placeholder || '-'; + } else if(value === 0) { return placeholder || '0'; } else { if(multiple) { @@ -77,6 +96,25 @@ var filters = { }, + // 根据状态值返回相应的状态文字 + // num:状态数值, + // arr: 状态文字数组, + // 文字顺序必须跟状态数值对应 + status: function(num, arr) { + // var text = ''; + // if(num == 0) { + // text = '未付款'; + // } else if(num == 1) { + // text = '已付款'; + // } else if(num == 2) { + // text = '等待分成(已收货)'; + // } else if(num == 3) { + // text = '已完成'; + // }; + return arr[num]; + }, + + }; @@ -89,4 +127,5 @@ module.exports = { pInt: filters.pInt, show_gui_ge: filters.show_gui_ge, show_default: filters.show_default, + status: filters.status, } \ No newline at end of file