Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 784832f

Browse files
author
doutingqiang
committed
源码分享
0 parents  commit 784832f

File tree

196 files changed

+10669
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+10669
-0
lines changed

Exchange volume/app.js

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
App({
2+
onLaunch: function(e) {
3+
var t = this;
4+
wx.getSystemInfo({
5+
success: function(e) {
6+
t.globalData.navHeight = e.statusBarHeight + 46;
7+
},
8+
fail: function(e) {
9+
console.log(e);
10+
}
11+
}), wx.getSetting({
12+
success: function(e) {
13+
e.authSetting["scope.userInfo"] && wx.getUserInfo({
14+
success: function(e) {
15+
t.globalData.userInfo = e.userInfo, t.userInfoReadyCallback && t.userInfoReadyCallback(e);
16+
}
17+
});
18+
}
19+
});
20+
var a = wx.getUpdateManager();
21+
a.onCheckForUpdate(function(e) {
22+
console.log(e.hasUpdate);
23+
}), a.onUpdateReady(function() {
24+
wx.showModal({
25+
title: "更新提示",
26+
content: "新版本已经准备好,是否重启应用?",
27+
success: function(e) {
28+
e.confirm && a.applyUpdate();
29+
}
30+
});
31+
}), a.onUpdateFailed(function() {
32+
wx.showModal({
33+
title: "更新提示",
34+
content: "新版本下载失败",
35+
showCancel: !1
36+
});
37+
});
38+
},
39+
onShow: function(e) {
40+
var t = this;
41+
1044 == e.scene && (t.globalData.shareTicket = e.shareTicket);
42+
},
43+
globalData: {
44+
userInfo: null,
45+
tabbar: {
46+
selectedColor: "rgb(210,26,18)",
47+
color: "rgb(77,77,77)",
48+
backgroundColor: "white",
49+
borderStyle: "#e1e1e6",
50+
list: [ {
51+
pagePath: "/pages/index/index",
52+
text: "首页",
53+
iconPath: "/assets/icn_home_02.png",
54+
selectedIconPath: "/assets/icn_home_01.png"
55+
}, {
56+
pagePath: "/pages/release/release",
57+
text: "发布",
58+
iconPath: "/assets/icn_join_02.png",
59+
selectedIconPath: "/assets/icn_join_01.png"
60+
}, {
61+
pagePath: "/pages/mine/mine",
62+
text: "我的",
63+
iconPath: "/assets/icn_me_02.png",
64+
selectedIconPath: "/assets/icn_me_01.png",
65+
iCount: 0
66+
} ],
67+
position: "bottom"
68+
}
69+
},
70+
editTabBar: function() {
71+
var e = this.globalData.tabbar, t = getCurrentPages(), a = t[t.length - 1], n = a.__route__;
72+
0 != n.indexOf("/") && (n = "/" + n);
73+
for (var s in e.list) e.list[s].selected = !1, e.list[s].pagePath == n && (e.list[s].selected = !0);
74+
a.setData({
75+
tabbar: e
76+
});
77+
}
78+
});

Exchange volume/app.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"pages": [
3+
"pages/index/index",
4+
"pages/myrelease/myrelease",
5+
"pages/info/info",
6+
"pages/add/add",
7+
"pages/mine/mine",
8+
"pages/logs/logs",
9+
"pages/search/serach",
10+
"pages/mymessage/mymessage",
11+
"pages/phone/phone",
12+
"pages/release/release"
13+
],
14+
"window": {
15+
"navigationStyle": "custom"
16+
}
17+
}

Exchange volume/app.wxss

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
page {
2+
height: 100%;
3+
width: 100%;
4+
}
5+
6+
.container {
7+
height: 100%;
8+
width: 100%;
9+
position: relative;
10+
}
11+
12+
.nav {
13+
width: 100%;
14+
overflow: hidden;
15+
position: relative;
16+
top: 0;
17+
left: 0;
18+
z-index: 10;
19+
}
20+
21+
.nav-title {
22+
width: 100%;
23+
height: 45px;
24+
line-height: 45px;
25+
text-align: center;
26+
position: absolute;
27+
bottom: 0;
28+
left: 0;
29+
z-index: 10;
30+
font-family: PingFang-SC-Medium;
31+
font-size: 36rpx;
32+
letter-spacing: 2px;
33+
border-bottom: 1rpx solid rgb(225,225,230);
34+
}
35+
36+
.nav .back {
37+
width: 22px;
38+
height: 22px;
39+
position: absolute;
40+
bottom: 0;
41+
left: 0;
42+
padding: 10px 15px;
43+
}
44+
45+
.nav .img_poster {
46+
width: 137rpx;
47+
height: 88rpx;
48+
position: absolute;
49+
left: 30rpx;
50+
top: 50%;
51+
transform: translateY(-50%);
52+
}
53+
54+
.bg-white {
55+
background-color: #fff;
56+
}
57+
58+
.overflow {
59+
overflow: auto;
60+
}
61+
62+
.hidden {
63+
overflow: hidden;
64+
}
65+
66+
.back_img_nav {
67+
width: 19rpx;
68+
height: 34rpx;
69+
padding: 10px 15px;
70+
position: absolute;
71+
left: 10rpx;
72+
top: 50%;
73+
transform: translateY(-50%);
74+
}
75+
76+
.img_v_01_authentication {
77+
width: 40rpx;
78+
height: 40rpx;
79+
position: absolute;
80+
top: -10rpx;
81+
left: -10rpx;
82+
}
83+
84+
.right_flex {
85+
align-items: flex-end;
86+
}
1.19 KB

Exchange volume/assets/arrow-left.png

1.19 KB

Exchange volume/assets/back.png

598 Bytes

Exchange volume/assets/boder.png

2.66 KB

Exchange volume/assets/border2.png

2.81 KB

Exchange volume/assets/border3.png

2.96 KB
223 Bytes
5.81 KB
4.77 KB
6.05 KB
5.76 KB
750 Bytes
338 Bytes
384 Bytes

Exchange volume/assets/btn_edit.png

503 Bytes
485 Bytes
638 Bytes
5.9 KB
583 Bytes
669 Bytes
5.28 KB
373 Bytes
1.75 KB
1.75 KB

Exchange volume/assets/concat.jpg

43.6 KB

Exchange volume/assets/gif_text.png

1.9 KB
875 Bytes
874 Bytes
210 Bytes
1.47 KB

Exchange volume/assets/icn_face.png

565 Bytes
669 Bytes
673 Bytes
785 Bytes
741 Bytes

Exchange volume/assets/icn_me_01.png

676 Bytes

Exchange volume/assets/icn_me_02.png

689 Bytes

Exchange volume/assets/icn_search.png

559 Bytes
965 Bytes

Exchange volume/assets/icn_share.png

821 Bytes

Exchange volume/assets/img_WeChat.png

4.16 KB
6.9 KB
61.7 KB

Exchange volume/assets/img_buy_01.png

721 Bytes

Exchange volume/assets/img_buy_02.png

845 Bytes
705 Bytes
846 Bytes
332 Bytes
436 Bytes

Exchange volume/assets/img_gray.png

2.63 KB
628 Bytes
5.58 KB

Exchange volume/assets/img_plus.png

210 Bytes

Exchange volume/assets/img_poster.png

2 KB
681 Bytes
796 Bytes
3.51 KB
3.6 KB
383 Bytes

Exchange volume/assets/img_v_01.png

1.99 KB

Exchange volume/assets/img_v_02.png

1.75 KB

Exchange volume/assets/search.png

6.41 KB

Exchange volume/assets/shareimg.jpg

77 KB

Exchange volume/assets/toux.jpg

55.1 KB

Exchange volume/common/toBar.js

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
function n(n) {
2+
function u() {}
3+
getApp();
4+
var c = n.data, s = [ {
5+
iCount: 1,
6+
sIconUrl: o("note"),
7+
sTitle: "note"
8+
}, {
9+
iCount: 98,
10+
sIconUrl: o("home"),
11+
sTitle: "home"
12+
}, {
13+
iCount: 0,
14+
sIconUrl: o("safari"),
15+
sTitle: "safari"
16+
} ];
17+
c.jhDataForTabbar = i || s;
18+
var d = {
19+
onLoad: n.onLoad || u,
20+
onReady: n.onReady || u,
21+
onShow: n.onShow || u,
22+
onHide: n.onHide || u,
23+
onUnload: n.onUnload || u,
24+
onPullDownRefresh: n.onPullDownRefresh || u,
25+
onReachBottom: n.onReachBottom || u
26+
}, f = {
27+
data: c,
28+
onLoad: function() {
29+
d.onLoad.bind(this)(), t = this;
30+
},
31+
onReady: function() {
32+
d.onReady.bind(this)();
33+
},
34+
onShow: function() {
35+
d.onShow.bind(this)();
36+
},
37+
onHide: function() {
38+
d.onHide.bind(this)();
39+
},
40+
onUnload: function() {
41+
d.onUnload.bind(this)();
42+
},
43+
onPullDownRefresh: function() {
44+
d.onPullDownRefresh.bind(this)();
45+
},
46+
onReachBottom: function() {
47+
d.onReachBottom.bind(this)();
48+
},
49+
onTabbarItemTap: function(n) {
50+
var o = n.currentTarget.dataset.key, t = {};
51+
this.data.jhDataForTabbar.forEach(function(n) {
52+
n.sTitle === o && (t = n);
53+
}), r.tap.length > 0 ? r.tap.forEach(function(n) {
54+
n({
55+
key: o,
56+
data: t,
57+
eventKey: o
58+
});
59+
}) : a({
60+
key: o
61+
});
62+
}
63+
};
64+
for (var l in n) void 0 === f[l] && (f[l] = n[l]);
65+
Page(f), e = !0;
66+
}
67+
68+
function o(n, o) {
69+
return void 0 === o ? [ "../template/img/", n, ".png" ].join("") : [ "../template/img/", n, "-", o, ".png" ].join("");
70+
}
71+
72+
function a(n) {
73+
var o = n.key, a = t.data.jhDataForTabbar.map(function(n) {
74+
var a = n.iCount, t = n.sIconUrl, e = n.sTitle;
75+
return e === o && ++a, {
76+
iCount: a,
77+
sIconUrl: t,
78+
sTitle: e
79+
};
80+
});
81+
t.setData({
82+
jhDataForTabbar: a
83+
});
84+
}
85+
86+
Object.defineProperty(exports, "__esModule", {
87+
value: !0
88+
}), exports.init = n, exports.setTabbarData = function(o) {
89+
return !1 === e ? i = o : t.setData({
90+
jhDataForTabbar: o
91+
}), n;
92+
};
93+
94+
var t = void 0, e = !1, i = void 0, r = {
95+
tap: []
96+
}, u = {
97+
addListener: function(n) {
98+
return "function" != typeof n ? (console.warn("Tabbar can only handle function. Tabbar.addListener() receive a non-function param."),
99+
!1) : (r.tap.push(n), !0);
100+
},
101+
removeListener: function(n) {
102+
if ("function" != typeof n) return console.warn("Tabbar can only handle function. Tabbar.addListener() receive a non-function param."),
103+
!1;
104+
var o = [];
105+
return r.tap.forEach(function(a) {
106+
a !== n && o.push(a);
107+
}), r.tap = o, !0;
108+
},
109+
removeAll: function() {
110+
r.tap = [];
111+
}
112+
};
113+
114+
module.exports.Tabbar = u;

Exchange volume/common/toBar.wxml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template name="tabbar">
2+
<view class="tabbar_box flex" style="background-color:{{tabbar.backgroundColor}}; border-top-color:{{tabbar.borderStyle}}; {{tabbar.position=='top'?'top:0':'bottom:0'}}">
3+
<navigator class="tabbar_nav" openType="redirect" style=" color:{{item.selected?tabbar.selectedColor:tabbar.color}}" url="{{item.pagePath}}" wx:for="{{tabbar.list}}" wx:key="index">
4+
<image class="tabbar_icon" src="{{item.selected?item.selectedIconPath:item.iconPath}}"></image>
5+
<view class="dot_tar" wx:if="{{item.iCount>0}}"></view>
6+
<text>{{item.text}}</text>
7+
</navigator>
8+
</view>
9+
</template>

Exchange volume/common/toBar.wxss

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.tabbar_box {
2+
display: flex;
3+
flex-direction: row;
4+
justify-content: space-around;
5+
position: fixed;
6+
bottom: 0;
7+
left: 0;
8+
width: 100%;
9+
height: 98rpx;
10+
border-top: 1rpx solid #e1e1e6;
11+
}
12+
13+
.tabbar_nav {
14+
display: flex;
15+
flex-direction: column;
16+
justify-content: center;
17+
align-items: center;
18+
font-size: 22rpx;
19+
height: 100%;
20+
margin-right: 3rpx;
21+
width: 100%;
22+
position: relative;
23+
}
24+
25+
.tabbar_icon {
26+
width: 50rpx;
27+
height: 50rpx;
28+
}
29+
30+
.dot_tar {
31+
width: 12rpx;
32+
height: 12rpx;
33+
border-radius: 50%;
34+
background: rgb(210,26,18);
35+
position: absolute;
36+
top: 11%;
37+
left: 59%;
38+
}

0 commit comments

Comments
 (0)