123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <template>
- <view class="noauth-cont" v-if="haveAuth === 2 || haveAuth === 3 || haveAuth === 4 || haveAuth === 5">
- <block v-if="!isShowAlert">
- <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
- <block v-if="haveAuth == 3">
- <view class="tip">{{ industryMsg }}</view>
- <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
- </block>
- <block v-if="haveAuth == 4 || haveAuth == 5">
- <view class="tip">{{ industryMsg }}</view>
- <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
- </block>
- <view class="tip" v-if="haveAuth === 2">
- <text style="margin-bottom: 20rpx"> 您暂无权限参加此活动 </text>
- <text>若想参加可以联系对口销售 </text>
- <text @click="callPhone(sellerMobile)"
- >{{ sellerName }}:<text style="color: #d4bf86; display: inline-block">{{ sellerMobile }}</text></text
- >
- <text>申请开通对应的试用权限</text>
- </view>
- <view v-if="haveAuth === 2" class="btn-cont" @click="sellerApplyAuth"> 立即申请 </view>
- <view class="btn-cont back-btn" @click="backIndex"> 返回</view>
- </block>
- <block v-else>
- <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
- <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
- <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
- <view class="btn-cont month-back" @click="backIndex"> 返回</view>
- </block>
- </view>
- </template>
- <script>
- import { User, FreeButton } from "@/config/api.js";
- export default {
- props: {
- haveAuth: {
- type: Number,
- required: true,
- },
- industryMsg: {
- type: String,
- required: true,
- },
- sellerMobile: {
- type: String,
- required: true,
- },
- sellerName: {
- type: String,
- required: true,
- },
- msgType: {
- type: String,
- required: true,
- },
- idAct: {
- type: Number,
- required: true,
- },
- },
- data() {
- return {
- isShowAlert: false,
- };
- },
- methods: {
- /* 无权限申请开通权限 */
- applyAuth() {
- /* 区分是否是潜在用户 */
- this.haveAuth === 3
- ? uni.navigateTo({
- url: "/pageMy/applyTrial/applyTrial?tryType=Activity&detailId=" + this.idAct,
- })
- : this.haveAuth === 5
- ? this.sellerApplyAuth()
- : uni.showModal({
- title: "",
- content: "您已经提交过申请了,请耐心等待",
- showCancel: false,
- confirmColor: "#3385FF",
- success: function (res) {},
- });
- },
- //销售的立即申请
- sellerApplyAuth() {
- User.applyTry({
- TryType: "Activity",
- DetailId: this.idAct,
- }).then((res) => {
- if (res.Ret === 200) {
- uni.showModal({
- title: "",
- content: "提交申请成功,请耐心等待",
- showCancel: false,
- confirmColor: "#3385FF",
- success: function (res) {
- this.backIndex();
- },
- });
- }
- });
- },
- // 返回首頁
- backIndex() {
- uni.navigateBack({
- fail() {
- uni.switchTab({
- url: "/pages/index/index",
- });
- },
- });
- },
- callPhone(num) {
- uni.makePhoneCall({
- phoneNumber: num,
- });
- },
- //获取权限弹窗是否展示免费月卡接口
- async userIsShowAlert() {
- const res = await FreeButton.userIsShowAlert();
- if (res.Ret === 200) {
- this.isShowAlert = res.Data.IsShow;
- }
- },
- },
- mounted() {
- this.userIsShowAlert();
- },
- };
- </script>
- <style scoped lang="scss">
- .noauth-cont {
- padding-top: 150rpx;
- text-align: center;
- font-size: 28rpx;
- .noauth-ico {
- width: 365rpx;
- height: 229rpx;
- margin-bottom: 70rpx;
- }
- .tip {
- width: 532rpx;
- margin: 0 auto 100rpx;
- .contract {
- padding: 40rpx 90rpx 0;
- line-height: 44rpx;
- text {
- display: inline-block;
- }
- }
- }
- .btn-cont {
- width: 368rpx;
- height: 80rpx;
- background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
- color: #fff;
- font-size: 34rpx;
- margin: 0 auto;
- text-align: center;
- line-height: 80rpx;
- &.back-btn {
- background: #fff !important;
- color: #2c83ff;
- border: 1px solid #2c83ff;
- margin-top: 30rpx;
- }
- .btn_bg {
- width: 100%;
- height: 80rpx;
- position: absolute;
- left: 0;
- top: 0;
- }
- .btn-txt {
- width: 100%;
- position: absolute;
- z-index: 1;
- }
- }
- .month_card {
- width: 100%;
- height: 565rpx;
- padding-left: -20rpx;
- }
- .btn-dl {
- background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
- color: #333 !important;
- margin: 30rpx auto !important;
- }
- .month-back {
- background: #f6f6f6 !important;
- color: #999 !important;
- }
- .moneh-text {
- text-align: center;
- width: 632rpx;
- margin: 0 auto 20rpx;
- color: #999999;
- }
- }
- </style>
|