pref_mail@163.com 3 years ago
commit
66098363f4
  1. 230
      app.js
  2. 112
      app.json
  3. 13
      app.wxss
  4. BIN
      images/activeBac.png
  5. BIN
      images/activefive.png
  6. BIN
      images/activefour.png
  7. BIN
      images/activem.png
  8. BIN
      images/activeone.png
  9. BIN
      images/activethree.png
  10. BIN
      images/activetwo.png
  11. BIN
      images/add.png
  12. BIN
      images/addactive.png
  13. BIN
      images/addr.png
  14. BIN
      images/addreq.png
  15. BIN
      images/addy.png
  16. BIN
      images/advice.png
  17. BIN
      images/albumNum.png
  18. BIN
      images/authcom.png
  19. BIN
      images/ava.png
  20. BIN
      images/back.png
  21. BIN
      images/call.png
  22. BIN
      images/cashok.png
  23. BIN
      images/cashpay.png
  24. BIN
      images/cen.png
  25. BIN
      images/cens.png
  26. BIN
      images/clubback.png
  27. BIN
      images/clubgroup.png
  28. BIN
      images/clubm.png
  29. BIN
      images/clubrank.png
  30. BIN
      images/comp.png
  31. BIN
      images/coupon.png
  32. BIN
      images/createalbum.png
  33. BIN
      images/detailAdd.png
  34. BIN
      images/dingwei.png
  35. BIN
      images/edit.png
  36. BIN
      images/help.png
  37. BIN
      images/hostm.png
  38. BIN
      images/hot.png
  39. BIN
      images/imgadd.png
  40. BIN
      images/index_all.png
  41. BIN
      images/index_cross.png
  42. BIN
      images/index_out.png
  43. BIN
      images/index_run.png
  44. BIN
      images/index_snow.png
  45. BIN
      images/join.png
  46. BIN
      images/joined.png
  47. BIN
      images/joinshare.png
  48. BIN
      images/ju.png
  49. BIN
      images/jus.png
  50. BIN
      images/left.png
  51. BIN
      images/logo.jpg
  52. BIN
      images/man.png
  53. BIN
      images/manage.png
  54. BIN
      images/mes.png
  55. BIN
      images/mess.png
  56. BIN
      images/more.png
  57. BIN
      images/myhost.png
  58. BIN
      images/new.png
  59. BIN
      images/nojoin.png
  60. BIN
      images/nologin.png
  61. BIN
      images/nopay.png
  62. BIN
      images/nores.png
  63. BIN
      images/nouse.png
  64. BIN
      images/nouser.png
  65. BIN
      images/ok.png
  66. BIN
      images/oneb.png
  67. BIN
      images/onef.png
  68. BIN
      images/online.png
  69. BIN
      images/orderm.png
  70. BIN
      images/outback.png
  71. BIN
      images/pai.png
  72. BIN
      images/pais.png
  73. BIN
      images/payok.png
  74. BIN
      images/person.png
  75. BIN
      images/photoback.png
  76. BIN
      images/popBac.png
  77. BIN
      images/popone.png
  78. BIN
      images/quan.png
  79. BIN
      images/queen.png
  80. BIN
      images/remove.png
  81. BIN
      images/say.png
  82. BIN
      images/search.png
  83. BIN
      images/share.png
  84. BIN
      images/shareh.png
  85. BIN
      images/sharek.png
  86. BIN
      images/smile.png
  87. BIN
      images/star.png
  88. BIN
      images/stars.png
  89. BIN
      images/sysm.png
  90. BIN
      images/time.png
  91. BIN
      images/timed.png
  92. BIN
      images/tongji.png
  93. BIN
      images/top1.png
  94. BIN
      images/top2.png
  95. BIN
      images/top3.png
  96. BIN
      images/trash.png
  97. BIN
      images/trashorder.png
  98. BIN
      images/used.png
  99. BIN
      images/viewk.png
  100. BIN
      images/woman.png
  101. Some files were not shown because too many files have changed in this diff Show More

230
app.js

@ -0,0 +1,230 @@
//app.js
var Api = require('./utils/common.js');
var code;
App({
onLaunch: function () {
this.globalData = {};
},
onShow: function () {
this.getPower();
// wx.getUserProfile({
// success: function(res) {
// console.log(res.userInfo)
// }
// })
},
getPower: function (res) {
var that = this;
try {
const value = wx.getStorageSync('openid')
if (!value || value == null) {
wx.redirectTo({
url: "/pages/login"
})
} else {
// that.getUser();
}
} catch (e) {}
},
getUser: function () {
var that = this;
wx.getUserProfile({
desc:'获取用户信息',
success: res => {
console.log('xinxi',res)
// 保存用户信息到服务端
var pid = wx.getStorageSync('user_pid')
if (!pid || pid == null) {
pid = 0;
}
var iv = res.iv;
var encryptedData = res.encryptedData;
that.goIndex(code, iv, encryptedData, pid)
}
})
// wx.getSetting({
// success: setting => {
wx.login({
success: function (res) {
if (res.code) {
code = res.code;
// wx.getUserProfile({
// desc:'获取用户信息',
// success: res => {
// console.log('xinxi',res)
// // 保存用户信息到服务端
// var pid = wx.getStorageSync('user_pid')
// if (!pid || pid == null) {
// pid = 0;
// }
// var iv = res.iv;
// var encryptedData = res.encryptedData;
// that.goIndex(code, iv, encryptedData, pid)
// }
// })
} else {
console.log("error code " + res.errMsg);
}
}
})
// }
// })
},
goIndex: function (code, iv, encryptedData, pid) {
var that = this;
var phone;
wx.showLoading({
title: '加载中',
})
wx.request({
url: Api.getAPILoader(),
data: {
jsCode: code,
},
method: "get",
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success: function (res) {
var res = res.data;
if (res.code == 0) {
var datas = res.data;
wx.request({
url: Api.getphone(),
data: {
encryptedData: encryptedData,
iv: iv,
sessionKey: datas.sessionKey,
},
method: "get",
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success: function (res) {
var res = res.data;
if (res.code == 0) {
phone = res.data.phoneNumber
}
},
fail: function (error) {
console.log(error);
}
})
wx.request({
url: Api.getUserInfo(),
data: {
encryptedData: encryptedData,
iv: iv,
sessionKey: datas.sessionKey,
},
method: "get",
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success: function (res) {
var res = res.data;
if (res.code == 0) {
that.sign(datas.openid, datas.unionid, res.data, phone);
}
},
fail: function (error) {
console.log(error);
}
})
} else {
wx.hideLoading();
wx.showToast({
title: '登录失败',
icon: 'none'
})
}
},
fail: function (error) {
console.log(error);
}
})
},
sign: function (openid, unionid, info, phone) {
var that = this;
wx.request({
url: Api.getAPISign(),
data: {
openId: openid,
unionId: unionid,
gender: info.gender,
nickname: info.nickName,
userPhoto: info.avatarUrl,
phone: phone
},
method: "post",
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success: function (res) {
var res = res.data;
if (res.code == 0) {
var datas = res.data;
wx.setStorage({
key: 'user',
data: datas,
})
that.getImgUrl();
//判断用户是否初次登录
if (!wx.getStorageSync('openid')) {
wx.setStorage({
key: 'openid',
data: datas.openId,
});
wx.setStorage({
key: 'token',
data: datas.token,
});
wx.switchTab({
url: "/pages/index/index"
})
} else {
wx.navigateBack({
delta: 1
})
}
wx.hideLoading();
}else {
wx.hideLoading();
wx.showToast({
title: '登录失败',
icon: 'none'
})
}
},
fail: function (error) {
console.log(error);
}
})
},
getImgUrl:function(){
wx.request({
url: Api.getImgUrl(),
data: {},
method: "post",
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success: function (res) {
wx.setStorage({
key: 'imgUrl',
data: res.data.msg,
});
},
fail: function (error) {
console.log(error);
}
})
},
})

112
app.json

@ -0,0 +1,112 @@
{
"pages": [
"pages/index/index",
"pages/picker/picker",
"pages/login",
"pages/logs/logs",
"pages/club/club",
"pages/message/message",
"pages/rank/rank",
"pages/center/center",
"pages/index/search/search",
"pages/index/club/club",
"pages/index/active/active",
"pages/index/activeing/activeing",
"pages/index/rank/rank",
"pages/index/activeDetail/activeDetail",
"pages/index/join/join",
"pages/index/teamJoin/teamJoin",
"pages/index/myjoin/myjoin",
"pages/index/history/history",
"pages/index/editjoin/editjoin",
"pages/message/clubmessage/clubmessage",
"pages/message/sysmessage/sysmessage",
"pages/message/activemessage/activemessage",
"pages/message/hostmessage/hostmessage",
"pages/center/cash/cash",
"pages/center/cashok/cashok",
"pages/center/cashlist/cashlist",
"pages/center/coupon/coupon",
"pages/club/mark/mark",
"pages/club/createClub/createClub",
"pages/club/clubDetail/clubDetail",
"pages/club/manage/manage",
"pages/club/clubgroups/clubgroups",
"pages/club/clublist/clublist",
"pages/club/popname/popname",
"pages/club/removesb/removesb",
"pages/club/deputy/deputy",
"pages/club/account/account",
"pages/club/setadmin/setadmin",
"pages/club/album/album",
"pages/club/albumdetail/albumdetail",
"pages/release/release",
"pages/release/addactive/addactive",
"pages/release/addrequired/addrequired",
"pages/release/manageac/manageac",
"pages/release/manageIndex/manageIndex",
"pages/release/messageset/messageset",
"pages/release/signIndex/signIndex",
"pages/release/updateactive/updateactive",
"pages/release/addjoiner/addjoiner",
"pages/release/activeSign/activeSign",
"pages/club/clubTag/clubTag",
"pages/release/scave/scave",
"pages/center/info/info",
"pages/center/order/order",
"pages/center/orderdetail/orderdetail",
"pages/release/extend/extend",
"pages/release/census/census",
"pages/release/map/map",
"pages/release/sendmessage/sendmessage",
"pages/index/order/order",
"pages/center/advice/advice",
"pages/index/activeList/activeList",
"pages/release/quan/quan",
"pages/release/addCoupon/addcoupon",
"pages/index/payOK/payok"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#FFCB12",
"navigationBarTitleText": "报名了",
"navigationBarTextStyle": "black"
},
"tabBar": {
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "/images/star.png",
"selectedIconPath": "/images/stars.png",
"text": "活动"
},
{
"pagePath": "pages/club/club",
"iconPath": "/images/ju.png",
"selectedIconPath": "/images/jus.png",
"text": "俱乐部"
},
{
"pagePath": "pages/release/release",
"iconPath": "/images/pai.png",
"selectedIconPath": "/images/pais.png",
"text": "发布"
},
{
"pagePath": "pages/message/message",
"iconPath": "/images/mes.png",
"selectedIconPath": "/images/mess.png",
"text": "消息"
},
{
"pagePath": "pages/center/center",
"iconPath": "/images/cen.png",
"selectedIconPath": "/images/cens.png",
"text": "个人中心"
}
],
"color": "#808080",
"selectedColor": "#F7C30C"
},
"sitemapLocation": "sitemap.json"
}

13
app.wxss

@ -0,0 +1,13 @@
/**app.wxss**/
page{background:#fafafa;}
.container {
height: 100%;
width:100%;
box-sizing: border-box;
background: #fafafa;
}
.defalt-style{color:#959595;font-size:26rpx;}
.red{color:#FF3C21}
.yellow{color:#FFAC0C}
.orangeO1{color:#F66A01}
.green{color:#00C777}

BIN
images/activeBac.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/activefive.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/activefour.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/activem.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
images/activeone.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/activethree.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
images/activetwo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
images/add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/addactive.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/addr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/addreq.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

BIN
images/addy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/advice.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/albumNum.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

BIN
images/authcom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
images/ava.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
images/back.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

BIN
images/call.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

BIN
images/cashok.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
images/cashpay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

BIN
images/cen.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
images/cens.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/clubback.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
images/clubgroup.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/clubm.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
images/clubrank.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/comp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/coupon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/createalbum.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

BIN
images/detailAdd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

BIN
images/dingwei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

BIN
images/edit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/help.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/hostm.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
images/hot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/imgadd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/index_all.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
images/index_cross.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
images/index_out.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/index_run.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
images/index_snow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
images/join.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

BIN
images/joined.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/joinshare.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
images/ju.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/jus.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/left.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

BIN
images/logo.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/man.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/manage.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

BIN
images/mes.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/mess.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
images/more.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/myhost.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/new.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/nojoin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
images/nologin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
images/nopay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
images/nores.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
images/nouse.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/nouser.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/ok.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

BIN
images/oneb.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
images/onef.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
images/online.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

BIN
images/orderm.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
images/outback.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
images/pai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/pais.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/payok.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
images/person.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/photoback.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
images/popBac.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

BIN
images/popone.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
images/quan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
images/queen.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

BIN
images/remove.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/say.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

BIN
images/share.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

BIN
images/shareh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

BIN
images/sharek.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

BIN
images/smile.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/stars.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/sysm.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
images/time.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/timed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
images/tongji.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

BIN
images/top1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/top2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/top3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/trash.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/trashorder.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

BIN
images/used.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
images/viewk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

BIN
images/woman.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save