123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <template>
- <view class="container activity-detail">
- <view class="" v-if="haveAuth == 1">
- <view class="content">
- <view class="dialog-title" :class="1 == 1 ? 'brackets-title' : ''">{{ detailData.ResearchTheme }}</view>
- <view class="network">
- <view class="network-left">活动类型:</view>
- <view class="network-right">{{ detailData.ActivityTypeName }}</view>
- </view>
- <view class="network">
- <view class="network-left">所属行业:</view>
- <view class="network-right">{{ detailData.ChartPermissionName }}</view>
- </view>
- <view class="network">
- <view class="network-left">预期时间:</view>
- <view class="network-right">{{ detailData.ActivityTimeText }}</view>
- </view>
- <view class="network">
- <view class="network-left">调研形式:</view>
- <view class="network-right">{{ detailData.SpecialType == 1 ? "线上" : "线下" }}</view>
- </view>
- <block v-if="detailData.IndustrialName || detailData.IndustrialSubjectName">
- <view class="network">
- <view class="network-left">产业名称:</view>
- <view class="network-right">{{ detailData.IndustrialName }}</view>
- </view>
- <view class="network">
- <view class="network-left">相关公司:</view>
- <view class="network-right">{{ detailData.IndustrialSubjectName }}</view>
- </view>
- </block>
- <block v-else>
- <view class="network">
- <view class="network-left">相关主题:</view>
- <view class="network-right">{{ detailData.Label }}</view>
- </view>
- </block>
- </view>
- <view class="" style="height: 50rpx"></view>
- <view class="look-Trip" @click="lookImg">
- 查看行程安排
- <van-icon name="arrow" />
- </view>
- <view class="interest-btn">
- <text class="button" v-if="detailData.IsSignup !== 1" @click="interest">感兴趣</text>
- <text class="button" @click="beNotInterested" v-else>已预报名</text>
- 若对该活动感兴趣,欢迎点击感兴趣进行预报名
- </view>
- </view>
- <!-- 权限部分 -->
- <view v-else>
- <jurisdiction :idAct="id" :haveAuth="haveAuth" :industryMsg="industryMsg" :msgType="msgType" :sellerMobile="sellerMobile" :sellerName="sellerName"></jurisdiction>
- </view>
- <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
- </view>
- </template>
- <script>
- import { activity, User } from "@/config/api.js";
- import jurisdiction from "../activityDetail/jurisdiction/components.vue";
- import freeCharge from "@/components/freeCharge";
- let app = getApp({ allowDefault: true });
- export default {
- data() {
- return {
- id: "",
- detailData: {},
- haveAuth: "",
- industryMsg: "",
- sellerMobile: "",
- sellerName: "", //销售名称
- msgType: "",
- };
- },
- components: {
- jurisdiction,
- freeCharge,
- },
- watch: {
- haveAuth: {
- handler() {
- //上传页面统计
- // if (this.haveAuth == 1) {
- // this.$store.dispatch("statistics", { PageType: "ActivitParticulars", DetailId: this.id });
- // }
- },
- immediate: true,
- },
- },
- methods: {
- async getActivityDetail() {
- const res = await activity.getSpecialDetailList({ ActivityId: this.id });
- if (res.Ret == 200) {
- this.haveAuth = res.Data.HasPermission;
- this.industryMsg = res.Data.PopupMsg;
- this.sellerMobile = res.Data.SellerMobile;
- this.sellerName = res.Data.SellerName;
- this.msgType = res.Data.MsgType;
- if (res.Data.HasPermission == 1) {
- this.detailData = res.Data.Detail;
- }
- }
- },
- //感兴趣
- async interest() {
- const res = await activity.postSpecialSignupAdd({
- ActivityId: this.detailData.ActivityId,
- });
- if (res.Ret === 200) {
- this.detailData.IsSignup = 1;
- this.currentPages();
- uni.showModal({
- content: "预报名成功,已通知您的销售",
- confirmText: "知道了",
- showCancel: false,
- confirmColor: "#3385FF",
- });
- }
- },
- //已预报名、就是不感兴趣
- beNotInterested() {
- uni.showModal({
- content: "您要取消此次专研调研的预报名吗?",
- confirmColor: "#3385FF",
- cancelColor: "#606266",
- success: async (res) => {
- if (res.confirm) {
- const res = await activity.postSpecialSignupAdd({
- ActivityId: this.detailData.ActivityId,
- });
- if (res.Ret === 200) {
- this.detailData.IsSignup = 0;
- this.currentPages();
- }
- }
- },
- });
- },
- currentPages() {
- let pages = getCurrentPages();
- let prevPage = pages[pages.length - 2];
- let path = prevPage.$page.fullPath;
- if (path == "/activityPages/specialResearchPage/specialResearchPage") {
- const index = prevPage.$vm.collectList.findIndex((item) => item.ActivityId == this.id);
- prevPage.$vm.collectList[index].IsSignup = this.detailData.IsSignup;
- }
- },
- //查看行程的事件
- lookImg() {
- uni.previewImage({
- urls: [this.detailData.TripImgLink], //查看图片的数组
- });
- },
- },
- onLoad(option) {
- console.log(option);
- this.id = option.id || "";
- },
- async onShow() {
- await this.$store.dispatch("checkHandle");
- if (!this.$store.state.isAuth && !this.$store.state.isBind) {
- //已授权已绑定
- this.getActivityDetail();
- }
- },
- /**
- * 用户点击分享
- */
- onShareAppMessage: function (res) {
- return {
- title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费试用月卡!" : "活动详情",
- path: "/activityPages/activityDetail/activityDetail?id=" + this.id,
- success: (res) => {},
- fail: (err) => {},
- };
- },
- };
- </script>
- <style lang="scss">
- .activity-detail {
- padding-bottom: 100rpx;
- .notice {
- height: 60rpx;
- width: 100%;
- }
- .choose-limit {
- position: relative;
- display: flex;
- align-items: center;
- // margin-left: 20rpx;
- image {
- width: 93rpx;
- height: 38rpx;
- }
- .limit-img {
- position: absolute;
- top: -13rpx;
- right: -30rpx;
- width: 46rpx;
- height: 26rpx;
- }
- }
- .content {
- padding: 34rpx 34rpx 0rpx;
- margin-bottom: -20rpx;
- color: #333333;
- font-size: 28rpx;
- view {
- padding-left: 20rpx;
- }
- text {
- line-height: 80rpx;
- padding-left: 20rpx;
- }
- .phone {
- padding: 0;
- display: inline-block;
- color: #2c83ff;
- }
- .dialog-title {
- width: 682rpx;
- padding: 20rpx;
- background: #f2f2f2;
- opacity: 0.8;
- text-align: center;
- font-size: 30rpx;
- font-weight: bold;
- margin-bottom: 15rpx;
- color: #000;
- }
- .brackets-title {
- padding-left: 20rpx;
- }
- .city-box {
- display: flex;
- align-items: center;
- text {
- padding: 0;
- }
- .city {
- display: flex;
- color: #2088ff;
- align-items: center;
- image {
- width: 27rpx;
- height: 32rpx;
- margin-right: 12rpx;
- }
- }
- }
- }
- .network {
- margin-bottom: 30rpx;
- padding: 0 !important;
- display: flex;
- .network-left {
- width: 160rpx;
- text-align-last: justify;
- text-align: justify;
- }
- .network-right {
- width: 480rpx;
- }
- .network-zoom {
- .text_zoom {
- width: 100%;
- word-break: break-all;
- color: #333333;
- }
- view {
- padding: 0 !important;
- margin: 0 !important;
- }
- .copy-zoom {
- display: inline-block;
- padding: 5rpx 17rpx !important;
- border-radius: 34rpx;
- background-color: #ebf4ff;
- font-size: 24rpx;
- color: #2c83ff;
- margin: 0 10rpx;
- margin-top: 30rpx;
- }
- }
- .network-link {
- width: 520rpx !important;
- view {
- padding: 0 !important;
- margin: 0 !important;
- width: 100%;
- display: flex;
- justify-content: space-between;
- :first-child {
- width: 350rpx;
- }
- .copy-link {
- padding: 5rpx 17rpx !important;
- border-radius: 34rpx;
- background-color: #ebf4ff;
- font-size: 24rpx;
- color: #2c83ff;
- }
- }
- }
- }
- .look-Trip {
- width: 100%;
- text-align: center;
- font-size: 28rpx;
- color: #3385ff;
- font-weight: 500;
- }
- .interest-btn {
- width: 100%;
- text-align: center;
- text {
- width: 318rpx;
- height: 67rpx;
- background: #3385ff;
- font-size: 28rpx;
- color: #fff;
- font-weight: 500;
- border-radius: 4rpx;
- line-height: 67rpx;
- margin: 90rpx auto 40rpx;
- }
- }
- }
- </style>
|