志愿者
This commit is contained in:
parent
0255a2d8e7
commit
0d6c323a5a
@ -313,7 +313,7 @@ Page({
|
||||
var self = this;
|
||||
this.getToken().then(result => {
|
||||
console.log(self.data.token)
|
||||
this.getDataFromArea('640332', 2).then(result => {
|
||||
this.getDataFromArea('640675', 2).then(result => {
|
||||
self.setData({
|
||||
teamCity: self.data.tempObj,
|
||||
teamCityArray: self.data.tempArray,
|
||||
|
@ -32,14 +32,18 @@ Page({
|
||||
},
|
||||
getDetail: function(id) {
|
||||
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: {
|
||||
'token': self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
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({
|
||||
dataMap: data
|
||||
})
|
||||
|
@ -52,7 +52,7 @@
|
||||
right: 0;
|
||||
}
|
||||
.activity{
|
||||
padding: 20rpx 30rpx 0;
|
||||
padding: 20rpx 30rpx 90rpx;
|
||||
}
|
||||
.activity-box{
|
||||
margin-bottom: 20rpx;
|
||||
|
@ -263,7 +263,7 @@ Page({
|
||||
getDataFromDict: function(dictId, type) {
|
||||
var self = this;
|
||||
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: {
|
||||
'token': self.data.token
|
||||
@ -273,15 +273,15 @@ Page({
|
||||
if(data || type === 2) {
|
||||
var array = [];
|
||||
for(var item of data) {
|
||||
delete item.dictionaryParentId;
|
||||
delete item.dictionaryParentName;
|
||||
delete item.dictionarySummary;
|
||||
delete item.dictionaryCode;
|
||||
delete item.dictionarySort;
|
||||
delete item.dataParentId;
|
||||
delete item.dataParentName;
|
||||
delete item.dataSummary;
|
||||
delete item.dataCode;
|
||||
delete item.dataSort;
|
||||
delete item.subDictionary;
|
||||
delete item.parent;
|
||||
|
||||
array.push(item.dictionaryName);
|
||||
array.push(item.dataName);
|
||||
}
|
||||
self.setData({
|
||||
tempArray: array
|
||||
@ -351,7 +351,7 @@ Page({
|
||||
getVolunteerMsg() {
|
||||
var self = this;
|
||||
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: {
|
||||
'token': self.data.token
|
||||
@ -395,7 +395,7 @@ Page({
|
||||
})
|
||||
})
|
||||
}).then(result => {
|
||||
this.getDataFromArea('640332', 2).then(result => {
|
||||
this.getDataFromArea('640675', 2).then(result => {
|
||||
self.setData({
|
||||
teamCity: self.data.tempObj,
|
||||
teamCityArray: self.data.tempArray,
|
||||
|
@ -54,8 +54,8 @@
|
||||
<view class="info-text" style="height: auto">
|
||||
<view class="section" style="height: auto">
|
||||
<checkbox-group bindchange="serviceTypeChange">
|
||||
<checkbox value='{{item.dictionaryId}}' wx:for="{{serviceType}}" wx:key="index">
|
||||
<view>{{item.dictionaryName}}</view>
|
||||
<checkbox value='{{item.dataId}}' wx:for="{{serviceType}}" wx:key="index">
|
||||
<view>{{item.dataName}}</view>
|
||||
</checkbox>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
@ -66,8 +66,8 @@
|
||||
<view class="info-text" style="height: auto">
|
||||
<view class="section" style="height: auto">
|
||||
<checkbox-group bindchange="serviceIndustryChange">
|
||||
<checkbox value='{{item.dictionaryId}}' wx:for="{{serviceIndustry}}" wx:key="index">
|
||||
<view>{{item.dictionaryName}}</view>
|
||||
<checkbox value='{{item.dataId}}' wx:for="{{serviceIndustry}}" wx:key="index">
|
||||
<view>{{item.dataName}}</view>
|
||||
</checkbox>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
|
Loading…
Reference in New Issue
Block a user