Commit 1b7744df11f8c5ec81263d9fa68f214adfb895b3
1 parent
1dfbcf3b
分销跳转
Showing
8 changed files
with
121 additions
and
5 deletions
app.js
... | ... | @@ -20,7 +20,7 @@ App({ |
20 | 20 | "src_sele": t.imghost+"/miniapp/images/bar/fl_on.png" |
21 | 21 | }, |
22 | 22 | { |
23 | - "weappurl": "packageA/pages/distribution/main/main", | |
23 | + "weappurl": "pages/temp/temp", | |
24 | 24 | "nav_name": "分销", |
25 | 25 | "src": t.imghost+"/miniapp/images/bar/fx.png", |
26 | 26 | "src_sele": t.imghost+"/miniapp/images/bar/fx_on.png" |
... | ... | @@ -369,7 +369,7 @@ App({ |
369 | 369 | "/pages/goods/categoryList/categoryList?type=2", |
370 | 370 | "/pages/goods/categoryList/categoryList?type=1", |
371 | 371 | "/pages/cart/cart/cart","/pages/user/index/index", |
372 | - "/packageA/pages/distribution/main/main"]; | |
372 | + "/pages/temp/temp"]; | |
373 | 373 | if(arr_tabbar.indexOf(url)!=-1){ |
374 | 374 | if(url.indexOf("categoryList?type=1")!=-1) this.globalData.cat_type=1; |
375 | 375 | if(url.indexOf("categoryList?type=2")!=-1) this.globalData.cat_type=2; | ... | ... |
app.json
... | ... | @@ -92,7 +92,8 @@ |
92 | 92 | "pages/user/collect_list/collect_list", |
93 | 93 | "pages/user/deposit/deposit", |
94 | 94 | "pages/user/deposit/prepaid/msg/msg", |
95 | - "pages/user/deposit/prepaid/prepaid" | |
95 | + "pages/user/deposit/prepaid/prepaid", | |
96 | + "pages/temp/temp" | |
96 | 97 | ], |
97 | 98 | "plugins": { |
98 | 99 | "live-player-plugin": { |
... | ... | @@ -171,7 +172,7 @@ |
171 | 172 | "selectedIconPath": "packageA/images/bar/fl_on.png" |
172 | 173 | }, |
173 | 174 | { |
174 | - "pagePath": "packageA/pages/distribution/main/main", | |
175 | + "pagePath": "pages/temp/temp", | |
175 | 176 | "text": "分销", |
176 | 177 | "iconPath": "packageA/images/bar/fx.png", |
177 | 178 | "selectedIconPath": "packageA/images/bar/fx_on.png" | ... | ... |
components/nodata/nodata.wxss
pages/temp/temp.js
0 → 100644
1 | +// pages/temp/temp.js | |
2 | +const app = getApp(); | |
3 | + | |
4 | +Page({ | |
5 | + | |
6 | + /** | |
7 | + * 页面的初始数据 | |
8 | + */ | |
9 | + data: { | |
10 | + | |
11 | + }, | |
12 | + | |
13 | + /** | |
14 | + * 生命周期函数--监听页面加载 | |
15 | + */ | |
16 | + onLoad: function (options) { | |
17 | + let url = '/packageA/pages/distribution/main/main'; | |
18 | + app.goto(url); | |
19 | + }, | |
20 | + | |
21 | + /** | |
22 | + * 生命周期函数--监听页面初次渲染完成 | |
23 | + */ | |
24 | + onReady: function () { | |
25 | + | |
26 | + }, | |
27 | + | |
28 | + /** | |
29 | + * 生命周期函数--监听页面显示 | |
30 | + */ | |
31 | + onShow: function () { | |
32 | + | |
33 | + }, | |
34 | + | |
35 | + /** | |
36 | + * 生命周期函数--监听页面隐藏 | |
37 | + */ | |
38 | + onHide: function () { | |
39 | + | |
40 | + }, | |
41 | + | |
42 | + /** | |
43 | + * 生命周期函数--监听页面卸载 | |
44 | + */ | |
45 | + onUnload: function () { | |
46 | + | |
47 | + }, | |
48 | + | |
49 | + /** | |
50 | + * 页面相关事件处理函数--监听用户下拉动作 | |
51 | + */ | |
52 | + onPullDownRefresh: function () { | |
53 | + | |
54 | + }, | |
55 | + | |
56 | + /** | |
57 | + * 页面上拉触底事件的处理函数 | |
58 | + */ | |
59 | + onReachBottom: function () { | |
60 | + | |
61 | + }, | |
62 | + | |
63 | + /** | |
64 | + * 用户点击右上角分享 | |
65 | + */ | |
66 | + onShareAppMessage: function () { | |
67 | + | |
68 | + } | |
69 | +}) | |
0 | 70 | \ No newline at end of file | ... | ... |
pages/temp/temp.json
0 → 100644
pages/temp/temp.wxml
0 → 100644
pages/temp/temp.wxss
0 → 100644
utils/filter.wxs
... | ... | @@ -58,9 +58,28 @@ var filters = { |
58 | 58 | }, |
59 | 59 | |
60 | 60 | |
61 | + // show_default: function (value, placeholder, multiple) { | |
62 | + // if(typeof value === 'number') { | |
63 | + // if(isNaN(value) || value === 0) { | |
64 | + // return placeholder || '0'; | |
65 | + // } else { | |
66 | + // if(multiple) { | |
67 | + // return value / multiple; | |
68 | + // } else { | |
69 | + // return value; | |
70 | + // } | |
71 | + // }; | |
72 | + // } else if(value === '' || value === undefined || value === null) { | |
73 | + // return placeholder || '-'; | |
74 | + // } else { | |
75 | + // return value; | |
76 | + // } | |
77 | + // }, | |
61 | 78 | show_default: function (value, placeholder, multiple) { |
62 | 79 | if(typeof value === 'number') { |
63 | - if(isNaN(value) || value === 0) { | |
80 | + if(isNaN(value)) { | |
81 | + return placeholder || '-'; | |
82 | + } else if(value === 0) { | |
64 | 83 | return placeholder || '0'; |
65 | 84 | } else { |
66 | 85 | if(multiple) { |
... | ... | @@ -77,6 +96,25 @@ var filters = { |
77 | 96 | }, |
78 | 97 | |
79 | 98 | |
99 | + // 根据状态值返回相应的状态文字 | |
100 | + // num:状态数值, | |
101 | + // arr: 状态文字数组, | |
102 | + // 文字顺序必须跟状态数值对应 | |
103 | + status: function(num, arr) { | |
104 | + // var text = ''; | |
105 | + // if(num == 0) { | |
106 | + // text = '未付款'; | |
107 | + // } else if(num == 1) { | |
108 | + // text = '已付款'; | |
109 | + // } else if(num == 2) { | |
110 | + // text = '等待分成(已收货)'; | |
111 | + // } else if(num == 3) { | |
112 | + // text = '已完成'; | |
113 | + // }; | |
114 | + return arr[num]; | |
115 | + }, | |
116 | + | |
117 | + | |
80 | 118 | |
81 | 119 | |
82 | 120 | }; |
... | ... | @@ -89,4 +127,5 @@ module.exports = { |
89 | 127 | pInt: filters.pInt, |
90 | 128 | show_gui_ge: filters.show_gui_ge, |
91 | 129 | show_default: filters.show_default, |
130 | + status: filters.status, | |
92 | 131 | } |
93 | 132 | \ No newline at end of file | ... | ... |