图片压缩、页面布局修改、部分接口添加areaCode
4
app.js
@ -1,6 +1,7 @@
|
|||||||
//app.js
|
//app.js
|
||||||
var restAjax = require('utils/restAjax.js');
|
var restAjax = require('utils/restAjax.js');
|
||||||
var dialog = require('utils/dialog.js');
|
var dialog = require('utils/dialog.js');
|
||||||
|
var utils = require('utils/util.js');
|
||||||
// + 'https://www.xzszwhy.cn/usercenter'
|
// + 'https://www.xzszwhy.cn/usercenter'
|
||||||
App({
|
App({
|
||||||
loginUrl: restAjax.baseUrl,
|
loginUrl: restAjax.baseUrl,
|
||||||
@ -13,7 +14,7 @@ App({
|
|||||||
volunteerUrl: restAjax.baseUrl,
|
volunteerUrl: restAjax.baseUrl,
|
||||||
activityUrl: restAjax.baseUrl,
|
activityUrl: restAjax.baseUrl,
|
||||||
volunteerUrl: restAjax.baseUrl,
|
volunteerUrl: restAjax.baseUrl,
|
||||||
liveUrl: restAjax.ulr+'live/',
|
liveUrl: restAjax.url + 'live/',
|
||||||
liveRecordUrl: restAjax.baseUrl,
|
liveRecordUrl: restAjax.baseUrl,
|
||||||
socialUrl: restAjax.baseUrl,
|
socialUrl: restAjax.baseUrl,
|
||||||
areaCode: '540200000000',
|
areaCode: '540200000000',
|
||||||
@ -23,6 +24,7 @@ App({
|
|||||||
restAjax: restAjax,
|
restAjax: restAjax,
|
||||||
shopImgUrl: restAjax.url + "xzshop/route/file/download/true/",
|
shopImgUrl: restAjax.url + "xzshop/route/file/download/true/",
|
||||||
dialog: dialog,
|
dialog: dialog,
|
||||||
|
utils: utils,
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
// 展示本地存储能力
|
// 展示本地存储能力
|
||||||
var logs = wx.getStorageSync('logs') || []
|
var logs = wx.getStorageSync('logs') || []
|
||||||
|
69
app.wxss
@ -8,3 +8,72 @@
|
|||||||
padding: 200rpx 0;
|
padding: 200rpx 0;
|
||||||
box-sizing: border-box;
|
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);
|
||||||
|
}
|
BIN
images/activity-on.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 689 B |
BIN
images/activity.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 634 B |
BIN
images/address.png
Normal file → Executable file
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 453 B |
BIN
images/avatar.png
Normal file → Executable file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 582 B |
BIN
images/big-news.png
Normal file → Executable file
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
images/center-bg.png
Normal file → Executable file
Before Width: | Height: | Size: 522 KiB After Width: | Height: | Size: 122 KiB |
BIN
images/center-on.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 606 B |
BIN
images/center.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 599 B |
BIN
images/collect.png
Normal file → Executable file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 624 B |
BIN
images/collected.png
Normal file → Executable file
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 510 B |
BIN
images/culture-on.png
Normal file → Executable file
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 871 B |
BIN
images/culture-slide.png
Normal file → Executable file
Before Width: | Height: | Size: 553 KiB After Width: | Height: | Size: 151 KiB |
BIN
images/culture.png
Normal file → Executable file
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 728 B |
BIN
images/delete-photo.png
Normal file → Executable file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 289 B |
BIN
images/delete.png
Normal file → Executable file
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 304 B |
BIN
images/friend.png
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 510 B |
BIN
images/good.png
Normal file → Executable file
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 383 B |
BIN
images/ic_empty_data.png
Normal file → Executable file
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 454 B |
BIN
images/ic_goods_type_default.png
Normal file → Executable file
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 519 B |
BIN
images/ic_shop_car_icon.png
Normal file → Executable file
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 387 B |
BIN
images/index-on.png
Normal file → Executable file
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 523 B |
BIN
images/index.png
Normal file → Executable file
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 470 B |
BIN
images/login-bg.png
Normal file → Executable file
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 41 KiB |
BIN
images/logo.png
Normal file → Executable file
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.7 KiB |
BIN
images/selected-l.png
Normal file → Executable file
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 121 B |
BIN
images/selected-r.png
Normal file → Executable file
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 122 B |
BIN
images/setting.png
Normal file → Executable file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 716 B |
BIN
images/share.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 757 B |
@ -8,19 +8,39 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
areaList: [],
|
areaList: [],
|
||||||
|
typeList: [],
|
||||||
pages: {
|
pages: {
|
||||||
page: 1,
|
page: 1,
|
||||||
rows: 5,
|
rows: 5,
|
||||||
county: ''
|
activityType: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//获取活动分类
|
||||||
|
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) {
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
getAreaList: function () {
|
getAreaList: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listallbyparentidrelease/640675', []),
|
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/dictionaryself/listdictionarybyparentidrelease/e36ad682-c6b4-44fe-a05c-889a5ff7c284', []),
|
||||||
self.data.pages, null, function (code, data) {
|
self.data.pages, null,
|
||||||
|
function (code, data) {
|
||||||
if (code == '200') {
|
if (code == '200') {
|
||||||
self.setData({
|
self.setData({
|
||||||
areaList: data
|
areaList: data,
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,8 +48,9 @@ Page({
|
|||||||
},
|
},
|
||||||
changeArea: function (e) {
|
changeArea: function (e) {
|
||||||
app.dialog.loading('正在加载');
|
app.dialog.loading('正在加载');
|
||||||
|
console.log(e)
|
||||||
this.setData({
|
this.setData({
|
||||||
'pages.county': e.currentTarget.dataset.area
|
'pages.activityType': e.currentTarget.dataset.dataid
|
||||||
})
|
})
|
||||||
this.getActivityList()
|
this.getActivityList()
|
||||||
},
|
},
|
||||||
@ -47,8 +68,9 @@ Page({
|
|||||||
},
|
},
|
||||||
getActivityList: function () {
|
getActivityList: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.restAjax.get(app.restAjax.path(app.activityUrl + '/wechat-miniapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
|
app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activitylibrary/listpageactivitylibraryfornetrelease/{areaCode}', [app.areaCode]),
|
||||||
self.data.pages, null, function(code, data) {
|
self.data.pages, null,
|
||||||
|
function (code, data) {
|
||||||
console.log(code + "===" + data)
|
console.log(code + "===" + data)
|
||||||
if ('200' == code) {
|
if ('200' == code) {
|
||||||
for (var item of data.rows) {
|
for (var item of data.rows) {
|
||||||
@ -73,9 +95,11 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, function() {
|
},
|
||||||
|
function () {
|
||||||
|
|
||||||
}, function() {
|
},
|
||||||
|
function () {
|
||||||
wx.hideNavigationBarLoading(); //完成停止加载图标
|
wx.hideNavigationBarLoading(); //完成停止加载图标
|
||||||
wx.stopPullDownRefresh();
|
wx.stopPullDownRefresh();
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
@ -85,8 +109,10 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
this.getActivityList();
|
this.getActivityTypeList()
|
||||||
this.getAreaList()
|
// this.getActivityList();
|
||||||
|
// this.getAreaList()
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -125,7 +151,9 @@ Page({
|
|||||||
wx.showNavigationBarLoading();
|
wx.showNavigationBarLoading();
|
||||||
var self = this;
|
var self = this;
|
||||||
self.setData({
|
self.setData({
|
||||||
[`pages.page`] : self.data.pages.page + 1
|
[`pages.page`]: 1,
|
||||||
|
dataList: []
|
||||||
|
|
||||||
})
|
})
|
||||||
this.getActivityList();
|
this.getActivityList();
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<view class="area">
|
<view class="area">
|
||||||
<view class="area-box {{'' == pages.county?'active': ''}}" bindtap="loadAll">全部</view>
|
<!-- <view class="area-box {{'' == pages.county?'active': ''}}" bindtap="loadAll">全部</view> -->
|
||||||
<view class="area-box {{item.areaId == pages.county?'active': ''}}" wx:for="{{areaList}}" wx:key="index" data-area="{{item.areaId}}" bindtap="changeArea">{{item.areaName}}</view>
|
<view class="area-box {{item.dataId == pages.activityType? 'active' : ''}}" wx:for="{{typeList}}" wx:key="index" data-dataId="{{item.dataId}}" bindtap="changeArea">{{item.dataName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="activity">
|
<view class="activity">
|
||||||
<view class="activity-box" bindtap="goDetail" data-id="{{item.activityLibraryId}}" wx:for="{{dataList}}" wx:key="index">
|
<view class="activity-box" bindtap="goDetail" data-id="{{item.activityLibraryId}}" wx:for="{{dataList}}" wx:key="index">
|
||||||
|
@ -2,20 +2,24 @@
|
|||||||
padding: 20rpx 30rpx 0;
|
padding: 20rpx 30rpx 0;
|
||||||
margin-top: 80rpx;
|
margin-top: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-box {
|
.activity-box {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.1);
|
box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-img {
|
.activity-img {
|
||||||
height: 320rpx;
|
height: 320rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-img image {
|
.activity-img image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.corner {
|
.corner {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
@ -23,6 +27,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.corner view {
|
.corner view {
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
@ -32,20 +37,25 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 5rpx;
|
border-radius: 5rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-count {
|
.view-count {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-count image {
|
.view-count image {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-info {
|
.activity-info {
|
||||||
padding: 15rpx 20rpx;
|
padding: 15rpx 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-title {
|
.activity-title {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -55,6 +65,7 @@
|
|||||||
color: #242424;
|
color: #242424;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sign {
|
.sign {
|
||||||
background: rgba(159, 21, 18, .1);
|
background: rgba(159, 21, 18, .1);
|
||||||
color: #9F1512;
|
color: #9F1512;
|
||||||
@ -63,11 +74,13 @@
|
|||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #242424;
|
color: #242424;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area {
|
.area {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -76,7 +89,9 @@
|
|||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
box-shadow: 10rpx 10rpx 5rpx #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-box {
|
.area-box {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
@ -84,6 +99,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-box.active {
|
.area-box.active {
|
||||||
color: #9F1512;
|
color: #9F1512;
|
||||||
}
|
}
|
@ -58,12 +58,12 @@ Page({
|
|||||||
var url;
|
var url;
|
||||||
var id = options.id;
|
var id = options.id;
|
||||||
if(!self.data.token) {
|
if(!self.data.token) {
|
||||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
url = '/app/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||||
self.setData({
|
self.setData({
|
||||||
token: null
|
token: null
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyid/' + id
|
url = '/app/activitylibrary/getactivitylibrarybyid/' + id
|
||||||
self.getToken()
|
self.getToken()
|
||||||
}
|
}
|
||||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, {
|
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, {
|
||||||
|
@ -31,7 +31,7 @@ Page({
|
|||||||
},
|
},
|
||||||
getActivityHis: function() {
|
getActivityHis: function() {
|
||||||
var self = this;
|
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, {
|
self.data.pages, {
|
||||||
headers: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
|
@ -118,9 +118,9 @@ Page({
|
|||||||
var url;
|
var url;
|
||||||
var id = options.id;
|
var id = options.id;
|
||||||
if (!self.data.token) {
|
if (!self.data.token) {
|
||||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
url = '/app/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||||
} else {
|
} else {
|
||||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyid/' + id
|
url = '/app/activitylibrary/getactivitylibrarybyid/' + id
|
||||||
}
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
activityId: options.id
|
activityId: options.id
|
||||||
|
@ -33,7 +33,7 @@ Page({
|
|||||||
doGetLibraryList: function(page) {
|
doGetLibraryList: function(page) {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.dialog.loading('正在加载');
|
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,
|
page: page,
|
||||||
rows: self.data.rows
|
rows: self.data.rows
|
||||||
}, null, function(code, data) {
|
}, null, function(code, data) {
|
||||||
|
@ -121,7 +121,7 @@ Page({
|
|||||||
},
|
},
|
||||||
doGetBanner: function () {
|
doGetBanner: function () {
|
||||||
var self = this;
|
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',
|
newsDirectoriesId: 'eab0ca3c-d35d-4c02-9397-ace2bdd10fc1',
|
||||||
page: 1,
|
page: 1,
|
||||||
rows: 5
|
rows: 5
|
||||||
@ -135,7 +135,7 @@ Page({
|
|||||||
},
|
},
|
||||||
doGetVenueList: function () {
|
doGetVenueList: function () {
|
||||||
var self = this;
|
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,
|
page: 1,
|
||||||
rows: 3,
|
rows: 3,
|
||||||
latitude: app.globalData.curLat,
|
latitude: app.globalData.curLat,
|
||||||
@ -152,9 +152,26 @@ Page({
|
|||||||
app.dialog.msg(data.msg);
|
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 () {
|
doGetActivityList: function () {
|
||||||
var self = this;
|
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,
|
page: 1,
|
||||||
rows: 3
|
rows: 3
|
||||||
}, null, function (code, data) {
|
}, null, function (code, data) {
|
||||||
@ -264,8 +281,8 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goHeritage: function () {
|
goHeritage: function () {
|
||||||
wx.switchTab({
|
wx.navigateTo({
|
||||||
url: '../heritage/heritage',
|
url: '/pages/heritage/heritage',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goCultureDetail: function (event) {
|
goCultureDetail: function (event) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<view class="swiper-box">
|
<view class="swiper-box">
|
||||||
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}">
|
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}">
|
||||||
<swiper-item class="swiper-item" wx:for="{{news.bannerList}}" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:for-index="idx" wx:for-item="item" wx:key="bannerList">
|
<swiper-item class="swiper-item" wx:for="{{news.bannerList}}" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:for-index="idx" wx:for-item="item" wx:key="bannerList">
|
||||||
<image src="{{news.newsUrl}}/route/file/download/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" class="swiper-img" wx:key="swiperImg"></image>
|
<image binderror="loadBannerErr" data-index="{{idx}}" src="{{news.newsUrl}}/route/file/download/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" class="swiper-img" wx:key="swiperImg"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@ -41,12 +41,17 @@
|
|||||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="line"></view>
|
||||||
<view class="recommend-container">
|
<view class="recommend-container">
|
||||||
<view class="recommend-box" wx:for="{{venue.venueList}}" bindtap="goVenueDetail" data-venues-info-Id="{{item.venuesInfoId}}" wx:for-index="index" wx:for-item="item" wx:key="venueList">
|
<view class="recommend-box" wx:for="{{venue.venueList}}" bindtap="goVenueDetail" data-venues-info-Id="{{item.venuesInfoId}}" wx:for-index="index" wx:for-item="item" wx:key="venueList">
|
||||||
|
<view class="recommend-status">场馆导航</view>
|
||||||
|
<view class="recommend-name">{{item.venueName}}</view>
|
||||||
<image src="{{venue.venueUrl}}/route/file/download/true/{{item.venuePanoramaArray[0]}}"></image>
|
<image src="{{venue.venueUrl}}/route/file/download/true/{{item.venuePanoramaArray[0]}}"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="recommend-box" wx:for="{{activity.activityList}}" bindtap="goActivityDetail" data-activity-library-id="{{item.activityLibraryId}}" wx:for-index="index" wx:for-item="item" wx:key="activityList">
|
<view class="recommend-box" wx:for="{{activity.activityList}}" bindtap="goActivityDetail" data-activity-library-id="{{item.activityLibraryId}}" wx:for-index="index" wx:for-item="item" wx:key="activityList">
|
||||||
<image src="{{activity.activityUrl}}/route/file/download/true/{{item.activityImageArray[0]}}"></image>
|
<view class="recommend-status">精彩活动</view>
|
||||||
|
<view class="recommend-name">{{item.activityTitle}}</view>
|
||||||
|
<image src="{{activity.activityUrl}}/route/file/download/true/{{item.activityImageArray[0]}}" data-index="{{index}}" binderror="loadImgErr"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -29,7 +29,7 @@ swiper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.recommend {
|
.recommend {
|
||||||
padding: 30rpx;
|
padding: 0rpx 30rpx 30rpx 30rpx;
|
||||||
border-bottom: 5px solid #FBFBFB;
|
border-bottom: 5px solid #FBFBFB;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,6 +37,13 @@ swiper {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 100%;
|
||||||
|
height: 1rpx;
|
||||||
|
background: #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recommend-box {
|
.recommend-box {
|
||||||
@ -49,11 +56,36 @@ swiper {
|
|||||||
margin-right: 30rpx;
|
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 {
|
.recommend-box image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 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 {
|
.public-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10rpx 0rpx;
|
padding: 10rpx 0rpx;
|
||||||
|
@ -48,10 +48,10 @@ Page({
|
|||||||
})
|
})
|
||||||
if(self.data.type === '1') {
|
if(self.data.type === '1') {
|
||||||
// 我发起的活动
|
// 我发起的活动
|
||||||
self.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservice');
|
self.myActivity(app.volunteerUrl + '/app/volunteerservice/listpagevolunteerservice');
|
||||||
}else {
|
}else {
|
||||||
// 我参加的活动
|
// 我参加的活动
|
||||||
self.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagemyjoinservice');
|
self.myActivity(app.volunteerUrl + '/app/volunteerservice/listpagemyjoinservice');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
myActivity: function(url) {
|
myActivity: function(url) {
|
||||||
@ -83,7 +83,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
this.getToken().then(result => {
|
this.getToken().then(result => {
|
||||||
this.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservice');
|
this.myActivity(app.volunteerUrl + '/app/volunteerservice/listpagevolunteerservice');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -68,14 +68,14 @@ Page({
|
|||||||
var methodType;
|
var methodType;
|
||||||
var title;
|
var title;
|
||||||
if('1' == self.data.type) {
|
if('1' == self.data.type) {
|
||||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/saveteammember'
|
url = app.volunteerUrl + '/app/teammember/saveteammember'
|
||||||
teamMemberVO = {
|
teamMemberVO = {
|
||||||
teamId: e.currentTarget.dataset.teamid
|
teamId: e.currentTarget.dataset.teamid
|
||||||
}
|
}
|
||||||
methodType = app.restAjax.post
|
methodType = app.restAjax.post
|
||||||
title = '申请成功!'
|
title = '申请成功!'
|
||||||
}else {
|
}else {
|
||||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/quitTeam/' + self.data.teamId
|
url = app.volunteerUrl + '/app/teammember/quitTeam/' + self.data.teamId
|
||||||
methodType = app.restAjax.get
|
methodType = app.restAjax.get
|
||||||
title = '退出成功!'
|
title = '退出成功!'
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
this.getToken().then(result => {
|
this.getToken().then(result => {
|
||||||
this.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/myteamm');
|
this.otherTeam(app.volunteerUrl + '/app/team/myteamm');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ Page({
|
|||||||
self.data.teamArea[self.data.teamAreaIndex].dictionaryId :
|
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, {
|
teamVO, {
|
||||||
headers: {
|
headers: {
|
||||||
'token': self.data.token
|
'token': self.data.token
|
||||||
@ -262,7 +262,7 @@ Page({
|
|||||||
getDataFromArea: function(dictId, type) {
|
getDataFromArea: function(dictId, type) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(resolve => {
|
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: {
|
headers: {
|
||||||
'token': self.data.token
|
'token': self.data.token
|
||||||
|
@ -177,7 +177,7 @@ Page({
|
|||||||
photo: self.data.uploadPhoto,
|
photo: self.data.uploadPhoto,
|
||||||
serviceRequirement: self.data.serviceRequirement
|
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, {
|
volunteerServiceVO, {
|
||||||
headers: {
|
headers: {
|
||||||
'token': self.data.token
|
'token': self.data.token
|
||||||
|
@ -17,6 +17,7 @@ Page({
|
|||||||
areaId: app.areaCode,
|
areaId: app.areaCode,
|
||||||
defaultAreaId: app.areaCode
|
defaultAreaId: app.areaCode
|
||||||
},
|
},
|
||||||
|
//获取下级子目录
|
||||||
doGetNewsDictionariesList: function () {
|
doGetNewsDictionariesList: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.dialog.loading('正在加载');
|
app.dialog.loading('正在加载');
|
||||||
@ -43,22 +44,19 @@ Page({
|
|||||||
});
|
});
|
||||||
self.doGetNewsList(1);
|
self.doGetNewsList(1);
|
||||||
},
|
},
|
||||||
//全部类型
|
//获取新闻
|
||||||
doClearCurrentNewsDictionariesId: function () {
|
|
||||||
var self = this;
|
|
||||||
self.setData({
|
|
||||||
currentNewsDictionariesId: self.data.dirId
|
|
||||||
});
|
|
||||||
self.doGetNewsList(1);
|
|
||||||
},
|
|
||||||
doGetNewsList: function (page, lv) {
|
doGetNewsList: function (page, lv) {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.dialog.loading('正在加载');
|
app.dialog.loading('正在加载');
|
||||||
var info = {
|
var info = {
|
||||||
newsDirectoriesId: self.data.currentNewsDictionariesId,
|
|
||||||
page: page,
|
page: page,
|
||||||
rows: self.data.rows
|
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;
|
var tempAreaCode = app.areaCode;
|
||||||
if (lv) {
|
if (lv) {
|
||||||
tempAreaCode = self.data.areaId;
|
tempAreaCode = self.data.areaId;
|
||||||
@ -94,7 +92,7 @@ Page({
|
|||||||
},
|
},
|
||||||
getAreaList: function () {
|
getAreaList: function () {
|
||||||
var self = this;
|
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,
|
self.data.pages, null,
|
||||||
function (code, data) {
|
function (code, data) {
|
||||||
if (code == '200') {
|
if (code == '200') {
|
||||||
@ -113,6 +111,15 @@ Page({
|
|||||||
})
|
})
|
||||||
this.doGetNewsList(1, lv)
|
this.doGetNewsList(1, lv)
|
||||||
},
|
},
|
||||||
|
//加载全部类型
|
||||||
|
doClearCurrentNewsDictionariesId: function () {
|
||||||
|
var self = this;
|
||||||
|
self.setData({
|
||||||
|
currentNewsDictionariesId: self.data.dirId
|
||||||
|
});
|
||||||
|
self.doGetNewsList(1);
|
||||||
|
},
|
||||||
|
//加载全部地区
|
||||||
loadAll: function () {
|
loadAll: function () {
|
||||||
this.setData({
|
this.setData({
|
||||||
areaId: app.areaCode
|
areaId: app.areaCode
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
|
min-width: fit-content;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
@ -40,7 +40,7 @@ Page({
|
|||||||
page: page,
|
page: page,
|
||||||
rows: self.data.rows
|
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;
|
var newsArray;
|
||||||
for (var i = 0; i < data.rows.length; i++) {
|
for (var i = 0; i < data.rows.length; i++) {
|
||||||
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
|
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
|
||||||
|
@ -134,7 +134,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
sendEnrollRequest: function(serviceMemberVO) {
|
sendEnrollRequest: function(serviceMemberVO) {
|
||||||
var self = this;
|
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, {
|
serviceMemberVO, {
|
||||||
headers: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
@ -159,9 +159,9 @@ Page({
|
|||||||
var self = this;
|
var self = this;
|
||||||
var url;
|
var url;
|
||||||
if(self.data.teamArray.length > 0) {
|
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 {
|
}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, []), {}, {
|
app.restAjax.get(app.restAjax.path(url, []), {}, {
|
||||||
@ -187,7 +187,7 @@ Page({
|
|||||||
getMyTeam: function() {
|
getMyTeam: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
console.log(self.data.token)
|
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: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
|
@ -28,7 +28,7 @@ Page({
|
|||||||
},
|
},
|
||||||
getDetail(teamId) {
|
getDetail(teamId) {
|
||||||
var self = this;
|
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: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
@ -48,7 +48,7 @@ Page({
|
|||||||
},
|
},
|
||||||
getMember(teamId) {
|
getMember(teamId) {
|
||||||
var self = this;
|
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: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
@ -80,7 +80,7 @@ Page({
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
var id = e.currentTarget.dataset.teammemberid;
|
var id = e.currentTarget.dataset.teammemberid;
|
||||||
var type = e.currentTarget.dataset.type;
|
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: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
|
@ -47,7 +47,7 @@ Page({
|
|||||||
page: page,
|
page: page,
|
||||||
rows: self.data.rows
|
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;
|
var newsArray;
|
||||||
for (var i = 0; i < data.rows.length; i++) {
|
for (var i = 0; i < data.rows.length; i++) {
|
||||||
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
|
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
|
||||||
|
@ -20,7 +20,7 @@ Page({
|
|||||||
rows: self.data.rows,
|
rows: self.data.rows,
|
||||||
newsDirectoriesId: self.data.newsDirectoriesId
|
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;
|
var newsArray;
|
||||||
for (var i = 0; i < data.rows.length; i++) {
|
for (var i = 0; i < data.rows.length; i++) {
|
||||||
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
|
data.rows[i].newsContentCoverList = data.rows[i].newsContentCoverList[0].contentCoverId
|
||||||
|
@ -25,7 +25,7 @@ Page({
|
|||||||
},
|
},
|
||||||
getUserAgree: function(type) {
|
getUserAgree: function(type) {
|
||||||
var self = this;
|
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: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
|
@ -49,7 +49,8 @@ Page({
|
|||||||
self.setData({
|
self.setData({
|
||||||
venueTypeList: data.data
|
venueTypeList: data.data
|
||||||
});
|
});
|
||||||
},function(code, data){
|
},
|
||||||
|
function (code, data) {
|
||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -58,8 +59,7 @@ Page({
|
|||||||
//获取场馆列表
|
//获取场馆列表
|
||||||
listPageVenuesInfo: function () {
|
listPageVenuesInfo: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease', [app.venueUrl]),
|
app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease/{areaCode}', [app.venueUrl, app.areaCode]), {
|
||||||
{
|
|
||||||
page: self.data.page,
|
page: self.data.page,
|
||||||
rows: self.data.rows,
|
rows: self.data.rows,
|
||||||
orderKey: self.data.orderKey,
|
orderKey: self.data.orderKey,
|
||||||
@ -85,9 +85,11 @@ Page({
|
|||||||
if (data.rows.length == 0) {
|
if (data.rows.length == 0) {
|
||||||
app.dialog.msg('暂无数据');
|
app.dialog.msg('暂无数据');
|
||||||
}
|
}
|
||||||
}, function(code,data){
|
},
|
||||||
|
function (code, data) {
|
||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
},function(){
|
},
|
||||||
|
function () {
|
||||||
wx.hideNavigationBarLoading();
|
wx.hideNavigationBarLoading();
|
||||||
wx.stopPullDownRefresh();
|
wx.stopPullDownRefresh();
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
@ -134,8 +136,9 @@ Page({
|
|||||||
// 获取地区列表
|
// 获取地区列表
|
||||||
getAreaList: function () {
|
getAreaList: function () {
|
||||||
var self = this;
|
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/640675', []),
|
||||||
self.data.pages, null, function (code, data) {
|
self.data.pages, null,
|
||||||
|
function (code, data) {
|
||||||
if (code == '200') {
|
if (code == '200') {
|
||||||
self.setData({
|
self.setData({
|
||||||
areaList: data
|
areaList: data
|
||||||
|
@ -40,7 +40,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
activityList: function() {
|
activityList: function() {
|
||||||
var self = this;
|
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) {
|
self.data.pages, null, function(code, data) {
|
||||||
if('200' == code) {
|
if('200' == code) {
|
||||||
// 将活动照片,拼接为可访问地址
|
// 将活动照片,拼接为可访问地址
|
||||||
@ -119,7 +119,7 @@ Page({
|
|||||||
wx.showNavigationBarLoading();
|
wx.showNavigationBarLoading();
|
||||||
var self = this;
|
var self = this;
|
||||||
self.setData({
|
self.setData({
|
||||||
[`pages.page`] : self.data.pages.page + 1
|
[`pages.page`] : 1
|
||||||
})
|
})
|
||||||
this.activityList();
|
this.activityList();
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// pages/volunteerRegister/volunteerRegister.js
|
// pages/volunteerRegister/volunteerRegister.js
|
||||||
var app = getApp();
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
@ -233,10 +232,10 @@ Page({
|
|||||||
var url;
|
var url;
|
||||||
var requ;
|
var requ;
|
||||||
if(!self.data.volunteerMsg) {
|
if(!self.data.volunteerMsg) {
|
||||||
url = '/wechat-miniapp/volunteer/savevolunteer';
|
url = '/app/volunteer/savevolunteer';
|
||||||
requ = app.restAjax.post;
|
requ = app.restAjax.post;
|
||||||
}else {
|
}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.put;
|
||||||
}
|
}
|
||||||
requ(app.restAjax.path(app.volunteerUrl + url, []),
|
requ(app.restAjax.path(app.volunteerUrl + url, []),
|
||||||
@ -305,7 +304,8 @@ Page({
|
|||||||
getDataFromArea: function(dictId, type) {
|
getDataFromArea: function(dictId, type) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(resolve => {
|
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: {
|
headers: {
|
||||||
'token': self.data.token
|
'token': self.data.token
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {},
|
"usingComponents": {},
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
@ -1,6 +1,8 @@
|
|||||||
|
<wxs src="/utils/indexof.wxs" module="utils" />
|
||||||
<view class="register">
|
<view class="register">
|
||||||
<view class="row" wx:if="{{volunteerMsg}}" style="color:red;margin-bottom:15rpx;">您已经是志愿者,可修改以下信息!</view>
|
<view class="hint" wx:if="{{volunteerMsg}}">您已经是志愿者,可修改以下信息!</view>
|
||||||
<view class="row" style="height: auto">
|
<view class="thick-line"></view>
|
||||||
|
<view class="row" style="height: auto;">
|
||||||
<view class="info-name">公开经历:</view>
|
<view class="info-name">公开经历:</view>
|
||||||
<view class="info-text" style="height: auto">
|
<view class="info-text" style="height: auto">
|
||||||
<view class="section" style="height: auto">
|
<view class="section" style="height: auto">
|
||||||
@ -13,8 +15,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="thin-line"></view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="info-name">市:</view>
|
<view class="info-name">旗县区:</view>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<picker bindchange="cityChange" value="{{teamCityIndex}}" range="{{teamCityArray}}">
|
<picker bindchange="cityChange" value="{{teamCityIndex}}" range="{{teamCityArray}}">
|
||||||
@ -25,8 +28,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="thin-line"></view>
|
||||||
<view class="row" hidden="{{countyShowStatus}}">
|
<view class="row" hidden="{{countyShowStatus}}">
|
||||||
<view class="info-name">旗县区:</view>
|
<view class="info-name">乡镇街道:</view>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<picker bindchange="countyChange" value="{{teamCountyIndex}}" range="{{teamCountyArray}}">
|
<picker bindchange="countyChange" value="{{teamCountyIndex}}" range="{{teamCountyArray}}">
|
||||||
@ -37,8 +41,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="thin-line"></view>
|
||||||
<view class="row" hidden="{{areaShowStatus}}">
|
<view class="row" hidden="{{areaShowStatus}}">
|
||||||
<view class="info-name">乡镇村:</view>
|
<view class="info-name">村:</view>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<picker bindchange="areaChange" value="{{teamAreaIndex}}" range="{{teamAreaArray}}">
|
<picker bindchange="areaChange" value="{{teamAreaIndex}}" range="{{teamAreaArray}}">
|
||||||
@ -49,30 +54,33 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row" style="height: auto">
|
<view class="thick-line"></view>
|
||||||
|
<view class="column" style="height: auto">
|
||||||
<view class="info-name">服务意向:</view>
|
<view class="info-name">服务意向:</view>
|
||||||
<view class="info-text" style="height: auto">
|
<view class="info-text" style="height: auto">
|
||||||
<view class="section" style="height: auto">
|
<view class="section" style="height: auto">
|
||||||
<checkbox-group bindchange="serviceTypeChange">
|
<checkbox-group bindchange="serviceTypeChange">
|
||||||
<checkbox value='{{item.dataId}}' wx:for="{{serviceType}}" wx:key="index">
|
<checkbox value='{{item.dataId}}' wx:for="{{serviceType}}" wx:key="index" checked="{{utils.indexOf(volunteerMsg.serviceType,item.dataId)}}">
|
||||||
<view>{{item.dataName}}</view>
|
<view>{{item.dataName}}</view>
|
||||||
</checkbox>
|
</checkbox>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row" style="height: auto">
|
<view class="thin-line"></view>
|
||||||
|
<view class="column" style="height: auto">
|
||||||
<view class="info-name">服务领域或行业:</view>
|
<view class="info-name">服务领域或行业:</view>
|
||||||
<view class="info-text" style="height: auto">
|
<view class="info-text" style="height: auto">
|
||||||
<view class="section" style="height: auto">
|
<view class="section" style="height: auto">
|
||||||
<checkbox-group bindchange="serviceIndustryChange">
|
<checkbox-group bindchange="serviceIndustryChange">
|
||||||
<checkbox value='{{item.dataId}}' wx:for="{{serviceIndustry}}" wx:key="index">
|
<checkbox value='{{item.dataId}}' wx:for="{{serviceIndustry}}" wx:key="index" checked="{{utils.indexOf(volunteerMsg.serviceIndustry,item.dataId)}}">
|
||||||
<view>{{item.dataName}}</view>
|
<view>{{item.dataName}}</view>
|
||||||
</checkbox>
|
</checkbox>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="thick-line"></view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="info-name">职业:</view>
|
<view class="info-name">职业:</view>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
@ -85,29 +93,28 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="thin-line"></view>
|
||||||
<view class="row" style="height: auto">
|
<view class="row" style="height: auto">
|
||||||
<view class="info-name">工作单位及职务:</view>
|
<view class="info-name">工作单位及职务:</view>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
<input name="work" placeholder="请输入工作单位及职务" model:value="{{work}}"></input>
|
<input name="work" placeholder="请输入工作单位及职务" model:value="{{work}}"></input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="thin-line"></view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="info-name">特长爱好:</view>
|
<view class="info-name">特长爱好:</view>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
<input name="hobby" placeholder="请输入特长爱好" model:value="{{hobby}}"></input>
|
<input name="hobby" placeholder="请输入特长爱好" model:value="{{hobby}}"></input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="thin-line"></view>
|
||||||
<view class="row" style="height: auto">
|
<view class="column" style="height: auto">
|
||||||
<view class="info-name">个人简历:</view>
|
<view class="info-name">个人简历:</view>
|
||||||
<view class="info-text" style="height: auto">
|
<view class="info-text" style="height: auto">
|
||||||
<textarea placeholder="请输入个人简历" model:value="{{cv}}"></textarea>
|
<textarea placeholder="请输入个人简历" model:value="{{cv}}"></textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="column" style="height: auto">
|
||||||
<view class="row" style="height: auto">
|
|
||||||
<view class="info-name">备注:</view>
|
<view class="info-name">备注:</view>
|
||||||
<view class="info-text" style="height: auto">
|
<view class="info-text" style="height: auto">
|
||||||
<textarea placeholder="请输入备注" model:value="{{remark}}"></textarea>
|
<textarea placeholder="请输入备注" model:value="{{remark}}"></textarea>
|
||||||
|
@ -1,50 +1,88 @@
|
|||||||
.register{
|
page {
|
||||||
padding: 30rpx;
|
background: #ffffff;
|
||||||
margin-bottom: 150rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.register {
|
||||||
|
padding: 0rpx 0rpx 250rpx 0rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
background: white;
|
||||||
|
color: red;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thick-line {
|
||||||
|
align-self: center;
|
||||||
|
background: #f2f2f2;
|
||||||
|
height: 5rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thin-line {
|
||||||
|
margin: 0rpx 30rpx;
|
||||||
|
align-self: center;
|
||||||
|
background: #f2f2f2;
|
||||||
|
height: 1rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 15rpx;
|
align-items: center;
|
||||||
height: 55rpx;
|
padding: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.info-name {
|
.info-name {
|
||||||
width: 21%;
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #000;
|
color: #000;
|
||||||
line-height: 55rpx;
|
line-height: 55rpx;
|
||||||
|
width: 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-text {
|
.info-text {
|
||||||
width: 77%;
|
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
height: 55rpx;
|
height: 55rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-text input {
|
.info-text input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 55rpx;
|
height: 55rpx;
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-text textarea {
|
.info-text textarea {
|
||||||
width: 100%;
|
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
padding: 10rpx;
|
padding: 10rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1px solid #DDD;
|
border: 1px solid #DDD;
|
||||||
}
|
}
|
||||||
picker, .picker{
|
|
||||||
|
picker,
|
||||||
|
.picker {
|
||||||
height: 55rpx;
|
height: 55rpx;
|
||||||
line-height: 55rpx;
|
line-height: 55rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
height: 55rpx;
|
height: 55rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit {
|
.submit {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 20rpx auto 0;
|
margin: 20rpx auto 0;
|
||||||
@ -56,9 +94,11 @@ text{
|
|||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
background: #9F1512;
|
background: #9F1512;
|
||||||
}
|
}
|
||||||
checkbox{
|
|
||||||
transform: scale(0.8);
|
checkbox:nth-of-type(n+2) {
|
||||||
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -66,4 +106,5 @@ checkbox{
|
|||||||
right: 0;
|
right: 0;
|
||||||
padding: 0 30rpx 20rpx;
|
padding: 0 30rpx 20rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
@ -7,9 +7,14 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
token: '',
|
token: '',
|
||||||
otherTeamMap: {},
|
otherTeamMap: [],
|
||||||
type: '1',
|
type: '1',
|
||||||
teamId: '',
|
teamId: '',
|
||||||
|
page: {
|
||||||
|
page: 1,
|
||||||
|
rows: 10
|
||||||
|
},
|
||||||
|
totalSize: 0,
|
||||||
|
|
||||||
},
|
},
|
||||||
getToken: function () {
|
getToken: function () {
|
||||||
@ -33,32 +38,42 @@ Page({
|
|||||||
},
|
},
|
||||||
changeTab: function (e) {
|
changeTab: function (e) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
self.data.page.page = 1;
|
||||||
self.setData({
|
self.setData({
|
||||||
|
page: self.data.page,
|
||||||
|
otherTeamMap: [],
|
||||||
|
totalSize: 0,
|
||||||
type: e.currentTarget.dataset.type
|
type: e.currentTarget.dataset.type
|
||||||
})
|
})
|
||||||
if (self.data.type === '1') {
|
if (self.data.type === '1') {
|
||||||
self.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/otherteamm?otherTeam=true');
|
self.otherTeam(app.volunteerUrl + '/app/team/otherteamm?otherTeam=true');
|
||||||
} else {
|
} else {
|
||||||
self.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/myjointeam?myTeam=true');
|
self.otherTeam(app.volunteerUrl + '/app/team/myjointeam?myTeam=true');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
otherTeam: function (url) {
|
otherTeam: function (url) {
|
||||||
var self = this;
|
var self = this;
|
||||||
app.restAjax.get(app.restAjax.path(url, []),
|
app.restAjax.get(app.restAjax.path(url, []), self.data.page, {
|
||||||
{}, {
|
|
||||||
headers: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
}
|
}
|
||||||
}, function (code, data) {
|
}, function (code, data) {
|
||||||
if ('200' == code) {
|
if ('200' == code) {
|
||||||
self.setData({
|
self.setData({
|
||||||
otherTeamMap: data.rows
|
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) {
|
}, function (code, data) {
|
||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
}, function () {
|
}, function () {
|
||||||
|
wx.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -74,14 +89,14 @@ Page({
|
|||||||
var methodType;
|
var methodType;
|
||||||
var title;
|
var title;
|
||||||
if ('1' == self.data.type) {
|
if ('1' == self.data.type) {
|
||||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/saveteammember'
|
url = app.volunteerUrl + '/app/teammember/saveteammember'
|
||||||
teamMemberVO = {
|
teamMemberVO = {
|
||||||
teamId: e.currentTarget.dataset.teamid
|
teamId: e.currentTarget.dataset.teamid
|
||||||
}
|
}
|
||||||
methodType = app.restAjax.post
|
methodType = app.restAjax.post
|
||||||
title = '申请成功!'
|
title = '申请成功!'
|
||||||
} else {
|
} else {
|
||||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/quitTeam/' + self.data.teamId
|
url = app.volunteerUrl + '/app/teammember/quitTeam/' + self.data.teamId
|
||||||
methodType = app.restAjax.get
|
methodType = app.restAjax.get
|
||||||
title = '退出成功!'
|
title = '退出成功!'
|
||||||
}
|
}
|
||||||
@ -91,16 +106,19 @@ Page({
|
|||||||
headers: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
}
|
}
|
||||||
}, function(code, data) {
|
},
|
||||||
|
function (code, data) {
|
||||||
if ('200' == code) {
|
if ('200' == code) {
|
||||||
app.dialog.msg(title);
|
app.dialog.msg(title);
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, function(code, data) {
|
},
|
||||||
|
function (code, data) {
|
||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
}, function() {
|
},
|
||||||
|
function () {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -109,7 +127,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
this.getToken().then(result => {
|
this.getToken().then(result => {
|
||||||
this.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/otherteamm?otherTeam=true');
|
this.otherTeam(app.volunteerUrl + '/app/team/otherteamm?otherTeam=true');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -145,14 +163,38 @@ Page({
|
|||||||
* 页面相关事件处理函数--监听用户下拉动作
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
*/
|
*/
|
||||||
onPullDownRefresh: 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 () {
|
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('暂无更多数据了')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,8 +40,7 @@
|
|||||||
}
|
}
|
||||||
.team{
|
.team{
|
||||||
margin-top: 90rpx;
|
margin-top: 90rpx;
|
||||||
padding: 0 30rpx;
|
padding: 0rpx 30rpx 110rpx 30rpx;
|
||||||
margin-bottom: 110rpx;
|
|
||||||
}
|
}
|
||||||
.team-box{
|
.team-box{
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
|
10
utils/indexof.wxs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
function indexOf(str, val) {
|
||||||
|
if (str.indexOf(val) != -1) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module.exports = {
|
||||||
|
indexOf: indexOf
|
||||||
|
}
|
@ -26,7 +26,15 @@ const formatNumber = n => {
|
|||||||
return n[1] ? n : '0' + n
|
return n[1] ? n : '0' + n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function indexOf(str, val) {
|
||||||
|
if (str.indexOf(val) != -1) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
module.exports = {
|
module.exports = {
|
||||||
formatTime: formatTime,
|
formatTime: formatTime,
|
||||||
formatDate: formatDate
|
formatDate: formatDate,
|
||||||
|
indexOf: indexOf
|
||||||
}
|
}
|