瀏覽代碼

调试活动接口

306132416@qq.com 4 年之前
父節點
當前提交
f1e90d3afc
共有 4 個文件被更改,包括 354 次插入 和 131 次删除
  1. 124 29
      pages/index/activity/activity.vue
  2. 15 35
      pages/index/activity/create1.vue
  3. 184 67
      pages/index/activity/create2.vue
  4. 31 0
      pages/index/activity/list.vue

+ 124 - 29
pages/index/activity/activity.vue

@@ -28,21 +28,21 @@
 				@change="change"
 				:clear-icon="false"
 			/> -->
-			<picker mode="date" fields="year"  @change="bindDateChange" class="picker-class">
+			<picker mode="date" fields="year"  @change="bindDateChange" class="picker-class" style="margin-left: 2%; width: 15%;">
 				<view class="uni-input display-between items-center">{{dateYear}}年<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
 			</picker>
-			<picker :range="arrayMonth" :value="dateMonth"  @change="bindDateMonthChange" class="picker-class" style="margin-left: 2%;">
+			<picker :range="arrayMonth" :value="dateMonth"  @change="bindDateMonthChange" class="picker-class" style="margin-left: 2%; width: 10%;">
 				<view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}月<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
 			</picker>
-		   <picker @change="bindPickerChange" :value="index" :range="array">
-					<view class="uni-input">{{array[index]}}</view>
+		   <picker @change="bindPickerChange" :value="branchValue" :range="branchArray" :range-key="'name'">
+					<view class="uni-input">{{branchValue}}</view>
 					<image src="/static/arrow_down.svg" mode="aspectFit"></image>
 		   </picker>
 		   <button @click="publish()">+发布活动</button>
 		</view>
 		
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
-		<view class="active-box" v-for="(item,index) in activiList" :key="index" @click="goList()">
+		<view class="active-box" v-for="(item,index) in activiList" :key="index" @click="goList(item.id)">
 			<view class="active-type" :class="{'bg-yellow':item.type == '组织建设' ,'bg-red':item.type == '学习培训','bg-blue':item.type == '参政议政',}"  >
 				{{item.type}}
 			</view>
@@ -84,8 +84,9 @@ export default {
       userNickName:getApp().globalData.user_name,
 	  userPhone:getApp().globalData.user_phone.substr(0, 3) + '****' + getApp().globalData.user_phone.substr(7),
 	  userPosList:[],
-	  array: ['全部', '浐灞一支部', '浐灞二支部'],
-	  index: 0,
+	  branchArray: [],
+	  branchValue:'全部',
+	  branchId:'0',
 	  page:1,
 	  pageSize:10,
 	  activiList:[]
@@ -95,25 +96,16 @@ export default {
   },
   onLoad() {
 	  this.getUserInfoBranch()
-	 // this.getActivityBranch()
+	  this.getActiveInfoBranch()
   },
   methods: {
 	  getUserInfoBranch() {
 	      let md5Sign = md5(
-	        "method=" +
-	          "member" +
-	          "&timestamp=" +
-	          getApp().globalData.globalTimestamp +
-	          "&secret=" +
-	          getApp().globalData.secret
+	        "method=" + "member" +"&timestamp=" + getApp().globalData.globalTimestamp +"&secret=" +getApp().globalData.secret
 	      );
 	      let url =
-	        getApp().globalData.shareUrl +
-	        "api/api.php" +
-	        "?method=member&action=my_branch&timestamp=" +
-	        getApp().globalData.globalTimestamp +
-	        "&sign=" +
-	        md5Sign;
+	        getApp().globalData.shareUrl + "api/api.php" + "?method=member&action=my_branch&timestamp=" + getApp().globalData.globalTimestamp +
+	        "&sign=" + md5Sign;
 	      uni.request({
 	        url: url,
 	        method: "POST",
@@ -133,7 +125,37 @@ export default {
 	        },
 	      });
 	  },
-	  bindDateChange(e){
+	  getActiveInfoBranch() {
+	      let md5Sign = md5("method=" + "activity" +"&timestamp=" + getApp().globalData.globalTimestamp +"&secret=" +getApp().globalData.secret);
+	      let url =
+	        getApp().globalData.shareUrl + "api/api.php" + "?method=activity&action=list_branch&timestamp=" + getApp().globalData.globalTimestamp +
+	        "&sign=" + md5Sign;
+	      uni.request({
+	        url: url,
+	        method: "POST",
+	        header: {
+	          "content-type": "application/x-www-form-urlencoded",
+	        },
+	        data: {
+	          openid:getApp().globalData.open_id,
+	        },
+	        success: (res) => {
+	          if (res.data.code === 200) {
+					let obj = {
+						name:'全部',
+						id:'0'
+					}
+					let arr = res.data.data;
+					arr.unshift(obj);
+					this.branchArray = arr;	
+	          }
+	        },
+	        fail: () => {
+	          console.log("连接失败");
+	        },
+	      });
+	  },
+	  bindDateChange(e){ 
 			this.dateYear = e.target.value;
 	  },
 	  bindDateMonthChange(e){
@@ -141,7 +163,44 @@ export default {
 	  },
 	  bindPickerChange: function(e) {
 		  console.log('picker发送选择改变,携带值为', e.target.value)
-		  this.index = e.target.value
+		  this.branchValue = this.branchArray[e.target.value].name;
+		  this.branchId = this.branchArray[e.target.value].id;
+		  this.getActiveList(this.branchId)
+	  },
+	  getActiveList(bId){
+		  let md5Sign = md5(
+		    "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
+		      "&secret=" + getApp().globalData.secret
+		  );
+		  let url = getApp().globalData.shareUrl +"api/api.php" +
+		    "?method=activity&action=list&timestamp=" +
+		    getApp().globalData.globalTimestamp +
+		    "&sign=" +
+		    md5Sign;
+		  uni.request({
+		    url: url,
+		    method: "POST",
+		    header: {
+		      "content-type": "application/x-www-form-urlencoded",
+		    },
+		    data: {
+		       openid: getApp().globalData.open_id,
+		  	   year:this.dateYear,
+		  	   month:this.dateMonth,
+		  	   s:'',
+		  	   branch_id:bId,
+		  	   page:this.page,
+		  	   page_size:this.pageSize
+		    },
+	  	  success: (res) => {
+	  	    if (res.data.code === 200) {
+	  				this.activiList=res.data.data.list;
+	  	    }
+	  	  },
+	  	  fail: () => {
+	  	    console.log("连接失败");
+	  	  },
+	  	});
 	  },
 	  upCallback(page) {
 		let pageNum = page.num; // 页码, 默认从1开始
@@ -166,6 +225,7 @@ export default {
 			   year:this.dateYear,
 			   month:this.dateMonth,
 			   s:'',
+			   branch_id:this.branchId,
 			   page:pageNum,
 			   page_size:pageSize
 	  	  },
@@ -197,14 +257,49 @@ export default {
 	  	  },
 	  	});
 	  },
+	  getPublishBranch() {
+	      let md5Sign = md5(
+	        "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
+	          "&secret=" +getApp().globalData.secret
+	      );
+	      let url = getApp().globalData.shareUrl +"api/api.php" +
+	        "?method=activity&action=activity_branch&timestamp=" +
+	        getApp().globalData.globalTimestamp +"&sign=" + md5Sign;
+	      uni.request({
+	        url: url,
+	        method: "POST",
+	        header: {
+	          "content-type": "application/x-www-form-urlencoded",
+	        },
+	        data: {
+	          openid:getApp().globalData.open_id,
+	        },
+	        success: (res) => {
+	          if (res.data.code === 200) {
+				  let publishList = res.data.data;
+	  			if(publishList.length >= 2){
+	  				uni.navigateTo({
+	  					url:'./create1?list=' + JSON.stringify(publishList)
+	  				})
+	  			}else {
+					uni.navigateTo({
+						url:'./create2?list=' + JSON.stringify(publishList)
+					})
+				}
+	          }
+	        },
+	        fail: () => {
+	          console.log("连接失败");
+	        },
+	      });
+	  },
 	  publish(){
-		  uni.navigateTo({
-			url:'./create1'
-		  })
+		 this.getPublishBranch()
 	  },
-	  goList(){
+	  goList(ids){
+		  console.log(ids)
 		  uni.navigateTo({
-			url:'./list'
+			url:'./list?id='+ ids
 		  })
 	  }
   },
@@ -291,7 +386,7 @@ export default {
 			margin-left: 5%;
 		}
 		picker {
-		    width: 25%;
+		    width: 29%;
 			border: 1px solid #d7d7d7;
 			height: 60rpx;
 			line-height: 60rpx;
@@ -308,7 +403,7 @@ export default {
 			}
 		}
 		button {
-			width: 29%;
+			width: 25%;
 			font-size: 25rpx;
 			background: #4988fd;
 			color: #fff;

+ 15 - 35
pages/index/activity/create1.vue

@@ -37,11 +37,13 @@
 				isAuthPhone:getApp().globalData.user_phone,
 				branchValue:'',
 				honorBranch:[],
+				branchId:''
 			}
 		},
-		onLoad() {
-			//this.getTradeRequest();
-			this.getActivityBranch();
+		onLoad(option) {
+			this.honorBranch = JSON.parse(option.list);
+			this.branchValue = this.honorBranch[0].name;
+			this.branchId = this.honorBranch[0].id;
 		},
 		onShow() {
 		},
@@ -52,45 +54,23 @@
 		// 	    }
 		// },
 		methods: {
-			getActivityBranch() {
-			    let md5Sign = md5(
-			      "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
-			        "&secret=" +getApp().globalData.secret
-			    );
-			    let url = getApp().globalData.shareUrl +"api/api.php" +
-			      "?method=activity&action=activity_branch&timestamp=" +
-			      getApp().globalData.globalTimestamp +"&sign=" + md5Sign;
-			    uni.request({
-			      url: url,
-			      method: "POST",
-			      header: {
-			        "content-type": "application/x-www-form-urlencoded",
-			      },
-			      data: {
-			        openid:getApp().globalData.open_id,
-			      },
-			      success: (res) => {
-			        if (res.data.code === 200) {
-						this.honorBranch = res.data.data;
-						this.branchValue = res.data.data[0].name;
-			        }
-			      },
-			      fail: () => {
-			        console.log("连接失败");
-			      },
-			    });
-			},
 			goStep(){
+				  let selectList = [{
+					  name:this.branchValue,
+					  id:this.branchId
+				  }]
+				  let length = this.honorBranch.length;	
 				  uni.navigateTo({
-				  	url:'./create2'
+				  	url:'./create2?list='+ JSON.stringify(selectList) + '&length=' + length
 				  })
 			 },
 			bindPickerChange(e) {
-				 this.branchValue =  this.honorBranch[e.target.value].name
+				 this.branchValue =  this.honorBranch[e.target.value].name;
+				 this.branchId = this.honorBranch[e.target.value].id;
 			  },
 			submitRequest(params){
-				   console.log(params)
-				 	 let that = this;
+				 console.log(params)
+				 let that = this;
 			},  
 		}
 	}

+ 184 - 67
pages/index/activity/create2.vue

@@ -9,7 +9,7 @@
 	
 	    <view class="info-box">
 			<view class="info-value-box">
-				<input type="text" placeholder="请输入活动标题" name="selfName">
+				<input type="text" placeholder="请输入活动标题" v-model="activeName">
 			</view>		
 	    </view>
 		<view class="info-box">
@@ -18,7 +18,7 @@
 				<text>选择活动类型</text>
 			</view>
 			<view class="info-value-box">
-				  <picker @change="bindPickerChange($event,'education')"  :range="activeType" class="select-box" name="education" disabled="true">
+				  <picker @change="bindPickerChange($event,'activeType')"  :range="activeType" class="select-box">
 				        <view class="uni-input">{{activeValue}}</view>
 						<image src="/static/arrow_down.svg" mode="aspectFill"></image>
 				  </picker>
@@ -33,26 +33,46 @@
 				<uni-datetime-picker
 				    class="time-select-box"
 					type="date"
-					:value="single"
+					:value="activeDate"
 					@change="change"
 					:clear-icon="false"
 				/>
 			</view>		
 		</view>
-		<view class="info-box">
+		<view class="info-box" v-if="leaderAuth == '1'">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>可见范围</text>
+			</view>
+		   <view class="info-value-box">
+			   <picker @change="bindPickerChange($event,'range')"  :range="rangeList" class="select-box">
+			         <view class="uni-input">{{rangeValue}}</view>
+			   		 <image src="/static/arrow_down.svg" mode="aspectFill"></image>
+			   </picker>
+			</view>	
+		</view>
+		<view class="info-box" v-if="orgList.length">
 			<view class="info-title-box">
 				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
-				<text>设置可见范围</text>
+				<text>下级支部/组织可见</text>
 			</view>
-		   <view style="margin-top: 2%;">
-			   <checkbox-group @change="checkboxChange" class="display-wrap">
-					  <label class="display-flex-start check-class"  v-for="(item,index) in memberList" :key="item.value">
-							<view>
-								<checkbox :value="item.value" :checked="item.checked"/>
-							</view>
-							<view>{{item.name}}</view>
-						</label> 
-				</checkbox-group>
+		   <view class="info-value-box">
+			   <picker @change="bindPickerChange($event,'org')"  :range="orgList" :range-key="'name'" class="select-box">
+			         <view class="uni-input">{{orgValue}}</view>
+			   		 <image src="/static/arrow_down.svg" mode="aspectFill"></image>
+			   </picker>
+			</view>	
+		</view>
+		<view class="info-box" v-if="orgList.length">
+			<view class="info-title-box">
+				<!-- <image src="/static/require-icon.png" mode="aspectFill"></image> -->
+				<text>下级支部/组织可见范围</text>
+			</view>
+		   <view class="info-value-box">
+			   <picker @change="bindPickerChange($event,'orgRange')"  :range="orgRangeList" class="select-box">
+			         <view class="uni-input">{{orgRangeValue}}</view>
+			   		 <image src="/static/arrow_down.svg" mode="aspectFill"></image>
+			   </picker>
 			</view>	
 		</view>
 		<view class="info-box">
@@ -80,8 +100,8 @@
 			</view>		
 		</view>
 		<view class="footer-box">
-			<button type="primary" class="submit-bth" style="background-color: #aaaaaa;" @click="goStep()">上一步</button>
-			<button type="primary" class="submit-bth" style="background-color: #169bd5;" @click="goStep()">提交</button>
+			<button type="primary" class="submit-bth" style="background-color: #aaaaaa;" @click="goStepBack()">上一步</button>
+			<button type="primary" class="submit-bth" style="background-color: #169bd5;" @click="submitActive()">提交</button>
 		</view>
 	</view>
 </template>
@@ -96,8 +116,23 @@
 		data() {
 			return {
 				isAuthPhone:getApp().globalData.user_phone,
+				leaderAuth:'0',
+				activeName:'',
+				activeDate:'',
 				activeValue:'请选择',
 				activeType:['组织建设','参政议政','学习培训','社会活动','其他'],
+				rangeList:['全体成员可见','仅管理团队可见'],
+				rangeValue:'全体成员可见',
+				orgList:[],
+				orgValue:'',
+				orgId:'',
+				orgRangeList:['全体成员可见','仅管理团队可见'],
+				orgRangeValue:'全体成员可见',
+				branchId:'',
+				branchValue:'',
+				imgIdList: [],
+				uploadList:[],
+				lastPageLength:'',
 				memberList: [
 					{
 						value: 'CHN',
@@ -119,8 +154,12 @@
 				],
 			}
 		},
-		onLoad() {
-			//this.getTradeRequest();
+		onLoad(option) {
+			let branchList = JSON.parse(option.list);
+			this.lastPageLength = option.length;
+			this.branchValue = branchList[0].name;
+			this.branchId = Number(branchList[0].id);
+			this.getPowerRequest(this.branchId);
 		},
 		onShow() {
 		},
@@ -133,57 +172,86 @@
 		methods: {
 			bindDateChange(e){
 					this.dateYear = e.target.value
-						   
 			},
 			bindDateMonthChange(e){
 					this.dateMonth = this.arrayMonth[e.target.value]
 			},
 			change(e) {
-					this.single = e;
+					this.activeDate = e;
 					console.log("-change事件:", e);
 			 },
-			 goStep(){
-				  uni.navigateTo({
-				  	url:'./create2'
-				  })
+			 goStepBack(){
+				 uni.navigateBack({
+				 })
 			 },
 			 bindPickerChange(e,type) {
-						 let that = this;
-						  switch (type){
-						  	case 'education':
-							 that.educationValue =  that.educationArray[e.target.value]
-							 console.log(that.educationValue)
-						  		break;
-						  	case 'profession':
-						  	 that.professionValue =  that.professionArray[e.target.value]
-						  		break;
-							case 'ends':
-							 that.endsValue =  that.endsArray[e.target.value]
-								break;	
-						  }
-			             
-			          },
-			submitRequest(params){
-				   console.log(params)
-				 	 let that = this;
-			}, 
+				 let that = this;
+				  switch (type){
+					case 'activeType':
+					 that.activeValue = that.activeType[e.target.value]
+						break;
+					case 'range':
+					 that.rangeValue =  that.rangeList[e.target.value]
+						break;
+					case 'org':
+					 that.orgValue =  that.orgList[e.target.value].name;
+					 that.orgId = that.orgList[e.target.value].value;
+						break;
+					case 'orgRange':
+					 that.orgRangeValue =  that.orgRangeList[e.target.value]
+						break;	
+				  }
+			},
+			getPowerRequest(bId){
+				let md5Sign = md5(
+				  "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
+				    "&secret=" + getApp().globalData.secret
+				);
+				let url = getApp().globalData.shareUrl +"api/api.php" +
+				  "?method=activity&action=branch_auth&timestamp=" +
+				  getApp().globalData.globalTimestamp + "&sign=" + md5Sign;
+				uni.request({
+				  url: url,
+				  method: "POST",
+				  header: {
+				    "content-type": "application/x-www-form-urlencoded",
+				  },
+				  data: {
+				    openid:getApp().globalData.open_id,
+					branch_id:bId
+				  },
+				  success: (res) => {
+				    if (res.data.code === 200) {
+						console.log(res.data)
+						this.leaderAuth = res.data.data.leader_auth;
+						this.orgList = res.data.data.post_branch_level;
+						console.log(this.orgList)
+						if(this.orgList.length){
+							this.orgValue = this.orgList[0].name;
+						}
+				    }
+				  },
+				  fail: () => {
+				    console.log("连接失败");
+				  },
+				});
+			},
 			getImage(type) {
 			  let that = this;
-			  // if (that.uploadList.length >= 9) {
-			  //   uni.showToast({
-			  //     title: "最多上传9张图片",
-			  //     icon: "none",
-			  //     duration: 2500,
-			  //   });
-			  //   return;
-			  // }
+			  if (that.uploadList.length >= 9) {
+			    uni.showToast({
+			      title: "最多上传9张图片",
+			      icon: "none",
+			      duration: 2500,
+			    });
+			    return;
+			  }
 			  uni.chooseImage({
 			    sourceType: [type],
-			    count: 1,
+			    count: 9 - that.uploadList.length,
 			    sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
 			    success: (res) => {
 			      for (let i = 0; i < res.tempFilePaths.length; i++) {
-					 console.log(res.tempFilePaths[i]) 
 			        that.uploadList.push(res.tempFilePaths[i]);
 			        that.uploadFileRequest(res.tempFilePaths[i]);
 			      }
@@ -197,30 +265,22 @@
 			  });
 			  let that = this;
 			  let md5Sign = md5(
-			    "method=" +
-			      "upload" +
-			      "&timestamp=" +
-			      getApp().globalData.globalTimestamp +
-			      "&secret=" +
-			      getApp().globalData.secret
+			    "method="+"activity_upload" +"&timestamp=" + getApp().globalData.globalTimestamp + "&secret=" +getApp().globalData.secret
 			  );
-			  let url =
-			    getApp().globalData.shareUrl +
-			    "api/api.php" +
-			    "?method=upload&source=activity&id=1&timestamp=" +
-			    getApp().globalData.globalTimestamp +
-			    "&sign=" +
-			    md5Sign;
+			  let url = getApp().globalData.shareUrl +  "api/api.php" +"?method=activity_upload&timestamp=" +
+			    getApp().globalData.globalTimestamp +"&sign=" + md5Sign;
 			  uni.uploadFile({
 			    url: url, //需要设置为全局
 			    filePath: fileVal,
 			    name: "file",
 			    formData: {
+			      openid: getApp().globalData.open_id,
 			      file: fileVal,
+			      branch_id:this.branchId
 			    },
 			    success: (res) => {
 			      let tmpres = JSON.parse(res.data);
-			      console.log(tmpres);
+				  console.log(tmpres)
 			      uni.hideLoading();
 			      that.imgIdList.push(tmpres.data.id);
 			    },
@@ -246,6 +306,63 @@
 			    },
 			  });
 			}, 
+			submitActive(){
+				let typeObj = {
+					'组织建设':'1',
+					'参政议政':'2',
+					'社会活动':'3',
+					'学习培训':'4',
+					// '其他':'99',
+				}
+				let rangeObj = {
+					'全体成员可见':'0',
+					'仅管理团队可见':'1',
+				}
+				let md5Sign = md5(
+				  "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
+				    "&secret=" + getApp().globalData.secret
+				);
+				let url = getApp().globalData.shareUrl +"api/api.php" +
+				  "?method=activity&action=add&timestamp=" +
+				  getApp().globalData.globalTimestamp + "&sign=" + md5Sign;
+				uni.request({
+				  url: url,
+				  method: "POST",
+				  header: {
+				    "content-type": "application/x-www-form-urlencoded",
+				  },
+				  data: {
+				    openid:getApp().globalData.open_id,
+					name:this.activeName,
+					type:typeObj[this.activeValue], //1.组织建设;2.参政议政;3.社会活动;4.学习培训;99.其他
+					start_time:this.activeDate, //开始日期
+					branch_id:this.branchId, //支部ID 
+					leader_only:rangeObj[this.rangeValue], //可见范围: 0,都可见;1, 仅管理层可见
+					post_branch_level:this.orgId || '0', //下级支部可见层级
+					post_leader_only:rangeObj[this.orgRangeValue], //下级支部可见范围: 0,都可见;1,仅管理层可见
+					attach_ids:this.imgIdList.join(),  //活动通知附件ids,以逗号分隔   可没有
+					remark:'' //备注
+				  },
+				  success: (res) => {
+				    if (res.data.code === 200) {
+						uni.showToast({
+						  title: "添加成功",
+						  icon: "none", 
+						  duration: 2500,
+						});
+						setTimeout(()=>{
+							if(this.lastPageLength == 1){
+								uni.navigateBack({delta:1})
+							}else{
+								uni.navigateBack({delta:2})
+							}
+						},800)
+				  }},
+				  fail: () => {
+				    console.log("连接失败");
+				  },
+				});
+			}
 		}
 	}
 </script>

+ 31 - 0
pages/index/activity/list.vue

@@ -54,6 +54,7 @@ export default {
       userNickName:getApp().globalData.user_name,
 	  array: ['全部', '浐灞一支部', '浐灞二支部'],
 	  index: 0,
+	  activeId:'',
 	  activiList:[
 		  {
 		     type:'组织建设',
@@ -94,6 +95,9 @@ export default {
 	  ]
     };
   },
+  onLoad(option) {
+	this.readActive(option.id)
+  },
   onShow() {
   },
   methods: {
@@ -105,6 +109,33 @@ export default {
 			  this.single = e;
 			  console.log("-change事件:", e);
 		  },
+		  readActive(id){
+			  let md5Sign = md5(
+			    "method=" +"activity" + "&timestamp=" + getApp().globalData.globalTimestamp +
+			      "&secret=" + getApp().globalData.secret
+			  );
+			  let url = getApp().globalData.shareUrl +"api/api.php" +
+			    "?method=activity&action=process_list&timestamp=" +
+			    getApp().globalData.globalTimestamp + "&sign=" + md5Sign;
+			  uni.request({
+			    url: url,
+			    method: "POST",
+			    header: {
+			      "content-type": "application/x-www-form-urlencoded",
+			    },
+			    data: {
+			      openid: getApp().globalData.open_id,
+				  activity_id :id
+			    },
+			    success: (res) => {
+			      if (res.data.code === 200) {
+			      }
+			    },
+			    fail: () => {
+			      console.log("连接失败");
+			    },
+			  });
+		  },
 		  publish(){
 			  uni.navigateTo({
 			  	url:'./create1'