123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- import { activity, User } from "@/config/api.js";
- let app = getApp();
- export default {
- methods: {
- // 报名
- signupAdd(type = 1) {
- if (this.isNeedAddCountryCode) {
- this.isAreaCode = true;
- this.areaCode = {
- id: Number(this.id),
- type,
- };
- } else {
- activity
- .signupAdd({
- ActivityId: Number(this.id),
- SignupType: type,
- })
- .then((res) => {
- if (res.Ret == 200) {
- this.signupType = res.Data.SignupType;
- this.countryCode = res.Data.CountryCode;
- this.mobileEdit = res.Data.Mobile;
- this.goOnNextStep = res.Data.GoFollow;
- this.idTypeCancel = {
- cutId: res.Data.ActivityId,
- state: 1,
- };
- if (res.Data.GoBindEmail) {
- this.mailboxBinding = true;
- return;
- }
- if (res.Data.SignupStatus !== "Success") {
- this.isShow = true;
- } else {
- if (res.Data.GoOutboundMobile) {
- this.editIsShow = true;
- } else if (res.Data.GoFollow) {
- this.goFollow = res.Data.GoFollow;
- } else if (res.Data.SignupStatus == "Success") {
- this.isShow = true;
- }
- }
- }
- });
- }
- this.selectShow = false;
- },
- // 取消报名
- signupCancel(type) {
- if (this.detailData.IsSignup == 1) {
- this.isCancelShow = true;
- this.idTypeCancel = {
- id: Number(this.id),
- type,
- cutId: "",
- state: 0,
- };
- } else {
- this.signupAdd();
- }
- },
- // 预约/取消
- async summaryIsHandel() {
- if (this.detailData.IsAppointment == 0) {
- const res = await activity.postAppointmentAdd({ ActivityId: Number(this.id) });
- if (res.Ret == 200) {
- this.signupType = "summaryIsHandel";
- this.idTypeCancel = {
- cutId: res.Data.ActivityId,
- state: 1,
- };
- if (res.Data.GoBindEmail) {
- this.mailboxBinding = true;
- return;
- }
- if (res.Data.SignupStatus !== "Success") {
- this.isShow = true;
- } else {
- if (res.Data.GoOutboundMobile) {
- this.editIsShow = true;
- } else if (res.Data.GoFollow) {
- this.goFollow = res.Data.GoFollow;
- } else if (res.Data.SignupStatus == "Success") {
- this.isShow = true;
- }
- }
- }
- this.selectShow = false;
- } else {
- uni.showModal({
- content: "确定要取消预约本场调研的纪要吗?",
- confirmColor: "#3385FF",
- cancelColor: "#606266",
- success: async (res) => {
- if (res.confirm) {
- const res = await activity.postAppointmentCancel({ ActivityId: Number(this.id) });
- if (res.Ret === 200) {
- this.getActivityDetail();
- }
- }
- },
- });
- }
- },
- // 取消会议提醒接口
- meetingReminderCancel() {
- if (this.detailData.IsCancelMeetingReminder == 1) {
- activity
- .meetingReminderCancel({
- ActivityId: Number(this.id),
- })
- .then((res) => {
- if (res.Ret == 200) {
- uni.showModal({
- confirmText: "知道了",
- confirmColor: "#3385FF",
- content: res.Msg,
- showCancel: false,
- success: (res) => {
- if (res.confirm) {
- this.getActivityDetail();
- }
- },
- });
- }
- });
- } else {
- this.meetingReminderAdd();
- }
- },
- // 添加会议提醒
- meetingReminderAdd() {
- activity
- .meetingReminderAdd({
- ActivityId: Number(this.id),
- })
- .then((res) => {
- if (res.Ret == 200) {
- uni.showModal({
- confirmText: "知道了",
- confirmColor: "#3385FF",
- content: res.Msg,
- showCancel: false,
- success: (res) => {
- if (res.confirm) {
- this.getActivityDetail();
- }
- },
- });
- }
- });
- },
- // 我要报名
- wanttosignup() {
- if (this.detailData.IsLimitPeople == 1 && this.detailData.ActivityTypeName == "公司调研电话会") {
- this.selectShow = true;
- } else {
- this.signupAdd(3);
- }
- },
- // 提问
- askingGo(type = "") {
- uni.navigateTo({
- url: "/activityPages/generationAsk/generationAsk?id=" + this.id + "&type=" + type,
- });
- },
- },
- };
|