Selaa lähdekoodia

邀请助力修改

DELL 3 vuotta sitten
vanhempi
commit
815e646d83
2 muutettua tiedostoa jossa 21 lisäystä ja 6 poistoa
  1. 17 3
      components/activity-help/activity-help.vue
  2. 4 3
      packageOperate/activity/index.vue

+ 17 - 3
components/activity-help/activity-help.vue

@@ -18,7 +18,7 @@
 				<view class="activityShow-sixtwo">您也可以获得一个免费抽奖机会</view>
 				<view class="activityShow-seven" @click="activityHelp()">
 					<image src="../../static/activity/yuanjiao.png" mode="" class="activityShow-seven-img"></image>
-					<view class="activityShow-seven-view">收下好意</view>
+					<view class="activityShow-seven-view" @click="exChange()">收下好意</view>
 				</view>
 			</view>
 		</u-popup>
@@ -101,11 +101,25 @@
 						this.closeShow = true
 						this.activityShowClose = false
 					} else if (res.code == 500) {
-						uni.$u.toast(res.msg);
+						setTimeout(()=>{
+							uni.$u.toast(res.msg);
+						},500)
 						this.close()
 					} else {}
 				})
-			}
+			},
+			exChange() {
+				//弹出层打开
+				// this.popupShow = true
+				uni.requestSubscribeMessage({
+					tmplIds: ['3y_My-yRmqmGd3-f-vAwNaK4LQeehzXBSNDi_5wcnFI',
+						'FGcPOV1j9ApESr3VUlWjFr6E1vF4X_h0LLN82T2CLL0',
+						'92xxL8XTRPLROyNUtmN04OT0kyq4iwSCH3sz-j6zbZs'
+					],
+					success(res) {
+					}
+				})
+			},
 		},
 	}
 </script>

+ 4 - 3
packageOperate/activity/index.vue

@@ -125,7 +125,7 @@
 					</view>
 					<text class="codesix">还没有抽奖码</text>
 				</view>
-				<view class="wrap-description-codesix" v-if="info.codeList && info.codeList.length > 0">再获取1个抽奖码可超过当前<view class="view">{{ (info.codeList.length + 4)*5 > 80 ? 80 : (info.codeList.length + 4)*5}}%</view>  的人</view>
+				<view class="wrap-description-codesix" v-if="info.codeList && info.codeList.length > 0">再获取1个抽奖码可超过当前<view class="view">{{ (info.codeList.length + 4)*5 > 80 ? 80 : (info.codeList.length + 4)*5}}%</view>的人</view>
 				<view class="wrap-description-codesixtwo">每邀请一位好友助力成功,即可获得1个抽奖码</view>
 				<view class="wrap-description-codesixtwo">抽奖码越多中奖概率越大</view>
 			</view>
@@ -151,7 +151,7 @@
 			<view class="flex btn">
 				<button v-if="info.codeType == 2 && info.codeList.length < 1" type="default" @click="exChange"
 					open-type="share">分享给好友,参与抽奖</button>
-				<button v-if="info.codeType == 1 && info.codeList.length < 1" type="default" @click="exChangeCode">立即参与抽奖</button>
+				<button v-if="info.codeType == 1 && info.codeList.length < 1" type="default" @click="exChangeCode" open-type="share">立即参与抽奖</button>
 				<button v-if="info.codeType == 1 && info.codeList.length >= 1 || info.codeType == 2 && info.codeList.length >= 1" type="default" @click="exChange"
 					open-type="share">分享给好友,提升中奖概率</button>
 <!-- 				<u-count-down v-else :time="activityTimeTwo" format="DD:HH:mm:ss" autoStart millisecond
@@ -177,7 +177,7 @@
 		<!-- <u-popup v-if="info.status && JSON.parse(info.status).value == 4"   mode="bottom" @close="close" closeable> -->
 		
 		<!-- 助力邀请弹框组件 -->
-		<activity-help :activity-show="activityShow" :inviteCode="inviteCodeTa" :marketingId="marketingId" @close="close" @success="toActivity" v-if="activityShow && info.status && JSON.parse(info.status).value == 3" />
+		<activity-help :activity-show="activityShow" :inviteCode="inviteCodeTa" :marketingId="marketingId" @close="close" @exChange='exChange' @success="toActivity" v-if="activityShow && info.status && JSON.parse(info.status).value == 3" />
 		<!-- 活动结束弹框 -->
 		<u-popup v-if="info.status && JSON.parse(info.status).value == 4 || info.isOn == -1" show="true" mode="center" @close="close"
 			round="11">
@@ -302,6 +302,7 @@
 						},500)
 					}
 				})
+				this.exChange()
 			},
 			close() {
 				//弹出层收起