Browse Source

志愿者活动详情增加参数actType;

feature/optimise
ZhaoTongYao 5 years ago
parent
commit
6cce15fac0
  1. 2
      project.config.json
  2. 10
      subpages/heart/pages/heartDetail/heartDetail.js
  3. 7
      utils/api.js
  4. 4
      utils/config.js

2
project.config.json

@ -22,7 +22,7 @@
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"useCompilerModule": true, "useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"compileHotReLoad": false, "compileHotReLoad": false,
"useIsolateContext": true "useIsolateContext": true

10
subpages/heart/pages/heartDetail/heartDetail.js

@ -26,6 +26,7 @@ Page({
preloadVisible: true, preloadVisible: true,
timeJudge: false,//根据当前时间比较活动结束时间,判断活动是否已经结束,用以判断显示订单多多里面的志愿者 timeJudge: false,//根据当前时间比较活动结束时间,判断活动是否已经结束,用以判断显示订单多多里面的志愿者
defaultGridId:"",//默认网格 defaultGridId:"",//默认网格
actType: ""
}, },
onLoad: function (options) { onLoad: function (options) {
console.log("当前时间" + getTimestamp()) console.log("当前时间" + getTimestamp())
@ -34,6 +35,7 @@ Page({
actCurrentState: options.actcurrentstate, actCurrentState: options.actcurrentstate,
signupFlag: options.signupflag, signupFlag: options.signupflag,
selectedTab: options.selectedTab, selectedTab: options.selectedTab,
actType: options.selectedTab==undefined?'':options.selectedTab=='tab0'?'0':options.selectedTab=='tab2'?'1':''
}) })
// this.getDetail();//活动详情 // this.getDetail();//活动详情
// this.clockList();//打卡列表 // this.clockList();//打卡列表
@ -45,8 +47,12 @@ Page({
}, },
// 获取详情信息 // 获取详情信息
getDetail () { getDetail () {
let id = this.data.id // let id = this.data.id
api.detail(id).then(res => { const param = {
id: this.data.id,
actType: this.data.actType
}
api.detail(param).then(res => {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
this.setData({ this.setData({
detail: res.data, detail: res.data,

7
utils/api.js

@ -323,8 +323,11 @@ function leaderboard () {
/** /**
* 活动详情 * 活动详情
*/ */
function detail (id) { function detail ({id,actType}) {
return fly.get(`heart/act/detail/${id}`) return fly.get(`heart/act/detail`,{
id: id,
actType: actType
})
} }
/** /**

4
utils/config.js

@ -6,13 +6,13 @@ module.exports = {
}; };
function BASEURL() { function BASEURL() {
// return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
// return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址 // return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址
// return "http://192.168.43.19:9094/epdc-api/api/" // 测试环境 ip接口地址 // return "http://192.168.43.19:9094/epdc-api/api/" // 测试环境 ip接口地址
// return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址 // return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址
// return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址 // return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址
// return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址 // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址
return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 // return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
// return 'http://10.10.10.63:9094/epdc-api/api/' // return 'http://10.10.10.63:9094/epdc-api/api/'
} }

Loading…
Cancel
Save