diff --git a/pages/release/manageIndex/manageIndex.js b/pages/release/manageIndex/manageIndex.js index 3767067..c5da45e 100644 --- a/pages/release/manageIndex/manageIndex.js +++ b/pages/release/manageIndex/manageIndex.js @@ -10,18 +10,19 @@ Page({ * 页面的初始数据 */ data: { + id:0, detail:{views:'1223',share:'2444',join:'344',cancel:'23',all:'22222'}, switchChecked: true, switchCheckedbao:true }, toedit:function(){ wx.navigateTo({ - url: '../addactive/addactive?id=1' + url: '../addactive/addactive?id=' + this.data.id }) }, tosign:function(){ wx.navigateTo({ - url: '../signIndex/signIndex' + url: '../signIndex/signIndex?activity_id='+this.data.id }) }, switchChange: function(e) { @@ -81,9 +82,28 @@ Page({ this.setData({ id:options.id }) + console.log(this.data.id) this.manageIndex(options.id); this.lastviews(options.id); }, + delActivity(e){ + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.removeActivity(), { + activityId:e.currentTarget.dataset.id, + }, header).then((res) => { + wx.showToast({ + title: '操作成功', + icon: 'none', + duration: 1000 + }) + wx.navigateBack({ + delta: 1 + }) + }) + }, manageIndex:function(id){ var that = this; const imgUrl = wx.getStorageSync('imgUrl') @@ -107,6 +127,11 @@ Page({ // }) }) }, + toactiveDetail:function(e){ + wx.navigateTo({ + url: '/pages/index/activeDetail/activeDetail?id='+e.currentTarget.dataset.id+'' + }) + }, lastviews:function(id){ var that = this; var postData = { diff --git a/pages/release/manageIndex/manageIndex.wxml b/pages/release/manageIndex/manageIndex.wxml index 2bd7294..4e44112 100644 --- a/pages/release/manageIndex/manageIndex.wxml +++ b/pages/release/manageIndex/manageIndex.wxml @@ -7,7 +7,7 @@ - + + 活动是否上架 @@ -46,8 +46,8 @@ - 活动页面 - 删除活动 + 活动页面 + 删除活动 复制再发一个 diff --git a/pages/release/signIndex/signIndex.js b/pages/release/signIndex/signIndex.js index 8064d3c..314e3bd 100644 --- a/pages/release/signIndex/signIndex.js +++ b/pages/release/signIndex/signIndex.js @@ -1,10 +1,13 @@ // pages/release/signIndex/signIndex.js +var Api = require('../../../utils/common.js'); +var re = require('../../../utils/request.js'); Page({ /** * 页面的初始数据 */ data: { + activityId:'', joinlist:[ {img:'../../../images/ava.png',name:'洒洒水',price:'2334',intro:'吃葡萄不吐皮套皮'}, {img:'../../../images/ava.png',name:'洒洒水',price:'2334',intro:'吃葡萄不吐皮套皮'} @@ -19,6 +22,51 @@ Page({ url: '../manageIndex/manageIndex' }) }, + delActivity(){ + var that = this; + var postData = { + activityId:that.data.activityId + }; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.removeActivity(), postData, header).then((res) => { + wx.showToast({ + title: res.msg, + duration: 0, + }) + }) + }, + getRegisterAll:function(){ + var that = this; + var postData = { + activityId:that.data.activityId + }; + var header = { + token:wx.getStorageSync('token'), + "Content-Type": "application/x-www-form-urlencoded" + }; + re.request(Api.getRegisterAll(), postData, header).then((res) => { + let datas = res.data.data; + let cancellist = []; + let joinlist = []; + //根据状态registerStatus报名状态0-未报名 1-已报名 2-已取消 3-报名中 + for(let i=0;i - + - {{item.name}}¥{{item.price}} + {{item.nickname}}¥{{item.realCost}} {{item.intro}} 微信支付 @@ -43,11 +43,11 @@ - + - {{item.name}}¥{{item.price}} + {{item.nickname}}¥{{item.realCost}} {{item.intro}} 微信支付