志愿者

This commit is contained in:
itgaojian163 2022-12-19 20:08:48 +08:00
parent 0255a2d8e7
commit 0d6c323a5a
5 changed files with 21 additions and 17 deletions

View File

@ -313,7 +313,7 @@ Page({
var self = this; var self = this;
this.getToken().then(result => { this.getToken().then(result => {
console.log(self.data.token) console.log(self.data.token)
this.getDataFromArea('640332', 2).then(result => { this.getDataFromArea('640675', 2).then(result => {
self.setData({ self.setData({
teamCity: self.data.tempObj, teamCity: self.data.tempObj,
teamCityArray: self.data.tempArray, teamCityArray: self.data.tempArray,

View File

@ -32,14 +32,18 @@ Page({
}, },
getDetail: function(id) { getDetail: function(id) {
var self = this; var self = this;
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteerservice/getvolunteerservicebyid/' + id, []), app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/volunteerservice/getvolunteerservicebyid/' + id, []),
{}, { {}, {
headers: { headers: {
'token': self.data.token 'token': self.data.token
} }
}, function(code, data) { }, function(code, data) {
if('200' == code) { if('200' == code) {
data.photo = app.volunteerUrl + '/route/file/download/true/' + data.photo; var ph=data.photo
if(data.photo.endsWith(",")){
ph=data.photo.substr(0,data.photo.length-1);
}
data.photo = app.volunteerUrl + '/route/file/download/true/' +ph;
self.setData({ self.setData({
dataMap: data dataMap: data
}) })

View File

@ -52,7 +52,7 @@
right: 0; right: 0;
} }
.activity{ .activity{
padding: 20rpx 30rpx 0; padding: 20rpx 30rpx 90rpx;
} }
.activity-box{ .activity-box{
margin-bottom: 20rpx; margin-bottom: 20rpx;

View File

@ -263,7 +263,7 @@ Page({
getDataFromDict: function(dictId, type) { getDataFromDict: 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/datadictionary/listdictionarybyparentid/' + dictId, []), app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/data/listbyparentid/' + dictId, []),
{}, { {}, {
headers: { headers: {
'token': self.data.token 'token': self.data.token
@ -273,15 +273,15 @@ Page({
if(data || type === 2) { if(data || type === 2) {
var array = []; var array = [];
for(var item of data) { for(var item of data) {
delete item.dictionaryParentId; delete item.dataParentId;
delete item.dictionaryParentName; delete item.dataParentName;
delete item.dictionarySummary; delete item.dataSummary;
delete item.dictionaryCode; delete item.dataCode;
delete item.dictionarySort; delete item.dataSort;
delete item.subDictionary; delete item.subDictionary;
delete item.parent; delete item.parent;
array.push(item.dictionaryName); array.push(item.dataName);
} }
self.setData({ self.setData({
tempArray: array tempArray: array
@ -351,7 +351,7 @@ Page({
getVolunteerMsg() { getVolunteerMsg() {
var self = this; var self = this;
return new Promise(resolve => { return new Promise(resolve => {
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteer/getvolunteerbyuserid', []), app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/volunteer/getvolunteerbyuserid', []),
{}, { {}, {
headers: { headers: {
'token': self.data.token 'token': self.data.token
@ -395,7 +395,7 @@ Page({
}) })
}) })
}).then(result => { }).then(result => {
this.getDataFromArea('640332', 2).then(result => { this.getDataFromArea('640675', 2).then(result => {
self.setData({ self.setData({
teamCity: self.data.tempObj, teamCity: self.data.tempObj,
teamCityArray: self.data.tempArray, teamCityArray: self.data.tempArray,

View File

@ -54,8 +54,8 @@
<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.dictionaryId}}' wx:for="{{serviceType}}" wx:key="index"> <checkbox value='{{item.dataId}}' wx:for="{{serviceType}}" wx:key="index">
<view>{{item.dictionaryName}}</view> <view>{{item.dataName}}</view>
</checkbox> </checkbox>
</checkbox-group> </checkbox-group>
</view> </view>
@ -66,8 +66,8 @@
<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.dictionaryId}}' wx:for="{{serviceIndustry}}" wx:key="index"> <checkbox value='{{item.dataId}}' wx:for="{{serviceIndustry}}" wx:key="index">
<view>{{item.dictionaryName}}</view> <view>{{item.dataName}}</view>
</checkbox> </checkbox>
</checkbox-group> </checkbox-group>
</view> </view>