commit 66098363f4edb43d430929926231a2ef2818a77f Author: pref_mail@163.com <123456> Date: Thu Jun 16 22:45:54 2022 +0800 inti diff --git a/app.js b/app.js new file mode 100644 index 0000000..f47d25b --- /dev/null +++ b/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); + } + }) + + }, +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..900bb53 --- /dev/null +++ b/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" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..d7b7a3d --- /dev/null +++ b/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} diff --git a/images/activeBac.png b/images/activeBac.png new file mode 100644 index 0000000..1143b19 Binary files /dev/null and b/images/activeBac.png differ diff --git a/images/activefive.png b/images/activefive.png new file mode 100644 index 0000000..4cd91ee Binary files /dev/null and b/images/activefive.png differ diff --git a/images/activefour.png b/images/activefour.png new file mode 100644 index 0000000..e504325 Binary files /dev/null and b/images/activefour.png differ diff --git a/images/activem.png b/images/activem.png new file mode 100644 index 0000000..2f55c8c Binary files /dev/null and b/images/activem.png differ diff --git a/images/activeone.png b/images/activeone.png new file mode 100644 index 0000000..08b5f94 Binary files /dev/null and b/images/activeone.png differ diff --git a/images/activethree.png b/images/activethree.png new file mode 100644 index 0000000..5b90558 Binary files /dev/null and b/images/activethree.png differ diff --git a/images/activetwo.png b/images/activetwo.png new file mode 100644 index 0000000..2a1d7ea Binary files /dev/null and b/images/activetwo.png differ diff --git a/images/add.png b/images/add.png new file mode 100644 index 0000000..15f7736 Binary files /dev/null and b/images/add.png differ diff --git a/images/addactive.png b/images/addactive.png new file mode 100644 index 0000000..908f7d9 Binary files /dev/null and b/images/addactive.png differ diff --git a/images/addr.png b/images/addr.png new file mode 100644 index 0000000..8f27268 Binary files /dev/null and b/images/addr.png differ diff --git a/images/addreq.png b/images/addreq.png new file mode 100644 index 0000000..3c9e696 Binary files /dev/null and b/images/addreq.png differ diff --git a/images/addy.png b/images/addy.png new file mode 100644 index 0000000..d2e95b2 Binary files /dev/null and b/images/addy.png differ diff --git a/images/advice.png b/images/advice.png new file mode 100644 index 0000000..3467d49 Binary files /dev/null and b/images/advice.png differ diff --git a/images/albumNum.png b/images/albumNum.png new file mode 100644 index 0000000..7214fa3 Binary files /dev/null and b/images/albumNum.png differ diff --git a/images/authcom.png b/images/authcom.png new file mode 100644 index 0000000..5ed74d7 Binary files /dev/null and b/images/authcom.png differ diff --git a/images/ava.png b/images/ava.png new file mode 100644 index 0000000..4427df8 Binary files /dev/null and b/images/ava.png differ diff --git a/images/back.png b/images/back.png new file mode 100644 index 0000000..325d9f8 Binary files /dev/null and b/images/back.png differ diff --git a/images/call.png b/images/call.png new file mode 100644 index 0000000..e8ce95f Binary files /dev/null and b/images/call.png differ diff --git a/images/cashok.png b/images/cashok.png new file mode 100644 index 0000000..afd2edd Binary files /dev/null and b/images/cashok.png differ diff --git a/images/cashpay.png b/images/cashpay.png new file mode 100644 index 0000000..3fd4f14 Binary files /dev/null and b/images/cashpay.png differ diff --git a/images/cen.png b/images/cen.png new file mode 100644 index 0000000..57fceb2 Binary files /dev/null and b/images/cen.png differ diff --git a/images/cens.png b/images/cens.png new file mode 100644 index 0000000..3b30225 Binary files /dev/null and b/images/cens.png differ diff --git a/images/clubback.png b/images/clubback.png new file mode 100644 index 0000000..81ce390 Binary files /dev/null and b/images/clubback.png differ diff --git a/images/clubgroup.png b/images/clubgroup.png new file mode 100644 index 0000000..4fea73f Binary files /dev/null and b/images/clubgroup.png differ diff --git a/images/clubm.png b/images/clubm.png new file mode 100644 index 0000000..12f0f5b Binary files /dev/null and b/images/clubm.png differ diff --git a/images/clubrank.png b/images/clubrank.png new file mode 100644 index 0000000..b0380eb Binary files /dev/null and b/images/clubrank.png differ diff --git a/images/comp.png b/images/comp.png new file mode 100644 index 0000000..186aa21 Binary files /dev/null and b/images/comp.png differ diff --git a/images/coupon.png b/images/coupon.png new file mode 100644 index 0000000..58b2159 Binary files /dev/null and b/images/coupon.png differ diff --git a/images/createalbum.png b/images/createalbum.png new file mode 100644 index 0000000..2f49a5c Binary files /dev/null and b/images/createalbum.png differ diff --git a/images/detailAdd.png b/images/detailAdd.png new file mode 100644 index 0000000..a1728f2 Binary files /dev/null and b/images/detailAdd.png differ diff --git a/images/dingwei.png b/images/dingwei.png new file mode 100644 index 0000000..af2805a Binary files /dev/null and b/images/dingwei.png differ diff --git a/images/edit.png b/images/edit.png new file mode 100644 index 0000000..e0535f4 Binary files /dev/null and b/images/edit.png differ diff --git a/images/help.png b/images/help.png new file mode 100644 index 0000000..9666414 Binary files /dev/null and b/images/help.png differ diff --git a/images/hostm.png b/images/hostm.png new file mode 100644 index 0000000..8de3d48 Binary files /dev/null and b/images/hostm.png differ diff --git a/images/hot.png b/images/hot.png new file mode 100644 index 0000000..b374528 Binary files /dev/null and b/images/hot.png differ diff --git a/images/imgadd.png b/images/imgadd.png new file mode 100644 index 0000000..d1333d7 Binary files /dev/null and b/images/imgadd.png differ diff --git a/images/index_all.png b/images/index_all.png new file mode 100644 index 0000000..0988cee Binary files /dev/null and b/images/index_all.png differ diff --git a/images/index_cross.png b/images/index_cross.png new file mode 100644 index 0000000..dba1708 Binary files /dev/null and b/images/index_cross.png differ diff --git a/images/index_out.png b/images/index_out.png new file mode 100644 index 0000000..d7453bd Binary files /dev/null and b/images/index_out.png differ diff --git a/images/index_run.png b/images/index_run.png new file mode 100644 index 0000000..4edc308 Binary files /dev/null and b/images/index_run.png differ diff --git a/images/index_snow.png b/images/index_snow.png new file mode 100644 index 0000000..5e29198 Binary files /dev/null and b/images/index_snow.png differ diff --git a/images/join.png b/images/join.png new file mode 100644 index 0000000..f809b21 Binary files /dev/null and b/images/join.png differ diff --git a/images/joined.png b/images/joined.png new file mode 100644 index 0000000..9700df4 Binary files /dev/null and b/images/joined.png differ diff --git a/images/joinshare.png b/images/joinshare.png new file mode 100644 index 0000000..4b669cd Binary files /dev/null and b/images/joinshare.png differ diff --git a/images/ju.png b/images/ju.png new file mode 100644 index 0000000..99afd4c Binary files /dev/null and b/images/ju.png differ diff --git a/images/jus.png b/images/jus.png new file mode 100644 index 0000000..e6ffb35 Binary files /dev/null and b/images/jus.png differ diff --git a/images/left.png b/images/left.png new file mode 100644 index 0000000..1e2cb3f Binary files /dev/null and b/images/left.png differ diff --git a/images/logo.jpg b/images/logo.jpg new file mode 100644 index 0000000..b5a3b71 Binary files /dev/null and b/images/logo.jpg differ diff --git a/images/man.png b/images/man.png new file mode 100644 index 0000000..74a5d0d Binary files /dev/null and b/images/man.png differ diff --git a/images/manage.png b/images/manage.png new file mode 100644 index 0000000..ff7de0d Binary files /dev/null and b/images/manage.png differ diff --git a/images/mes.png b/images/mes.png new file mode 100644 index 0000000..33cc261 Binary files /dev/null and b/images/mes.png differ diff --git a/images/mess.png b/images/mess.png new file mode 100644 index 0000000..520a45a Binary files /dev/null and b/images/mess.png differ diff --git a/images/more.png b/images/more.png new file mode 100644 index 0000000..e5b63da Binary files /dev/null and b/images/more.png differ diff --git a/images/myhost.png b/images/myhost.png new file mode 100644 index 0000000..fa62e3f Binary files /dev/null and b/images/myhost.png differ diff --git a/images/new.png b/images/new.png new file mode 100644 index 0000000..026268c Binary files /dev/null and b/images/new.png differ diff --git a/images/nojoin.png b/images/nojoin.png new file mode 100644 index 0000000..9bba234 Binary files /dev/null and b/images/nojoin.png differ diff --git a/images/nologin.png b/images/nologin.png new file mode 100644 index 0000000..c1c62af Binary files /dev/null and b/images/nologin.png differ diff --git a/images/nopay.png b/images/nopay.png new file mode 100644 index 0000000..ea23990 Binary files /dev/null and b/images/nopay.png differ diff --git a/images/nores.png b/images/nores.png new file mode 100644 index 0000000..899dc3d Binary files /dev/null and b/images/nores.png differ diff --git a/images/nouse.png b/images/nouse.png new file mode 100644 index 0000000..fa98f86 Binary files /dev/null and b/images/nouse.png differ diff --git a/images/nouser.png b/images/nouser.png new file mode 100644 index 0000000..1907ffe Binary files /dev/null and b/images/nouser.png differ diff --git a/images/ok.png b/images/ok.png new file mode 100644 index 0000000..2a59817 Binary files /dev/null and b/images/ok.png differ diff --git a/images/oneb.png b/images/oneb.png new file mode 100644 index 0000000..d6859ed Binary files /dev/null and b/images/oneb.png differ diff --git a/images/onef.png b/images/onef.png new file mode 100644 index 0000000..f717dc4 Binary files /dev/null and b/images/onef.png differ diff --git a/images/online.png b/images/online.png new file mode 100644 index 0000000..502a16d Binary files /dev/null and b/images/online.png differ diff --git a/images/orderm.png b/images/orderm.png new file mode 100644 index 0000000..1d2e1ac Binary files /dev/null and b/images/orderm.png differ diff --git a/images/outback.png b/images/outback.png new file mode 100644 index 0000000..68da5ff Binary files /dev/null and b/images/outback.png differ diff --git a/images/pai.png b/images/pai.png new file mode 100644 index 0000000..5acda83 Binary files /dev/null and b/images/pai.png differ diff --git a/images/pais.png b/images/pais.png new file mode 100644 index 0000000..97ec62e Binary files /dev/null and b/images/pais.png differ diff --git a/images/payok.png b/images/payok.png new file mode 100644 index 0000000..2df688a Binary files /dev/null and b/images/payok.png differ diff --git a/images/person.png b/images/person.png new file mode 100644 index 0000000..66e07db Binary files /dev/null and b/images/person.png differ diff --git a/images/photoback.png b/images/photoback.png new file mode 100644 index 0000000..cc74a93 Binary files /dev/null and b/images/photoback.png differ diff --git a/images/popBac.png b/images/popBac.png new file mode 100644 index 0000000..9b6ef66 Binary files /dev/null and b/images/popBac.png differ diff --git a/images/popone.png b/images/popone.png new file mode 100644 index 0000000..f73a64e Binary files /dev/null and b/images/popone.png differ diff --git a/images/quan.png b/images/quan.png new file mode 100644 index 0000000..650d5af Binary files /dev/null and b/images/quan.png differ diff --git a/images/queen.png b/images/queen.png new file mode 100644 index 0000000..ec78e2f Binary files /dev/null and b/images/queen.png differ diff --git a/images/remove.png b/images/remove.png new file mode 100644 index 0000000..47e41cf Binary files /dev/null and b/images/remove.png differ diff --git a/images/say.png b/images/say.png new file mode 100644 index 0000000..8b37a0f Binary files /dev/null and b/images/say.png differ diff --git a/images/search.png b/images/search.png new file mode 100644 index 0000000..9d65fa5 Binary files /dev/null and b/images/search.png differ diff --git a/images/share.png b/images/share.png new file mode 100644 index 0000000..2089c9f Binary files /dev/null and b/images/share.png differ diff --git a/images/shareh.png b/images/shareh.png new file mode 100644 index 0000000..9f2d7b7 Binary files /dev/null and b/images/shareh.png differ diff --git a/images/sharek.png b/images/sharek.png new file mode 100644 index 0000000..6877675 Binary files /dev/null and b/images/sharek.png differ diff --git a/images/smile.png b/images/smile.png new file mode 100644 index 0000000..1f0a2b3 Binary files /dev/null and b/images/smile.png differ diff --git a/images/star.png b/images/star.png new file mode 100644 index 0000000..93120db Binary files /dev/null and b/images/star.png differ diff --git a/images/stars.png b/images/stars.png new file mode 100644 index 0000000..4e7cc98 Binary files /dev/null and b/images/stars.png differ diff --git a/images/sysm.png b/images/sysm.png new file mode 100644 index 0000000..580716d Binary files /dev/null and b/images/sysm.png differ diff --git a/images/time.png b/images/time.png new file mode 100644 index 0000000..e17c7ae Binary files /dev/null and b/images/time.png differ diff --git a/images/timed.png b/images/timed.png new file mode 100644 index 0000000..5348673 Binary files /dev/null and b/images/timed.png differ diff --git a/images/tongji.png b/images/tongji.png new file mode 100644 index 0000000..7835790 Binary files /dev/null and b/images/tongji.png differ diff --git a/images/top1.png b/images/top1.png new file mode 100644 index 0000000..7133338 Binary files /dev/null and b/images/top1.png differ diff --git a/images/top2.png b/images/top2.png new file mode 100644 index 0000000..a1c0872 Binary files /dev/null and b/images/top2.png differ diff --git a/images/top3.png b/images/top3.png new file mode 100644 index 0000000..d1c787e Binary files /dev/null and b/images/top3.png differ diff --git a/images/trash.png b/images/trash.png new file mode 100644 index 0000000..76f9a6e Binary files /dev/null and b/images/trash.png differ diff --git a/images/trashorder.png b/images/trashorder.png new file mode 100644 index 0000000..bad6a25 Binary files /dev/null and b/images/trashorder.png differ diff --git a/images/used.png b/images/used.png new file mode 100644 index 0000000..f55954d Binary files /dev/null and b/images/used.png differ diff --git a/images/viewk.png b/images/viewk.png new file mode 100644 index 0000000..64876fb Binary files /dev/null and b/images/viewk.png differ diff --git a/images/woman.png b/images/woman.png new file mode 100644 index 0000000..6e0eba0 Binary files /dev/null and b/images/woman.png differ diff --git a/images/wonder.png b/images/wonder.png new file mode 100644 index 0000000..06c64d4 Binary files /dev/null and b/images/wonder.png differ diff --git a/images/wx.png b/images/wx.png new file mode 100644 index 0000000..1146fa4 Binary files /dev/null and b/images/wx.png differ diff --git a/images/wxpay.png b/images/wxpay.png new file mode 100644 index 0000000..8197ca6 Binary files /dev/null and b/images/wxpay.png differ diff --git a/images/youlike.png b/images/youlike.png new file mode 100644 index 0000000..643055c Binary files /dev/null and b/images/youlike.png differ diff --git a/images/zan.png b/images/zan.png new file mode 100644 index 0000000..90b2d6e Binary files /dev/null and b/images/zan.png differ diff --git a/images/zaned.png b/images/zaned.png new file mode 100644 index 0000000..5caac9e Binary files /dev/null and b/images/zaned.png differ diff --git a/pages/center/advice/advice.js b/pages/center/advice/advice.js new file mode 100644 index 0000000..342ef0a --- /dev/null +++ b/pages/center/advice/advice.js @@ -0,0 +1,97 @@ +// miniprogram/pages/center/advice/index.js +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + content: '', + }, + + /** + * 生命周期函数--监听页面加载 + */ + markInput: function (e) { + this.setData({ + content: e.detail.value + }) + }, + onLoad: function (options) { + + }, + + setAdvice:function(){ + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + + // if(this.data.content){ + + // } + var pastData = { + content:that.data.content + } + re.request(Api.setAdvice(), pastData, header).then((res) => { + console.log(res); + wx.showToast({ + title: '感谢您的意见!', + icon: 'none' + }) + wx.navigateBack({ + delta: 1 + }) + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/center/advice/advice.json b/pages/center/advice/advice.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/center/advice/advice.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/center/advice/advice.wxml b/pages/center/advice/advice.wxml new file mode 100644 index 0000000..cfb15f1 --- /dev/null +++ b/pages/center/advice/advice.wxml @@ -0,0 +1,9 @@ + + + + + + + + 所属圈子 + + + {{array[index].typeName}} + + + + + 主打项目 + + + + {{item}} + + + + + + + + + + 俱乐部联系人 + + + + 俱乐部联系方式 + + + + 身份认证 + + + + + + + + + + + + + + + + * 创建者需保证上传信息的真实性,如发现虚假信息,将会封号处理 + * 平台有权利和义务保密信息不外泄露 + + + 提交审核 + + \ No newline at end of file diff --git a/pages/club/createClub/createClub.wxss b/pages/club/createClub/createClub.wxss new file mode 100644 index 0000000..19435ac --- /dev/null +++ b/pages/club/createClub/createClub.wxss @@ -0,0 +1,34 @@ +.container{background: #fff;} +.page-body{width:94%;margin:24rpx auto;} +.formlist{width:100%;height:96rpx;line-height: 96rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlist text{width:30%;} +.formlist input{width:70%;height:80rpx;text-align: right;padding:0 12rpx} +.formlistimg{width:100%;height:160rpx;line-height: 160rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlistimg text{width:30%;} +.formlistimg .upload{position: relative;} +.formlistimg image{width:128rpx;height:128rpx;margin-top:16rpx;} +.formlistimg .ui_uploader_item_icon{position: absolute;right:0;top:0} +.formlistarea{width:100%;border-bottom:2rpx solid #dfdfdf;} +.formlist .back{width:32rpx;height:32rpx;transform:rotate(180deg);margin-top:32rpx;} +.formlistarea text{font-size:26rpx;padding:24rpx 0;display: inline-block;} +.formlistarea textarea{font-size:26rpx;padding:3%;border:2rpx solid #dfdfdf;height:100rpx;width:94%;margin-bottom:24rpx;} +.chooseauth{height:92rpx;line-height:92rpx;display: flex;justify-content: space-between;} +.chooseauth .authleft{font-size:32rpx;} +.chooseauth image{width:6rpx;height:32rpx;margin-right:16rpx;} +.chooseauth .authright{font-size:28rpx;} +.chooseauth .authright radio{transform:scale(0.7);} +.people{width:100%;} +.people image{width:100%;height:412rpx;margin-top:24rpx;} +.rule{margin-top:24rpx;background: rgba(246,106,1,0.10);border-radius: 12rpx;padding:18rpx 24rpx;font-size:22rpx} +.rule view{padding:6rpx 0;color:#A9A099} +.rule view text{color:#F66A01} +.bottom{width:94%;margin:24rpx auto;background: #f66a01;border-radius: 12rpx;text-align: center;font-size:28rpx; + box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);height:96rpx;line-height:96rpx;color:#fff;} +.list{width:100%;margin-top:24rpx;} +.list .title{font-size:26rpx;} +.list .signbox {font-size:24rpx;margin-top:20rpx;display: flex;justify-content:start ;flex-wrap: wrap;} +.list .signbox view {width:33%} +.list .signbox view text{display:inline-block;margin-top:20rpx;background: #f0f9ec;border: 2rpx solid #67c23a;border-radius: 14rpx;padding:14rpx 74rpx;color:#89D066;} +.people .idimg .upload{position: relative;} +.people .idimg .ui_uploader_item_icon{position: absolute;right:0;top:24rpx} +modal input{border:1rpx solid #999} \ No newline at end of file diff --git a/pages/club/deputy/deputy.js b/pages/club/deputy/deputy.js new file mode 100644 index 0000000..328f9a0 --- /dev/null +++ b/pages/club/deputy/deputy.js @@ -0,0 +1,83 @@ +var Api = require('../../../utils/common.js'); + +var request= require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:[], + clubId:'', + + }, + + /** + * 生命周期函数--监听页面加载 + */ + async onLoad(options) { + this.setData({ + clubId:options.id + }) + let header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + let data=await request.request(Api.memberLsit(),{clubId:options.id,memberType:1},header) + console.log(data,9999); + // this.data.Deputy=data.data.data + console.log(this.data.Deputy); + this.setData({ + Deputy:data.data.data + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/club/deputy/deputy.json b/pages/club/deputy/deputy.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/club/deputy/deputy.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/club/deputy/deputy.wxml b/pages/club/deputy/deputy.wxml new file mode 100644 index 0000000..baac384 --- /dev/null +++ b/pages/club/deputy/deputy.wxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + 添加副会长 + + + \ No newline at end of file diff --git a/pages/club/deputy/deputy.wxss b/pages/club/deputy/deputy.wxss new file mode 100644 index 0000000..b56182c --- /dev/null +++ b/pages/club/deputy/deputy.wxss @@ -0,0 +1,10 @@ +.nav{height:128rpx;width:100%;} +.search{height:80rpx;width:100%;padding:24rpx 0;} +.search .search-box{width:90%;border-radius: 180rpx;background-color:#fff;height:100%;margin:0 auto;display:flex;justify-content: start;box-shadow: 0px 8px 20px 0px rgba(0,0,0,0.05); } +.search .search-box .search-icon{width:70rpx;height:100%;} +.search .search-box .search-icon image{width:32rpx;height:32rpx;padding:24rpx 0rpx 24rpx 38rpx;} +.search .search-box .search-input{width:590rpx;} +.search .search-box .search-input input{height:100%;width:90%;padding-left:10rpx} +.add{width:90%;margin-left:32rpx;} +.add image{width:160rpx;height:160rpx;} +.add view{width:160rpx;text-align: center;font-size:24rpx;padding:16rpx 0;} \ No newline at end of file diff --git a/pages/club/manage/manage.js b/pages/club/manage/manage.js new file mode 100644 index 0000000..8ba02dd --- /dev/null +++ b/pages/club/manage/manage.js @@ -0,0 +1,355 @@ +// pages/club/manage/manage.js +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + array: [ + {id:'0',name:'允许任何人加入'},{id:'1',name:'需验证加入'} + ], + accts:[ + {id:'1',name:'会长账户'},{id:'2',name:'管理员账户'} + ], + acctindex:0, + joinWay:'0', + index: 0, + company:{}, + uploaderList: [], + showList: [], + uploaderNum: 0, + showUpload:true, + payType:'0', + uploaderListcom:[],//logo + showListcom: [], + uploaderNumcom: 0, + showUploadcom:true, + old:true, + jurisdiction:5 + }, + bindPickerChange: function(e) { + var that = this; + that.setData({ + index: e.detail.value, + joinWay:that.data.array[e.detail.value].id + }) + }, + accountChange: function(e) { + var that = this; + that.setData({ + acctindex: e.detail.value, + payType:that.data.array[e.detail.value].id + }) + }, + togroups:function(){ + wx.navigateTo({ + url: '../clubgroups/clubgroups?id='+this.data.company.clubId+'' + }) + }, + topopname:function(){ + wx.navigateTo({ + url: '../popname/popname?id='+this.data.company.clubId + }) + }, + removesb:function(){ + wx.navigateTo({ + url: '../removesb/removesb?id='+this.data.company.clubId+'' + }) + }, + setDeputy:function(){ + wx.navigateTo({ + url: '../setadmin/setadmin?type=2' + }) + }, + toacct:function(){ + wx.navigateTo({ + url: '../account/account' + }) + }, + tosetadmin:function(){ + wx.navigateTo({ + url: '../setadmin/setadmin?type=3' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let queryval = JSON.parse(options.val) + this.setData({ + company:queryval, + }) + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.selectgrade(),{clubId:this.data.company.clubId},header).then(res=>{ + console.log(res,'查询权限等级'); + this.setData({ + // jurisdiction:1 + jurisdiction:res.data.data + }) + }) + }, + // 删除图片 + clearImg: function (e) { + var nowList = []; //新数据 + var nowListshow = []; //新数据 + var uploaderList = this.data.uploaderList; //原数据 + var showList = this.data.showList; //原数据 + + for (let i = 0; i < uploaderList.length; i++) { + if (i == e.currentTarget.dataset.index) { + continue; + } else { + nowList.push(uploaderList[i]); + nowListshow.push(showList[i]); + } + } + this.setData({ + uploaderNum: this.data.uploaderNum - 1, + uploaderList: nowList, + showUpload: true, + showList:nowListshow + }) +}, +//展示图片 +showImg: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.uploaderList, + current: that.data.uploaderList[e.currentTarget.dataset.index] + }) +}, +//上传图片 +upload: function (e) { + var that = this; + wx.chooseImage({ + count: 1 - that.data.uploaderNum, // 默认3 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success: function (res) { + // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 + let tempFilePaths = res.tempFilePaths; + let uploaderList = that.data.uploaderList.concat(tempFilePaths); + if (uploaderList.length == 1) { + that.setData({ + showUpload: false + }) + } + that.setData({ + uploaderList: uploaderList, + uploaderNum: uploaderList.length, + }) + + for(var i=0;i { + let datas = res.data.data; + console.log(datas); + wx.showToast({ + title: '提交成功,等待审核', + icon: 'none', + duration: 1000 + }) + wx.navigateBack({ + delta: 1 + }) + }) + }, + todelete:function(){ + var that = this; + wx.showModal({ + title: '提示', + content: '确定要解散该俱乐部吗?', + success: function (sm) { + if (sm.confirm) { + that.subRemove(); + } else if (sm.cancel) { + console.log('用户点击取消') + } + } + }) + + }, + subRemove:function(){ + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + var postData={ + clubId:that.data.company.clubId, + }; + re.request(Api.removeClub(), postData, header).then((res) => { + let datas = res.data.data; + console.log(datas); + wx.showToast({ + title: '提交成功,等待审核', + icon: 'none', + duration: 1000 + }) + wx.navigateBack({ + delta: 2 + }) + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/club/manage/manage.json b/pages/club/manage/manage.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/club/manage/manage.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/club/manage/manage.wxml b/pages/club/manage/manage.wxml new file mode 100644 index 0000000..de90fb1 --- /dev/null +++ b/pages/club/manage/manage.wxml @@ -0,0 +1,96 @@ + + +
+ + 俱乐部名称 + + + + 俱乐部ID + {{company.clubId}} + + + 俱乐部logo + + + + + + + + + + + + + + 背景图 + + + + + + + + 认证状态 + 个人认证 + 企业认证 + + + 俱乐部简介 + + + + 设置加入方式 + + + {{array[index].name}} + + + + + + 俱乐部成员({{company.totalMembers}}) + + + + 个性化称号 + + + + 移除成员 + + + + 设置副会长 + + + + 设置管理员 + + + + 俱乐部收款账户 + + + {{accts[acctindex].name}} + + + + +
+
+ + + + 解散俱乐部 + + +
\ No newline at end of file diff --git a/pages/club/manage/manage.wxss b/pages/club/manage/manage.wxss new file mode 100644 index 0000000..29822d3 --- /dev/null +++ b/pages/club/manage/manage.wxss @@ -0,0 +1,31 @@ +.container{background: #fff;} +.page-body{width:94%;margin:24rpx auto;} +.formlist{width:100%;height:96rpx;line-height: 96rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlist text{width:30%;} +.formlist input{width:70%;height:80rpx;text-align: right;padding:0 12rpx} +.formlist .back{width:32rpx;height:32rpx;transform:rotate(180deg);margin-top:32rpx;} +.formlist .backs{width:32rpx;height:32rpx;transform:rotate(180deg);vertical-align: middle;margin-left:8rpx;} +.formlistimg{width:100%;height:160rpx;line-height: 160rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlistimg text{width:30%;} +.formlistimg .upload{position: relative;} +.formlistimg image{width:128rpx;height:128rpx;margin-top:16rpx;} +.formlistimg .ui_uploader_item_icon{position: absolute;right:-10rpx;top:-26rpx;} +.formlistarea{width:100%;border-bottom:2rpx solid #dfdfdf;} +.formlistarea text{font-size:26rpx;padding:24rpx 0;display: inline-block;} +.formlistarea textarea{font-size:26rpx;padding:3%;border:2rpx solid #dfdfdf;height:100rpx;width:94%;margin-bottom:24rpx;} +.chooseauth{height:92rpx;line-height:92rpx;display: flex;justify-content: space-between;} +.chooseauth .authleft{font-size:32rpx;} +.chooseauth image{width:6rpx;height:32rpx;margin-right:16rpx;} +.chooseauth .authright{font-size:28rpx;} +.chooseauth .authright radio{transform:scale(0.7);} +.people{width:100%;} +.people image{width:100%;height:412rpx;margin-top:24rpx;} +.rule{margin-top:24rpx;background: rgba(246,106,1,0.10);border-radius: 12rpx;padding:18rpx 24rpx;font-size:22rpx} +.rule view{padding:6rpx 0;color:#A9A099} +.rule view text{color:#F66A01} +.bottom{width:100%;background:#fff;} +.bottom-circle{width:100%;height:80rpx;line-height:80rpx;color:#fff;text-align:center;font-size:32rpx;margin:24rpx auto;display: flex;justify-content: space-around;} +.bottom-circle .share{width:288rpx;height:80rpx;color:#fff;background:#FFCB12;border-radius: 12rpx;} +.bottom-circle .delete{width:288rpx;height:80rpx;color:#fff;background:#F66A01;border-radius: 12rpx;} +.old{position: relative;} +.old .ui_uploader_item_icon{position: absolute;right:-10rpx;top:-26rpx;} \ No newline at end of file diff --git a/pages/club/mark/mark.js b/pages/club/mark/mark.js new file mode 100644 index 0000000..ede097c --- /dev/null +++ b/pages/club/mark/mark.js @@ -0,0 +1,88 @@ +// pages/club/mark/mark.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + items: [ + {value: 'USA', name: '徒步'}, + {value: 'CHN', name: '跑步', checked: 'true'}, + {value: 'BRA', name: '骑行',checked: 'true'}, + {value: 'JPN', name: '登山'}, + ], + }, + checkboxChange(e) { + // console.log('checkbox发生change事件,携带value值为:', e.detail.value) + const items = this.data.items + const values = e.detail.value + for (let i = 0, lenI = items.length; i < lenI; ++i) { + items[i].checked = false + + for (let j = 0, lenJ = values.length; j < lenJ; ++j) { + if (items[i].value === values[j]) { + items[i].checked = true + break + } + } + } + this.setData({ + items + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/club/mark/mark.json b/pages/club/mark/mark.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/club/mark/mark.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/club/mark/mark.wxml b/pages/club/mark/mark.wxml new file mode 100644 index 0000000..b4ef740 --- /dev/null +++ b/pages/club/mark/mark.wxml @@ -0,0 +1,19 @@ + + + + 创建我自己的标签 + + + + + + + + 保存 + + \ No newline at end of file diff --git a/pages/club/mark/mark.wxss b/pages/club/mark/mark.wxss new file mode 100644 index 0000000..d5a04c4 --- /dev/null +++ b/pages/club/mark/mark.wxss @@ -0,0 +1,8 @@ +.circle{width:94%;margin:0 auto;} +.circle .nav{width:100%;margin:22rpx 0;background: rgba(255,203,18,0.15);font-size:28rpx; + border: 2rpx dashed #ffac0c;border-radius: 6rpx;height:96rpx;line-height: 96rpx;color:#FFAC0C} +.circle .nav image{width:40rpx;height:40rpx;vertical-align: sub;padding:0 16rpx 0 24rpx;} +.content{width:100%;padding-bottom:110rpx;font-size:28rpx} +.content .contentText{display: flex;justify-content:space-between;height:96rpx;line-height:96rpx;} +.sava{position: fixed;bottom:32rpx;left:3%;background: #f66a01;border-radius: 12rpx;width:94%;color:#fff; + box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);height:96rpx;line-height:96rpx;font-size:28rpx;text-align: center;} \ No newline at end of file diff --git a/pages/club/popname/popname.js b/pages/club/popname/popname.js new file mode 100644 index 0000000..2f7a084 --- /dev/null +++ b/pages/club/popname/popname.js @@ -0,0 +1,250 @@ +// pages/club/popname/popname.js +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + text1:'', + text2:'', + text3:'', + text4:'', + text5:'', + text6:'', + text7:'', + text8:'', + clubId:'', + isxiugai:false + }, +zhengjia(){ + let {text1,text2,text3,text4,text5,text6,text7,text8,clubId}=this.data + if(text1==''||text2==''||text3==''||text4==''||text5==''||text6==''||text7==''||text8==''){ + wx.showToast({ + title: '内容不能为空', + icon:'none' + }) + return + } + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + + if(!this.data.isxiugai){ + for(let i=1;i<=8;i++){ + let text + switch (i) { + case 1: + text=text1 + break; + case 2: + text=text2 + break; + case 3: + text=text3 + break; + case 4: + text=text4 + break; + case 5: + text=text5 + break; + case 6: + text=text6 + break; + case 7: + text=text7 + break; + case 8: + text=text8 + break; + } + let data={ + clubId, + // 'nicknameList[0].clubId':'', + 'nicknameList[0].nameType':i, + "nicknameList[0].nickname":text, + } + re.request(Api.nicknameadd(),data,header).then(res=>{ + console.log(res); + }) + + } + }else{ + for(let i=1;i<=8;i++){ + let text + switch (i) { + case 1: + text=text1 + break; + case 2: + text=text2 + break; + case 3: + text=text3 + break; + case 4: + text=text4 + break; + case 5: + text=text5 + break; + case 6: + text=text6 + break; + case 7: + text=text7 + break; + case 8: + text=text8 + break; + } + let data={ + clubId, + 'nicknameList[0].clubId':clubId, + 'nicknameList[0].nameType':i, + "nicknameList[0].nickname":text, + } + re.request(Api.nicknameedit(),data,header).then(res=>{ + console.log(res); + }) + } + + } + wx.showToast({ + title: '保存成功', + }) + wx.navigateBack({ + delta: 1, + }) +}, +removeall(){ + this.setData({ + text1:'', + text2:'', + text3:'', + text4:'', + text5:'', + text6:'', + text7:'', + text8:'' + }) +}, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.log(options.id); + this.setData({ + clubId:options.id + }) + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + //初始化查询 + re.request(Api.nicknamedetail(), {clubId:options.id}, header).then(res=>{ + console.log(res,'初始化'); + if(res.data.data.length!=0){ + res.data.data.map((item)=>{ + switch (Number(item.nameType)) { + case 1: + this.setData({ + text1:item.nickname + }) + break; + case 2: + this.setData({ + text2:item.nickname + }) + break; + case 3: + this.setData({ + text3:item.nickname + }) + break; + case 4: + this.setData({ + text4:item.nickname + }) + break; + case 5: + this.setData({ + text5:item.nickname + }) + break; + case 6: + this.setData({ + text6:item.nickname + }) + break; + case 7: + this.setData({ + text7:item.nickname + }) + break; + case 8: + this.setData({ + text8:item.nickname + }) + break; + } + }) + this.setData({ + isxiugai:true + }) + } + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/club/popname/popname.json b/pages/club/popname/popname.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/club/popname/popname.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/club/popname/popname.wxml b/pages/club/popname/popname.wxml new file mode 100644 index 0000000..fde757d --- /dev/null +++ b/pages/club/popname/popname.wxml @@ -0,0 +1,43 @@ + + +
+ + 会长 + + + + 副会长 + + + + 管理员 + + + + 五星成员 + + + + 四星成员 + + + + 三星成员 + + + + 二星成员 + + + + 一星成员 + + +
+
+ + 清空(恢复默认) + 保存 + + +
\ No newline at end of file diff --git a/pages/club/popname/popname.wxss b/pages/club/popname/popname.wxss new file mode 100644 index 0000000..6cf889d --- /dev/null +++ b/pages/club/popname/popname.wxss @@ -0,0 +1,28 @@ +.container{background: #fff;} +.page-body{width:94%;margin:24rpx auto;} +.formlist{width:100%;height:96rpx;line-height: 96rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlist text{width:30%;} +.formlist input{width:70%;height:80rpx;text-align: right;padding:0 12rpx} +.formlist .back{width:32rpx;height:32rpx;transform:rotate(180deg);margin-top:32rpx;} +.formlist .backs{width:32rpx;height:32rpx;transform:rotate(180deg);vertical-align: middle;margin-left:8rpx;} +.formlistimg{width:100%;height:160rpx;line-height: 160rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlistimg text{width:30%;} +.formlistimg image{width:128rpx;height:128rpx;margin-top:16rpx;} +.formlistarea{width:100%;border-bottom:2rpx solid #dfdfdf;} +.formlistarea text{font-size:26rpx;padding:24rpx 0;display: inline-block;} +.formlistarea textarea{font-size:26rpx;padding:3%;border:2rpx solid #dfdfdf;height:100rpx;width:94%;margin-bottom:24rpx;} +.chooseauth{height:92rpx;line-height:92rpx;display: flex;justify-content: space-between;} +.chooseauth .authleft{font-size:32rpx;} +.chooseauth image{width:6rpx;height:32rpx;margin-right:16rpx;} +.chooseauth .authright{font-size:28rpx;} +.chooseauth .authright radio{transform:scale(0.7);} +.people{width:100%;} +.people image{width:100%;height:412rpx;margin-top:24rpx;} +.rule{margin-top:24rpx;background: rgba(246,106,1,0.10);border-radius: 12rpx;padding:18rpx 24rpx;font-size:22rpx} +.rule view{padding:6rpx 0;color:#A9A099} +.rule view text{color:#F66A01} +.low{position: absolute;bottom:0;height:250rpx;background:#fff;width:100%;} +.bottom{width:94%;margin:24rpx auto;background: #f66a01;border-radius: 12rpx;text-align: center;font-size:28rpx; + box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);height:96rpx;line-height:96rpx;color:#fff;} +.reset{width:94%;margin:24rpx auto;background: #FFCB12;border-radius: 12rpx;text-align: center;font-size:28rpx; + box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);height:96rpx;line-height:96rpx;color:#fff;} \ No newline at end of file diff --git a/pages/club/removesb/removesb.js b/pages/club/removesb/removesb.js new file mode 100644 index 0000000..3c08f94 --- /dev/null +++ b/pages/club/removesb/removesb.js @@ -0,0 +1,172 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + Deputy:[ + {id:'1',image:'../../../images/ava.png',name:'张三三',ispop:'true'}, + {id:'2',image:'../../../images/ava.png',name:'张三三',ispop:'false'}, + {id:'3',image:'../../../images/ava.png',name:'张三三',ispop:'true'}, + {id:'4',image:'../../../images/ava.png',name:'张三三',ispop:'true'}, + ], + ids:[], + texts:'' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + id:options.id + }) + this.getCanRemove(options.id); + }, + sousuo(){ + let that=this + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + let data={ + + clubId:this.data.id, + name:this.data.texts + } + re.request(Api.memberremoveLikeList(), data, header).then((res) => { + let datas = res.data.data; + console.log(datas); + that.setData({ + Deputy:datas + }) + }) + }, + getCanRemove:function(){ + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + var postData={ + clubId:that.data.id, + }; + re.request(Api.getCanRemove(), postData, header).then((res) => { + let datas = res.data.data; + console.log(datas); + that.setData({ + Deputy:datas + }) + // wx.navigateBack({ + // delta: 1 + // }) + }) + }, + checkboxChange(e){ + console.log(e); + if(e.detail.value.length==1){ + let ids=this.data.ids; + ids.push(e.detail.value[0]) + this.setData({ + ids + }) + }else{ + let ids=this.data.ids; + let index= ids.indexOf(this.data.Deputy[e.currentTarget.dataset.index].memberId) + ids.splice(index,1) + this.setData({ + ids + }) + } + }, + subremove:function(){ + if(this.data.ids.length==0){ + wx.showToast({ + title: '请选择需要移除的成员', + icon:'none' + }) + return + } + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + var postData={ + ids:this.data.ids + }; + this.setData({ + ids:[] + }) + re.request(Api.removesb(), postData, header).then((res) => { + // let datas = res.data.data; + // console.log(datas); + that.setData({ + Deputy:[] + }) + this.getCanRemove() + // wx.navigateBack({ + // delta: 1 + // }) + }) + }, + quxiao:function(){ + let Deputy= this.data.Deputy + this.setData({ + Deputy:[] + }) + this.setData({ + Deputy + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/club/removesb/removesb.json b/pages/club/removesb/removesb.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/club/removesb/removesb.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/club/removesb/removesb.wxml b/pages/club/removesb/removesb.wxml new file mode 100644 index 0000000..80bbfcd --- /dev/null +++ b/pages/club/removesb/removesb.wxml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + 每日移除上限 + 10 + + + + + 取消 + 确定移除 + + + + + + + + {{item.nickname}} + 个性化称号 + + + + + + + \ No newline at end of file diff --git a/pages/club/removesb/removesb.wxss b/pages/club/removesb/removesb.wxss new file mode 100644 index 0000000..a9d29d0 --- /dev/null +++ b/pages/club/removesb/removesb.wxss @@ -0,0 +1,22 @@ + +.nav{height:128rpx;width:100%;} +.search{height:80rpx;width:100%;padding:24rpx 0;} +.search .search-box{width:90%;border-radius: 180rpx;background-color:#fff;height:100%;margin:0 auto;display:flex;justify-content: start;box-shadow: 0px 8px 20px 0px rgba(0,0,0,0.05); } +.search .search-box .search-icon{width:70rpx;height:100%;} +.search .search-box .search-icon image{width:32rpx;height:32rpx;padding:24rpx 0rpx 24rpx 38rpx;} +.search .search-box .search-input{width:590rpx;} +.search .search-box .search-input input{height:100%;width:90%;padding-left:10rpx} +.limit{width:94%;margin:24rpx auto;height:96rpx;line-height:96rpx;background: rgba(255,203,18,0.15);border: 2rpx dashed #ffac0c;border-radius: 6rpx;} +.limit .limitbox{display: flex;justify-content: space-between;padding:0 24rpx;color:#FFAC0C;font-size:28rpx} +.limit .num{color:#6E6A5E} +.limit .num image{width:32rpx;height:32rpx;transform: rotate(180deg);vertical-align: middle;margin-left:16rpx;} +.save{width:94%;margin:24rpx auto;display: flex;justify-content: space-between;} +.save view text{color:#fff;padding:12rpx 48rpx;border-radius: 8rpx;box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);font-size:28rpx; } +.save .cancel text{background: #ffcb12;} +.save .sub text{background: #f66a01;} +.circle{width:100%;} +.circle .title{font-size:24rpx;margin-left:40rpx;padding-top:40rpx} +.content{width:94%;background:#fff;margin:40rpx auto;padding:0 3%;} +.content .list{padding:16rpx 0;font-size:28rpx;line-height:96rpx;} +.content .list image{width:96rpx;height:96rpx;vertical-align: middle;border-radius:50%;padding:0 24rpx;} +.content .list text{background: rgba(0,170,255,0.10);font-size: 16rpx;color: #409eff;padding:2rpx 12rpx;} \ No newline at end of file diff --git a/pages/club/setadmin/setadmin.js b/pages/club/setadmin/setadmin.js new file mode 100644 index 0000000..60c47ec --- /dev/null +++ b/pages/club/setadmin/setadmin.js @@ -0,0 +1,107 @@ + +// url +var Api = require('../../../utils/common.js'); + +var request= require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + clubId:'', + userId:'', + Deputy: [ + // {id:'1',image:'../../../images/ava.png',name:'张三三',ispop:'true'}, + // {id:'2',image:'../../../images/ava.png',name:'张三三',ispop:'false'}, + // {id:'3',image:'../../../images/ava.png',name:'张三三',ispop:'true'}, + // {id:'4',image:'../../../images/ava.png',name:'张三三',ispop:'true'}, + ], + type:'' + }, + + + checkboxChange(e){ +console.log(e); +this.setData({ + userId:e.detail.value[0] +}) + }, + async save(){ + let header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + let data=await request.request(Api.SetMember(),{clubId:this.data.clubId,memberGrade:0,memberId:this.data.userId,memberType:this.data.type},header) + console.log(data,9999); + }, + /** + * 生命周期函数--监听页面加载 + */ + async onLoad(options) { +this.setData({ + clubId:options.id, + type:options.type +}) + let header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + let data=await request.request(Api.memberLsit(),{clubId:options.id,memberType:1},header) + console.log(data,9999); + // this.data.Deputy=data.data.data + console.log(this.data.Deputy); + this.setData({ + Deputy:data.data.data + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/club/setadmin/setadmin.json b/pages/club/setadmin/setadmin.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/club/setadmin/setadmin.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/club/setadmin/setadmin.wxml b/pages/club/setadmin/setadmin.wxml new file mode 100644 index 0000000..1e74c63 --- /dev/null +++ b/pages/club/setadmin/setadmin.wxml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + {{item.nickname}} + 个性化称号 + + + + + + + 保存 + \ No newline at end of file diff --git a/pages/club/setadmin/setadmin.wxss b/pages/club/setadmin/setadmin.wxss new file mode 100644 index 0000000..f3e6241 --- /dev/null +++ b/pages/club/setadmin/setadmin.wxss @@ -0,0 +1,16 @@ + +.nav{height:128rpx;width:100%;} +.search{height:80rpx;width:100%;padding:24rpx 0;} +.search .search-box{width:90%;border-radius: 180rpx;background-color:#fff;height:100%;margin:0 auto;display:flex;justify-content: start;box-shadow: 0px 8px 20px 0px rgba(0,0,0,0.05); } +.search .search-box .search-icon{width:70rpx;height:100%;} +.search .search-box .search-icon image{width:32rpx;height:32rpx;padding:24rpx 0rpx 24rpx 38rpx;} +.search .search-box .search-input{width:590rpx;} +.search .search-box .search-input input{height:100%;width:90%;padding-left:10rpx} +.circle{width:100%;} +checkbox .wx-checkbox-input{ border-radius: 50%;width: 46rpx;height: 46rpx;} +.content{width:94%;background:#fff;margin:20rpx auto;padding:0 3% 100rpx 3%;} +.content .list{padding:16rpx 0;font-size:28rpx;line-height:96rpx;} +.content .list image{width:96rpx;height:96rpx;vertical-align: middle;border-radius:50%;padding:0 24rpx;} +.content .list text{background: rgba(0,170,255,0.10);font-size: 16rpx;color: #409eff;padding:2rpx 12rpx;} +.bottom{width:94%;position: absolute;bottom:32rpx;left:3%;height:96rpx;line-height: 96rpx;text-align: center;color:#fff;background: #f66a01; + border-radius: 12rpx;box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);font-size:28rpx} \ No newline at end of file diff --git a/pages/dateTimePicker.js b/pages/dateTimePicker.js new file mode 100644 index 0000000..89e8b15 --- /dev/null +++ b/pages/dateTimePicker.js @@ -0,0 +1,100 @@ +function withData(param) { + return param < 10 ? '0' + param : '' + param; + } + + function getLoopArray(start, end) { + var start = start || 0; + var end = end || 1; + var array = []; + for (var i = start; i <= end; i++) { + array.push(withData(i)); + } + return array; + } + function getMonthDay(year, month) { + + var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0), array = null; + switch (month) { + case '01': + case '03': + case '05': + case '07': + case '08': + case '10': + case '12': + array = getLoopArray(1, 31) + break; + case '04': + case '06': + case '09': + case '11': + array = getLoopArray(1, 30) + break; + case '02': + array = flag ? getLoopArray(1, 29) : getLoopArray(1, 28) + break; + default: + array = '月份格式不正确,请重新输入!' + } + return array; + + } + function getNewDateArry() { + + // 当前时间的处理 + var newDate = new Date(); + var year = withData(newDate.getFullYear()), + mont = withData(newDate.getMonth() + 1), + date = withData(newDate.getDate()), + hour = withData(newDate.getHours()), + minu = withData(newDate.getMinutes()); + // seco = withData(newDate.getSeconds()); + return [year, mont, date, hour, minu]; + + } + /** + * startYear: 开始的年份,进行年份的范围指定 + * endYear: 结束的年份,进行年份的范围指定 + * date: 年份日期 + * 1、如果不传参数,默认显示当前日期和时间 + * 2、如果只需要date参数,将startYear和endYear设置为空字符串 + */ + function dateTimePicker(startYear, endYear, date) { + // 返回默认显示的数组和联动数组的声明 + var dateTime = [], dateTimeArray = [[], [], [], [], [], []]; + var start = startYear || 1978; + var end = endYear || 2100; + // 默认开始显示数据 + var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry(); + // 处理联动列表数据 + /*年月日 时分秒*/ + dateTimeArray[0] = getLoopArray(start, end); + dateTimeArray[1] = getLoopArray(1, 12); + dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]); + dateTimeArray[3] = getLoopArray(0, 23); + dateTimeArray[4] = getLoopArray(0, 59); + // dateTimeArray[5] = getLoopArray(0, 59); + dateTimeArray.forEach((current, index) => { + dateTime.push(current.indexOf(defaultDate[index])); + }); + return { + dateTimeArray: dateTimeArray, + dateTime: dateTime + } + } + /** 对数组中的时间信息进行格式化 + * dateTimeArray :通过dateTimePicker获取的日期范围数组 + * dateTime: 选择的日期数组信息 + */ + function formatPickerDateTime(dateTimeArray,dateTime) { + var obj = dateTimePicker() + var format = dateTimeArray[0][dateTime[0]] + '-' + dateTimeArray[1][dateTime[1]] + + '-' + dateTimeArray[2][dateTime[2]] + " " + + dateTimeArray[3][dateTime[3]] + ':' + dateTimeArray[4][dateTime[4]] + return format + } + module.exports = { + dateTimePicker: dateTimePicker, + getMonthDay: getMonthDay, + formatPickerDateTime: formatPickerDateTime + } \ No newline at end of file diff --git a/pages/index/active/active.js b/pages/index/active/active.js new file mode 100644 index 0000000..b99cd69 --- /dev/null +++ b/pages/index/active/active.js @@ -0,0 +1,75 @@ +// pages/index/active/active.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + fourImages:[ + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'1',person:'22',low:'150',high:'300'}, + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'2',person:'22',low:'150',high:'300'}, + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'0',person:'22',low:'150',high:'300'}, + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'1',person:'22',low:'150',high:'300'} + ], + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/active/active.json b/pages/index/active/active.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/active/active.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/active/active.wxml b/pages/index/active/active.wxml new file mode 100644 index 0000000..beba588 --- /dev/null +++ b/pages/index/active/active.wxml @@ -0,0 +1,53 @@ + + + + + + + + + + + + 搜索 + + + + \ No newline at end of file diff --git a/pages/index/active/active.wxss b/pages/index/active/active.wxss new file mode 100644 index 0000000..90753b2 --- /dev/null +++ b/pages/index/active/active.wxss @@ -0,0 +1,33 @@ +page{background:#FAFAFA} +.yesword{width:100%} +.nav{width:100%;padding:16rpx 0;background:#FFCB12;} +.search{height:64rpx;width:90%;margin:0 auto;display:flex;justify-content: start;} +.search .search-box{width:85%;border-radius: 180rpx;background-color:#fff;height:100%;margin:0 auto;display:flex;justify-content: start;} +.search .search-box .search-icon{width:70rpx;height:100%;} +.search .search-box .search-icon image{width:32rpx;height:32rpx;padding:16rpx 0rpx 16rpx 38rpx;} +.search .search-box .search-input{width:580rpx;} +.search .search-box .search-input input{height:100%;width:90%;padding-left:10rpx} +.search .search-word{width:15%;font-size:28rpx;line-height:64rpx;text-align: right;} +.search-title{width:94%;margin:0 auto;height:90rpx;line-height:90rpx;display:flex;justify-content: space-between;font-size:30rpx;} +.search-title text{font-size:24rpx;color:#7C7C7C} +.yesword .noresult{width:100%;} +.yesword .noresult .noimg{width:200rpx;height:170rpx;margin:0 auto;border:1px dashed #969798;display: block;} +.yesword .noresult .noforword{font-size:24rpx;color:#ADADAD;margin:24rpx 0;display: block;text-align: center;} +.yesword .noresult .club-list{width:100%;background-color:#F1F1F1;border-top:6rpx solid #F1F1F1;border-bottom:6rpx solid #f1f1f1} +.club-list .club{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.more{width:100%;height:64rpx;background:#fff;line-height:64rpx;display: flex;justify-content: center;} +.more .more-left{height:2rpx;width:90rpx;background: linear-gradient(to left, #000000, #f1f1f1);margin-top:30rpx} +.more .more-word{width:150rpx;text-align: center;font-size:20rpx;color:#A5A5A5} +.more .more-right{height:2rpx;width:90rpx;background: linear-gradient(to left, #f1f1f1, #000000);margin-top:30rpx} +.club-list .four-list{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.club-list .four-list .bigimg{width:38%;height:182rpx;border-radius: 12rpx;} +.club-list .four-list .four-word{width:59%;margin-left:3%;} +.club-list .four-word .four-title{display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; +word-break:break-all;font-size:24rpx;color:#7E7B70;height:60rpx;line-height:30rpx;} +.club-list .four-word .four-log{height:40rpx;line-height:40rpx;font-size:18rpx;color:#C1C1C1;display: flex; +justify-content: space-between;width:80%} +.club-list .four-word .four-name{font-size:24rpx;color:#2A2A2A;line-height:40rpx;} +.club-list .four-word .four-name image{width:20rpx;height:20rpx;margin-left:10rpx;vertical-align: sub;} +.club-list .four-word .four-bottom{display: flex;justify-content: space-between;font-size:20rpx;color:#C9C9C9;height:40rpx;line-height:40rpx;} +.club-list .four-word .four-bottom .price{font-size:24rpx;color:#F66A01;font-weight:bold;} +.club-list .four-word .four-bottom .price text{font-size:18rpx;} \ No newline at end of file diff --git a/pages/index/activeDetail/activeDetail.js b/pages/index/activeDetail/activeDetail.js new file mode 100644 index 0000000..d3612f2 --- /dev/null +++ b/pages/index/activeDetail/activeDetail.js @@ -0,0 +1,253 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +// const QQMapWX = require('../../utils/qqmap-wx-jssdk.min.js'); +var QQMapWX=require('../../../utils/qqmap-wx-jssdk.min') +let qqmapsdk +Page({ + + /** + * 页面的初始数据 + */ + data: { + activeId:'', + detail:{}, + content:[], + user:[{img:'../../../images/ava.png',name:'长岛加冰'},{img:'../../../images/ava.png',name:'长岛加冰'}, + {img:'../../../images/ava.png',name:'长岛加冰'},{img:'../../../images/ava.png',name:'长岛加冰'}, + {img:'../../../images/ava.png',name:'长岛加冰'}], + company:{img:'../../../images/logo.jpg',name:'众兴天下户外',status:'1',active:'15',group:'23',intro:'个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名个...'}, + messages:[ + {ava:'../../../images/ava.png',nickName:'耳机分你一瓣',content:'这个地方看起来特别好玩的样子,个地方看起来特别好玩的样子,我们计划下个月也全家去玩我们计划下个月也全家去玩。',time:'2020-10-10 20:00'}, + {ava:'../../../images/ava.png',nickName:'耳机分你一瓣',content:'这个地方看起来特别好玩的样子,我们计划下个月也全家去玩。',time:'2020-10-10 20:00'}, + {ava:'../../../images/ava.png',nickName:'耳机分你一瓣',content:'这个地方看起来特别好玩的样子,我们计划下个月也全家去玩。',time:'2020-10-10 20:00'} + ], + otheractive:[ + {img:'../../../images/logo.jpg',intro:'欢乐游园亲子活动,全家人一起畅游欢乐谷,享受天...',time:'2020-10-13 07:00',people:'2'}, + {img:'../../../images/logo.jpg',intro:'欢乐游园亲子活动,全家人一起畅游欢乐谷,享受天...',time:'2020-10-13 07:00',people:'2'}, + {img:'../../../images/logo.jpg',intro:'欢乐游园亲子活动,全家人一起畅游欢乐谷,享受天...',time:'2020-10-13 07:00',people:'2'} + ] +}, +seeJoin:function(){ + wx.navigateTo({ + url: '../join/join' + }) +}, +tojion:function(){ + var that = this; + console.log(that.data.detail); + wx.navigateTo({ + url: '../myjoin/myjoin?acId='+that.data.detail.activityId+'&clubId='+that.data.detail.clubId+'&price='+that.data.detail.lowestPrice+'' + }) +}, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var that = this; + that.setData({ + activeId:options.id, + }); + that.getActiveDetail(); + that.getOtherActive(); + that.addviews(options.id); + }, + getActiveDetail:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl'); + var postData = { + activityId:that.data.activeId + }; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getActiveDetail(), postData, header).then((res) => { + let datas = res.data.data; + datas.activityLogo = imgUrl + datas.activityLogo; + datas.coverFirstImage = imgUrl + datas.coverFirstImage; + let content = JSON.parse(datas.activityContent); + for(var i=0;i { + //成功后的回调 + // console.log(res,'地址'); + // this.latitude = res.result.location.lat; + // this.longitude = res.result.location.lng; + wx.openLocation({ + latitude:Number(res.result.location.lat), + longitude:Number(res.result.location.lng), + name:that.data.activityAddr, + scale: 28 + }) + }, + fail: function(error) { + console.error(error); + } + }); + // wx.openLocation({ + // latitude:Number(that.data.addrLat), + // longitude:Number(that.data.addrLon), + // name:that.data.activityAddr, + // scale: 28 + // }) + }, + tiaozhuan(e){ + // pages/club/clubDetail/clubDetail + wx.navigateTo({ + url: '../../club/clubDetail/clubDetail?id='+this.data.company.clubId, + }) + }, + getclubInfo:function(id){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl'); + var postData = { + clubId:id + }; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getclubInfo(), postData, header).then((res) => { + let datas = res.data.data; + console.log(datas); + datas.clubLogo = imgUrl + datas.clubLogo; + that.setData({ + company:datas + }) + }) + }, + addviews:function(id){ + var that = this; + var postData = { + activityId:id, + }; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.addviews(), postData, header).then((res) => { + let datas = res.data.data; + console.log(datas); + }) + }, + getOtherActive:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl'); + var postData = { + activityId:that.data.activeId, + clubId:that.data.detail.clubId + }; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getOtherActive(), postData, header).then((res) => { + let datas = res.data.data; + console.log(datas); + for(let i=0;i { + wx.showToast({ + title: '请求已发送', + icon: 'none', + duration: 1000 + }) + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + handleContact(e){ + console.log(e); +}, + onShareAppMessage: function () { + return { + title: '报名了', + path: 'pages/index/activeDetail/activeDetail?id='+this.data.detail.activityId, + success: (res) => { + // 分享成功 + console.log(this.data.detail.activityId,'this.data.detail.activityId'); + console.log(res); + }, + fail: (res) => { + // 分享失败 + } + } + } +}) \ No newline at end of file diff --git a/pages/index/activeDetail/activeDetail.json b/pages/index/activeDetail/activeDetail.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/activeDetail/activeDetail.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/activeDetail/activeDetail.wxml b/pages/index/activeDetail/activeDetail.wxml new file mode 100644 index 0000000..2101b41 --- /dev/null +++ b/pages/index/activeDetail/activeDetail.wxml @@ -0,0 +1,143 @@ + + + + {{detail.activityName}} + + {{detail.lowestPrice?detail.lowestPrice:0}} + + 浏览{{detail.totalRead?detail.totalRead:0}} + + + + + + {{detail.startTime}}{{detail.endTime}} + + + + + {{detail.activityAddr}} + 查看地图 + + + + + + 已报名{{detail.totalRegister?detail.totalRegister:0}}人/不限制名额 + 查看全部报名 + + + + + + + + {{item.name}} + + + + + + + + + + + {{company.clubName}} + + 个人认证 + + + 企业认证 + + + 游客登录 + + + 活动:{{company.totalActivity}} + | + 成员:{{company.totalMembers}} + + + + + {{company.clubIntroduction}} + + + + 联系俱乐部 + + + 加入 + + 已加入 + + + + + + + {{item}} + + + + + + 留言 + + 我要留言 + + + + + + + + + + {{item.nickName}} + {{item.time}} + + {{item.content}} + + + + + + + + + 俱乐部其他活动 + + + + + + + + + {{item.intro}} + {{item.time}} + 报名:{{item.people}}人 + + + + + 没有数据 + + + + + + + 我要报名 + + \ No newline at end of file diff --git a/pages/index/activeDetail/activeDetail.wxss b/pages/index/activeDetail/activeDetail.wxss new file mode 100644 index 0000000..d5fa54e --- /dev/null +++ b/pages/index/activeDetail/activeDetail.wxss @@ -0,0 +1,464 @@ +.banner { + width: 100%; + height: 400rpx; + z-index: 1; +} + +.banner image { + width: 100%; + height: 100%; + z-index: 1; +} + +.circle { + width: 88%; + margin: 0 auto; + margin-top: -40rpx; + background: #ffffff; + border: 1px solid #f0f0f0; + border-radius: 17px; + box-shadow: 0px 8px 8px 0px rgba(0, 0, 0, 0.04); + z-index: 3; + position: relative; + padding: 24rpx +} + +.circle .title { + font-size: 32rpx; + color: #000; + line-height: 44rpx; + height: 88rpx; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all; +} + +.circle .price { + padding: 12rpx; + border-bottom: 2rpx solid #F0F0F0; + display: flex; + justify-content: space-between; + height: 64rpx; + line-height: 64rpx; +} + +.circle .price .price-left { + line-height: 64rpx; + font-size: 24rpx; +} + +.circle .price .price-left text { + font-size: 50rpx; + color: #F66A01; + padding-right: 8rpx; +} + +.circle .price .price-left small { + color: #F66A01; +} + +.circle .price .price-right { + color: #9C9C9C; + font-size: 24rpx; +} + +.circle .price .price-right image { + width: 28rpx; + height: 28rpx; + margin-right: 5rpx; + vertical-align: middle; +} + +.circle .detail { + width: 100%; +} + +.circle .detail .detail-list { + width: 100%; + height: 36rpx; + line-height: 36rpx; + padding: 10rpx; + font-size: 26rpx; + color: #9C9C9C; + display: flex; +} + +.circle .detail .detail-list image { + width: 32rpx; + height: 32rpx; + margin-right: 16rpx; + vertical-align: middle; +} + +.circle .detail .detail-list .two { + display: flex; + justify-content: space-between; + width: 90% +} + +.circle .detail .detail-list .two .two-right { + color: #87C2FF +} + +.circle .detail .detail-list .two .yellow { + color: #F66A01 +} + +.circle .detail .detail-list .two .activeaddr { + width: 75%; + word-break: keep-all; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.user { + width: 100%; + display: flex; + justify-content: space-around; + padding-top: 32rpx; +} + +.user .user-list { + width: 20%; + text-align: center; +} + +.user .user-list image { + width: 96rpx; + height: 96rpx; + border-radius: 50%; +} + +.user .user-list view { + font-size: 24rpx; + padding: 15rpx 0 5rpx; +} + +.company, +.activity, +.message { + width: 88%; + margin: 0 auto; + margin-top: 24rpx; + background: #ffffff; + border: 1px solid #f0f0f0; + border-radius: 17px; + box-shadow: 0px 8px 8px 0px rgba(0, 0, 0, 0.04); + padding: 24rpx +} + +.company .com-nav { + width: 100%; + display: flex; + justify-content: space-between; + height: 144rpx; +} + +.company .com-nav .nav-left { + width: 25% +} + +.company .com-nav .nav-left image { + width: 144rpx; + height: 144rpx; +} + +.company .com-nav .nav-right { + width: 75% +} + +.company .com-nav .nav-right .right-name { + font-size: 32rpx; + line-height: 44rpx; +} + +.company .com-nav .nav-right .right-user { + font-size: 20rpx; + padding: 8rpx 0 24rpx +} + +.company .com-nav .nav-right .right-user image { + width: 32rpx; + height: 32rpx; + vertical-align: middle; + margin-right: 10rpx +} + +.company .com-nav .nav-right .nav-detail { + font-size: 24rpx; + color: #9C9C9C; +} + +.company .com-nav .nav-right .nav-detail text { + padding: 0 10rpx +} + +.company .company-intro { + padding: 26rpx 0; + font-size: 24rpx; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all; + color: #969696 +} + +.company .company-call { + width: 100%; + display: flex; + justify-content: space-around; +} + +.company .company-call view { + width: 240rpx; + height: 64rpx; + background: #FFCB12; + text-align: center; + border-radius: 8rpx; + color: #fff; + line-height: 64rpx; + font-size: 32rpx; +} + +.company .company-call view image { + width: 32rpx; + height: 32rpx; + vertical-align: middle; + margin-right: 16rpx +} + +.activity .act-list { + width: 100%; +} + +.activity .act-list image { + width: 100%; + height: 280rpx; + border-radius: 8rpx; +} + +.activity .act-list view { + font-size: 28rpx; + padding: 16rpx 0; + line-height: 40rpx; +} + +.message .message-top { + height: 44rpx; + display: flex; + justify-content: space-between; + line-height: 44rpx; +} + +.message .message-top .top-left { + font-size: 32rpx; +} + +.message .message-top .top-left image { + width: 6rpx; + height: 32rpx; + margin-right: 16rpx; + vertical-align: middle; +} + +.message .message-top .top-right { + font-size: 24rpx; + color: #F89041 +} + +.message-three { + width: 100%; + margin-top: 20rpx +} + +.message-three .message-list { + width: 100%; + padding: 16rpx 0; + display: flex; + justify-self: start; +} + +.message-three .message-list .list-left { + width: 15% +} + +.message-three .message-list .list-left image { + width: 64rpx; + height: 64rpx +} + +.message-three .message-list .list-right { + width: 85% +} + +.message-three .message-list .list-right .right-top { + display: flex; + justify-content: space-between; + color: #999999; + font-size: 24rpx; +} + +.message-three .message-list .list-right .right-top .time { + font-size: 20rpx; +} + +.message-three .message-list .list-right .right-content { + padding-top: 12rpx; + line-height: 40rpx; + font-size: 28rpx; +} + +.other { + width: 100%; + background: #fff; + margin-top: 24rpx; + margin-bottom: 120rpx; +} + +.other .other-top { + height: 92rpx; + line-height: 92rpx; + font-size: 32rpx; + padding: 0 6%; +} + +.other .other-top image { + height: 36rpx; + width: 6rpx; + vertical-align: middle; + margin-right: 16rpx; +} + +.other .other-circle { + width: 100%; +} + +.other .other-circle .other-list { + border-bottom: 2rpx solid #F3F3F3; + padding: 24rpx 6%; + width: 88%; + display: flex; + justify-content: start; +} + +.other .other-circle .other-list .other-left { + width: 40%; +} + +.other .other-circle .other-list .other-left image { + width: 240rpx; + height: 152rpx; + border-radius: 8rpx; +} + +.other .other-circle .other-list .other-right { + width: 60%; +} + +.other .other-circle .other-list .other-right .other-name { + color: #676457; + font-size: 24rpx; + height: 56rpx; + line-height: 28rpx; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all; +} + +.other .other-circle .other-list .other-right .other-time { + font-size: 20rpx; + color: #BBBBBB; + padding: 16rpx 0 +} + +.other .other-circle .other-list .other-right .other-people { + padding-top: 2rpx; +} + +.other .other-circle .other-list .other-right .other-people text { + background: #FFFAEA; + padding: 4rpx 16rpx; + color: #B3AFA4; + font-size: 20rpx; + border-radius: 8rpx; +} + +.bottom { + width: 100%; + height: 100rpx; + background: #fff; + position: fixed; + bottom: 0; + left: 0; + display: flex; + justify-content: start; +} + +.bottom .bottom-left { + width: 482rpx; + height: 100rpx; + display: flex; + justify-content: start; + text-align: center; +} + +.bottom .bottom-left image { + width: 40rpx; + height: 40rpx; + padding-top: 14rpx; +} + +.bottom .bottom-left .share, +.bottom .bottom-left .online { + width: 120rpx; + font-size: 22rpx; +} + +#online { + background-color: #00000000; + color: #000; + padding: 0; + margin: 0; + margin-left: 50rpx; +} + +#online image { + width: 40rpx; + height: 40rpx; + padding-top: 14rpx; +} + +#online view { + font-size: 22rpx; + margin-top: -40rpx; +} + +.bottom-left { + display: flex; + justify-content: left; +} + +button::after { + border: none; +} + +.bottom .bottom-right { + width: 268rpx; + background: #F66A01; + line-height: 100rpx; + color: #fff; + text-align: center; +} + +.nodata { + padding: 50rpx; + text-align: center; + font-size: 26rpx; + color: #808080; +} \ No newline at end of file diff --git a/pages/index/activeList/activeList.js b/pages/index/activeList/activeList.js new file mode 100644 index 0000000..7f92564 --- /dev/null +++ b/pages/index/activeList/activeList.js @@ -0,0 +1,99 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + logo:'../../../images/logo.jpg', + fourImages:[], + circleId:'' + }, + toactiveDetail:function(e){ + console.log(e); + wx.navigateTo({ + url: '../activeDetail/activeDetail?id='+e.currentTarget.dataset.id+'' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + circleId:options.id + }) + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getmoreClubList(); + }, + getmoreClubList:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl') + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + var pastData = { + clubCircle:that.data.circleId + } + re.request(Api.getmoreClubList(), pastData, header).then((res) => { + let datas = res.data.data; + that.getactiveInfo(datas.activityId) + for(let i=0;i + + + + + + + + {{item.activityName}} + + {{item.startRegisterTime}} + | + {{item.endRegisterTime}} + | + {{item.activityAddr}} + + {{item.clubName}} + + + + + + {{item.totalRegister}}人已参加 + {{item.rangePrice}} + + + + + + + 下拉加载 + + + + + + \ No newline at end of file diff --git a/pages/index/activeList/activeList.wxss b/pages/index/activeList/activeList.wxss new file mode 100644 index 0000000..42f1e6c --- /dev/null +++ b/pages/index/activeList/activeList.wxss @@ -0,0 +1,29 @@ +page{background:#FAFAFA} +.nav{z-index: 4; position: fixed; top:0;left:0;width:100%;height:100rpx;line-height:100rpx;background:#fff;} +.nav .navtop{width:50%;margin:0 auto;display:flex;box-sizing: border-box;} +.navtop> view{text-align:center;width:50%;} +.navtop> view text{height:70rpx; display:inline-block;line-height: 70rpx;color:#979797;font-size: 32rpx;} +.navtop .cur text{ border-bottom:4rpx solid #FE4C00; color:#494949;font-size: 34rpx;} +.yesword{width:100%;margin-top:100rpx;} +.yesword .noresult{width:100%;} +.yesword .noresult .noimg{width:200rpx;height:170rpx;margin:0 auto;border:1px dashed #969798;display: block;} +.yesword .noresult .noforword{font-size:24rpx;color:#ADADAD;margin:24rpx 0;display: block;text-align: center;} +.yesword .noresult .club-list{width:100%;background-color:#F1F1F1;border-top:6rpx solid #F1F1F1;border-bottom:6rpx solid #f1f1f1} +.club-list .club{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} + +.more{width:100%;height:64rpx;background:#fff;line-height:64rpx;display: flex;justify-content: center;} +.more .more-left{height:2rpx;width:90rpx;background: linear-gradient(to left, #000000, #f1f1f1);margin-top:30rpx} +.more .more-word{width:150rpx;text-align: center;font-size:20rpx;color:#A5A5A5} +.more .more-right{height:2rpx;width:90rpx;background: linear-gradient(to left, #f1f1f1, #000000);margin-top:30rpx} +.club-list .four-list{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.club-list .four-list .bigimg{width:38%;height:182rpx;border-radius: 12rpx;} +.club-list .four-list .four-word{width:59%;margin-left:3%;} +.club-list .four-word .four-title{display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; +word-break:break-all;font-size:24rpx;color:#7E7B70;height:60rpx;line-height:30rpx;} +.club-list .four-word .four-log{height:40rpx;line-height:40rpx;font-size:18rpx;color:#C1C1C1;display: flex; +justify-content: space-between;width:80%} +.club-list .four-word .four-name{font-size:24rpx;color:#2A2A2A;line-height:40rpx;} +.club-list .four-word .four-name image{width:20rpx;height:20rpx;margin-left:10rpx;vertical-align: sub;} +.club-list .four-word .four-bottom{display: flex;justify-content: space-between;font-size:20rpx;color:#C9C9C9;height:40rpx;line-height:40rpx;} +.club-list .four-word .four-bottom .price{font-size:24rpx;color:#F66A01;font-weight:bold;} +.club-list .four-word .four-bottom .price text{font-size:18rpx;} \ No newline at end of file diff --git a/pages/index/activeing/activeing.js b/pages/index/activeing/activeing.js new file mode 100644 index 0000000..cb553d9 --- /dev/null +++ b/pages/index/activeing/activeing.js @@ -0,0 +1,128 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + logo:'../../../images/logo.jpg', + fourImages:[], + navTab: ['热门','即将开始'], + currentTab: 0, + }, + currentTab: function (e) { + var that = this; + if (that.data.currentTab == e.currentTarget.dataset.idx){ + return; + } + that.setData({ + currentTab: e.currentTarget.dataset.idx, + }) + if(e.currentTarget.dataset.idx==1){ + that.beginActive(); + }else{ + that.hotActive(); + } + }, + toactiveDetail:function(e){ + console.log(e); + wx.navigateTo({ + url: '../activeDetail/activeDetail?id='+e.currentTarget.dataset.id+'' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + currentTab:options.pid + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.hotActive(); + }, + beginActive:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl') + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.beginActive(), '', header).then((res) => { + let datas = res.data.rows; + for(let i=0;i { + let datas = res.data.rows; + for(let i=0;i + + + {{item}} + + + + \ No newline at end of file diff --git a/pages/index/activeing/activeing.wxss b/pages/index/activeing/activeing.wxss new file mode 100644 index 0000000..42f1e6c --- /dev/null +++ b/pages/index/activeing/activeing.wxss @@ -0,0 +1,29 @@ +page{background:#FAFAFA} +.nav{z-index: 4; position: fixed; top:0;left:0;width:100%;height:100rpx;line-height:100rpx;background:#fff;} +.nav .navtop{width:50%;margin:0 auto;display:flex;box-sizing: border-box;} +.navtop> view{text-align:center;width:50%;} +.navtop> view text{height:70rpx; display:inline-block;line-height: 70rpx;color:#979797;font-size: 32rpx;} +.navtop .cur text{ border-bottom:4rpx solid #FE4C00; color:#494949;font-size: 34rpx;} +.yesword{width:100%;margin-top:100rpx;} +.yesword .noresult{width:100%;} +.yesword .noresult .noimg{width:200rpx;height:170rpx;margin:0 auto;border:1px dashed #969798;display: block;} +.yesword .noresult .noforword{font-size:24rpx;color:#ADADAD;margin:24rpx 0;display: block;text-align: center;} +.yesword .noresult .club-list{width:100%;background-color:#F1F1F1;border-top:6rpx solid #F1F1F1;border-bottom:6rpx solid #f1f1f1} +.club-list .club{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} + +.more{width:100%;height:64rpx;background:#fff;line-height:64rpx;display: flex;justify-content: center;} +.more .more-left{height:2rpx;width:90rpx;background: linear-gradient(to left, #000000, #f1f1f1);margin-top:30rpx} +.more .more-word{width:150rpx;text-align: center;font-size:20rpx;color:#A5A5A5} +.more .more-right{height:2rpx;width:90rpx;background: linear-gradient(to left, #f1f1f1, #000000);margin-top:30rpx} +.club-list .four-list{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.club-list .four-list .bigimg{width:38%;height:182rpx;border-radius: 12rpx;} +.club-list .four-list .four-word{width:59%;margin-left:3%;} +.club-list .four-word .four-title{display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; +word-break:break-all;font-size:24rpx;color:#7E7B70;height:60rpx;line-height:30rpx;} +.club-list .four-word .four-log{height:40rpx;line-height:40rpx;font-size:18rpx;color:#C1C1C1;display: flex; +justify-content: space-between;width:80%} +.club-list .four-word .four-name{font-size:24rpx;color:#2A2A2A;line-height:40rpx;} +.club-list .four-word .four-name image{width:20rpx;height:20rpx;margin-left:10rpx;vertical-align: sub;} +.club-list .four-word .four-bottom{display: flex;justify-content: space-between;font-size:20rpx;color:#C9C9C9;height:40rpx;line-height:40rpx;} +.club-list .four-word .four-bottom .price{font-size:24rpx;color:#F66A01;font-weight:bold;} +.club-list .four-word .four-bottom .price text{font-size:18rpx;} \ No newline at end of file diff --git a/pages/index/club/club.js b/pages/index/club/club.js new file mode 100644 index 0000000..d04b4e2 --- /dev/null +++ b/pages/index/club/club.js @@ -0,0 +1,70 @@ +// pages/index/club/club.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + clubList:[ + {img:'../../../images/logo.jpg',title:'众游天下',intro:'简介简介简介行在路上乐在其中!行在路上乐在...',num:'2',user:'2'} + ,{img:'../../../images/logo.jpg',title:'众游天下',intro:'简介简介简介行在路上乐在其中!行在路上乐在...',num:'2',user:'1'} + ,{img:'../../../images/logo.jpg',title:'众游天下',intro:'简介简介简介行在路上乐在其中!行在路上乐在...',num:'2',user:'3'} + ], + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/club/club.json b/pages/index/club/club.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/club/club.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/club/club.wxml b/pages/index/club/club.wxml new file mode 100644 index 0000000..953df2e --- /dev/null +++ b/pages/index/club/club.wxml @@ -0,0 +1,45 @@ + + + + + + + + + + + + 搜索 + + + + \ No newline at end of file diff --git a/pages/index/club/club.wxss b/pages/index/club/club.wxss new file mode 100644 index 0000000..23a809a --- /dev/null +++ b/pages/index/club/club.wxss @@ -0,0 +1,29 @@ +page{background:#FAFAFA} +.nav{width:100%;padding:16rpx 0;background:#FFCB12;} +.search{height:64rpx;width:90%;margin:0 auto;display:flex;justify-content: start;} +.search .search-box{width:85%;border-radius: 180rpx;background-color:#fff;height:100%;margin:0 auto;display:flex;justify-content: start;} +.search .search-box .search-icon{width:70rpx;height:100%;} +.search .search-box .search-icon image{width:32rpx;height:32rpx;padding:16rpx 0rpx 16rpx 38rpx;} +.search .search-box .search-input{width:580rpx;} +.search .search-box .search-input input{height:100%;width:90%;padding-left:10rpx} +.search .search-word{width:15%;font-size:28rpx;line-height:64rpx;text-align: right;} +.search-title{width:94%;margin:0 auto;height:90rpx;line-height:90rpx;display:flex;justify-content: space-between;font-size:30rpx;} +.search-title text{font-size:24rpx;color:#7C7C7C} +.yesword{width:100%} +.yesword .noresult{width:100%;} +.yesword .noresult .noimg{width:200rpx;height:170rpx;margin:0 auto;border:1px dashed #969798;display: block;} +.yesword .noresult .noforword{font-size:24rpx;color:#ADADAD;margin:24rpx 0;display: block;text-align: center;} +.yesword .noresult .club-list{width:100%;background-color:#F1F1F1;border-top:6rpx solid #F1F1F1;border-bottom:6rpx solid #f1f1f1} +.club-list .club{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.club-list .club .club-left{width:28%;} +.club-list .club .club-left image{width:100%;height:144rpx;border-radius:8rpx;} +.club-list .club .club-right{width:69%;margin-left:3%;} +.club-list .club .club-right .right-title{color:#F66A01;font-size:32rpx;line-height:45rpx;} +.club-list .club .club-right .right-title image{width:28rpx;height:28rpx;margin-left:10rpx;vertical-align: middle;} +.club-list .club .club-right .right-intro{color:#878787;font-size:28rpx;line-height:40rpx;word-break:keep-all; + white-space:nowrap;overflow:hidden; text-overflow:ellipsis;} +.club-list .club .club-right .right-num{color:#A3A3A3;font-size:24rpx;padding-top:24rpx;} +.more{width:100%;height:64rpx;background:#fff;line-height:64rpx;display: flex;justify-content: center;} +.more .more-left{height:2rpx;width:90rpx;background: linear-gradient(to left, #000000, #f1f1f1);margin-top:30rpx} +.more .more-word{width:150rpx;text-align: center;font-size:20rpx;color:#A5A5A5} +.more .more-right{height:2rpx;width:90rpx;background: linear-gradient(to left, #f1f1f1, #000000);margin-top:30rpx} \ No newline at end of file diff --git a/pages/index/editjoin/editjoin.js b/pages/index/editjoin/editjoin.js new file mode 100644 index 0000000..164a5ec --- /dev/null +++ b/pages/index/editjoin/editjoin.js @@ -0,0 +1,66 @@ +// pages/index/editjoin/editjoin.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/editjoin/editjoin.json b/pages/index/editjoin/editjoin.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/editjoin/editjoin.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/editjoin/editjoin.wxml b/pages/index/editjoin/editjoin.wxml new file mode 100644 index 0000000..6ecf08b --- /dev/null +++ b/pages/index/editjoin/editjoin.wxml @@ -0,0 +1,25 @@ + + + + 昵称 + + + + 手机号 + + + + 性别 + + + + 真实姓名 + + + + 身份证号 + + + + + \ No newline at end of file diff --git a/pages/index/editjoin/editjoin.wxss b/pages/index/editjoin/editjoin.wxss new file mode 100644 index 0000000..d75dcde --- /dev/null +++ b/pages/index/editjoin/editjoin.wxss @@ -0,0 +1,9 @@ +.container{background:#fff;padding-bottom:110rpx;} +.circle{width:100%;} +.top{height:100rpx;line-height:100rpx;text-align:center;font-size:34rpx;border-bottom:8rpx solid #F6F6F6} +.content{width:94%;margin:24rpx auto;} +.content .list{width:100%;height:96rpx;line-height:96rpx;display: flex;justify-content:space-between;border-bottom:2rpx solid #F6F6F6} +.content .list .inputbox{width:60%;} +.content .list .title{color:#9A9A9A;font-size:26rpx;} +.content .list .inputbox input{width:100%;text-align: right;height:40rpx;margin-top:28rpx;} +.content .mark .title{color:#9A9A9A;font-size:26rpx;line-height:80rpx;} \ No newline at end of file diff --git a/pages/index/history/history.js b/pages/index/history/history.js new file mode 100644 index 0000000..464e986 --- /dev/null +++ b/pages/index/history/history.js @@ -0,0 +1,85 @@ +// pages/index/history/history.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + joined:[ + + ] + }, + toedit:function(){ + wx.navigateTo({ + url: '../editjoin/editjoin' + }) + }, + NowIndex:function(e){ +// console.log(index); +let id =e.currentTarget.dataset.id; + + let obj= this.data.joined[id] + wx.setStorageSync('item', obj) + wx.navigateBack({ + delta: 1, + }) + + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + joined:wx.getStorageSync('stroe') + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/history/history.json b/pages/index/history/history.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/history/history.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/history/history.wxml b/pages/index/history/history.wxml new file mode 100644 index 0000000..c1aea77 --- /dev/null +++ b/pages/index/history/history.wxml @@ -0,0 +1,31 @@ + + + + + + + + + + + + {{item.nickname}} + + + + {{item.phone}} + + + + + + + 真实姓名:{{item.realname}} + 身份证号:{{item.idcard}} + + + + + + + \ No newline at end of file diff --git a/pages/index/history/history.wxss b/pages/index/history/history.wxss new file mode 100644 index 0000000..2bfd38f --- /dev/null +++ b/pages/index/history/history.wxss @@ -0,0 +1,14 @@ +.container{background:#fff;} +.circle{width:100%} +.list{width:94%;height:140rpx;padding:32rpx 3%;border-bottom:2rpx solid #f5f5f5;display: flex;justify-content: start;} +.list .list-left{width:18%} +.list .list-left image{width:96rpx;height:96rpx} +.list .list-right{width:82%} +.list .list-right .right-top{display: flex;justify-content: space-between;width:100%} +.list .list-right .right-top .top-left {width:85%} +.list .list-right .right-top .top-left .name{font-size:30rpx;} +.list .list-right .right-top .top-left .tel{font-size:30rpx;padding-top:12rpx;color:#838383} +.list .list-right .right-top .top-left .tel image{width:36rpx;height:36rpx;vertical-align: sub;} +.list .list-right .right-top .top-right{width:15%} +.list .list-right .right-top .top-right image{width:48rpx;height:48rpx} +.list .list-right .idcard{color:#AEAEAE;font-size:24rpx;padding-top:24rpx;display:flex;justify-content: space-between;} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..3081582 --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,263 @@ +// 获取应用实例 +var Api = require('../../utils/common.js'); +var re = require('../../utils/request.js'); +const app = getApp() + +Page({ + data: { + logo:'../../images/logo.jpg', + imgUrls:[ '/images/logo.jpg'], + twoImages:[], + fiveImages:[], + fourImages:[], + youlike:[], + threeImages:[], + wonderPerson:[ + {img:'/images/ava.png',user:'1',name:'Boonas',intro:'行在路上乐在其中!行在路上乐在其中!'}, + {img:'/images/ava.png',user:'1',name:'Boonas',intro:'行在路上乐在其中!行在路上乐在其中!'}, + {img:'/images/ava.png',user:'1',name:'Boonas',intro:'行在路上乐在其中!行在路上乐在其中!'} + ], + clubpage:'1' + }, + toSearch:function(){ + wx.navigateTo({ + url: './search/search' + }) + }, + toTypeList:function(e){ + // wx.navigateTo({ + // url: './activeList/activeList?id='+e.currentTarget.dataset.id+'' + // }) + wx.navigateTo({ + url: '../club/clublist/clublist?id='+e.currentTarget.dataset.id+'' + }) + }, + toactiveing:function(){ + wx.navigateTo({ + url: './activeing/activeing?pid=1' + }) + }, + torank:function(){ + wx.navigateTo({ + url: './rank/rank' + }) + }, + toactiveDetail:function(e){ + wx.navigateTo({ + url: './activeDetail/activeDetail?id='+e.currentTarget.dataset.id+'' + }) + }, + // 事件处理函数 + bindViewTap() { + wx.navigateTo({ + url: '../logs/logs' + }) + }, + onLoad() { + this.getbanner(); + }, + onShow: function () { + this.hotActive(); + this.getLike(); + this.getRankActive(); + this.getRecommendActive(); + this.getclubCircle(); + this.getClubing(); + }, + getbanner:function(){ + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getbanner(), '', header).then((res) => { + let datas = res.data.data; + that.setData({ + imgUrls:datas + }) + console.log(this.data.imgUrls,'logloglog'); + }) + }, + hotActive:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl') + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + var postData = { + pageSize: 4, + pageNum: 1 + } + re.request(Api.hotActive(), postData, header).then((res) => { + let datas = res.data.rows; + for(let i=0;i { + let datas = res.data.rows; + for(let i=0;i { + let datas = res.data.rows; + for(let i=0;i { + let datas = res.data.rows; + for(let i=0;i { + let datas = res.data.rows; + for(let i=0;i { + let datas = res.data.rows; + for(let i=0;i { + let datas = res.data.data; + for(let i=0;i + + + + + + + + + + + + + + + + + + + 全部 + + + + + {{item.typeName}} + + + + + + 精品活动推荐 + + + + + + + + + + + + + 正在进行的活动 + + + + + + 热门 + + 即将开始 + + + + + + + {{item.activityName}} + + {{item.startTime}} + | + {{item.totalDay}}天 + | + {{item.activityAddr}} + + {{item.clubName}} + + + + + + {{item.totalRegister?item.totalRegister:0}}人已参加 + {{item.rangePrice}} + + + + + + + + + 查看更多 + + + + + + + + + 人气活动 + + + 全部榜单 + + + + + + + + + + + {{item.activityName}} + + {{item.startTime}} + | + {{item.totalDay}}天 + | + {{item.activityAddr}} + + {{item.clubName}} + + + + + + {{item.totalRegister?item.totalRegister:0}}人已参加 + {{item.rangePrice}} + + + + + + + + + + + + TA们在办精彩活动 + + + + + 换一批 + + + + + + + + + + + + + {{item.clubName}} + {{item.intro}} + 加入 + 已加入 + + + + + + + + + 猜你喜欢 + + + + + + + + + {{item.activityName}} + + {{item.startTime}} + | + {{item.totalDay}}天 + | + {{item.activityAddr}} + + {{item.clubName}} + + + + + + {{item.totalRegister?item.totalRegister:0}}人已参加 + {{item.rangePrice}} + + + + + + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..82c129e --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,88 @@ +/**index.wxss**/ +/* .userinfo { + display: flex; + flex-direction: column; + align-items: center; +} */ +.nav{height:420rpx;width:100%;background: linear-gradient(to bottom,#FFCB12 0%,#ffffff 100%);} +.search{height:64rpx;width:100%;padding:16rpx 0;} +.search .search-box{width:94%;border-radius: 180rpx;background-color:#fff;height:100%;margin:0 auto;display:flex;justify-content: start;} +.search .search-box .search-icon{width:70rpx;height:100%;} +.search .search-box .search-icon image{width:32rpx;height:32rpx;padding:16rpx 0rpx 16rpx 38rpx;} +.search .search-box .search-input{width:590rpx;} +.search .search-box .search-input input{height:100%;width:90%;padding-left:10rpx} +.banner{height:322rpx;width:100%;margin:11rpx 0;} +.banner .banner-box{width:94%;border-radius: 16rpx;background-color:#fff;height:100%;margin:0 auto;} +.banner .banner-box swiper{height:100%;} +.banner .banner-box swiper-item{text-align: center;} +.banner .banner-box swiper-item image{width: 100%;height:322rpx;border-radius: 16rpx;} +.index-five{width:94%;margin:32rpx auto;display:flex;justify-content: space-around;} +.index-five .five-list{width:16%;text-align: center;line-height:50rpx;color:#8D8D8D;font-size:24rpx;} +.index-five .five-list image{width:96rpx;height:96rpx;} +.active{width:100%;} +.active .active-title{width:94%;display: flex;justify-content: start;margin:22rpx auto;height:50rpx;line-height: 50rpx;} +.active .active-title .name{z-index: 2;font-size:36rpx;} +.active .active-title image{width:42rpx;height:42rpx;vertical-align: sub;margin-left:-15rpx;z-index: 1} +.active .ac-img{width:94%;margin:0 auto;margin-bottom:8rpx;} +.active .ac-img image{width:100%;box-shadow: 0px 10px 8px 0px rgba(0,0,0,0.06);height:208rpx;border-radius: 16rpx;} +.active .ing-content{width:94%;margin:22rpx auto;} +.active .ing-content .ing-title{height:60rpx;line-height: 60rpx;display: flex;justify-content: start;} +.active .ing-content .ing-title .title-name{width:50%;text-align: center;} +.active .ing-content .ing-title .title-start{font-size:30rpx;color:#979691} +.active .ing-content .ing-title .title-hot image{width:24rpx;height:24rpx} +.active .ing-content .img-circle{width:100%;display: flex;justify-content: space-between;flex-wrap: wrap;margin-top:20rpx;} +.four-list{width:48%;border-radius:16rpx;overflow: hidden;margin-bottom:22rpx;background: #ffffff;box-shadow: 0px 8px 8px 0px rgba(0,0,0,0.04);} +.four-list .bigimg{width:100%;height:228rpx;} +.four-list .four-word{padding: 5rpx 10rpx 10rpx;} +.four-word .four-title{overflow: hidden;display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; + word-break:break-all;font-size:24rpx;color:#7E7B70;line-height:38rpx;} +.four-word .four-log{height:40rpx;line-height:40rpx;font-size:18rpx;color:#C1C1C1;width:100%;display: flex;justify-content: space-around;text-align: center;} +.four-word .four-log text{width:30%;word-break:keep-all; white-space:nowrap;overflow:hidden; text-overflow:ellipsis;} +.four-word .four-log view{padding:0 12rpx} +.four-word .four-name{font-size:24rpx;color:#2A2A2A;line-height:40rpx;} +.four-word .four-name image{width:20rpx;height:20rpx;margin-left:10rpx;vertical-align: sub;} +.four-word .four-bottom{display: flex;justify-content: space-between;font-size:20rpx;color:#C9C9C9;height:40rpx;line-height:40rpx;} +.four-word .four-bottom text{font-size:24rpx;color:#F66A01;font-weight:bold;} +.four-word .four-bottom text text{font-size:18rpx;} +.active .active-more{height:40rpx;line-height:40rpx;text-align: center;color:#FF7F0A;font-size:28rpx;} +.active .active-more image{height:40rpx;width:40rpx;vertical-align: sub;} +.popularity{width:94%;margin:30rpx auto;height:900rpx;border-radius:16rpx;position: relative;} +.popularity .popimg{width:100%;height:100%;} +.popularity .popview{position: absolute;top:0;left:0;width:100%;} +.popularity .popview .poptitle{height:60rpx;margin:20rpx auto; width:90%;display: flex;justify-content: space-between;} +.popularity .popview .poptitle .title-left{height:60rpx;width:275rpx;position: relative;} +.popularity .popview .poptitle .title-left image{height:100%;width:100%;} +.popularity .popview .poptitle .title-left view{position: absolute;left:32rpx;top:4rpx;letter-spacing: 25rpx;color:#fff;font-weight: bold;font-size:36rpx;} +.popularity .popview .poptitle .title-right{width:154rpx;height:56rpx;line-height:56rpx;opacity: 0.7; background: rgba(255,255,255,0.20); + border: 1px solid #ffffff;border-radius: 71rpx;box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.08);color:#fff;font-size:24rpx;} +.popularity .popview .poptitle .title-right image{width:28rpx;height:28rpx;vertical-align: sub;margin:0 8rpx;} +.popularity .popview .three-list{width:88%;margin:2rpx auto 20rpx auto;opacity: 1;background: #ffffff;border: 1px solid rgba(0,0,0,0.04);border-radius: 17rpx; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.08), 0px 8px 8px 0px rgba(0,0,0,0.05);display: flex;padding:25rpx 20rpx;justify-content: space-between;} +.popularity .popview .three-list .three-left{width:44%;} +.popularity .popview .three-list .three-left image{width:100%;height:190rpx;border-radius: 12rpx;} +.popularity .popview .three-list .three-right{width:52%;} +.popularity .popview .three-list .three-title{overflow: hidden;display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; + word-break:break-all;font-size:24rpx;color:#7E7B70;line-height:38rpx;height:76rpx;} +.wonderful{width:100%;background: #FAFAFA;padding:5rpx 0;} +.wonderful .wonder-name{width:94%;margin:22rpx auto;height:50rpx;line-height: 50rpx;display: flex;justify-content: space-between;} +.wonderful .wonderful-title{display: flex;justify-content: start;} +.wonderful .wonderful-title .name{font-size:36rpx;color:#FFCB12} +.wonderful .wonderful-title .names{font-size:36rpx;} +.wonderful .wonderful-title image{width:42rpx;height:42rpx;vertical-align: sub;} +.wonderful .wonder-more{color:#F66A01;font-size: 24rpx;} +.wonderful .wonder-more image{width:28rpx;height:28rpx;vertical-align: sub;} +.wonderful .wonder-view{width:94%;margin:20rpx auto;display: flex;justify-content: space-between;} +.wonderful .wonder-view .wonder-list{width:31%;background: #ffffff;border-radius: 16rpx;box-shadow: 0px 8rpx 8rpx 0px rgba(0,0,0,0.05)} +.wonderful .wonder-view .wonder-list .list-top{width:128rpx;height:128rpx;margin:36rpx auto;position: relative;} +.wonderful .wonder-view .wonder-list .list-top .top-ava{width:100%;height:100%;border-radius:50%;} +.wonderful .wonder-view .wonder-list .list-top .top-log{position: absolute;bottom:0;right:0;width:20rpx;height:20rpx;} +.wonderful .wonder-view .wonder-list .list-view{padding:5rpx 20rpx;} +.wonderful .wonder-view .wonder-list .list-view .list-name{font-size:30rpx;text-align:center;} +.wonderful .wonder-view .wonder-list .list-view .list-intro{color:#AEAEAE;font-size:22rpx;overflow: hidden;display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; + word-break:break-all;} +.wonderful .wonder-view .wonder-list .list-view .join{height:56rpx;line-height: 56rpx;color:#FF6C01;background: #fdf6ec;border: 2rpx solid #ff6c01; + border-radius: 148rpx; box-shadow: 0px 8rpx 8rpx 0px rgba(0,0,0,0.05);width:90%;margin:20rpx auto;text-align: center; font-size:28rpx;} + .wonderful .wonder-view .wonder-list .list-view .joined{height:56rpx;line-height: 56rpx;color:#ccc;background: #fdf6ec;border: 2rpx solid #ccc; + border-radius: 148rpx; box-shadow: 0px 8rpx 8rpx 0px rgba(0,0,0,0.05);width:90%;margin:20rpx auto;text-align: center; font-size:28rpx;} + + .wonderful .youlike-view{display: flex;justify-content: space-between;flex-wrap: wrap;margin:20rpx auto;width:90%} \ No newline at end of file diff --git a/pages/index/join/join.js b/pages/index/join/join.js new file mode 100644 index 0000000..1dbb6ba --- /dev/null +++ b/pages/index/join/join.js @@ -0,0 +1,107 @@ +// pages/index/join/join.js +Page({ + /** + * 页面的初始数据 + */ + data: { + navTab: ['个人报名','团队报名'], + currentTab: 0, + people:12, + person:false, + team:true, + personList:[ + {img:'../../../images/ava.png',name:'李三',time:'2020-10-10 12:00'}, + {img:'../../../images/ava.png',name:'李三',time:'2020-10-10 12:00'}, + {img:'../../../images/ava.png',name:'李三',time:'2020-10-10 12:00',help:'1',helpname:'张可'}, + ], + teamList:[ + {img:'../../../images/logo.jpg',title:'众行天下',time:'2020-11-16',people:'12',user:'2'}, + {img:'../../../images/ava.png',title:'众行天下',time:'2020-11-16',people:'12',user:'1'}, + {img:'../../../images/ava.png',title:'众行天下',time:'2020-11-16',people:'12',user:'3'}, + {img:'../../../images/ava.png',title:'众行天下',time:'2020-11-16',people:'12',user:'3'}, + {img:'../../../images/ava.png',title:'众行天下',time:'2020-11-16',people:'12',user:'3'}, + {img:'../../../images/ava.png',title:'众行天下',time:'2020-11-16',people:'12',user:'3'}, + {img:'../../../images/ava.png',title:'众行天下',time:'2020-11-16',people:'12',user:'3'}, + ] + }, + currentTab: function (e) { + var that = this; + if (that.data.currentTab == e.currentTarget.dataset.idx){ + return; + } + that.setData({ + currentTab: e.currentTarget.dataset.idx, + }) + if(e.currentTarget.dataset.idx==0){ + that.setData({ + person: false, + team: true, + }) + }else{ + that.setData({ + person: true, + team: false, + }) + } + }, + toteamjoin:function(){ + wx.navigateTo({ + url: '../teamJoin/teamJoin' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/join/join.json b/pages/index/join/join.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/join/join.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/join/join.wxml b/pages/index/join/join.wxml new file mode 100644 index 0000000..bc7ef1b --- /dev/null +++ b/pages/index/join/join.wxml @@ -0,0 +1,66 @@ + + + + + {{item}} + + + + 已报名{{people}}人 + + + + diff --git a/pages/index/join/join.wxss b/pages/index/join/join.wxss new file mode 100644 index 0000000..f9e6fdd --- /dev/null +++ b/pages/index/join/join.wxss @@ -0,0 +1,32 @@ +.nav{z-index: 4; position: fixed; top:0;left:0;width:100%;height:100rpx;line-height:100rpx;background:#fff;border-bottom:4rpx solid #F5F5F5} +.nav .navtop{width:50%;margin:0 auto;display:flex;box-sizing: border-box;} +.navtop> view{text-align:center;width:50%;} +.navtop> view text{height:70rpx; display:inline-block;line-height: 70rpx;color:#979797;font-size: 32rpx;} +.navtop .cur text{ border-bottom:4rpx solid #FE4C00; color:#494949;font-size: 34rpx;} +.content{width:94%;padding:0 3%;margin-top:100rpx;background:#fff;} +.content .content-title{height:64rpx;line-height:64rpx;padding:12rpx 0;} +.circle{width:100%;padding:24rpx 0;} +.circle .circle-list{width:100%;border-bottom:2rpx solid #F5F5F5;display: flex;padding:24rpx 0;} +.circle .circle-list .list-left{width:20%;} +.circle .circle-list .list-left image{width:112rpx;height:112rpx;border-radius:50%;} +.circle .circle-list .list-right{width:80%;} +.circle .circle-list .list-right .right-top{display: flex;justify-content: space-between;height:60rpx;line-height:60rpx;} +.circle .circle-list .list-right .right-top .name{font-size:32rpx;} +.circle .circle-list .list-right .right-top .name text{font-size:24rpx;margin-left:20rpx;background: #FF6C01;padding:6rpx 16rpx;color:#fff;border-radius:16rpx;} +.circle .circle-list .list-right .right-top .time{font-size:24rpx;color:#C7C7C7} +.circle .circle-list .list-right .right-bottom{height:52rpx;line-height:52rpx;color:#F66A01;font-size:26rpx;} +.circle .team-list{width:100%;border-bottom:2rpx solid #F5F5F5;display: flex;padding:24rpx 0;} +.circle .team-list .list-left{width:30%;} +.circle .team-list .list-left image{width:176rpx;height:144rpx;border-radius:12rpx;} +.circle .team-list .list-right{width:70%;} +.circle .team-list .list-right .right-title{color:#F66A01;font-size:32rpx;height:44rpx;line-height:44rpx;} +.circle .team-list .list-right .right-title image{width:32rpx;height:32rpx;margin-left:8rpx;vertical-align: middle;} +.circle .team-list .list-right .right-timename{display: flex;justify-content: space-between;} +.circle .team-list .list-right .right-timename .right-time{text-align: center;} +.circle .team-list .list-right .right-timename .one{padding-top:22rpx;font-size:24rpx;color:#D2D2D2} +.circle .team-list .list-right .right-timename .two{padding-top:8rpx;font-size:28rpx;color:#717171} +.tewm{padding-bottom:130rpx;} +.bottom{width:100%;position: fixed;bottom:0;left:0;background:#fff;} +.bottom-circle{width:702rpx;height:96rpx;background: #F66A01;line-height:96rpx;color:#fff;text-align:center;border-radius: 12rpx; + box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);font-size:28rpx;margin:24rpx auto} + diff --git a/pages/index/myjoin/myjoin.js b/pages/index/myjoin/myjoin.js new file mode 100644 index 0000000..bede1fc --- /dev/null +++ b/pages/index/myjoin/myjoin.js @@ -0,0 +1,282 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); + +function Detail(nickname, realname, phone, idcard, gender) { + this.nickname = nickname; //昵称 + this.realname = realname; // + this.phone = phone; + this.idcard = idcard; + this.gender = gender; +} + + +function Info() { + this.details = []; +} + + + +Page({ + + /** + * 页面的初始数据 + */ + data: { + genderdata: '', + joiner: [{ + clubId: '', + activityId: '', + cost: 0, + nickname: '', + realname: '', + phone: '', + idcard: '', + isTeam: 0, + gender: '1' + }], + price: '', + index: 1, + activityId: '', + clubId: '', + isHava: true, + info: {}, + checked: true + }, + history: function () { + wx.navigateTo({ + url: '../history/history' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var that = this; + console.log(options); + that.setData({ + clubId: options.clubId, + activityId: options.acId, + price: options.price + }) + that.init(); + }, + init: function () { + let that = this; + this.setData({ + info: new Info(), + }); + }, + addItem: function (e) { + var that = this; + let info = this.data.info; + // new Detail() + console.log(new Detail()); + info.details.push(new Detail()); + this.setData({ + info: info, + }); + console.log(info.details) + }, + removeItem: function (e) { + var that = this; + let info = this.data.info; + info.details.pop(); + this.setData({ + info: info, + }); + }, + // 通过id属性来判断操作的是哪个Detail类 + nickInput: function (e) { + let index = parseInt(e.currentTarget.id.replace("nick-", "")); + let nick = e.detail.value; + let info = this.data.info; + info.details[index].nickname = nick; + this.setData({ + info: info + }); + }, + telInput: function (e) { + let index = parseInt(e.currentTarget.id.replace("tel-", "")); + let tel = e.detail.value; + let info = this.data.info; + info.details[index].phone = tel; + this.setData({ + info: info + }); + }, + nameInput: function (e) { + let index = parseInt(e.currentTarget.id.replace("name-", "")); + let name = e.detail.value; + let info = this.data.info; + info.details[index].realname = name; + this.setData({ + info: info + }); + }, + genderChange: function (e) { + let index = parseInt(e.currentTarget.id.replace("gender-", "")); + let gender = e.detail.value; + let info = this.data.info; + info.details[index].gender = gender; + this.setData({ + info: info + }); + }, + IdInput: function (e) { + let index = parseInt(e.currentTarget.id.replace("id-", "")); + let id = e.detail.value; + let info = this.data.info; + info.details[index].idcard = id; + this.setData({ + info: info + }); + }, + //shangchuan + toOrder: function () { + console.log(this.genderdata); + var that = this; + // if(this.data.info.details) + console.log(this.data.info.details); + let isfl=false + if(this.data.info.details.length==0){ + wx.showToast({ + title: '至少添加一个用户', + icon:'error' + }) + return + } + this.data.info.details.forEach(item => { + if(item.gender==undefined||item.idcard==undefined||item.nickname==undefined||item.phone==undefined||item.realname==undefined||item.gender==''||item.idcard==''||item.nickname==''||item.phone==''||item.realname==''){ + isfl=true + } + }); + if(isfl){ + wx.showToast({ + title: '请确保表单全部填写完成', + icon:'none' + }) + return + } + let postData = that.data.info.details; + + // 本地存储用于 + if (!wx.getStorageSync('stroe')) { + let stroe = postData + wx.setStorageSync('stroe', stroe) + } else { + let stroe = wx.getStorageSync('stroe') + console.log(stroe); + stroe.splice(0,0,...postData) + + let obj = {} + stroe = stroe.reduce((arr, item) => { + obj[item.idcard] ? "" : obj[item.idcard] = true && arr.push(item) + return arr + }, []) + if(stroe.length==11){ + stroe.splice(stroe.length-1,1) + } + wx.setStorageSync('stroe', stroe) + } +// return + for (let i = 0; i < postData.length; i++) { + postData[i].clubId = that.data.clubId; + postData[i].activityId = that.data.activityId; + postData[i].cost = that.data.price; + } + postData = JSON.stringify(postData); + + + console.log(postData); + let lastData = { + req: postData + }; + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + if (!that.data.checked) { + wx.showToast({ + title: '请阅读并同意协议', + icon: 'none', + duration: 1000 + }) + } else { + re.request(Api.toJoinactive(), lastData, header).then((res) => { + console.log(res,'res'); + wx.navigateTo({ + url: '../order/order?id=' + res.data.msg + '' + }) + }) + } + + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + // 判断本地是否有item 有的话就往里面加入 + if (wx.getStorageSync('item')) { + let items = wx.getStorageSync('item') + let info = this.data.info + console.log(info.details); + let bl = info.details.some((item, index) => { + return item.idcard == items.idcard + }) + console.log(bl); + if (!bl) { + info.details.push(items) + this.setData({ + info, + }) + wx.removeStorageSync('item') + } else { + wx.removeStorageSync('item') + } + } + // let item=wx.getStorageSync('item') + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/myjoin/myjoin.json b/pages/index/myjoin/myjoin.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/myjoin/myjoin.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/myjoin/myjoin.wxml b/pages/index/myjoin/myjoin.wxml new file mode 100644 index 0000000..c6020d5 --- /dev/null +++ b/pages/index/myjoin/myjoin.wxml @@ -0,0 +1,85 @@ + + + + + 第{{index+1}}位报名人 + + + + + 费用 + ¥{{price}} + + + + 保险 + 由主办方统一购买 + + + + + 昵称 + + + + + + + 手机号 + + + + + + + 性别 + + + + + + + + + + + 真实姓名 + + + + + + + + 身份证号 + + + + + + + + + + + + 添加报名人 + 历史报名人 + + + + + 我已阅读并同意《**活动报名协议》 + + + + + 合计:{{price*info.details.length}} + 我要报名 + \ No newline at end of file diff --git a/pages/index/myjoin/myjoin.wxss b/pages/index/myjoin/myjoin.wxss new file mode 100644 index 0000000..4d766bc --- /dev/null +++ b/pages/index/myjoin/myjoin.wxss @@ -0,0 +1,32 @@ +.container{background:#fff;padding-bottom:110rpx;} +.circle{width:100%;} +.top{height:100rpx;line-height:100rpx;text-align:center;font-size:34rpx;border-bottom:8rpx solid #F6F6F6} +.content{width:94%;margin:24rpx auto;} +.content .list{width:100%;height:96rpx;line-height:96rpx;font-size:28rpx;display: flex;justify-content:space-between;border-bottom:2rpx solid #F6F6F6} +.content .list .inputbox{width:60%;} +.content .list .title{color:#9A9A9A;font-size:26rpx;} +.content .list .inputbox input{width:100%;text-align: right;height:40rpx;margin-top:28rpx;} +.content .mark .title{color:#9A9A9A;font-size:26rpx;line-height:80rpx;} +.content .mark textarea{border:2rpx solid #9A9A9A;width:92%;height:100rpx;padding:12rpx 4%;border-radius: 8rpx;} +.add{width:100%;height:100rpx;display: flex;justify-content: space-around;margin-top:34rpx;font-size:28rpx;} +.add view{width:320rpx;height:80rpx;line-height:80rpx;text-align: center;color:#fff;background:#FFCB12;border-radius:8rpx;box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34); } +.delete{width:100%;margin:12rpx 0;position: relative;height:85rpx;font-size:28rpx;} +.delete view{width:168rpx;height:72rpx;line-height:72rpx;border:2rpx solid #F66A01;border-radius: 66rpx;text-align:center;color:#F66A01;position: absolute;right:0;top:16rpx} +.agree{width:100%;margin-top:12rpx;font-size:28rpx;text-align: center;} +checkbox{transform:scale(0.6);} +.formlist{width:100%;height:96rpx;line-height: 96rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlist text{width:40%;color:#919191;} +.formlist .authright{font-size:28rpx;color:#919191;} +.formlist .authright radio{transform:scale(0.6);} +/* .agree text{color:#00E58D} */ +/* 广告弹出层 */ +.modal-box{ position:fixed; background:rgba(0,0,0,0.4); top:5rpx; width:100%; left:0;z-index:999;height:100%;} +/* .modal-box .modal-content{ margin-top:50rpx; height:50rpx;} */ +.modal-box .modal{ margin: 0 auto;background: #fff;width: 85%;padding:20rpx 0 20rpx 0;border:1px solid #ccc;border-radius:15rpx} +.modal-box .knowBtn{height:40rpx;line-height:48rpx;text-align: center; width:40%;margin-left: 30%;border:1px solid #00E58D;color:#fff;background:#00E58D;font-size:24rpx} +.modal-box .modal .choice{width:94%;margin:15rpx 3% 10rpx 3%;font-size:30rpx;} +.bottom{width: 100%;height:100rpx;line-height:100rpx;position: fixed;background:#fff;bottom:0;left:0;display: flex;justify-content: start;} +.bottom .price{width:60%;padding-left:5%;font-size:24rpx;} +.bottom .price text{color:#F66A01;font-size:50rpx;} +.bottom .price text text{font-size:24rpx;} +.bottom .join{width:35%;text-align: center;color:#fff;background: #F66A01;} \ No newline at end of file diff --git a/pages/index/order/order.js b/pages/index/order/order.js new file mode 100644 index 0000000..67b5bf4 --- /dev/null +++ b/pages/index/order/order.js @@ -0,0 +1,231 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + groups:[ + {name:'洒洒水',tel:'13222222222',price:'200'}, + {name:'洒洒水',tel:'13222222222',price:'200'}, + ], + allTotal:400, + trueTotal:400, + checked:true, + id:'', + payType:'1', + orderId:'', + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var that = this; + console.log(options) + that.setData({ + id:options.id + }) + that.getOrderPeople(options.id); + // that.getOrderDetail(options.id); + }, + backChange:function(e){ + var that = this; + that.setData({ + payType:e.detail.value + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + getOrderPeople:function(id){ + var that = this; + var postData = { + orderSerial:that.data.id, + }; + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getOrderPeople(), postData, header).then((res) => { + console.log(res) + that.setData({ + orderId:res.data.data[0].orderId + }) + this.getOrderDetail(res.data.data[0].orderId) + }) + }, + getOrderDetail:function(id){ + var that = this; + var postData = { + orderId:id, + }; + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getOrderDetail(), postData, header).then((res) => { + console.log(res) + }) + }, + topay:function(){ + var that = this; + if(that.data.payType=='1'){ + that.getwxpay() + }else if(that.data.payType=='3'){ + that.walletpay(); + }else{ + that.getelsepay() + } + }, + getwxpay:function(id){ + var that = this; + let openId = wx.getStorageSync('openid') + var postData = { + orderSerial :that.data.id, + openId:openId, + realCost:'0.01', + body:'备注', + cost:'0.01', + payWay:that.data.payType, + subject:'我的订单' + }; + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getwxpay(), postData, header).then((res) => { + console.log(res.data.data) + wx.requestPayment( + { + 'timeStamp': res.data.data.timeStamp.toString(), + 'nonceStr': res.data.data.nonceStr, + 'package': res.data.data.package, + 'signType': 'MD5', + 'paySign': res.data.data.sign, + 'success':function(res){ + that.payokBack(); + wx.navigateTo({ + url: '../payOK/payok', + }) + }, + 'fail':function(res){ + console.log(res) + wx.showToast({ + title: res.errMsg, + icon: 'none', + duration: 1000 + }) + }, + }) + }) + }, + getelsepay:function(){ + var that = this; + let openId = wx.getStorageSync('openid') + var postData = { + orderSerial :that.data.id, + openId:openId, + realCost:'0.01', + body:'备注', + cost:'0.01', + payWay:that.data.payType, + subject:'我的订单' + }; + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getwxpay(), postData, header).then((res) => { + that.payokBack(); + wx.navigateTo({ + url: '../payOK/payok', + }) + }) + }, + payokBack:function(){ + var that = this; + var postData = { + orderSerial:that.data.id, + orderStatus:'1' + }; + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.payokBack(), postData, header).then((res) => { + console.log(res) + }) + }, + walletpay:function(){ + var that = this; + let openId = wx.getStorageSync('openid') + var postData = { + orderSerial :that.data.id, + openId:openId, + couponId:'', + realCost:'0.01', + body:'备注', + cost:'0.01', + realCost:'0.01', + subject:'我的订单' + }; + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.walletpay(), postData, header).then((res) => { + that.payokBack(); + wx.navigateTo({ + url: '../payOK/payok', + }) + }) + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/order/order.json b/pages/index/order/order.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/order/order.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/order/order.wxml b/pages/index/order/order.wxml new file mode 100644 index 0000000..b21ce81 --- /dev/null +++ b/pages/index/order/order.wxml @@ -0,0 +1,80 @@ + + + 【侗族侗年摄影】乐里侗年盛大活动-岜沙枪手部落-肇兴烟花夜景(全年仅此一批) + 开始时间:2020-10-10 08:00 至 2020-10-10 17:00 + + + + + 报名成员(2) + + + + + + {{item.name}}-{{item.tel}} + 费用项目¥{{item.price}} + + + + + + 总费用¥{{allTotal}} + + + 现金优惠券无可用 + + + + 实际应付¥{{trueTotal}} + + + + + + 选择支付 + + + + + + + + + + + 我同意《XXX服务协议》,并确认活动真实性,同意支付报名 + + + + 确定支付 + + \ No newline at end of file diff --git a/pages/index/order/order.wxss b/pages/index/order/order.wxss new file mode 100644 index 0000000..d32cda5 --- /dev/null +++ b/pages/index/order/order.wxss @@ -0,0 +1,24 @@ +.nav{width:100%;background:#fff;} +.nav .activetitle{font-size:32rpx;padding:32rpx 24rpx;} +.nav .activetime{font-size:24rpx;padding:0 24rpx 36rpx;color:#F66A01;text-align:center;} +.top{width:100%;background: #fff;margin-top:24rpx} +.top .other-top{height:92rpx;line-height:92rpx;font-size:32rpx;padding: 0 24rpx;} +.top .other-top image{height:36rpx;width:6rpx;vertical-align: middle;margin-right:16rpx;} +.groupList{width:100%;background: #fff;margin-bottom:24rpx;} +.groupList .list{padding:24rpx;} +.groupList .list .name{font-size:28rpx;padding-bottom:10rpx} +.groupList .list .price{display: flex;justify-content: space-between;color:#919191;font-size:24rpx;} +.groupList .list .price text{color:#F66A01;font-size:28rpx;} +.first{margin-top:24rpx;background:#fff;} +.total{display: flex;justify-content: space-between;padding:0 24rpx;height:88rpx;line-height:88rpx;font-size:28rpx;} +.total text{color:#F66A01;} +.total view image{width:32rpx;height:32rpx;transform:rotate(180deg);vertical-align:middle;margin-left:8rpx;} +.radio-box{width:100%;height:88rpx;line-height:88rpx} +.radio-box .radiocircle{display: flex;justify-content: space-between;padding:0 24rpx;font-size:28rpx} +.radio-box .radiocircle .name image{width:40rpx;height:40rpx;margin-right:12rpx;vertical-align:middle;} +radio,checkbox{transform:scale(0.6);} +.radio-box .radiocircle .name text{font-size:24rpx;color:#919191} +.agree{width:100%;margin-top:50rpx;font-size:24rpx;padding-left:12rpx;} +.agree text{color:#ffac0c} +.bottom{width:100%;margin-top:24rpx;background: #07C160;text-align: center;font-size:28rpx; + height:100rpx;line-height:100rpx;color:#fff;} \ No newline at end of file diff --git a/pages/index/payOK/payok.js b/pages/index/payOK/payok.js new file mode 100644 index 0000000..6bed454 --- /dev/null +++ b/pages/index/payOK/payok.js @@ -0,0 +1,70 @@ +// miniprogram/pages/center/payOk/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + backindex:function(){ + wx.switchTab({ + url: '/pages/index/index' + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/payOK/payok.json b/pages/index/payOK/payok.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/payOK/payok.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/payOK/payok.wxml b/pages/index/payOK/payok.wxml new file mode 100644 index 0000000..d4de75c --- /dev/null +++ b/pages/index/payOK/payok.wxml @@ -0,0 +1,8 @@ + + + + + + 支付成功! + +回到首页 \ No newline at end of file diff --git a/pages/index/payOK/payok.wxss b/pages/index/payOK/payok.wxss new file mode 100644 index 0000000..ccc4fd9 --- /dev/null +++ b/pages/index/payOK/payok.wxss @@ -0,0 +1,6 @@ +/* pages/payok/payok.wxss */ +.payok{width:100%;margin-top:20%;} +.payok .tu{margin:0 auto;width:140rpx} +.payok .tu image{width:140rpx;height:140rpx;} +.payok .word{line-height:80rpx;text-align:center;font-size:42rpx;margin-top:60rpx;} +.back{width:80%;height:70rpx;background:#d81e06;color:#fff;line-height:70rpx;text-align: center;border-radius:15rpx;margin:50rpx auto;font-size:32rpx;} \ No newline at end of file diff --git a/pages/index/rank/rank.js b/pages/index/rank/rank.js new file mode 100644 index 0000000..187094b --- /dev/null +++ b/pages/index/rank/rank.js @@ -0,0 +1,79 @@ +// pages/index/rank/rank.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + fourImages:[ + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'1',person:'22',low:'150',high:'300',rank:'01'}, + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'2',person:'22',low:'150',high:'300',rank:'02'}, + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'0',person:'22',low:'150',high:'300',rank:'03'}, + {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'1',person:'22',low:'150',high:'300',rank:'04'} + ], + }, + toactiveDetail:function(){ + wx.navigateTo({ + url: '../activeDetail/activeDetail' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/rank/rank.json b/pages/index/rank/rank.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/rank/rank.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/rank/rank.wxml b/pages/index/rank/rank.wxml new file mode 100644 index 0000000..7146fb8 --- /dev/null +++ b/pages/index/rank/rank.wxml @@ -0,0 +1,42 @@ + + + + 人气活动排行榜 + + + + + + + + + {{item.rank}} + {{item.rank}} + {{item.rank}} + {{item.rank}} + + + + {{item.title}} + + {{item.time}}{{item.week}} + | + {{item.day}}天 + | + {{item.lacation}} + + {{item.name}} + + + + + + {{item.person}}人已参加 + {{item.low}}~{{item.high}} + + + + + + + \ No newline at end of file diff --git a/pages/index/rank/rank.wxss b/pages/index/rank/rank.wxss new file mode 100644 index 0000000..cef20a5 --- /dev/null +++ b/pages/index/rank/rank.wxss @@ -0,0 +1,29 @@ +.nav{height:300rpx;width:100%;background: linear-gradient(135deg,#ffcb12, #ffa012); + border-bottom-left-radius: 150rpx; border-bottom-right-radius: 150rpx;position: absolute;top:0} +.nav .nav-title{height:60rpx;margin:44rpx auto;width:90%;color:#FFFFFF;font-size:44rpx;display: flex;justify-content: space-between;} +.nav .nav-title image{width:48rpx;height:48rpx;vertical-align: middle;} +.circle{position: absolute;top:144rpx;width:92%;left:4%;background: #fff; + border-radius:12rpx;overflow: hidden;} +.circle .noresult{width:100%;} +.circle .noresult .noimg{width:200rpx;height:170rpx;margin:0 auto;border:1px dashed #969798;display: block;} +.circle .noresult .noforword{font-size:24rpx;color:#ADADAD;margin:24rpx 0;display: block;text-align: center;} +.circle .noresult .club-list{width:100%;background-color:#F1F1F1;border-top:6rpx solid #F1F1F1;border-bottom:6rpx solid #f1f1f1} +.club-list .club{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.club-list .four-list{width:90%;padding:24rpx 5%;background:#fff;position: relative;margin:2rpx auto;display:flex;justify-content: start;border-bottom:2rpx solid #f1f1f1} +.club-list .four-list .bigimg{width:38%;height:182rpx;border-radius: 12rpx;} +.club-list .four-list .four-word{width:59%;margin-left:3%;} +.club-list .four-word .four-title{display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; +word-break:break-all;font-size:24rpx;color:#7E7B70;height:60rpx;line-height:30rpx;} +.club-list .four-word .four-log{height:40rpx;line-height:40rpx;font-size:18rpx;color:#C1C1C1;display: flex; +justify-content: space-between;width:80%} +.club-list .four-word .four-name{font-size:24rpx;color:#2A2A2A;line-height:40rpx;} +.club-list .four-word .four-name image{width:20rpx;height:20rpx;margin-left:10rpx;vertical-align: sub;} +.club-list .four-word .four-bottom{display: flex;justify-content: space-between;font-size:20rpx;color:#C9C9C9;height:40rpx;line-height:40rpx;} +.club-list .four-word .four-bottom .price{font-size:24rpx;color:#F66A01;font-weight:bold;} +.club-list .four-word .four-bottom .price text{font-size:18rpx;} +.topmark{position: absolute;left:0;top:-2rpx;width:100rpx;height:40rpx;line-height:40rpx;text-align: center;color:#fff;border-top-left-radius: 20rpx; border-bottom-right-radius: 80rpx;font-size:24rpx;} +.topmark image{width:22rpx;height:19rpx;vertical-align: middle;margin-right: 10rpx;} +.topOne{background: #F66A01;} +.topTwo{background: #FFCB12;} +.topThree{background: #85EF60;} +.topelse{background: #D0D0D0;} \ No newline at end of file diff --git a/pages/index/search/search.js b/pages/index/search/search.js new file mode 100644 index 0000000..062ba20 --- /dev/null +++ b/pages/index/search/search.js @@ -0,0 +1,94 @@ +// pages/index/search/search.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + historyList:['徒步','国庆出行','周末','五一出行','周末','徒步','国庆出行','周末','五一出行'], + searchOne:'', + noword:true, + yesword:false, + texts:'', + clubList:[ + {img:'../../../images/logo.jpg',title:'众游天下',intro:'简介简介简介行在路上乐在其中!行在路上乐在...',num:'2',user:'2'} + ,{img:'../../../images/logo.jpg',title:'众游天下',intro:'简介简介简介行在路上乐在其中!行在路上乐在...',num:'2',user:'1'} + ,{img:'../../../images/logo.jpg',title:'众游天下',intro:'简介简介简介行在路上乐在其中!行在路上乐在...',num:'2',user:'3'} + ], + fourImages:[ + // {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + // week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'1',person:'22',low:'150',high:'300'}, + // {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + // week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'2',person:'22',low:'150',high:'300'}, + // {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + // week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'0',person:'22',low:'150',high:'300'}, + // {img:'/images/logo.jpg',title:'冰雪漠河·一路向北12-2月吉林市,“雪国列车行走雪国列车行走"',time:'10/25', + // week:'周日',day:'1',lacation:'四川.成都',name:'超级凶呀',user:'1',person:'22',low:'150',high:'300'} + ], + }, + toclub:function(){ + wx.navigateTo({ + url: '../club/club' + }) + }, + toactive:function(){ + wx.navigateTo({ + url: '../active/active' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/search/search.json b/pages/index/search/search.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/search/search.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/search/search.wxml b/pages/index/search/search.wxml new file mode 100644 index 0000000..3807736 --- /dev/null +++ b/pages/index/search/search.wxml @@ -0,0 +1,148 @@ + + + + + + + + + + + + 搜索 + + + + + + + + + 猜你喜欢 + + + + + + + + + {{item.title}} + + {{item.time}}{{item.week}} + | + {{item.day}}天 + | + {{item.lacation}} + + {{item.name}} + + + + + + {{item.person}}人已参加 + {{item.low}}~{{item.high}} + + + + + + + + 查看更多 + + + + \ No newline at end of file diff --git a/pages/index/search/search.wxss b/pages/index/search/search.wxss new file mode 100644 index 0000000..4dbeae3 --- /dev/null +++ b/pages/index/search/search.wxss @@ -0,0 +1,75 @@ +page{background:#FFFFFF;} +.nav{width:100%;padding:16rpx 0;background:#FFCB12;} +.search{height:64rpx;width:90%;margin:0 auto;display:flex;justify-content: start;} +.search .search-box{width:85%;border-radius: 180rpx;background-color:#fff;height:100%;margin:0 auto;display:flex;justify-content: start;} +.search .search-box .search-icon{width:70rpx;height:100%;} +.search .search-box .search-icon image{width:32rpx;height:32rpx;padding:16rpx 0rpx 16rpx 38rpx;} +.search .search-box .search-input{width:580rpx;} +.search .search-box .search-input input{height:100%;width:90%;padding-left:10rpx} +.search .search-word{width:15%;font-size:28rpx;line-height:64rpx;text-align: right;} +.search-title{width:94%;margin:0 auto;height:90rpx;line-height:90rpx;display:flex;justify-content: space-between;font-size:30rpx;} +.search-title text{font-size:24rpx;color:#7C7C7C} +.history{width:94%;margin:15rpx auto;} +.history text{font-size: 28rpx;height:40rpx;line-height:40rpx;padding:8rpx 40rpx;display:inline-block;background: #ffffff; + border: 1rpx solid #cfcfcf;border-radius: 61rpx;margin:0 12rpx 12rpx 0;color:#B0B0B0} +.yesword{width:100%} +.yesword .noresult{width:100%;} +.yesword .noresult .noimg{width:200rpx;height:170rpx;margin:0 auto;border:1px dashed #969798;display: block;} +.yesword .noresult .noforword{font-size:24rpx;color:#ADADAD;margin:24rpx 0;display: block;text-align: center;} +.yesword .noresult .club-list{width:100%;background-color:#F1F1F1;border-top:6rpx solid #F1F1F1;border-bottom:6rpx solid #f1f1f1} +.club-list .club{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.club-list .club .club-left{width:28%;} +.club-list .club .club-left image{width:100%;height:144rpx;border-radius:8rpx;} +.club-list .club .club-right{width:69%;margin-left:3%;} +.club-list .club .club-right .right-title{color:#F66A01;font-size:32rpx;line-height:45rpx;} +.club-list .club .club-right .right-title image{width:28rpx;height:28rpx;margin-left:10rpx;vertical-align: middle;} +.club-list .club .club-right .right-intro{color:#878787;font-size:28rpx;line-height:40rpx;word-break:keep-all; + white-space:nowrap;overflow:hidden; text-overflow:ellipsis;} +.club-list .club .club-right .right-num{color:#A3A3A3;font-size:24rpx;padding-top:24rpx;} +.more{width:100%;height:64rpx;background:#fff;line-height:64rpx;display: flex;justify-content: center;} +.more .more-left{height:2rpx;width:90rpx;background: linear-gradient(to left, #000000, #f1f1f1);margin-top:30rpx} +.more .more-word{width:150rpx;text-align: center;font-size:20rpx;color:#A5A5A5} +.more .more-right{height:2rpx;width:90rpx;background: linear-gradient(to left, #f1f1f1, #000000);margin-top:30rpx} +.club-list .four-list{width:90%;padding:24rpx 5%;background:#fff;margin:2rpx auto;display:flex;justify-content: start;} +.club-list .four-list .bigimg{width:38%;height:182rpx;border-radius: 12rpx;} +.club-list .four-list .four-word{width:59%;margin-left:3%;} +.club-list .four-word .four-title{display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; +word-break:break-all;font-size:24rpx;color:#7E7B70;height:60rpx;line-height:30rpx;} +.club-list .four-word .four-log{height:40rpx;line-height:40rpx;font-size:18rpx;color:#C1C1C1;display: flex; +justify-content: space-between;width:80%} +.club-list .four-word .four-name{font-size:24rpx;color:#2A2A2A;line-height:40rpx;} +.club-list .four-word .four-name image{width:20rpx;height:20rpx;margin-left:10rpx;vertical-align: sub;} +.club-list .four-word .four-bottom{display: flex;justify-content: space-between;font-size:20rpx;color:#C9C9C9;height:40rpx;line-height:40rpx;} +.club-list .four-word .four-bottom .price{font-size:24rpx;color:#F66A01;font-weight:bold;} +.club-list .four-word .four-bottom .price text{font-size:18rpx;} +.wonderful{width:100%;background: #FAFAFA;padding:5rpx 0;} +.wonderful .wonder-name{width:90%;margin:22rpx auto;height:50rpx;line-height: 50rpx;display: flex;justify-content: space-between;} +.wonderful .wonderful-title{display: flex;justify-content: start;} +.wonderful .wonderful-title .name{font-size:36rpx;color:#FFCB12} +.wonderful .wonderful-title .names{font-size:36rpx;} +.wonderful .wonderful-title image{width:42rpx;height:42rpx;vertical-align: sub;} +.wonderful .wonder-more{color:#F66A01;font-size: 24rpx;} +.wonderful .wonder-more image{width:28rpx;height:28rpx;vertical-align: sub;} +.wonderful .wonder-view{width:90%;margin:20rpx auto;display: flex;justify-content: space-around;} +.wonderful .wonder-view .wonder-list{width:31%;background: #ffffff;border-radius: 16rpx;box-shadow: 0px 8rpx 8rpx 0px rgba(0,0,0,0.05)} +.wonderful .wonder-view .wonder-list .list-top{width:128rpx;height:128rpx;margin:36rpx auto;position: relative;} +.wonderful .wonder-view .wonder-list .list-top .top-ava{width:100%;height:100%;border-radius:50%;} +.wonderful .wonder-view .wonder-list .list-top .top-log{position: absolute;bottom:0;right:0;width:20rpx;height:20rpx;} +.wonderful .wonder-view .wonder-list .list-view{padding:5rpx 20rpx;} +.wonderful .wonder-view .wonder-list .list-view .list-name{font-size:30rpx;text-align:center;} +.wonderful .wonder-view .wonder-list .list-view .list-intro{color:#AEAEAE;font-size:22rpx;overflow: hidden;display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; + word-break:break-all;} +.wonderful .wonder-view .wonder-list .list-view .join{height:56rpx;line-height: 56rpx;color:#FF6C01;background: #fdf6ec;border: 2rpx solid #ff6c01; + border-radius: 148rpx; box-shadow: 0px 8rpx 8rpx 0px rgba(0,0,0,0.05);width:90%;margin:20rpx auto;text-align: center; font-size:28rpx;} +.wonderful .youlike-view{display: flex;justify-content: space-between;flex-wrap: wrap;margin:20rpx auto;width:90%} +.four-list{width:48%;border-radius:16rpx;overflow: hidden;margin-bottom:22rpx;background: #ffffff;box-shadow: 0px 8px 8px 0px rgba(0,0,0,0.04);} +.four-list .bigimg{width:100%;height:228rpx;} +.four-list .four-word{padding: 5rpx 10rpx 10rpx;} +.four-word .four-title{overflow: hidden;display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; + word-break:break-all;font-size:24rpx;color:#7E7B70;line-height:38rpx;} +.four-word .four-log{height:40rpx;line-height:40rpx;font-size:18rpx;color:#C1C1C1;display: flex;justify-content: space-between;} +.four-word .four-name{font-size:24rpx;color:#2A2A2A;line-height:40rpx;} +.four-word .four-name image{width:20rpx;height:20rpx;margin-left:10rpx;vertical-align: sub;} +.four-word .four-bottom{display: flex;justify-content: space-between;font-size:20rpx;color:#C9C9C9;height:40rpx;line-height:40rpx;} +.four-word .four-bottom text{font-size:24rpx;color:#F66A01;font-weight:bold;} +.four-word .four-bottom text text{font-size:18rpx;} \ No newline at end of file diff --git a/pages/index/teamJoin/teamJoin.js b/pages/index/teamJoin/teamJoin.js new file mode 100644 index 0000000..5ea5e36 --- /dev/null +++ b/pages/index/teamJoin/teamJoin.js @@ -0,0 +1,77 @@ +// pages/index/teamJoin/teamJoin.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + detail:{title:'【侗族侗年摄影】乐里侗年',startTime:'2020-10-10',endTime:'2020-10-10 至 2020-12-10',leader:'张三', + deadline:'2020-10-10 12:00',people:'100',guanprice:'128',teamprice:'108'}, + people:12, + personList:[ + {img:'../../../images/ava.png',name:'李三',time:'2020-10-10 12:00'}, + {img:'../../../images/ava.png',name:'李三',time:'2020-10-10 12:00'}, + {img:'../../../images/ava.png',name:'李三',time:'2020-10-10 12:00',help:'1',helpname:'张可'}, + ], + }, + tojion:function(){ + wx.navigateTo({ + url: '../myjoin/myjoin' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/index/teamJoin/teamJoin.json b/pages/index/teamJoin/teamJoin.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/teamJoin/teamJoin.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/teamJoin/teamJoin.wxml b/pages/index/teamJoin/teamJoin.wxml new file mode 100644 index 0000000..5cceca4 --- /dev/null +++ b/pages/index/teamJoin/teamJoin.wxml @@ -0,0 +1,60 @@ + + + + + + 活动名称{{detail.title}} + + + 活动时间{{detail.startTime}} 至 {{detail.endTime}} + + + 发起人{{detail.leader}} + + + 报名截止时间{{detail.deadline}} + + + 人数限制{{detail.people}} + + + + + + + 官方价格{{detail.guanprice}}起 + + + 团报价格{{detail.teamprice}}起 + + + + + + 已报名{{people}}人 + + + + + + + + + {{item.name}}{{item.helpname}}帮报名 + {{item.time}} + + 选择费用项 + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/index/teamJoin/teamJoin.wxss b/pages/index/teamJoin/teamJoin.wxss new file mode 100644 index 0000000..9038891 --- /dev/null +++ b/pages/index/teamJoin/teamJoin.wxss @@ -0,0 +1,24 @@ +.banner{width:100%;height: 400rpx;z-index: 1;} +.banner image{width:100%;height:100%;z-index: 1;} +.detail{width:100%;border-bottom:2rpx solid #F1F1F1;background:#fff;padding:12rpx 0;} +.detail .detail-circle{padding:12rpx 24rpx;} +.detail .detail-circle view{display: flex;justify-content: space-between;color:#A5A5A5;font-size:28rpx;height:60rpx;line-height:60rpx;} +.detail .detail-circle view text{color:#626262;} +.detail .detail-circle .price text{color:#F66A01} +.hei{width:100%;height:14rpx;background: #FAFAFA;} +.content{width:94%;padding:0 3% 130rpx 3%;background:#fff;} +.content .content-title{height:64rpx;line-height:64rpx;padding:12rpx 0;color:#626262} +.circle{width:100%;padding:24rpx 0;} +.circle .circle-list{width:100%;border-bottom:2rpx solid #F5F5F5;display: flex;padding:24rpx 0;} +.circle .circle-list .list-left{width:20%;} +.circle .circle-list .list-left image{width:112rpx;height:112rpx;border-radius:50%;} +.circle .circle-list .list-right{width:80%;} +.circle .circle-list .list-right .right-top{display: flex;justify-content: space-between;height:60rpx;line-height:60rpx;} +.circle .circle-list .list-right .right-top .name{font-size:32rpx;} +.circle .circle-list .list-right .right-top .name text{font-size:24rpx;margin-left:20rpx;background: #FF6C01;padding:6rpx 16rpx;color:#fff;border-radius:16rpx;} +.circle .circle-list .list-right .right-top .time{font-size:24rpx;color:#C7C7C7} +.circle .circle-list .list-right .right-bottom{height:52rpx;line-height:52rpx;color:#F66A01;font-size:26rpx;} +.bottom{width:100%;position: fixed;bottom:0;left:0;background:#fff;} +.bottom-circle{width:100%;height:80rpx;line-height:80rpx;color:#fff;text-align:center;font-size:32rpx;margin:24rpx auto;display: flex;justify-content: space-around;} +.bottom-circle .share{width:288rpx;height:80rpx;border:2rpx solid #FFCB12;color:#F66A01;background:#FFFBD6;border-radius: 12rpx;} +.bottom-circle .share image{width:40rpx;height:40rpx;vertical-align: sub;margin-right:12rpx} diff --git a/pages/login.js b/pages/login.js new file mode 100644 index 0000000..75b3030 --- /dev/null +++ b/pages/login.js @@ -0,0 +1,80 @@ +require('../app.js'); +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + canIUse: wx.canIUse('button.open-type.getUserInfo'), + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + wx.getSetting({ + success(res) { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称 + // wx.getUserInfo({ + // success(res) { + // console.log(res.userInfo) + // } + // }) + } + } + }) + }, + bindGetUserInfo: function(e) { + app.getUser(); + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/login.json b/pages/login.json new file mode 100644 index 0000000..97e7bd6 --- /dev/null +++ b/pages/login.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "授权登录" +} \ No newline at end of file diff --git a/pages/login.wxml b/pages/login.wxml new file mode 100644 index 0000000..c749540 --- /dev/null +++ b/pages/login.wxml @@ -0,0 +1,17 @@ + + + + + + + + 申请获取以下权限 + 获得你的公开信息(昵称,头像等) + + + + + +请升级微信版本 \ No newline at end of file diff --git a/pages/login.wxss b/pages/login.wxss new file mode 100644 index 0000000..0ca2c5e --- /dev/null +++ b/pages/login.wxss @@ -0,0 +1,27 @@ +/* miniprogram/pages/login.wxss */ +.header {margin: 90rpx 0 90rpx 50rpx; + border-bottom: 1px solid #ccc; + text-align: center; + width: 650rpx; + height: 300rpx; + line-height: 450rpx; +} + +.header image { + width: 300rpx; + height: 200rpx; +} + +.content { + margin-left: 50rpx; + margin-bottom: 90rpx; + font-size:30rpx; +} + +.content text { + display: block; + color: #9d9d9d; + margin-top: 40rpx; +} + +.bottom {border-radius: 80rpx;margin: 70rpx 50rpx;font-size: 35rpx;} diff --git a/pages/logs/logs.js b/pages/logs/logs.js new file mode 100644 index 0000000..3c7cb60 --- /dev/null +++ b/pages/logs/logs.js @@ -0,0 +1,15 @@ +// logs.js +const util = require('../../utils/util.js') + +Page({ + data: { + logs: [] + }, + onLoad() { + this.setData({ + logs: (wx.getStorageSync('logs') || []).map(log => { + return util.formatTime(new Date(log)) + }) + }) + } +}) diff --git a/pages/logs/logs.json b/pages/logs/logs.json new file mode 100644 index 0000000..3ee76c1 --- /dev/null +++ b/pages/logs/logs.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "查看启动日志", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/logs/logs.wxml b/pages/logs/logs.wxml new file mode 100644 index 0000000..b5a85ac --- /dev/null +++ b/pages/logs/logs.wxml @@ -0,0 +1,6 @@ + + + + {{index + 1}}. {{log}} + + diff --git a/pages/logs/logs.wxss b/pages/logs/logs.wxss new file mode 100644 index 0000000..94d4b88 --- /dev/null +++ b/pages/logs/logs.wxss @@ -0,0 +1,8 @@ +.log-list { + display: flex; + flex-direction: column; + padding: 40rpx; +} +.log-item { + margin: 10rpx; +} diff --git a/pages/message/activemessage/activemessage.js b/pages/message/activemessage/activemessage.js new file mode 100644 index 0000000..fde4804 --- /dev/null +++ b/pages/message/activemessage/activemessage.js @@ -0,0 +1,72 @@ +// pages/message/activemessage/activemessage.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + activeMe:[ + {status:'1',title:'出去耍',money:'2555',name:'张三',people:'22',intro:'已发送'}, + {status:'3',title:'出去耍',money:'2555',name:'张三',people:'22',intro:'已报名'}, + {status:'2',title:'出去耍',money:'2555',name:'张三',people:'22',intro:'已退费'}, + {status:'3',title:'出去耍',money:'2555',name:'张三',people:'22',intro:'已报名'}, + {status:'1',title:'出去耍',money:'2555',name:'张三',people:'22',intro:'已发送'}, + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/message/activemessage/activemessage.json b/pages/message/activemessage/activemessage.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/message/activemessage/activemessage.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/message/activemessage/activemessage.wxml b/pages/message/activemessage/activemessage.wxml new file mode 100644 index 0000000..d397fd5 --- /dev/null +++ b/pages/message/activemessage/activemessage.wxml @@ -0,0 +1,33 @@ + + + + 活动消息 + + + + + + 报名信息{{item.intro}} + + + + 活动名称:{{item.title}} + + + 选择费用:{{item.money}} + + + 报名人:{{item.name}} + + + 活动人数:{{item.people}} + + + 通过 + 不通过 + + + + + + \ No newline at end of file diff --git a/pages/message/activemessage/activemessage.wxss b/pages/message/activemessage/activemessage.wxss new file mode 100644 index 0000000..f9edc26 --- /dev/null +++ b/pages/message/activemessage/activemessage.wxss @@ -0,0 +1,14 @@ +.nav{height:92rpx;line-height:92rpx;font-size:34rpx;padding: 0 6%;background:#fff;box-shadow: 0px 6px 6px 0px rgba(0,0,0,0.04); } +.nav image{height:36rpx;width:6rpx;vertical-align: middle;margin-right:16rpx;} +.cluber{width:100%;padding:12rpx 0;} +.cluber .list{width:94%;background: #fff;margin:24rpx auto;border-radius: 12px; + box-shadow: 0px 8px 20px 0px rgba(97,97,97,0.05); } +.cluber .list .list-top{height:80rpx;display: flex;justify-content: space-between;padding:0 24rpx;line-height:80rpx;font-size:28rpx;} +.cluber .list .list-top text{color:#BCBCBC} +.cluber .list .list-content{padding:24rpx;border-top:2rpx solid #F1F1F1;} +.cluber .list .list-content .content-one{display: flex;justify-content: space-between;padding:12rpx 0;color:#8C8C8C} +.cluber .list .list-content .content-one text{color:#8C8C8C} +.ifpass{width:100%;margin-top:24rpx;display: flex;justify-content: space-around;} +.ifpass view{width:200rpx;height:64rpx;line-height:64rpx;color:#fff;text-align: center;border-radius:68rpx;} +.pass{background: #FFC700;} +.nopass{background: #F66A01;} \ No newline at end of file diff --git a/pages/message/clubmessage/clubmessage.js b/pages/message/clubmessage/clubmessage.js new file mode 100644 index 0000000..dbdf7fe --- /dev/null +++ b/pages/message/clubmessage/clubmessage.js @@ -0,0 +1,72 @@ +// pages/message/clubmessage/clubmessage.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + cluber:[ + {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'1'}, + {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'2'}, + {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'2'}, + {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'3'}, + {clubname:'众行天下',time:'3小时前',img:'../../../images/ava.png',name:'王华',content:'会员邀请加入',status:'1'} + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/message/clubmessage/clubmessage.json b/pages/message/clubmessage/clubmessage.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/message/clubmessage/clubmessage.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/message/clubmessage/clubmessage.wxml b/pages/message/clubmessage/clubmessage.wxml new file mode 100644 index 0000000..8b5f2cf --- /dev/null +++ b/pages/message/clubmessage/clubmessage.wxml @@ -0,0 +1,30 @@ + + + + 俱乐部消息 + + + + + + {{item.clubname}}{{item.time}} + + + + + {{item.name}} + + + 会员邀请加入 + + + 被设为管理员 + + + 被撤销管理员 + + + + + + \ No newline at end of file diff --git a/pages/message/clubmessage/clubmessage.wxss b/pages/message/clubmessage/clubmessage.wxss new file mode 100644 index 0000000..e091a15 --- /dev/null +++ b/pages/message/clubmessage/clubmessage.wxss @@ -0,0 +1,13 @@ +.nav{height:92rpx;line-height:92rpx;font-size:34rpx;padding: 0 6%;background:#fff;box-shadow: 0px 6px 6px 0px rgba(0,0,0,0.04); } +.nav image{height:36rpx;width:6rpx;vertical-align: middle;margin-right:16rpx;} +.cluber{width:100%;padding:12rpx 0;} +.cluber .list{width:94%;height:224rpx;background: #fff;margin:24rpx auto;border-radius: 12px; + box-shadow: 0px 8px 20px 0px rgba(97,97,97,0.05); } +.cluber .list .list-top{height:80rpx;display: flex;justify-content: space-between;padding:0 24rpx;line-height:80rpx;font-size:28rpx;} +.cluber .list .list-top text{color:#BCBCBC} +.cluber .list .list-content{height:96rpx;line-height:96rpx;padding:24rpx;border-top:2rpx solid #F1F1F1;display: flex;justify-content: space-between;} +.cluber .list .list-content .content-left{font-size:32rpx;} +.cluber .list .list-content .content-left image{width:96rpx;height:96rpx;margin-right:16rpx;vertical-align:middle;} +.cluber .list .list-content .statusIn{font-size:26rpx;color:#F66A01} +.cluber .list .list-content .statusMa{font-size:26rpx;color:#00C777} +.cluber .list .list-content .statusOut{font-size:26rpx;color:#ADADAD} \ No newline at end of file diff --git a/pages/message/hostmessage/hostmessage.js b/pages/message/hostmessage/hostmessage.js new file mode 100644 index 0000000..b312fcb --- /dev/null +++ b/pages/message/hostmessage/hostmessage.js @@ -0,0 +1,66 @@ +// pages/message/hostmessage/hostmessage.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/message/hostmessage/hostmessage.json b/pages/message/hostmessage/hostmessage.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/message/hostmessage/hostmessage.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/message/hostmessage/hostmessage.wxml b/pages/message/hostmessage/hostmessage.wxml new file mode 100644 index 0000000..d4a517b --- /dev/null +++ b/pages/message/hostmessage/hostmessage.wxml @@ -0,0 +1,6 @@ + + + + 客服消息 + + \ No newline at end of file diff --git a/pages/message/hostmessage/hostmessage.wxss b/pages/message/hostmessage/hostmessage.wxss new file mode 100644 index 0000000..e21240e --- /dev/null +++ b/pages/message/hostmessage/hostmessage.wxss @@ -0,0 +1,2 @@ +.nav{height:92rpx;line-height:92rpx;font-size:34rpx;padding: 0 6%;background:#fff;box-shadow: 0px 6px 6px 0px rgba(0,0,0,0.04); } +.nav image{height:36rpx;width:6rpx;vertical-align: middle;margin-right:16rpx;} \ No newline at end of file diff --git a/pages/message/message.js b/pages/message/message.js new file mode 100644 index 0000000..47e6e31 --- /dev/null +++ b/pages/message/message.js @@ -0,0 +1,160 @@ +var Api = require('../../utils/common.js'); +var re = require('../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + club:{time:'18:17',content:'双哥哥:会员成功加入',pay:'微信'}, + order:{time:'10-20 18:17',content:'您的订单已完成'}, + system:{time:'10-20 18:17',content:'提现成功'}, + active:{time:'10-20 18:17',content:'您有一个新的活动'}, + host:{time:'10-20 18:17',content:'您好'}, + }, + toclub:function(){ + wx.navigateTo({ + url: './clubmessage/clubmessage' + }) + }, + toorder:function(){ + wx.navigateTo({ + url: '../center/order/order' + }) + }, + tosystem:function(){ + wx.navigateTo({ + url: './sysmessage/sysmessage' + }) + }, + toactive:function(){ + wx.navigateTo({ + url: './activemessage/activemessage' + }) + }, + tohost:function(){ + wx.navigateTo({ + url: './hostmessage/hostmessage' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.activeMassage(); + this.orderMassage(); + this.sysMassage(); + this.clubMassage(); + }, + activeMassage:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl') + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + var postData = { + pageSize: 3, + } + re.request(Api.activeMassage(), postData, header).then((res) => { + let datas = res.data.data; + that.setData({ + active:datas[0], + }) + }) + }, + orderMassage:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl') + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.orderMassage(), '', header).then((res) => { + console.log(res) + let datas = res.data.data; + that.setData({ + order:datas[0], + }) + }) + }, + sysMassage:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl') + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.sysMassage(), '', header).then((res) => { + console.log(res) + let datas = res.data.data; + that.setData({ + system:datas[0], + }) + }) + }, + clubMassage:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl') + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.clubMassage(), '', header).then((res) => { + console.log(res) + let datas = res.data.data; + that.setData({ + club:datas[0], + }) + }) + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/message/message.json b/pages/message/message.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/message/message.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/message/message.wxml b/pages/message/message.wxml new file mode 100644 index 0000000..e958944 --- /dev/null +++ b/pages/message/message.wxml @@ -0,0 +1,73 @@ + + + + + + + + + 订单消息{{order.createdTime}} + + + 订单待支付 + 订单支付成功 + 订单超时未支付 + 订单已取消 + 订单等待审核 + + + + + + + + + + + 活动消息{{active.createdTime}} + + + {{active.massageTitle}} + + + + + + + \ No newline at end of file diff --git a/pages/message/message.wxss b/pages/message/message.wxss new file mode 100644 index 0000000..03484bb --- /dev/null +++ b/pages/message/message.wxss @@ -0,0 +1,11 @@ +.container{background: #fff;} +.list{width:94%;padding:26rpx 3%;height:96rpx;display: flex;justify-content: start;} +.list .list-left{width:17%;} +.list .list-left image{width:96rpx;height:96rpx} +.list .list-right{width:83%;} +.list .list-right .right-top{width:100%;height:42rpx;line-height:42rpx;display: flex;justify-content: space-between;font-size:30rpx;} +.list .list-right .right-top text{color:#B4B4B4;font-size:24rpx;} +.list .list-right .right-content{width:100%;padding-top:16rpx;font-size:24rpx;color:#B1B1B1;display: flex;justify-content: space-between;} +.list .list-right .right-content text{color:#00C777} +button{background:#fff;border:none;padding-left:0;padding-right:0;display:inline;text-align: left;width:100%;display: flex;justify-content: start;} +button::after{width:100%;border:none;} \ No newline at end of file diff --git a/pages/message/sysmessage/sysmessage.js b/pages/message/sysmessage/sysmessage.js new file mode 100644 index 0000000..4853c38 --- /dev/null +++ b/pages/message/sysmessage/sysmessage.js @@ -0,0 +1,71 @@ +// pages/message/sysmessage/sysmessage.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + sysList:[ + {time:'08-31 14:50',title:'俱乐部申请通过',content:'您创建的俱乐部已通过审核,可以使用提现功能,请遵守国家法律法规,文明发布活动。'}, + {time:'08-31 14:50',title:'俱乐部申请通过',content:'您创建的俱乐部未通过审核,原因:(后台变量),请修改后重新提交。'}, + {time:'08-31 14:50',title:'俱乐部申请通过',content:'您的提现申请已经审核中,请耐心等待。'}, + {time:'08-31 14:50',title:'俱乐部申请通过',content:'您申请的42.30元提现,已经提现到钱包,请注意查收。'}, + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/message/sysmessage/sysmessage.json b/pages/message/sysmessage/sysmessage.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/message/sysmessage/sysmessage.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/message/sysmessage/sysmessage.wxml b/pages/message/sysmessage/sysmessage.wxml new file mode 100644 index 0000000..1dbe3e5 --- /dev/null +++ b/pages/message/sysmessage/sysmessage.wxml @@ -0,0 +1,18 @@ + + + + 系统消息 + + + + + + {{item.title}}{{item.time}} + + + {{item.content}} + + + + + \ No newline at end of file diff --git a/pages/message/sysmessage/sysmessage.wxss b/pages/message/sysmessage/sysmessage.wxss new file mode 100644 index 0000000..4178a3e --- /dev/null +++ b/pages/message/sysmessage/sysmessage.wxss @@ -0,0 +1,8 @@ +.nav{height:92rpx;line-height:92rpx;font-size:34rpx;padding: 0 6%;background:#fff;box-shadow: 0px 6px 6px 0px rgba(0,0,0,0.04); } +.nav image{height:36rpx;width:6rpx;vertical-align: middle;margin-right:16rpx;} +.system{width:100%;padding:12rpx 0;} +.system .list{width:94%;background: #fff;margin:24rpx auto;border-radius: 12px; + box-shadow: 0px 8px 20px 0px rgba(97,97,97,0.05); } +.system .list .list-top{height:80rpx;display: flex;justify-content: space-between;padding:0 24rpx;line-height:80rpx;font-size:28rpx;} +.system .list .list-top text{color:#BCBCBC;font-size:24rpx;} +.system .list .list-content{line-height:40rpx;font-size:24rpx;padding:24rpx;border-top:2rpx solid #F1F1F1;color:#696969} diff --git a/pages/picker/picker.js b/pages/picker/picker.js new file mode 100644 index 0000000..aae3cca --- /dev/null +++ b/pages/picker/picker.js @@ -0,0 +1,43 @@ +var dateTimePicker = require('../dateTimePicker.js') +Page({ + data: { + dateTime:'', + dateTimeArray:'', + startT:'' + }, + + onLoad: function (options) { + + var start = '2019-04-26 15:26' + + var obj = dateTimePicker.dateTimePicker(2015,2020,start); + + this.setData({ + dateTime: obj.dateTime, + dateTimeArray: obj.dateTimeArray + }); + + var startT = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray,this.data.dateTime) + console.log(startT); + + this.setData({ + startT: startT + }) + + }, + //获取时间日期 + changeDateTime(e) { + + this.setData({ + dateTime: e.detail.value + }) + + var startT = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray, this.data.dateTime) + + this.setData({ + startT: startT + }) + }, + +}) + \ No newline at end of file diff --git a/pages/picker/picker.json b/pages/picker/picker.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/picker/picker.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/picker/picker.wxml b/pages/picker/picker.wxml new file mode 100644 index 0000000..a3cc95f --- /dev/null +++ b/pages/picker/picker.wxml @@ -0,0 +1,7 @@ + + 日期时间 + + {{startT}} + + + diff --git a/pages/picker/picker.wxss b/pages/picker/picker.wxss new file mode 100644 index 0000000..da103e5 --- /dev/null +++ b/pages/picker/picker.wxss @@ -0,0 +1 @@ +/* pages/picker/picker.wxss */ \ No newline at end of file diff --git a/pages/rank/rank.js b/pages/rank/rank.js new file mode 100644 index 0000000..feec6e5 --- /dev/null +++ b/pages/rank/rank.js @@ -0,0 +1,66 @@ +// pages/rank/rank.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/rank/rank.json b/pages/rank/rank.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/rank/rank.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/rank/rank.wxml b/pages/rank/rank.wxml new file mode 100644 index 0000000..7724521 --- /dev/null +++ b/pages/rank/rank.wxml @@ -0,0 +1 @@ +暂无 \ No newline at end of file diff --git a/pages/rank/rank.wxss b/pages/rank/rank.wxss new file mode 100644 index 0000000..61469b4 --- /dev/null +++ b/pages/rank/rank.wxss @@ -0,0 +1 @@ +/* pages/rank/rank.wxss */ \ No newline at end of file diff --git a/pages/release/activeSign/activeSign.js b/pages/release/activeSign/activeSign.js new file mode 100644 index 0000000..92afef0 --- /dev/null +++ b/pages/release/activeSign/activeSign.js @@ -0,0 +1,145 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + logo:'../../../images/logo.jpg', + otheractive:[ + {img:'../../../images/logo.jpg',intro:'欢乐游园亲子活动,全家人一起畅游欢乐谷,享受天...',time:'2020-10-13 07:00',name:'动感光波',views:'123',share:'22',issign:true,times:1,total:9}, + {img:'../../../images/logo.jpg',intro:'欢乐游园亲子活动,全家人一起畅游欢乐谷,享受天...',time:'2020-10-13 07:00',name:'动感光波',views:'123',share:'22',issign:false}, + {img:'../../../images/logo.jpg',intro:'欢乐游园亲子活动,全家人一起畅游欢乐谷,享受天...',time:'2020-10-13 07:00',name:'动感光波',views:'123',share:'22',issign:true} + ], + navTab: ['可签到','已签到'], + currentTab: 0, + }, + currentTab: function (e) { + var that = this; + if (that.data.currentTab == e.currentTarget.dataset.idx){ + return; + } + that.setData({ + currentTab: e.currentTarget.dataset.idx, + }) + if(e.currentTarget.dataset.idx==1){ + that.getSigningList(); + }else{ + that.getcanSignList(); + } + }, + tocode:function(){ + wx.navigateTo({ + url: '../scave/scave' + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + getSigningList:function(){ + var that = this; + const imgUrl = wx.getStorageSync('imgUrl'); + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getSigningList(), '', header).then((res) => { + let datas = res.data.data; + for(let i=0;i { + let datas = res.data.data; + for(let i=0;i { + wx.showToast({ + title: '操作成功', + icon: 'none' + }) + this.getcanSignList(); + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getcanSignList(); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/release/activeSign/activeSign.json b/pages/release/activeSign/activeSign.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/release/activeSign/activeSign.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/release/activeSign/activeSign.wxml b/pages/release/activeSign/activeSign.wxml new file mode 100644 index 0000000..742cbea --- /dev/null +++ b/pages/release/activeSign/activeSign.wxml @@ -0,0 +1,38 @@ + + + + {{item}} + + + + + + + + + + + + + {{item.activityName}} + {{item.activityAddr}} + {{item.startTime}} + 发起签到 + 今日签到 + + + + + 第{{item.times}}次签到 + 已签到{{item.times}}/{{item.total}} + 进行中 + + + + + + \ No newline at end of file diff --git a/pages/release/activeSign/activeSign.wxss b/pages/release/activeSign/activeSign.wxss new file mode 100644 index 0000000..88dcf68 --- /dev/null +++ b/pages/release/activeSign/activeSign.wxss @@ -0,0 +1,24 @@ +.nav{z-index: 4; position: fixed; top:0;left:0;width:100%;height:100rpx;line-height:100rpx;background:#fff;} +.nav .navtop{width:70%;margin:0 auto;display:flex;box-sizing: border-box;} +.navtop> view{text-align:center;width:50%;} +.navtop> view text{height:70rpx; display:inline-block;line-height: 70rpx;color:#979797;font-size: 32rpx;} +.navtop .cur text{ border-bottom:4rpx solid #FE4C00; color:#494949;font-size: 34rpx;} +.other{width:100%;background: #fff;margin-top:100rpx;} +.last{margin-bottom:120rpx;} +.other .other-top{height:92rpx;line-height:92rpx;font-size:32rpx;padding: 0 6%;} +.other .other-top image{height:36rpx;width:6rpx;vertical-align: middle;margin-right:16rpx;} +.other .other-circle{width:100%;} +.other .other-circle .other-list{border-bottom:2rpx solid #F3F3F3;padding:24rpx 6%; + width:88%;} +.other .other-circle .other-list .list-top{display: flex;justify-content: start;} +.other .other-circle .other-list .other-left{width:40%;} +.other .other-circle .other-list .other-left image{width:240rpx;height:152rpx;border-radius: 8rpx;} +.other .other-circle .other-list .other-right{width:60%;} +.other .other-circle .other-list .other-right .other-name{color:#676457;font-size:24rpx;height:56rpx;line-height:28rpx;overflow: hidden; + display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; word-break:break-all;} +.other .other-circle .other-list .other-right .other-time{font-size:20rpx;color:#BBBBBB;padding:16rpx 0} +.other .other-circle .other-list .other-right .other-people{padding-top:2rpx;font-size:24rpx;color:#676457;display: flex;justify-content: space-between;} +.other .other-circle .other-list .other-right .other-people text{padding:8rpx 20rpx;color:#fff;background: #ffcb12;border-radius: 6rpx;box-shadow: 0px 3rpx 10rpx 0px rgba(255,108,1,0.34);} +.sign{display: flex;justify-content: space-between;font-size:24rpx;margin-top:24rpx} +.sign view text{font-weight: bold;color:#FFCB12;padding:0 4rpx;font-size:30rpx} +.sign view image{width:32rpx;height:32rpx;margin-left:11rpx;transform:rotate(180deg);vertical-align: middle;} \ No newline at end of file diff --git a/pages/release/addCoupon/addcoupon.js b/pages/release/addCoupon/addcoupon.js new file mode 100644 index 0000000..5866770 --- /dev/null +++ b/pages/release/addCoupon/addcoupon.js @@ -0,0 +1,231 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +Page({ + + /** + * 页面的初始数据 + */ + data: { + type:[ + {value:'0',name:'所有活动'}, + {value:'1',name:'指定俱乐部所有活动'}, + {value:'2',name:'俱乐部指定活动'}, + ], + indexed:'0', + startTime:'2021-06-07', + endTime:'2021-06-07', + array:[], + index:0, + circleId:'', + arrays:[], + indexs:0, + activityId:'', + couponPrice:'', + couponLimit:'', + couponTotal:'', + personLimit:'', + couponType:'0', + club:true, + active:true + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + bindstartTimeChange: function (e) { + this.setData({ + startTime: e.detail.value + }) + }, + bindendTimeChange: function (e) { + this.setData({ + endTime: e.detail.value + }) + }, + couponPriceInput:function(e){ + this.setData({ + couponPrice: e.detail.value + }) + }, + couponLimitInput:function(e){ + this.setData({ + couponLimit: e.detail.value + }) + }, + couponTotalInput:function(e){ + this.setData({ + couponTotal: e.detail.value + }) + }, + personLimitInput:function(e){ + this.setData({ + personLimit: e.detail.value + }) + }, + radioChange:function(e){ + var that = this; + this.setData({ + couponType: that.data.type[e.detail.value].value, + indexed:e.detail.value + }) + if (e.detail.value == '0') { + this.setData({ + club: true, + active:true + }) + }else if (e.detail.value == '1') { + this.setData({ + club: false, + active:true + }) + this.getClubHave(); + }else { + this.setData({ + club: false, + active:false + }) + this.getClubHave(); + } + }, + getClubHave:function(){ + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getClubHave(), '', header).then((res) => { + let datas = res.data.data; + console.log(datas); + that.setData({ + array:datas, + circleId:datas[1].clubId + }) + that.getClubActive(datas[1].clubId); + }) + }, + bindPickerChange: function(e) { + var that = this; + console.log(e) + console.log(that.data.array[e.detail.value].clubId) + that.setData({ + index: e.detail.value, + circleId:that.data.array[e.detail.value].clubId + }) + that.getClubActive(that.data.array[e.detail.value].clubId); + }, + getClubActive:function(clubId){ + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + var postDatas = { + clubId:clubId + } + re.request(Api.getClubActive(), postDatas, header).then((res) => { + let datas = res.data.data; + console.log(datas); + that.setData({ + arrays:datas, + }) + }) + }, + activePickerChange: function(e) { + var that = this; + console.log(that.data.arrays); + console.log(e.detail.value); + if(that.data.circleId){ + that.setData({ + indexs: e.detail.value, + activityId:that.data.arrays[e.detail.value].activityId + }) + }else{ + wx.showToast({ + title: '请先选择俱乐部', + icon: 'none', + duration: 1000 + }) + } + }, + toadd:function(){ + var that = this; + var postData = { + activityId: that.data.activityId, + clubId: that.data.circleId, + couponLimit: that.data.couponLimit, + couponPrice: that.data.couponPrice, + couponTotal: that.data.couponTotal, + couponType: that.data.couponType, + endTime: that.data.endTime, + personLimit: that.data.personLimit, + startTime: that.data.startTime, + }; + console.log(postData) + var header = { + token: wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.addCoupon(), postData, header).then((res) => { + console.log(res) + wx.showToast({ + title: '提交成功,等待审核', + icon: 'none', + duration: 1000 + }) + wx.navigateBack({ + delta: 1 + }) + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/release/addCoupon/addcoupon.json b/pages/release/addCoupon/addcoupon.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/release/addCoupon/addcoupon.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/release/addCoupon/addcoupon.wxml b/pages/release/addCoupon/addcoupon.wxml new file mode 100644 index 0000000..88b4cd0 --- /dev/null +++ b/pages/release/addCoupon/addcoupon.wxml @@ -0,0 +1,67 @@ + + + + + 优惠券信息 + + + + + 面额 + + + + 使用条件 + + + + 库存 + + + + 每人限领 + + + + 有效时间 + + + + {{startTime}} + + + 至 + + + {{endTime}} + + + + + + 类型 + + + {{type[indexed].name}} + + + + + + + 添加现金券 + \ No newline at end of file diff --git a/pages/release/addCoupon/addcoupon.wxss b/pages/release/addCoupon/addcoupon.wxss new file mode 100644 index 0000000..e2836c9 --- /dev/null +++ b/pages/release/addCoupon/addcoupon.wxss @@ -0,0 +1,35 @@ +.other .other-top{height:92rpx;line-height:92rpx;font-size:32rpx;padding: 0 6%;background:#fff;} +.other .other-top image{height:36rpx;width:6rpx;vertical-align: middle;margin-right:16rpx;} +.circle{padding:24rpx;background:#fff;margin-top:24rpx;} +.list{width:100%;margin-top:24rpx;} +.list .title{color:#919191;font-size:26rpx;} +.list .time{display: flex;justify-content: space-between;line-height:58rpx;font-size:24rpx;margin-top:20rpx;} +.list .time .picker{border: 1px solid #cfcfcf;border-radius: 5rpx;font-size:24rpx;padding:0 60rpx;height:58rpx;color:#AFAFAF} +.list .inputbox{height:60rpx;line-height:60rpx;font-size:24rpx;color:#AFAFAF;margin-top:20rpx;} +.list .inputbox input{border: 1px solid #cfcfcf;border-radius: 5rpx;height:100%;padding:0 24rpx;} +.list .areabox{font-size:24rpx;color:#AFAFAF;margin-top:20rpx;} +.list .areabox textarea{border: 1px solid #cfcfcf;border-radius: 5rpx;height:100rpx;padding:24rpx;width:92%} +.list .areabox image{width:92rpx;height:92rpx;} +.list .addAreaBox{width:100%;display: flex;justify-content: start;font-size:24rpx;} +.list .addAreaBox text{display:inline-block;margin-top:20rpx;background: #f0f9ec;border: 2rpx solid #67c23a;border-radius: 14rpx;padding:14rpx 74rpx;margin-right:15rpx;color:#89D066;} +.list .addressbox{height:60rpx;line-height:60rpx;font-size:24rpx;color:#AFAFAF;margin-top:20rpx;display: flex;justify-content: space-between;border-bottom: 1px solid #cfcfcf;} +.list .addressbox input{width:70%} +.list .addressbox .ding{color:#409EFF} +.list .addressbox .ding image{width:29rpx;height:29rpx;margin-left:20rpx;vertical-align: middle;} +.formlist{width:100%;height:96rpx;line-height: 96rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlist text{width:40%;color:#919191;} +.formlist input{width:60%;height:80rpx;text-align: right;padding:0 12rpx} +.formlist .authright{font-size:28rpx;color:#919191;} +.formlist .authright radio{transform:scale(0.6);} +.formlist switch,checkbox{transform:scale(0.6);} +.formlist .picker{color:#919191;} +.formlistimg{width:100%;height:160rpx;line-height: 160rpx;display: flex;justify-content: space-between;border-bottom:2rpx solid #dfdfdf;font-size:26rpx;} +.formlistimg text{width:30%;color:#919191} +.formlistimg .upload{position: relative;} + +.formlist button{background: #ffac0c;border-radius: 8rpx;font-size:26rpx;color:#fff;height:60rpx;line-height:60rpx;margin-top:18rpx;} +.formlist image{width:32rpx;height:32rpx;margin-top:32rpx;transform:rotate(180deg);vertical-align: middle;} +.agree{width:100%;margin-top:30rpx;font-size:28rpx;text-align: center;} +.agree text{color:#ffac0c} +.bottom{width:94%;margin:24rpx auto;background: #f66a01;border-radius: 12rpx;text-align: center;font-size:28rpx; + box-shadow: 0px 4px 12px 0px rgba(255,108,1,0.34);height:80rpx;line-height:80rpx;color:#fff;} diff --git a/pages/release/addactive/addactive.js b/pages/release/addactive/addactive.js new file mode 100644 index 0000000..d1c813e --- /dev/null +++ b/pages/release/addactive/addactive.js @@ -0,0 +1,834 @@ +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); +var WxParse = require('../../../wxParse/wxParse.js'); +var dateTimePicker = require('../../dateTimePicker.js') + +Page({ + + /** + * 页面的初始数据 + */ + data: { + + dateTime:'', + dateTimeArray:'', + startT:'', + + dateTimeTwo:'', + dateTimeArrayTwo:'', + startTTwo:'', + + dateTimeThree:'', + dateTimeArrayThree:'', + startTThree:'', + + dateTimeFour:'', + dateTimeArrayFour:'', + startTFour:'', + year: new Date().getFullYear(), + clubId: '', + endRegisterTime: '2021-06-01', + startTime: '2021-06-01', + endTime: '2021-06-01', + nofree: true, + flag: true, + array:[], + index:0, + activityName: '', + costReq: '', + address: '', + addrLat: '', + addrLon: '', + createdTel:'', + costList:[], + isFree: '0', //kaishi + imgIndex: 0, + imageLength: 0, + firstCon: '', + dataList: [], + uploaderList: [],//fengmian + showList: [], + uploaderNum: 0, + showUpload: true, + uploaderListfront:[],//idcardfront + showListfront: [], + uploaderNumfront: 0, + showUploadfront:true, + insurancePrice: '', + insuranceType: '0', + hidden: true, + isLimit :'', + items: [//退款 + { value: '0', name: '活动开始前均可申请退款', checked: 'true' }, + { value: '1', name: '指定时间钱可申请退款' }, + { value: '2', name: '不可退款' }, + ], + ifchoose: true, + refundType: '0', + refundTime: '2021-04-01', + isCheck: '0', + taghidden: true, + // questionReq: [], + addtag: '', + isUpdateRegister: '0', + isSmsNotify: '0', + isJoin: '0', + isShowRegister:'0', + isShowSponsor:'0' + }, + bindstartDateChange: function (e) { + this.setData({ + startRegisterTime: e.detail.value + }) + }, + bindendDateChange: function (e) { + this.setData({ + endRegisterTime: e.detail.value + }) + }, + bindstartTimeChange: function (e) { + this.setData({ + startTime: e.detail.value + }) + }, + bindendTimeChange: function (e) { + this.setData({ + endTime: e.detail.value + }) + }, + peoplelimitInput: function (e) { + this.setData({ + isLimit: e.detail.value + }) + }, + safeInput: function (e) { + this.setData({ + insurancePrice: e.detail.value + }) + }, + feeInput: function (e) { + this.setData({ + isLimitSelect: e.detail.value + }) + }, + telInput: function (e) { + this.setData({ + createdTel: e.detail.value + }) + }, + helpInput: function (e) { + this.setData({ + isHelpRegister: e.detail.value + }) + }, + insuranceTypeChange(e) { + this.setData({ + insuranceType: e.detail.value + }) + }, + addrequired: function () { + this.setData({ + taghidden: false + }) + }, + addtags: function (e) { + this.setData({ + addtag: e.detail.value, + }) + }, + tagcancel: function () { + this.setData({ + taghidden: true + }); + }, + tagconfirm: function () { + var that = this; + if (that.data.addtag) { + that.setData({ + questionReq: that.data.questionReq.concat(that.data.addtag), + taghidden: true, + addtag: '' + }) + } else { + wx.showToast({ + title: '输入有误', + icon: 'none', + duration: 1000 + }) + } + }, + tobackmoney: function () { + var that = this; + that.setData({ + hidden: false + }) + }, + cancel: function () { + var that = this; + that.setData({ + hidden: true + }) + }, + confirm: function () { + var that = this; + that.setData({ + hidden: true + }) + }, + tomessage: function () { + // wx.navigateTo({ + // url: '../messageset/messageset' + // }) + this.setData({ + isSmsNotify: e.detail.value + }) + }, + radioChange(e) { + this.setData({ + isFree: e.detail.value + }) + if (e.detail.value == '0') { + this.setData({ + nofree: true + }) + } else { + this.setData({ + nofree: false + }) + } + }, + tochooseAddress: function () { + var that = this; + wx.chooseLocation({ + success(res) { + that.setData({ + address: res.address, + addrLat: res.latitude, + addrLon: res.longitude + }) + } + }) + }, + checkChange: function (e) { + this.setData({ + isCheck: e.detail.value + }) + }, + registerChange: function (e) { + this.setData({ + isUpdateRegister: e.detail.value + }) + }, + showregisterChange: function (e) { + this.setData({ + isShowRegister: e.detail.value + }) + }, + sponsorChange: function (e) { + this.setData({ + isShowSponsor: e.detail.value + }) + }, + isJoinChange: function (e) { + this.setData({ + isJoin: e.detail.value + }) + }, + nameInput: function (e) { + this.setData({ + activityName: e.detail.value, + }) + }, + appleChange: function (e) { + this.setData({ + isAppletNotify: e.detail.value, + }) + }, + backChange(e) { + console.log(e.detail.value) + this.setData({ + refundType: e.detail.value + }) + if (e.detail.value == 1) { + this.setData({ + ifchoose: false + }) + } else { + this.setData({ + ifchoose: true + }) + } + }, + bindDateChange: function (e) { + this.setData({ + refundTime: e.detail.value + }) + }, + custname: function (e) { + this.setData({ + costName: e.detail.value, + }) + }, + custmoney: function (e) { + this.setData({ + cost: e.detail.value, + }) + }, + custintro: function (e) { + this.setData({ + costExplain: e.detail.value, + }) + }, + bindPickerChange: function(e) { + var that = this; + that.setData({ + index: e.detail.value, + clubId:that.data.array[e.detail.value].clubId + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + //获取时间日期 + + changeDateTime(e) { + this.setData({ + dateTime: e.detail.value + }) + + var startT = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray, this.data.dateTime) +console.log(startT); + this.setData({ + startT: startT + }) + }, + + // 时间Two + changeDateTimeTwo(e) { + this.setData({ + dateTimeTwo: e.detail.value + }) + + var startTTwo = dateTimePicker.formatPickerDateTime(this.data.dateTimeArrayTwo, this.data.dateTimeTwo) +// console.log(startTTwo); + this.setData({ + startTTwo: startTTwo + }) + }, + + // 时间Three + changeDateTimeThree(e) { + this.setData({ + dateTimeThree: e.detail.value + }) + + var startTThree = dateTimePicker.formatPickerDateTime(this.data.dateTimeArrayThree, this.data.dateTimeThree) + + console.log(startTThree); + this.setData({ + startTThree: startTThree + }) + }, + + // 时间Four + changeDateTimeFour(e) { + this.setData({ + dateTimeFour: e.detail.value + }) + + var startTFour = dateTimePicker.formatPickerDateTime(this.data.dateTimeArrayFour, this.data.dateTimeFour) +console.log(startTFour); + this.setData({ + startTFour: startTFour + }) + }, + + onLoad: function (options) { + this.getClubHave(); + + // 时间ONE + var start = '2019-04-26 15:26' + var obj = dateTimePicker.dateTimePicker(2000,this.data.year,start); + this.setData({ + dateTime: obj.dateTime, + dateTimeArray: obj.dateTimeArray + }); + var startT = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray,this.data.dateTime) + console.log(startT); + this.setData({ + startT: startT + }) + + // 时间Two + var startTwo = '2019-04-26 15:26' + var objTwo = dateTimePicker.dateTimePicker(2000,this.data.year,startTwo); + this.setData({ + dateTimeTwo: objTwo.dateTime, + dateTimeArrayTwo: objTwo.dateTimeArray + }); + var startTTwo = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray,this.data.dateTime) + console.log(startTTwo); + this.setData({ + startTTwo: startTTwo + }) + + // 时间three + var startThree= '2019-04-26 15:26' + var objThree = dateTimePicker.dateTimePicker(2000,this.data.year,startThree); + this.setData({ + dateTimeThree: objThree.dateTime, + dateTimeArrayThree: objThree.dateTimeArray + }); + var startTThree = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray,this.data.dateTime) + this.setData({ + startTThree: startTThree + }) + + + // 时间Four + var startFour= '2019-04-26 15:26' + var objFour = dateTimePicker.dateTimePicker(2000,this.data.year,startFour); + this.setData({ + dateTimeFour: objFour.dateTime, + dateTimeArrayFour: objFour.dateTimeArray + }); + var startTFour = dateTimePicker.formatPickerDateTime(this.data.dateTimeArray,this.data.dateTime) + this.setData({ + startTFour: startTFour + }) + + + + }, + getClubHave:function(){ + var that = this; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getClubHave(), '', header).then((res) => { + let datas = res.data.data; + console.log(datas); + that.setData({ + array:datas, + }) + }) + }, + /*勾选协议 */ + xieyi: function (e) { + this.setData({ + checked: !this.data.checked + }) + }, + //查看协议 + seexcieyi: function () { + var that = this; + that.setData({ + flag: false + }) + that.self(); + }, + //看完协议了 + know: function () { + var that = this; + that.setData({ + flag: true + }) + }, + self: function () { + var that = this; + var header = {}; + var postData = { + type: 2 + }; + // re.request(Api.getAgreement(), postData, header).then((res) => { + // var ftext = res.data.data[0].content; + // WxParse.wxParse('ftext', 'html', ftext, that, 5); + // }) + }, + // 删除图片 + clearImg: function (e) { + var nowList = []; //新数据 + var nowListshow = []; //新数据 + var uploaderList = this.data.uploaderList; //原数据 + var showList = this.data.showList; //原数据 + + for (let i = 0; i < uploaderList.length; i++) { + if (i == e.currentTarget.dataset.index) { + continue; + } else { + nowList.push(uploaderList[i]); + nowListshow.push(showList[i]); + } + } + this.setData({ + uploaderNum: this.data.uploaderNum - 1, + uploaderList: nowList, + showUpload: true, + showList: nowListshow + }) + }, + //展示图片 + showImg: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.uploaderList, + current: that.data.uploaderList[e.currentTarget.dataset.index] + }) + }, + //上传图片 + upload: function (e) { + var that = this; + wx.chooseImage({ + count: 1 - that.data.uploaderNum, // 默认3 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success: function (res) { + // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 + let tempFilePaths = res.tempFilePaths; + let uploaderList = that.data.uploaderList.concat(tempFilePaths); + if (uploaderList.length == 1) { + that.setData({ + showUpload: false + }) + } + that.setData({ + uploaderList: uploaderList, + uploaderNum: uploaderList.length, + }) + + for (var i = 0; i < tempFilePaths.length; i++) { + wx.uploadFile({ + url: Api.uploadImg(), + filePath: res.tempFilePaths[i], + name: 'file', + formData: { + }, + success: function (res) { + var sss = JSON.parse(res.data); + let showList = that.data.showList.concat(sss.msg); + that.setData({ + showList: showList + }) + } + }) + } + } + }) + }, + // 删除Logofront图片 +clearImgfront: function (e) { + var nowList = []; //新数据 + var nowListshowfront = []; //新数据 + var uploaderListfront = this.data.uploaderListfront; //原数据 + var showListfront = this.data.showListfront; //原数据 + + for (let i = 0; i < uploaderListfront.length; i++) { + if (i == e.currentTarget.dataset.index) { + continue; + } else { + nowList.push(uploaderListfront[i]); + nowListshowfront.push(showListfront[i]); + } + } + this.setData({ + uploaderNum: this.data.uploaderNum - 1, + uploaderListfront: nowList, + showUploadfront: true, + showListfront:nowListshowfront + }) +}, +//展示图片 +showImgfront: function (e) { + var that = this; + wx.previewImage({ + urls: that.data.uploaderListfront, + current: that.data.uploaderListfront[e.currentTarget.dataset.index] + }) +}, +//上传图片 +uploadfront: function (e) { + var that = this; + wx.chooseImage({ + count: 1 - that.data.uploaderNum, // 默认3 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success: function (res) { + // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 + let tempFilePaths = res.tempFilePaths; + let uploaderListfront = that.data.uploaderListfront.concat(tempFilePaths); + if (uploaderListfront.length == 1) { + that.setData({ + showUploadfront: false + }) + } + that.setData({ + uploaderListfront: uploaderListfront, + uploaderNum: uploaderListfront.length, + }) + + for(var i=0;i { + console.log(res) + wx.showToast({ + title: '提交成功,等待审核', + icon: 'none', + duration: 1000 + }) + wx.navigateBack({ + delta: 1 + }) + }) + } + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function (e) { + var that = this; + }, + /** + * 输入监听 + */ + inputCon: function (e) { + let that = this; + if (0 === e.currentTarget.id - 0) {//第一个文本框的输入监听 + that.data.firstCon = e.detail.value; + } else { + that.data.dataList[e.currentTarget.id - 1].value = e.detail.value; + } + }, + /** + * 失去焦点监听 + * 根据失去监听的input的位置来判断图片的插入位置 + */ + outBlur: function (e) { + let that = this; + that.data.imgIndex = e.currentTarget.id - 0; + }, + /** + * 添加图片 + */ + addImg: function () { + var that = this; + //这里考虑到性能,对于图片张数做了限制 + if (that.data.dataList.length >= 4) {//超过四张 + wx.showModal({ + title: '提示', + content: '最多只能添加四张图片哦', + confirmText: "我知道了", + confirmColor: "#ef8383", + showCancel: false, + success: function (res) { + if (res.confirm) { + } else if (res.cancel) { + } + } + }) + } else {//添加图片 + wx.showActionSheet({ + itemList: ['从相册选择', '拍照'], + itemColor: '#ef8383', + success: function (res) { + var choseType = res.tapIndex == 0 ? "album" : res.tapIndex == 1 ? "camera" : ""; + if (choseType != "") { + wx.chooseImage({ + sizeType: ['original'],//原图 + sourceType: [choseType], + count: 1,//每次添加一张 + success: function (res) { + let tempFilePaths = res.tempFilePaths; + for(var i=0;i 0 && that.data.dataList[index].value != null) { + that.data.dataList[index - 1].value = that.data.dataList[index - 1].value + that.data.dataList[index].value; + } + that.data.dataList.splice(index, 1); + that.setData({ + firstCon: that.data.firstCon, + dataList: that.data.dataList + }) + } + }, + fail: function (res) { + console.log(res.errMsg) + } + }) + }, + //失败警告 + do_fail: function (a) { + wx.showToast({ + title: a, + icon: 'none', + duration: 1000 + }) + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/release/addactive/addactive.json b/pages/release/addactive/addactive.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/release/addactive/addactive.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/release/addactive/addactive.wxml b/pages/release/addactive/addactive.wxml new file mode 100644 index 0000000..b733706 --- /dev/null +++ b/pages/release/addactive/addactive.wxml @@ -0,0 +1,307 @@ + + + + + + + + + 首图尺寸建议:宽750px*高680px + 上传首图 + + + + + 报名时间 + + + + {{startT}} + + + 至 + + + {{startTTwo}} + + + + + + + 活动时间 + + + + + {{startTThree}} + + + 至 + + + + {{startTFour}} + + + + + + + 选择俱乐部 + + + + {{array[index].clubName}} + + + + + + + 活动名称 + + + + + + 联系电话 + + + + + + + 活动logo + + + + + + + + 活动地址 + + + 选择定位 + + + + 活动内容 + + + + + + +