diff --git a/app.js b/app.js
index 7040ee7..25adae5 100644
--- a/app.js
+++ b/app.js
@@ -1,6 +1,7 @@
//app.js
var restAjax = require('utils/restAjax.js');
var dialog = require('utils/dialog.js');
+var utils = require('utils/util.js');
// + 'https://www.xzszwhy.cn/usercenter'
App({
loginUrl: restAjax.baseUrl,
@@ -13,7 +14,7 @@ App({
volunteerUrl: restAjax.baseUrl,
activityUrl: restAjax.baseUrl,
volunteerUrl: restAjax.baseUrl,
- liveUrl: restAjax.ulr+'live/',
+ liveUrl: restAjax.url + 'live/',
liveRecordUrl: restAjax.baseUrl,
socialUrl: restAjax.baseUrl,
areaCode: '540200000000',
@@ -23,6 +24,7 @@ App({
restAjax: restAjax,
shopImgUrl: restAjax.url + "xzshop/route/file/download/true/",
dialog: dialog,
+ utils: utils,
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
diff --git a/app.wxss b/app.wxss
index 06c6fc9..d033489 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,10 +1,79 @@
/**app.wxss**/
.container {
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- padding: 200rpx 0;
- box-sizing: border-box;
-}
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-between;
+ padding: 200rpx 0;
+ box-sizing: border-box;
+}
+
+radio-group text {
+ font-size: 25rpx;
+}
+
+radio .wx-radio-input {
+ border-radius: 50%;
+ width: 24rpx;
+ border: 2rpx solid #5e5e5f;
+ height: 24rpx;
+}
+
+radio .wx-radio-input.wx-radio-input-checked {
+ border: none;
+ background: #07c160;
+}
+
+radio .wx-radio-input.wx-radio-input-checked::before {
+ border-radius: 50%;
+ /* 圆角 */
+ width: 28rpx;
+ /* 选中后对勾大小,不要超过背景的尺寸 */
+ height: 28rpx;
+ /* 选中后对勾大小,不要超过背景的尺寸 */
+ line-height: 28rpx;
+ text-align: center;
+ font-size: 20rpx;
+ /* 对勾大小 30rpx */
+ color: #fff;
+ /* 对勾颜色 白色 */
+ background: #07c160;
+ transform: translate(-50%, -50%) scale(1);
+}
+
+
+
+checkbox-group text {
+ font-size: 25rpx;
+
+}
+
+checkbox .wx-checkbox-input {
+ width: 24rpx;
+ border: 2rpx solid #5e5e5f;
+ height: 24rpx;
+ margin-left: 5rpx;
+}
+
+checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+ border: none;
+ background: #07c160;
+}
+
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
+ /* 圆角 */
+ width: 28rpx;
+ /* 选中后对勾大小,不要超过背景的尺寸 */
+ height: 28rpx;
+ /* 选中后对勾大小,不要超过背景的尺寸 */
+ line-height: 28rpx;
+ text-align: center;
+ font-size: 20rpx;
+ margin-left: 5rpx;
+ /* 对勾大小 30rpx */
+ color: #fff;
+ /* 对勾颜色 白色 */
+ background: #07c160;
+ transform: translate(-50%, -50%) scale(1);
+}
\ No newline at end of file
diff --git a/images/activity-on.png b/images/activity-on.png
old mode 100644
new mode 100755
index 1921173..9393e14
Binary files a/images/activity-on.png and b/images/activity-on.png differ
diff --git a/images/activity.png b/images/activity.png
old mode 100644
new mode 100755
index 3890866..47368d7
Binary files a/images/activity.png and b/images/activity.png differ
diff --git a/images/address.png b/images/address.png
old mode 100644
new mode 100755
index c9efebc..c3db54b
Binary files a/images/address.png and b/images/address.png differ
diff --git a/images/avatar.png b/images/avatar.png
old mode 100644
new mode 100755
index 0747ce1..2b021d9
Binary files a/images/avatar.png and b/images/avatar.png differ
diff --git a/images/big-news.png b/images/big-news.png
old mode 100644
new mode 100755
index ac67a11..ad890d3
Binary files a/images/big-news.png and b/images/big-news.png differ
diff --git a/images/center-bg.png b/images/center-bg.png
old mode 100644
new mode 100755
index 81171ec..dc17baa
Binary files a/images/center-bg.png and b/images/center-bg.png differ
diff --git a/images/center-on.png b/images/center-on.png
old mode 100644
new mode 100755
index c6113bb..2ada7b8
Binary files a/images/center-on.png and b/images/center-on.png differ
diff --git a/images/center.png b/images/center.png
old mode 100644
new mode 100755
index a2171f0..0f4de8a
Binary files a/images/center.png and b/images/center.png differ
diff --git a/images/collect.png b/images/collect.png
old mode 100644
new mode 100755
index 358f00c..beada9c
Binary files a/images/collect.png and b/images/collect.png differ
diff --git a/images/collected.png b/images/collected.png
old mode 100644
new mode 100755
index 0956cff..6c58152
Binary files a/images/collected.png and b/images/collected.png differ
diff --git a/images/culture-on.png b/images/culture-on.png
old mode 100644
new mode 100755
index bed0091..cfd32e0
Binary files a/images/culture-on.png and b/images/culture-on.png differ
diff --git a/images/culture-slide.png b/images/culture-slide.png
old mode 100644
new mode 100755
index 44e6963..598e089
Binary files a/images/culture-slide.png and b/images/culture-slide.png differ
diff --git a/images/culture.png b/images/culture.png
old mode 100644
new mode 100755
index 5154da1..0632efd
Binary files a/images/culture.png and b/images/culture.png differ
diff --git a/images/delete-photo.png b/images/delete-photo.png
old mode 100644
new mode 100755
index db02a2f..7774c41
Binary files a/images/delete-photo.png and b/images/delete-photo.png differ
diff --git a/images/delete.png b/images/delete.png
old mode 100644
new mode 100755
index 63f7d52..d2d9c2a
Binary files a/images/delete.png and b/images/delete.png differ
diff --git a/images/friend.png b/images/friend.png
old mode 100644
new mode 100755
index 7e05fbb..fb32fd1
Binary files a/images/friend.png and b/images/friend.png differ
diff --git a/images/good.png b/images/good.png
old mode 100644
new mode 100755
index 833f428..c5d5d5a
Binary files a/images/good.png and b/images/good.png differ
diff --git a/images/ic_empty_data.png b/images/ic_empty_data.png
old mode 100644
new mode 100755
index 791e76e..f45aa49
Binary files a/images/ic_empty_data.png and b/images/ic_empty_data.png differ
diff --git a/images/ic_goods_type_default.png b/images/ic_goods_type_default.png
old mode 100644
new mode 100755
index 306f9e9..ecf9ab9
Binary files a/images/ic_goods_type_default.png and b/images/ic_goods_type_default.png differ
diff --git a/images/ic_shop_car_icon.png b/images/ic_shop_car_icon.png
old mode 100644
new mode 100755
index b681f01..70006cd
Binary files a/images/ic_shop_car_icon.png and b/images/ic_shop_car_icon.png differ
diff --git a/images/index-on.png b/images/index-on.png
old mode 100644
new mode 100755
index 11bb6f1..4a16628
Binary files a/images/index-on.png and b/images/index-on.png differ
diff --git a/images/index.png b/images/index.png
old mode 100644
new mode 100755
index 6c08973..57b5c65
Binary files a/images/index.png and b/images/index.png differ
diff --git a/images/login-bg.png b/images/login-bg.png
old mode 100644
new mode 100755
index cc87a61..2e3ea69
Binary files a/images/login-bg.png and b/images/login-bg.png differ
diff --git a/images/logo.png b/images/logo.png
old mode 100644
new mode 100755
index 97ec11b..d8bfbdb
Binary files a/images/logo.png and b/images/logo.png differ
diff --git a/images/selected-l.png b/images/selected-l.png
old mode 100644
new mode 100755
index e2dccf4..f1b1f13
Binary files a/images/selected-l.png and b/images/selected-l.png differ
diff --git a/images/selected-r.png b/images/selected-r.png
old mode 100644
new mode 100755
index 13d9275..7e4f452
Binary files a/images/selected-r.png and b/images/selected-r.png differ
diff --git a/images/setting.png b/images/setting.png
old mode 100644
new mode 100755
index 930c382..aa8f0a4
Binary files a/images/setting.png and b/images/setting.png differ
diff --git a/images/share.png b/images/share.png
old mode 100644
new mode 100755
index ca507a9..c0aca29
Binary files a/images/share.png and b/images/share.png differ
diff --git a/pages/activity/activity.js b/pages/activity/activity.js
index 12f680d..a5cf2fe 100644
--- a/pages/activity/activity.js
+++ b/pages/activity/activity.js
@@ -2,145 +2,173 @@
var app = getApp();
Page({
- /**
- * 页面的初始数据
- */
- data: {
- dataList: [],
- areaList: [],
- pages: {
- page: 1,
- rows: 5,
- county: ''
- }
- },
- getAreaList: function () {
- var self = this;
- app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listallbyparentidrelease/640675', []),
- self.data.pages, null, function (code, data) {
- if (code == '200') {
- self.setData({
- areaList: data
- })
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ dataList: [],
+ areaList: [],
+ typeList: [],
+ pages: {
+ page: 1,
+ rows: 5,
+ activityType: ''
}
- }
- )
- },
- changeArea: function (e) {
- app.dialog.loading('正在加载');
- this.setData({
- 'pages.county': e.currentTarget.dataset.area
- })
- this.getActivityList()
- },
- loadAll: function () {
- this.setData({
- 'pages.county': ''
- })
- this.getActivityList()
- },
- goDetail: function (e) {
- var id = e.currentTarget.dataset.id;
- wx.navigateTo({
- url: '../activityDetail/activityDetail?id=' + id
- })
- },
- getActivityList: function() {
- var self = this;
- app.restAjax.get(app.restAjax.path(app.activityUrl + '/wechat-miniapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
- self.data.pages, null, function(code, data) {
- console.log(code+"==="+data)
- if('200' == code) {
- for(var item of data.rows) {
- if('' != item.activityImage) {
- item.activityImage = app.activityUrl + '/route/file/download/true/' + item.activityImage;
- }
- }
- if(1 === self.data.pages.page) {
- self.setData({
- dataList: data.rows,
- })
- }else {
- if(data.rows.length == 0) {
- self.setData({
- [`pages.page`] : self.data.pages.page - 1
- })
- app.dialog.msg('暂无更多')
- return false;
+ },
+ //获取活动分类
+ getActivityTypeList() {
+ var _self = this;
+ app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/dictionaryself/listdictionarybyparentidrelease/e36ad682-c6b4-44fe-a05c-889a5ff7c284', []),
+ null, null,
+ function (code, data) {
+ _self.setData({
+ typeList: data,
+ 'pages.activityType': data[0].dataId
+ })
+ _self.getActivityList()
+ },
+ function (err) {
+
}
- self.setData({
- dataList: data.rows.concat(self.data.dataList),
+ );
+ },
+ getAreaList: function () {
+ var self = this;
+ app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/dictionaryself/listdictionarybyparentidrelease/e36ad682-c6b4-44fe-a05c-889a5ff7c284', []),
+ self.data.pages, null,
+ function (code, data) {
+ if (code == '200') {
+ self.setData({
+ areaList: data,
+
+ })
+ }
+ }
+ )
+ },
+ changeArea: function (e) {
+ app.dialog.loading('正在加载');
+ console.log(e)
+ this.setData({
+ 'pages.activityType': e.currentTarget.dataset.dataid
+ })
+ this.getActivityList()
+ },
+ loadAll: function () {
+ this.setData({
+ 'pages.county': ''
+ })
+ this.getActivityList()
+ },
+ goDetail: function (e) {
+ var id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: '../activityDetail/activityDetail?id=' + id
+ })
+ },
+ getActivityList: function () {
+ var self = this;
+ app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activitylibrary/listpageactivitylibraryfornetrelease/{areaCode}', [app.areaCode]),
+ self.data.pages, null,
+ function (code, data) {
+ console.log(code + "===" + data)
+ if ('200' == code) {
+ for (var item of data.rows) {
+ if ('' != item.activityImage) {
+ item.activityImage = app.activityUrl + '/route/file/download/true/' + item.activityImage;
+ }
+ }
+ if (1 === self.data.pages.page) {
+ self.setData({
+ dataList: data.rows,
+ })
+ } else {
+ if (data.rows.length == 0) {
+ self.setData({
+ [`pages.page`]: self.data.pages.page - 1
+ })
+ app.dialog.msg('暂无更多')
+ return false;
+ }
+ self.setData({
+ dataList: data.rows.concat(self.data.dataList),
+ })
+ }
+ }
+ },
+ function () {
+
+ },
+ function () {
+ wx.hideNavigationBarLoading(); //完成停止加载图标
+ wx.stopPullDownRefresh();
+ wx.hideLoading();
})
- }
- }
- }, function() {
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getActivityTypeList()
+ // this.getActivityList();
+ // this.getAreaList()
- }, function() {
- wx.hideNavigationBarLoading(); //完成停止加载图标
- wx.stopPullDownRefresh();
- wx.hideLoading();
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.getActivityList();
- this.getAreaList()
- },
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
+ },
- },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
+ },
- },
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
+ },
- },
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- // 在标题栏中显示加载图标
- wx.showNavigationBarLoading();
- var self = this;
- self.setData({
- [`pages.page`] : self.data.pages.page + 1
- })
- this.getActivityList();
- },
+ },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+ // 在标题栏中显示加载图标
+ wx.showNavigationBarLoading();
+ var self = this;
+ self.setData({
+ [`pages.page`]: 1,
+ dataList: []
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
+ })
+ this.getActivityList();
+ },
- }
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
})
\ No newline at end of file
diff --git a/pages/activity/activity.wxml b/pages/activity/activity.wxml
index c1644db..2dfc13d 100644
--- a/pages/activity/activity.wxml
+++ b/pages/activity/activity.wxml
@@ -1,23 +1,23 @@
- 全部
- {{item.areaName}}
+
+ {{item.dataName}}
-
-
-
+
+
+
+
+
+
+ {{item.activityTitle}}
+ 报名中
+ 报名人数已满
+ 停止报名
+ 进行中
+ 直接进入
+ 已结束
+
+ {{item.activityStartTime}}至{{item.activityEndTime}}
+
-
-
- {{item.activityTitle}}
- 报名中
- 报名人数已满
- 停止报名
- 进行中
- 直接进入
- 已结束
-
- {{item.activityStartTime}}至{{item.activityEndTime}}
-
-
\ No newline at end of file
diff --git a/pages/activity/activity.wxss b/pages/activity/activity.wxss
index a496ac3..57ac14b 100644
--- a/pages/activity/activity.wxss
+++ b/pages/activity/activity.wxss
@@ -1,89 +1,105 @@
-.activity{
- padding: 20rpx 30rpx 0;
- margin-top: 80rpx;
+.activity {
+ padding: 20rpx 30rpx 0;
+ margin-top: 80rpx;
}
-.activity-box{
- margin-bottom: 20rpx;
- box-shadow:0px 0px 17rpx 0px rgba(0,0,0,0.1);
- border-radius: 10rpx;
- overflow: hidden;
+
+.activity-box {
+ margin-bottom: 20rpx;
+ box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.1);
+ border-radius: 10rpx;
+ overflow: hidden;
}
-.activity-img{
- height: 320rpx;
- position: relative;
+
+.activity-img {
+ height: 320rpx;
+ position: relative;
}
-.activity-img image{
- width: 100%;
- height: 100%;
+
+.activity-img image {
+ width: 100%;
+ height: 100%;
}
-.corner{
- position: absolute;
- top: 20rpx;
- right: 20rpx;
- display: flex;
- color: #fff;
+
+.corner {
+ position: absolute;
+ top: 20rpx;
+ right: 20rpx;
+ display: flex;
+ color: #fff;
}
-.corner view{
- padding: 0 10rpx;
- background: rgba(0,0,0,0.6);
- line-height: 40rpx;
- vertical-align: middle;
- display: flex;
- align-items: center;
- border-radius: 5rpx;
+
+.corner view {
+ padding: 0 10rpx;
+ background: rgba(0, 0, 0, 0.6);
+ line-height: 40rpx;
+ vertical-align: middle;
+ display: flex;
+ align-items: center;
+ border-radius: 5rpx;
}
-.view-count{
- margin-right: 20rpx;
+
+.view-count {
+ margin-right: 20rpx;
}
-.view-count image{
- width: 40rpx;
- height: 40rpx;
+
+.view-count image {
+ width: 40rpx;
+ height: 40rpx;
}
-.activity-info{
- padding: 15rpx 20rpx;
+
+.activity-info {
+ padding: 15rpx 20rpx;
}
-.title{
- display: flex;
- justify-content: space-between;
+
+.title {
+ display: flex;
+ justify-content: space-between;
}
-.activity-title{
- width: 70%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-size: 32rpx;
- color: #242424;
- line-height: 40rpx;
+
+.activity-title {
+ width: 70%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ font-size: 32rpx;
+ color: #242424;
+ line-height: 40rpx;
}
-.sign{
- background: rgba(159,21,18,.1);
- color: #9F1512;
- border-radius: 10rpx;
- padding: 0 20rpx;
- line-height: 40rpx;
- font-size: 28rpx;
+
+.sign {
+ background: rgba(159, 21, 18, .1);
+ color: #9F1512;
+ border-radius: 10rpx;
+ padding: 0 20rpx;
+ line-height: 40rpx;
+ font-size: 28rpx;
}
-.date{
- margin-top: 10rpx;
- font-size: 24rpx;
- color: #242424;
+
+.date {
+ margin-top: 10rpx;
+ font-size: 24rpx;
+ color: #242424;
}
-.area{
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- height: 80rpx;
- white-space: nowrap;
- overflow-x: auto;
+
+.area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 80rpx;
+ white-space: nowrap;
+ overflow-x: auto;
+ box-shadow: 10rpx 10rpx 5rpx #f2f2f2;
}
-.area-box{
- display: inline-block;
- width: 25%;
- line-height: 80rpx;
- text-align: center;
- font-size: 30rpx;
+
+.area-box {
+ display: inline-block;
+ width: 25%;
+ line-height: 80rpx;
+ text-align: center;
+ font-size: 30rpx;
}
-.area-box.active{
- color: #9F1512;
+
+.area-box.active {
+ color: #9F1512;
}
\ No newline at end of file
diff --git a/pages/activityDetail/activityDetail.js b/pages/activityDetail/activityDetail.js
index 0ddce26..44a7377 100644
--- a/pages/activityDetail/activityDetail.js
+++ b/pages/activityDetail/activityDetail.js
@@ -58,12 +58,12 @@ Page({
var url;
var id = options.id;
if(!self.data.token) {
- url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
+ url = '/app/activitylibrary/getactivitylibrarybyidrelease/' + id;
self.setData({
token: null
})
}else {
- url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyid/' + id
+ url = '/app/activitylibrary/getactivitylibrarybyid/' + id
self.getToken()
}
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, {
diff --git a/pages/activityDialog/activityDialog.js b/pages/activityDialog/activityDialog.js
index 804ae15..7ed2669 100644
--- a/pages/activityDialog/activityDialog.js
+++ b/pages/activityDialog/activityDialog.js
@@ -31,7 +31,7 @@ Page({
},
getActivityHis: function() {
var self = this;
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/teamactivityhis/listpageteamactivityhis?serviceId=' + self.data.serviceId, []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/teamactivityhis/listpageteamactivityhis?serviceId=' + self.data.serviceId, []),
self.data.pages, {
headers: {
token: self.data.token
diff --git a/pages/activitySign/activitySign.js b/pages/activitySign/activitySign.js
index cb5c8c6..44bb418 100644
--- a/pages/activitySign/activitySign.js
+++ b/pages/activitySign/activitySign.js
@@ -118,9 +118,9 @@ Page({
var url;
var id = options.id;
if (!self.data.token) {
- url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
+ url = '/app/activitylibrary/getactivitylibrarybyidrelease/' + id;
} else {
- url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyid/' + id
+ url = '/app/activitylibrary/getactivitylibrarybyid/' + id
}
self.setData({
activityId: options.id
diff --git a/pages/heritage/heritage.js b/pages/heritage/heritage.js
index d3b59cd..79f2111 100644
--- a/pages/heritage/heritage.js
+++ b/pages/heritage/heritage.js
@@ -33,7 +33,7 @@ Page({
doGetLibraryList: function(page) {
var self = this;
app.dialog.loading('正在加载');
- app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibrary/listpageintangiblelibraryrelease', [self.data.libraryUrl]), {
+ app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibrary/listpageintangiblelibraryrelease/{areaCode}', [self.data.libraryUrl,app.areaCode]), {
page: page,
rows: self.data.rows
}, null, function(code, data) {
diff --git a/pages/index/index.js b/pages/index/index.js
index 732bb01..4694282 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -121,7 +121,7 @@ Page({
},
doGetBanner: function () {
var self = this;
- app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [self.data.news.newsUrl]), {
+ app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease/{areaCode}', [self.data.news.newsUrl, app.areaCode]), {
newsDirectoriesId: 'eab0ca3c-d35d-4c02-9397-ace2bdd10fc1',
page: 1,
rows: 5
@@ -135,7 +135,7 @@ Page({
},
doGetVenueList: function () {
var self = this;
- app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease', [self.data.venue.venueUrl]), {
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease/{areaCode}', [self.data.venue.venueUrl, app.areaCode]), {
page: 1,
rows: 3,
latitude: app.globalData.curLat,
@@ -152,9 +152,26 @@ Page({
app.dialog.msg(data.msg);
});
},
+ //加载活动图片错误
+ loadImgErr(e) {
+ console.log(e)
+ var index = e.currentTarget.dataset.index
+ this.data.activity.activityList[index].activityImageArray.unshift("03c2ea0d-87ad-43db-bba0-ae6b4f827dba")
+ this.setData({
+ activity: this.data.activity
+ })
+ },
+ //加载轮播图错误
+ loadBannerErr(e) {
+ var index = e.currentTarget.dataset.index
+ this.data.news.bannerList[index].newsContentCoverList.unshift('03c2ea0d-87ad-43db-bba0-ae6b4f827dba')
+ this.setData({
+ news: this.data.news
+ })
+ },
doGetActivityList: function () {
var self = this;
- app.restAjax.get(app.restAjax.path('{activityUrl}/app/activitylibrary/listpageactivitylibraryrelease', [self.data.activity.activityUrl]), {
+ app.restAjax.get(app.restAjax.path('{activityUrl}/app/activitylibrary/listpageactivitylibraryfornetrelease/{areaCode}', [self.data.activity.activityUrl, app.areaCode]), {
page: 1,
rows: 3
}, null, function (code, data) {
@@ -264,8 +281,8 @@ Page({
})
},
goHeritage: function () {
- wx.switchTab({
- url: '../heritage/heritage',
+ wx.navigateTo({
+ url: '/pages/heritage/heritage',
})
},
goCultureDetail: function (event) {
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 3703d90..5ace990 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,7 +1,7 @@
-
+
@@ -41,12 +41,17 @@
+
+ 场馆导航
+ {{item.venueName}}
-
+ 精彩活动
+ {{item.activityTitle}}
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index c85766b..58055f2 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -29,7 +29,7 @@ swiper {
}
.recommend {
- padding: 30rpx;
+ padding: 0rpx 30rpx 30rpx 30rpx;
border-bottom: 5px solid #FBFBFB;
}
@@ -37,6 +37,13 @@ swiper {
width: 100%;
display: flex;
overflow-x: auto;
+ margin-top: 10rpx;
+}
+
+.line {
+ width: 100%;
+ height: 1rpx;
+ background: #f2f2f2;
}
.recommend-box {
@@ -49,11 +56,36 @@ swiper {
margin-right: 30rpx;
}
+.recommend-name {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ font-size: 20rpx;
+ background: #00000088;
+ color: white;
+ width: 100%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
.recommend-box image {
width: 100%;
height: 100%;
}
+.recommend-status {
+ position: absolute;
+ right: 0;
+ top: 0;
+ background: #9F1512;
+ border-radius: 10rpx;
+ color: white;
+ font-size: 20rpx;
+ padding: 0rpx 10rpx;
+ width: fit-content;
+}
+
.public-title {
text-align: center;
padding: 10rpx 0rpx;
diff --git a/pages/myVolunteerActivity/myVolunteerActivity.js b/pages/myVolunteerActivity/myVolunteerActivity.js
index 473afd5..81cde1c 100644
--- a/pages/myVolunteerActivity/myVolunteerActivity.js
+++ b/pages/myVolunteerActivity/myVolunteerActivity.js
@@ -48,10 +48,10 @@ Page({
})
if(self.data.type === '1') {
// 我发起的活动
- self.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservice');
+ self.myActivity(app.volunteerUrl + '/app/volunteerservice/listpagevolunteerservice');
}else {
// 我参加的活动
- self.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagemyjoinservice');
+ self.myActivity(app.volunteerUrl + '/app/volunteerservice/listpagemyjoinservice');
}
},
myActivity: function(url) {
@@ -83,7 +83,7 @@ Page({
*/
onLoad: function (options) {
this.getToken().then(result => {
- this.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservice');
+ this.myActivity(app.volunteerUrl + '/app/volunteerservice/listpagevolunteerservice');
})
},
diff --git a/pages/myVolunteerTeam/myVolunteerTeam.js b/pages/myVolunteerTeam/myVolunteerTeam.js
index 21884ca..6b77acc 100644
--- a/pages/myVolunteerTeam/myVolunteerTeam.js
+++ b/pages/myVolunteerTeam/myVolunteerTeam.js
@@ -68,14 +68,14 @@ Page({
var methodType;
var title;
if('1' == self.data.type) {
- url = app.volunteerUrl + '/wechat-miniapp/teammember/saveteammember'
+ url = app.volunteerUrl + '/app/teammember/saveteammember'
teamMemberVO = {
teamId: e.currentTarget.dataset.teamid
}
methodType = app.restAjax.post
title = '申请成功!'
}else {
- url = app.volunteerUrl + '/wechat-miniapp/teammember/quitTeam/' + self.data.teamId
+ url = app.volunteerUrl + '/app/teammember/quitTeam/' + self.data.teamId
methodType = app.restAjax.get
title = '退出成功!'
}
@@ -103,7 +103,7 @@ Page({
*/
onLoad: function (options) {
this.getToken().then(result => {
- this.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/myteamm');
+ this.otherTeam(app.volunteerUrl + '/app/team/myteamm');
})
},
diff --git a/pages/newTeam/newTeam.js b/pages/newTeam/newTeam.js
index 07285ac..4b12457 100644
--- a/pages/newTeam/newTeam.js
+++ b/pages/newTeam/newTeam.js
@@ -198,7 +198,7 @@ Page({
self.data.teamArea[self.data.teamAreaIndex].dictionaryId :
'',
};
- app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/team/saveteam', []),
+ app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/app/team/saveteam', []),
teamVO, {
headers: {
'token': self.data.token
@@ -262,7 +262,7 @@ Page({
getDataFromArea: function(dictId, type) {
var self = this;
return new Promise(resolve => {
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/area/listallbyparentidrelease/' + dictId, []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/area/listbyparentidrelease/' + dictId, []),
{}, {
headers: {
'token': self.data.token
diff --git a/pages/newVolunteerActivity/newVolunteerActivity.js b/pages/newVolunteerActivity/newVolunteerActivity.js
index e5bd313..6d9b129 100644
--- a/pages/newVolunteerActivity/newVolunteerActivity.js
+++ b/pages/newVolunteerActivity/newVolunteerActivity.js
@@ -177,7 +177,7 @@ Page({
photo: self.data.uploadPhoto,
serviceRequirement: self.data.serviceRequirement
};
- app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteerservice/savevolunteerservice', []),
+ app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/app/volunteerservice/savevolunteerservice', []),
volunteerServiceVO, {
headers: {
'token': self.data.token
diff --git a/pages/newsList/newsList.js b/pages/newsList/newsList.js
index 7d23239..fa89a78 100644
--- a/pages/newsList/newsList.js
+++ b/pages/newsList/newsList.js
@@ -17,6 +17,7 @@ Page({
areaId: app.areaCode,
defaultAreaId: app.areaCode
},
+ //获取下级子目录
doGetNewsDictionariesList: function () {
var self = this;
app.dialog.loading('正在加载');
@@ -43,22 +44,19 @@ Page({
});
self.doGetNewsList(1);
},
- //全部类型
- doClearCurrentNewsDictionariesId: function () {
- var self = this;
- self.setData({
- currentNewsDictionariesId: self.data.dirId
- });
- self.doGetNewsList(1);
- },
+ //获取新闻
doGetNewsList: function (page, lv) {
var self = this;
app.dialog.loading('正在加载');
var info = {
- newsDirectoriesId: self.data.currentNewsDictionariesId,
page: page,
rows: self.data.rows
}
+ if (self.data.currentNewsDictionariesId == self.data.dirId) {
+ info.newsDirectoriesParentId = self.data.dirId;
+ } else {
+ info.newsDirectoriesId = self.data.currentNewsDictionariesId;
+ }
var tempAreaCode = app.areaCode;
if (lv) {
tempAreaCode = self.data.areaId;
@@ -94,7 +92,7 @@ Page({
},
getAreaList: function () {
var self = this;
- app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listallbyparentidrelease/640675', []),
+ app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listbyparentidrelease/' + app.areaId, []),
self.data.pages, null,
function (code, data) {
if (code == '200') {
@@ -113,6 +111,15 @@ Page({
})
this.doGetNewsList(1, lv)
},
+ //加载全部类型
+ doClearCurrentNewsDictionariesId: function () {
+ var self = this;
+ self.setData({
+ currentNewsDictionariesId: self.data.dirId
+ });
+ self.doGetNewsList(1);
+ },
+ //加载全部地区
loadAll: function () {
this.setData({
areaId: app.areaCode
diff --git a/pages/newsList/newsList.wxss b/pages/newsList/newsList.wxss
index ec98aec..5b62c2f 100644
--- a/pages/newsList/newsList.wxss
+++ b/pages/newsList/newsList.wxss
@@ -26,6 +26,7 @@
justify-content: space-between;
align-items: center;
width: 25%;
+ min-width: fit-content;
position: relative;
height: 90rpx;
font-size: 30rpx;
diff --git a/pages/resource/resource.js b/pages/resource/resource.js
index 9cdef80..558a866 100644
--- a/pages/resource/resource.js
+++ b/pages/resource/resource.js
@@ -40,7 +40,7 @@ Page({
page: page,
rows: self.data.rows
}
- app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [app.newsUrl]), info, null, function (code, data) {
+ app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease/{areaCode}', [app.newsUrl,app.areaCode]), info, null, function (code, data) {
var newsArray;
for (var i = 0; i < data.rows.length; i++) {
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
diff --git a/pages/serviceActivityDetail/serviceActivityDetail.js b/pages/serviceActivityDetail/serviceActivityDetail.js
index 801bfe6..adb9a87 100644
--- a/pages/serviceActivityDetail/serviceActivityDetail.js
+++ b/pages/serviceActivityDetail/serviceActivityDetail.js
@@ -134,7 +134,7 @@ Page({
*/
sendEnrollRequest: function(serviceMemberVO) {
var self = this;
- app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/servicemember/saveservicemember', []),
+ app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/app/servicemember/saveservicemember', []),
serviceMemberVO, {
headers: {
token: self.data.token
@@ -159,9 +159,9 @@ Page({
var self = this;
var url;
if(self.data.teamArray.length > 0) {
- url = app.volunteerUrl + '/wechat-miniapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
+ url = app.volunteerUrl + '/app/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
}else {
- url = app.volunteerUrl + '/wechat-miniapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
+ url = app.volunteerUrl + '/app/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
}
app.restAjax.get(app.restAjax.path(url, []), {}, {
@@ -187,7 +187,7 @@ Page({
getMyTeam: function() {
var self = this;
console.log(self.data.token)
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/team/myteamm', []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/team/myteamm', []),
{}, {
headers: {
token: self.data.token
diff --git a/pages/teamDetail/teamDetail.js b/pages/teamDetail/teamDetail.js
index 7988b72..eaaf2ce 100644
--- a/pages/teamDetail/teamDetail.js
+++ b/pages/teamDetail/teamDetail.js
@@ -28,7 +28,7 @@ Page({
},
getDetail(teamId) {
var self = this;
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/team/getteambyid/' + teamId, []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/team/getteambyid/' + teamId, []),
{}, {
headers: {
token: self.data.token
@@ -48,7 +48,7 @@ Page({
},
getMember(teamId) {
var self = this;
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/teammember/listteammember?teamId=' + teamId, []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/teammember/listteammember?teamId=' + teamId, []),
{}, {
headers: {
token: self.data.token
@@ -80,7 +80,7 @@ Page({
console.log(e)
var id = e.currentTarget.dataset.teammemberid;
var type = e.currentTarget.dataset.type;
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []),
{}, {
headers: {
token: self.data.token
diff --git a/pages/train/train.js b/pages/train/train.js
index bfe316c..35469a2 100644
--- a/pages/train/train.js
+++ b/pages/train/train.js
@@ -47,7 +47,7 @@ Page({
page: page,
rows: self.data.rows
}
- app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [app.newsUrl]), info, null, function (code, data) {
+ app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease/{areaCode}', [app.newsUrl,app.areaCode]), info, null, function (code, data) {
var newsArray;
for (var i = 0; i < data.rows.length; i++) {
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
diff --git a/pages/travel/travel.js b/pages/travel/travel.js
index d7a147b..8fd44e7 100644
--- a/pages/travel/travel.js
+++ b/pages/travel/travel.js
@@ -20,7 +20,7 @@ Page({
rows: self.data.rows,
newsDirectoriesId: self.data.newsDirectoriesId
}
- app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [app.newsUrl]), info, null, function (code, data) {
+ app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease/{areaCode}', [app.newsUrl,app.areaCode]), info, null, function (code, data) {
var newsArray;
for (var i = 0; i < data.rows.length; i++) {
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
diff --git a/pages/userAgree/userAgree.js b/pages/userAgree/userAgree.js
index a41588b..c8b2d4b 100644
--- a/pages/userAgree/userAgree.js
+++ b/pages/userAgree/userAgree.js
@@ -25,7 +25,7 @@ Page({
},
getUserAgree: function(type) {
var self = this;
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/agreecontent/getagreecontentbyid/' + type, []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/agreecontent/getagreecontentbyid/' + type, []),
{}, {
headers: {
token: self.data.token
diff --git a/pages/venue/venue.js b/pages/venue/venue.js
index 205514b..6e08a30 100644
--- a/pages/venue/venue.js
+++ b/pages/venue/venue.js
@@ -2,226 +2,229 @@ var app = getApp();
// pages/venue/venue.js
Page({
- /**
- * 页面的初始数据
- */
- data: {
- venueUrl : app.venueUrl,
- imgRoute : '/route/file/download/true/',
- venueTypeParentId : 'df8b758c-f6d8-465a-9aa8-c451fde47076',
- page : '1',
- rows : '10',
- venueTypeList: [],
- venuesList: [],
- orderKey : '',
- venueType : '',
- latitude: '',
- longitude: '',
- selectingArea: false, // 显示隐藏选择区域
- areaList: [],
- venueArea: '',
- areaName: ''
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ venueUrl: app.venueUrl,
+ imgRoute: '/route/file/download/true/',
+ venueTypeParentId: 'df8b758c-f6d8-465a-9aa8-c451fde47076',
+ page: '1',
+ rows: '10',
+ venueTypeList: [],
+ venuesList: [],
+ orderKey: '',
+ venueType: '',
+ latitude: '',
+ longitude: '',
+ selectingArea: false, // 显示隐藏选择区域
+ areaList: [],
+ venueArea: '',
+ areaName: ''
+ },
- //获取定位
- getLocation: function () {
- var self = this;
- wx.getLocation({
- type: 'gcj02',
- success: function (res) {
- self.setData({
- latitude: res.latitude,
- longitude: res.longitude
+ //获取定位
+ getLocation: function () {
+ var self = this;
+ wx.getLocation({
+ type: 'gcj02',
+ success: function (res) {
+ self.setData({
+ latitude: res.latitude,
+ longitude: res.longitude
+ })
+ },
+ complete: function () {
+ self.listPageVenuesInfo();
+ }
})
- },
- complete: function(){
- self.listPageVenuesInfo();
- }
- })
- },
-
- //获取场馆分类
- listVenueType : function(){
- var self = this;
- app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuedictionary/listvenuedictionarybyparentidrelease/{venueTypeParentId}',
- [app.venueUrl, self.data.venueTypeParentId]), {}, null,
- function(code,data){
- self.setData({
- venueTypeList: data.data
- });
- },function(code, data){
- app.dialog.msg(data.msg);
- }
- );
- },
+ },
- //获取场馆列表
- listPageVenuesInfo : function(){
- var self = this;
- app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease', [app.venueUrl]),
- {
- page : self.data.page,
- rows : self.data.rows,
- orderKey : self.data.orderKey,
- venueType : self.data.venueType,
- latitude: self.data.latitude,
- longitude: self.data.longitude,
- selfLocation: 'TX',
- venueArea: self.data.venueArea
- }, null,
- function(code, data){
- data.rows.forEach(element => {
- element.venuePanorama = element.venuePanorama.split(',')[0];
- if(element.apart >= 1000){
- element.apart = (element.apart / 1000).toFixed(2) + 'km';
- } else {
- element.apart += 'm';
- }
- });
- self.setData({
- venuesList : data.rows,
- page : data.page
- });
- if (data.rows.length == 0) {
- app.dialog.msg('暂无数据');
+ //获取场馆分类
+ listVenueType: function () {
+ var self = this;
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuedictionary/listvenuedictionarybyparentidrelease/{venueTypeParentId}',
+ [app.venueUrl, self.data.venueTypeParentId]), {}, null,
+ function (code, data) {
+ self.setData({
+ venueTypeList: data.data
+ });
+ },
+ function (code, data) {
+ app.dialog.msg(data.msg);
+ }
+ );
+ },
+
+ //获取场馆列表
+ listPageVenuesInfo: function () {
+ var self = this;
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease/{areaCode}', [app.venueUrl, app.areaCode]), {
+ page: self.data.page,
+ rows: self.data.rows,
+ orderKey: self.data.orderKey,
+ venueType: self.data.venueType,
+ latitude: self.data.latitude,
+ longitude: self.data.longitude,
+ selfLocation: 'TX',
+ venueArea: self.data.venueArea
+ }, null,
+ function (code, data) {
+ data.rows.forEach(element => {
+ element.venuePanorama = element.venuePanorama.split(',')[0];
+ if (element.apart >= 1000) {
+ element.apart = (element.apart / 1000).toFixed(2) + 'km';
+ } else {
+ element.apart += 'm';
+ }
+ });
+ self.setData({
+ venuesList: data.rows,
+ page: data.page
+ });
+ if (data.rows.length == 0) {
+ app.dialog.msg('暂无数据');
+ }
+ },
+ function (code, data) {
+ app.dialog.msg(data.msg);
+ },
+ function () {
+ wx.hideNavigationBarLoading();
+ wx.stopPullDownRefresh();
+ wx.hideLoading();
+ }
+ );
+ },
+
+ //切换场馆类型
+ changeVenueType: function (options) {
+ var id = options.currentTarget.dataset.id;
+ if (id == this.data.venueType) {
+ id = ''
}
- }, function(code,data){
- app.dialog.msg(data.msg);
- },function(){
- wx.hideNavigationBarLoading();
- wx.stopPullDownRefresh();
- wx.hideLoading();
- }
- );
- },
+ this.setData({
+ venueType: id
+ })
+ this.listPageVenuesInfo();
+ },
+
+ //切换场馆排序
+ changeVenuesOrderBy: function (options) {
+ var beCheck = options.currentTarget.dataset.becheck;
+ this.setData({
+ orderKey: beCheck
+ })
+ this.listPageVenuesInfo();
+ },
+
+ //去详情页
+ goDetail: function (options) {
+ var venuesInfoId = options.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: '../venueDetail/venueDetail?venuesInfoId=' + venuesInfoId,
+ })
+ },
+
+ //选择区域
+ selectArea: function () {
+ this.setData({
+ selectingArea: true
+ })
+ },
+
+ // 获取地区列表
+ getAreaList: function () {
+ var self = this;
+ app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listbyparentidrelease/640675', []),
+ self.data.pages, null,
+ function (code, data) {
+ if (code == '200') {
+ self.setData({
+ areaList: data
+ })
+ }
+ })
+ },
+ // 切换地区
+ changeArea: function (e) {
+ app.dialog.loading('正在加载');
+ this.setData({
+ venueArea: e.currentTarget.dataset.area,
+ selectingArea: false,
+ areaName: e.currentTarget.dataset.areaname
+ })
+ this.listPageVenuesInfo()
+ },
+
+ // 全部地区
+ loadAll: function () {
+ this.setData({
+ venueArea: '',
+ selectingArea: false
+ })
+ this.listPageVenuesInfo()
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.listVenueType();
+ this.getLocation();
+ this.getAreaList();
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+ wx.showNavigationBarLoading();
+ this.setData({
+ venueType: '',
+ orderKey: '',
+ })
+ this.onLoad();
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
- //切换场馆类型
- changeVenueType: function(options){
- var id = options.currentTarget.dataset.id;
- if(id == this.data.venueType){
- id = ''
}
- this.setData({
- venueType : id
- })
- this.listPageVenuesInfo();
- },
-
- //切换场馆排序
- changeVenuesOrderBy: function(options){
- var beCheck = options.currentTarget.dataset.becheck;
- this.setData({
- orderKey : beCheck
- })
- this.listPageVenuesInfo();
- },
-
- //去详情页
- goDetail: function (options) {
- var venuesInfoId = options.currentTarget.dataset.id;
- wx.navigateTo({
- url: '../venueDetail/venueDetail?venuesInfoId=' + venuesInfoId,
- })
- },
-
- //选择区域
- selectArea: function () {
- this.setData({
- selectingArea: true
- })
- },
-
- // 获取地区列表
- getAreaList: function () {
- var self = this;
- app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listallbyparentidrelease/640675', []),
- self.data.pages, null, function (code, data) {
- if (code == '200') {
- self.setData({
- areaList: data
- })
- }
- })
- },
- // 切换地区
- changeArea: function (e) {
- app.dialog.loading('正在加载');
- this.setData({
- venueArea: e.currentTarget.dataset.area,
- selectingArea: false,
- areaName: e.currentTarget.dataset.areaname
- })
- this.listPageVenuesInfo()
- },
-
- // 全部地区
- loadAll: function () {
- this.setData({
- venueArea: '',
- selectingArea: false
- })
- this.listPageVenuesInfo()
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.listVenueType();
- this.getLocation();
- this.getAreaList();
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- wx.showNavigationBarLoading();
- this.setData({
- venueType: '',
- orderKey: '',
- })
- this.onLoad();
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
})
\ No newline at end of file
diff --git a/pages/volunteer/volunteer.js b/pages/volunteer/volunteer.js
index 800d4c5..5c18b7c 100644
--- a/pages/volunteer/volunteer.js
+++ b/pages/volunteer/volunteer.js
@@ -40,7 +40,7 @@ Page({
*/
activityList: function() {
var self = this;
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservicerelease', []),
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/volunteerservice/listpagevolunteerservicerelease/{areaCode}', [app.areaCode]),
self.data.pages, null, function(code, data) {
if('200' == code) {
// 将活动照片,拼接为可访问地址
@@ -119,7 +119,7 @@ Page({
wx.showNavigationBarLoading();
var self = this;
self.setData({
- [`pages.page`] : self.data.pages.page + 1
+ [`pages.page`] : 1
})
this.activityList();
},
diff --git a/pages/volunteerRegister/volunteerRegister.js b/pages/volunteerRegister/volunteerRegister.js
index 5a3fcdc..3a761eb 100644
--- a/pages/volunteerRegister/volunteerRegister.js
+++ b/pages/volunteerRegister/volunteerRegister.js
@@ -1,7 +1,6 @@
// pages/volunteerRegister/volunteerRegister.js
var app = getApp();
Page({
-
/**
* 页面的初始数据
*/
@@ -233,10 +232,10 @@ Page({
var url;
var requ;
if(!self.data.volunteerMsg) {
- url = '/wechat-miniapp/volunteer/savevolunteer';
+ url = '/app/volunteer/savevolunteer';
requ = app.restAjax.post;
}else {
- url = '/wechat-miniapp/volunteer/updatevolunteer/' + self.data.volunteerMsg.volunteerId;
+ url = '/app/volunteer/updatevolunteer/' + self.data.volunteerMsg.volunteerId;
requ = app.restAjax.put;
}
requ(app.restAjax.path(app.volunteerUrl + url, []),
@@ -305,7 +304,8 @@ Page({
getDataFromArea: function(dictId, type) {
var self = this;
return new Promise(resolve => {
- app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/area/listallbyparentidrelease/' + dictId, []),
+ // listbyparentidrelease
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/area/listbyparentidrelease/' + dictId, []),
{}, {
headers: {
'token': self.data.token
diff --git a/pages/volunteerRegister/volunteerRegister.json b/pages/volunteerRegister/volunteerRegister.json
index 7360326..64da9ee 100644
--- a/pages/volunteerRegister/volunteerRegister.json
+++ b/pages/volunteerRegister/volunteerRegister.json
@@ -1,4 +1,4 @@
{
"usingComponents": {},
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": false
}
\ No newline at end of file
diff --git a/pages/volunteerRegister/volunteerRegister.wxml b/pages/volunteerRegister/volunteerRegister.wxml
index cafe736..fb44c3f 100644
--- a/pages/volunteerRegister/volunteerRegister.wxml
+++ b/pages/volunteerRegister/volunteerRegister.wxml
@@ -1,128 +1,135 @@
+
- 您已经是志愿者,可修改以下信息!
-
- 公开经历:
-
-
-
-
-
-
+ 您已经是志愿者,可修改以下信息!
+
+
+ 公开经历:
+
+
+
+
+
+
+
-
-
- 市:
-
-
-
-
- {{teamCityArray[teamCityIndex]}}
-
-
-
+
+
+ 旗县区:
+
+
+
+
+ {{teamCityArray[teamCityIndex]}}
+
+
+
+
-
-
- 旗县区:
-
-
-
-
- {{teamCountyArray[teamCountyIndex]}}
-
-
-
+
+
+ 乡镇街道:
+
+
+
+
+ {{teamCountyArray[teamCountyIndex]}}
+
+
+
+
-
-
- 乡镇村:
-
-
-
-
- {{teamAreaArray[teamAreaIndex]}}
-
-
-
+
+
+ 村:
+
+
+
+
+ {{teamAreaArray[teamAreaIndex]}}
+
+
+
+
-
-
- 服务意向:
-
-
-
-
- {{item.dataName}}
-
-
-
+
+
+ 服务意向:
+
+
+
+
+ {{item.dataName}}
+
+
+
+
-
-
- 服务领域或行业:
-
-
-
-
- {{item.dataName}}
-
-
-
+
+
+ 服务领域或行业:
+
+
+
+
+ {{item.dataName}}
+
+
+
+
-
-
- 职业:
-
-
-
-
- {{occupationArray[occupationIndex]}}
-
-
-
+
+
+ 职业:
+
+
+
+
+ {{occupationArray[occupationIndex]}}
+
+
+
+
-
-
-
- 工作单位及职务:
-
-
+
+
+ 工作单位及职务:
+
+
+
-
-
-
- 特长爱好:
-
-
+
+
+ 特长爱好:
+
+
+
-
-
-
- 个人简历:
-
-
+
+
+ 个人简历:
+
+
+
-
-
-
- 备注:
-
-
+
+ 备注:
+
+
+
-
-
-
-
-
-
- 立即注册
- 立即修改
+
+
+
+
+
+ 立即注册
+ 立即修改
\ No newline at end of file
diff --git a/pages/volunteerRegister/volunteerRegister.wxss b/pages/volunteerRegister/volunteerRegister.wxss
index f2dba43..1c4c9d6 100644
--- a/pages/volunteerRegister/volunteerRegister.wxss
+++ b/pages/volunteerRegister/volunteerRegister.wxss
@@ -1,69 +1,110 @@
-.register{
- padding: 30rpx;
- margin-bottom: 150rpx;
+page {
+ background: #ffffff;
}
-.row{
- display: flex;
- justify-content: space-between;
- margin-bottom: 15rpx;
- height: 55rpx;
+
+.register {
+ padding: 0rpx 0rpx 250rpx 0rpx;
}
-.info-name{
- width: 21%;
- font-size: 26rpx;
- color: #000;
- line-height: 55rpx;
+
+.hint {
+ background: white;
+ color: red;
+ padding: 20rpx;
}
-.info-text{
- width: 77%;
- font-size: 26rpx;
- height: 55rpx;
+
+.thick-line {
+ align-self: center;
+ background: #f2f2f2;
+ height: 5rpx;
}
-.info-text input{
- width: 100%;
- height: 55rpx;
- border: 1px solid #ddd;
- padding: 0 10rpx;
- box-sizing: border-box;
+
+.thin-line {
+ margin: 0rpx 30rpx;
+ align-self: center;
+ background: #f2f2f2;
+ height: 1rpx;
}
-.info-text textarea{
- width: 100%;
- height: 150rpx;
- padding: 10rpx;
- box-sizing: border-box;
- border: 1px solid #DDD;
+
+.row {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx;
}
-picker, .picker{
- height: 55rpx;
- line-height: 55rpx;
+
+.column {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+ padding: 20rpx;
}
-text{
- color: red;
+
+.info-name {
+ font-size: 26rpx;
+ color: #000;
+ line-height: 55rpx;
+ width: 30%;
}
-.section{
- border: 1px solid #ddd;
- padding: 0 10rpx;
- height: 55rpx;
+
+.info-text {
+ font-size: 26rpx;
+ height: 55rpx;
}
-.submit{
- width: 100%;
- margin: 20rpx auto 0;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 80rpx;
- color: #fff;
- border-radius: 10rpx;
- background: #9F1512;
+
+.info-text input {
+ width: 100%;
+ height: 55rpx;
+ padding: 0 10rpx;
+ box-sizing: border-box;
+ text-align: right;
}
-checkbox{
- transform: scale(0.8);
+
+.info-text textarea {
+ height: 150rpx;
+ padding: 10rpx;
+ box-sizing: border-box;
+ border: 1px solid #DDD;
}
-.bottom{
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- padding: 0 30rpx 20rpx;
- background: #fff;
+
+picker,
+.picker {
+ height: 55rpx;
+ line-height: 55rpx;
+}
+
+text {
+ color: red;
+}
+
+.section {
+ padding: 0 10rpx;
+ height: 55rpx;
+}
+
+.submit {
+ width: 100%;
+ margin: 20rpx auto 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 80rpx;
+ color: #fff;
+ border-radius: 10rpx;
+ background: #9F1512;
+}
+
+checkbox:nth-of-type(n+2) {
+ margin-left: 10rpx;
+}
+
+.bottom {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding: 0 30rpx 20rpx;
+ background: #fff;
+ z-index: 10;
}
\ No newline at end of file
diff --git a/pages/volunteerTeam/volunteerTeam.js b/pages/volunteerTeam/volunteerTeam.js
index 6e10d29..2526ea3 100644
--- a/pages/volunteerTeam/volunteerTeam.js
+++ b/pages/volunteerTeam/volunteerTeam.js
@@ -2,163 +2,205 @@
var app = getApp();
Page({
- /**
- * 页面的初始数据
- */
- data: {
- token: '',
- otherTeamMap: {},
- type: '1',
- teamId: '',
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ token: '',
+ otherTeamMap: [],
+ type: '1',
+ teamId: '',
+ page: {
+ page: 1,
+ rows: 10
+ },
+ totalSize: 0,
- },
- getToken: function() {
- var self = this;
- return new Promise(resolve =>{
- wx.getStorage({
- key: 'token',
- success(res) {
- self.setData({
- token: res.data
- })
- return resolve();
+ },
+ getToken: function () {
+ var self = this;
+ return new Promise(resolve => {
+ wx.getStorage({
+ key: 'token',
+ success(res) {
+ self.setData({
+ token: res.data
+ })
+ return resolve();
+ }
+ })
+ })
+ },
+ newTeam: function () {
+ wx.navigateTo({
+ url: '../newTeam/newTeam',
+ })
+ },
+ changeTab: function (e) {
+ var self = this;
+ self.data.page.page = 1;
+ self.setData({
+ page: self.data.page,
+ otherTeamMap: [],
+ totalSize: 0,
+ type: e.currentTarget.dataset.type
+ })
+ if (self.data.type === '1') {
+ self.otherTeam(app.volunteerUrl + '/app/team/otherteamm?otherTeam=true');
+ } else {
+ self.otherTeam(app.volunteerUrl + '/app/team/myjointeam?myTeam=true');
}
- })
- })
- },
- newTeam: function () {
- wx.navigateTo({
- url: '../newTeam/newTeam',
- })
- },
- changeTab: function(e) {
- var self = this;
- self.setData({
- type: e.currentTarget.dataset.type
- })
- if(self.data.type === '1') {
- self.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/otherteamm?otherTeam=true');
- }else {
- self.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/myjointeam?myTeam=true');
+ },
+ otherTeam: function (url) {
+ var self = this;
+ app.restAjax.get(app.restAjax.path(url, []), self.data.page, {
+ headers: {
+ token: self.data.token
+ }
+ }, function (code, data) {
+ if ('200' == code) {
+ self.setData({
+ totalSize: data.total
+ })
+ if (data.rows && data.rows.length > 0) {
+ self.setData({
+ otherTeamMap: self.data.otherTeamMap.concat(data.rows)
+ })
+ } else {
+ app.dialog.msg('暂无更多数据了')
+ }
+ }
+ }, function (code, data) {
+ app.dialog.msg(data.msg);
+ }, function () {
+ wx.stopPullDownRefresh()
+ })
+ },
+ /**
+ * 申请/退出加入团队
+ */
+ joinOrOutTeam: function (e) {
+ var self = this;
+ self.setData({
+ teamId: e.currentTarget.dataset.teamid
+ })
+ var teamMemberVO;
+ var url;
+ var methodType;
+ var title;
+ if ('1' == self.data.type) {
+ url = app.volunteerUrl + '/app/teammember/saveteammember'
+ teamMemberVO = {
+ teamId: e.currentTarget.dataset.teamid
+ }
+ methodType = app.restAjax.post
+ title = '申请成功!'
+ } else {
+ url = app.volunteerUrl + '/app/teammember/quitTeam/' + self.data.teamId
+ methodType = app.restAjax.get
+ title = '退出成功!'
+ }
+
+ methodType(app.restAjax.path(url, []),
+ teamMemberVO, {
+ headers: {
+ token: self.data.token
+ }
+ },
+ function (code, data) {
+ if ('200' == code) {
+ app.dialog.msg(title);
+ wx.navigateTo({
+ url: '../volunteer/volunteer',
+ })
+ }
+ },
+ function (code, data) {
+ app.dialog.msg(data.msg);
+ },
+ function () {
+
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getToken().then(result => {
+ this.otherTeam(app.volunteerUrl + '/app/team/otherteamm?otherTeam=true');
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+ var self = this;
+ self.data.page.page = 1;
+ self.setData({
+ page: self.data.page,
+ otherTeamMap: [],
+ totalSize: 0,
+ })
+ if (self.data.type === '1') {
+ self.otherTeam(app.volunteerUrl + '/app/team/otherteamm?otherTeam=true');
+ } else {
+ self.otherTeam(app.volunteerUrl + '/app/team/myjointeam?myTeam=true');
+ }
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ var self = this;
+ if (self.data.otherTeamMap.length < self.data.totalSize) {
+ self.data.page.page = self.data.page.page + 1
+ self.setData({
+ page: self.data.page
+ })
+ if (self.data.type === '1') {
+ self.otherTeam(app.volunteerUrl + '/app/team/otherteamm?otherTeam=true');
+ } else {
+ self.otherTeam(app.volunteerUrl + '/app/team/myjointeam?myTeam=true');
+ }
+ } else {
+ app.dialog.msg('暂无更多数据了')
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
}
- },
- otherTeam: function(url) {
- var self = this;
- app.restAjax.get(app.restAjax.path(url, []),
- {}, {
- headers: {
- token: self.data.token
- }
- }, function(code, data) {
- if('200' == code) {
- self.setData({
- otherTeamMap: data.rows
- })
- }
- }, function(code, data) {
- app.dialog.msg(data.msg);
- }, function() {
-
- })
- },
- /**
- * 申请/退出加入团队
- */
- joinOrOutTeam: function(e) {
- var self = this;
- self.setData({
- teamId: e.currentTarget.dataset.teamid
- })
- var teamMemberVO;
- var url;
- var methodType;
- var title;
- if('1' == self.data.type) {
- url = app.volunteerUrl + '/wechat-miniapp/teammember/saveteammember'
- teamMemberVO = {
- teamId: e.currentTarget.dataset.teamid
- }
- methodType = app.restAjax.post
- title = '申请成功!'
- }else {
- url = app.volunteerUrl + '/wechat-miniapp/teammember/quitTeam/' + self.data.teamId
- methodType = app.restAjax.get
- title = '退出成功!'
- }
-
- methodType(app.restAjax.path(url, []),
- teamMemberVO, {
- headers: {
- token: self.data.token
- }
- }, function(code, data) {
- if('200' == code) {
- app.dialog.msg(title);
- wx.navigateTo({
- url: '../volunteer/volunteer',
- })
- }
- }, function(code, data) {
- app.dialog.msg(data.msg);
- }, function() {
-
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.getToken().then(result => {
- this.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/otherteamm?otherTeam=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/volunteerTeam/volunteerTeam.wxss b/pages/volunteerTeam/volunteerTeam.wxss
index 97bc150..2674c63 100644
--- a/pages/volunteerTeam/volunteerTeam.wxss
+++ b/pages/volunteerTeam/volunteerTeam.wxss
@@ -40,8 +40,7 @@
}
.team{
margin-top: 90rpx;
- padding: 0 30rpx;
- margin-bottom: 110rpx;
+ padding: 0rpx 30rpx 110rpx 30rpx;
}
.team-box{
padding: 20rpx 0;
diff --git a/utils/indexof.wxs b/utils/indexof.wxs
new file mode 100644
index 0000000..1813a08
--- /dev/null
+++ b/utils/indexof.wxs
@@ -0,0 +1,10 @@
+function indexOf(str, val) {
+ if (str.indexOf(val) != -1) {
+ return true;
+ } else {
+ return false;
+ }
+}
+module.exports = {
+ indexOf: indexOf
+}
\ No newline at end of file
diff --git a/utils/util.js b/utils/util.js
index 9e2b322..46464a2 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -1,12 +1,12 @@
const formatTime = date => {
- const year = date.getFullYear()
- const month = date.getMonth() + 1
- const day = date.getDate()
- const hour = date.getHours()
- const minute = date.getMinutes()
- const second = date.getSeconds()
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1
+ const day = date.getDate()
+ const hour = date.getHours()
+ const minute = date.getMinutes()
+ const second = date.getSeconds()
- return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
+ return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
/**
@@ -14,19 +14,27 @@ const formatTime = date => {
* @param {*} date
*/
const formatDate = date => {
- const year = date.getFullYear()
- const month = date.getMonth() + 1
- const day = date.getDate()
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1
+ const day = date.getDate()
- return [year, month, day].map(formatNumber).join('-')
+ return [year, month, day].map(formatNumber).join('-')
}
const formatNumber = n => {
- n = n.toString()
- return n[1] ? n : '0' + n
+ n = n.toString()
+ return n[1] ? n : '0' + n
}
-module.exports = {
- formatTime: formatTime,
- formatDate: formatDate
+function indexOf(str, val) {
+ if (str.indexOf(val) != -1) {
+ return true;
+ } else {
+ return false;
+ }
}
+module.exports = {
+ formatTime: formatTime,
+ formatDate: formatDate,
+ indexOf: indexOf
+}
\ No newline at end of file