Commit a58777c4 authored by leiqingsong's avatar leiqingsong

修改活动详情

parent 03700c6d
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
) { ) {
// 1.获取code // 1.获取code
if (this.$route.query.unionid === undefined) { if (this.$route.query.unionid === undefined) {
// this.getUnionid(); this.getUnionid();
} else { } else {
this.userBaseInfo.unionid = JSON.stringify(this.$route.query.unionid); this.userBaseInfo.unionid = JSON.stringify(this.$route.query.unionid);
this.userBaseInfo.openid = JSON.stringify(this.$route.query.openid); this.userBaseInfo.openid = JSON.stringify(this.$route.query.openid);
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
if (res.data.errMessage === "会员不存在") { if (res.data.errMessage === "会员不存在") {
this.isMember = false; this.isMember = false;
Dialog.confirm({ Dialog.confirm({
title: "确认框", title: "提示",
message: message:
"当前活动为会员才可参加,尚未找到您的会员信息,是否前往注册?" "当前活动为会员才可参加,尚未找到您的会员信息,是否前往注册?"
}) })
...@@ -341,13 +341,13 @@ export default { ...@@ -341,13 +341,13 @@ export default {
}, },
Start_Game() { Start_Game() {
// 在微信端打开 会有身份验证 路径中会带上 unionid // 在微信端打开 会有身份验证 路径中会带上 unionid
// if ( if (
// this.env.match(/MicroMessenger/i) !== "micromessenger" || this.env.match(/MicroMessenger/i) !== "micromessenger" ||
// this.env.match(/wxwork/i) == "wxwork" this.env.match(/wxwork/i) == "wxwork"
// ) { ) {
// this.$toast("请在微信端参与活动!"); this.$toast("请在微信端参与活动!");
// return false; return false;
// } }
if (this.game_end) { if (this.game_end) {
this.$toast("活动已结束"); this.$toast("活动已结束");
return false; return false;
...@@ -358,9 +358,9 @@ export default { ...@@ -358,9 +358,9 @@ export default {
} }
let params = { let params = {
activityId: this.active_id, activityId: this.active_id,
openId: this.userBaseInfo.openid || "ofoA-xH5niSEVKKdaw2rE4bEZ3KY", openId: this.userBaseInfo.openid,
phone: this.userBaseInfo.phone, phone: this.userBaseInfo.phone,
unionId: this.userBaseInfo.unionid || "oCIMxuC30KJI9Kn_y4miMflyQ7BY", unionId: this.userBaseInfo.unionid,
userName: this.userBaseInfo.name userName: this.userBaseInfo.name
}; };
APi_Active.play(params) APi_Active.play(params)
......
...@@ -338,6 +338,7 @@ import { Toast } from "vant"; ...@@ -338,6 +338,7 @@ import { Toast } from "vant";
export default { export default {
data() { data() {
return { return {
remain_probability: 100,
can_create: true, can_create: true,
minStartDate: null, minStartDate: null,
minEndDate: null, minEndDate: null,
...@@ -419,7 +420,9 @@ export default { ...@@ -419,7 +420,9 @@ export default {
confirmTime: new Date() confirmTime: new Date()
}; };
}, },
created() {}, created() {
// this.prizeList[0].probability = this.remain_probability;
},
methods: { methods: {
// 限制 vant stepper 输入长度 // 限制 vant stepper 输入长度
handleProbalitity(val) { handleProbalitity(val) {
...@@ -837,10 +840,14 @@ export default { ...@@ -837,10 +840,14 @@ export default {
return newString; return newString;
}, },
addPrice() { addPrice() {
if (this.prizeList.length > 7) { if (this.prizeList.length > 5) {
this.$toast("最多设置8个奖项"); this.$toast("最多设置6个奖项");
return; return;
} }
// 计算剩余 概率
// this.prizeList.forEach(p => {
// this.remain_probability -= Number(p.probability)
// })
this.prizeList.push({ this.prizeList.push({
name: "", name: "",
timeLine_type: "", timeLine_type: "",
......
...@@ -238,7 +238,7 @@ export default { ...@@ -238,7 +238,7 @@ export default {
this.flag = sessionStorage.getItem("role"); this.flag = sessionStorage.getItem("role");
} }
} else { } else {
// this.zReadyUserId() this.zReadyUserId()
this.zTestGetNowUrlInfo() this.zTestGetNowUrlInfo()
} }
this.GET_CurrentActive() this.GET_CurrentActive()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment