components.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <view class="noauth-cont" v-if="jurisdictionList.HasPermission === 2 || jurisdictionList.HasPermission === 3 || jurisdictionList.HasPermission === 4 || jurisdictionList.HasPermission === 5">
  3. <block v-if="!isShowAlert">
  4. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  5. <block v-if="jurisdictionList.HasPermission == 3">
  6. <view class="tip">{{ jurisdictionList.PopupMsg }}</view>
  7. <view class="btn-cont" v-if="jurisdictionList.Type !== '专项调研'" @click="applyAuth"> 立即申请 </view>
  8. </block>
  9. <block v-if="jurisdictionList.HasPermission == 4 || jurisdictionList.HasPermission == 5">
  10. <view class="tip">{{ jurisdictionList.PopupMsg }}</view>
  11. <view class="btn-cont" v-if="jurisdictionList.Type !== '专项调研'" @click="applyAuth"> 立即申请 </view>
  12. </block>
  13. <view class="tip" v-if="jurisdictionList.HasPermission === 2">
  14. <block v-if="jurisdictionList.Type == '专项调研'"> 需要升级行业套餐权限才可参与此活动,请联系对口销售</block>
  15. <block v-else>
  16. <text style="margin-bottom: 20rpx"> 您暂无权限参加此活动 </text>
  17. <text>若想参加可以联系对口销售 </text>
  18. <text @click="callPhone(jurisdictionList.SellerMobile)" v-if="jurisdictionList.Type !== '专项调研'">
  19. {{ jurisdictionList.SellerName }}:
  20. <text style="color: #d4bf86; display: inline-block">{{ jurisdictionList.SellerMobile }}</text>
  21. </text>
  22. <text>申请开通对应的试用权限</text>
  23. </block>
  24. </view>
  25. <view v-if="jurisdictionList.HasPermission === 2 && jurisdictionList.Type !== '专项调研'" class="btn-cont" @click="sellerApplyAuth"> 立即申请 </view>
  26. <view class="btn-cont back-btn" @click="backIndex"> 返回</view>
  27. </block>
  28. <block v-else>
  29. <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
  30. <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
  31. <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
  32. <view class="btn-cont month-back" @click="backIndex"> 返回</view>
  33. </block>
  34. </view>
  35. </template>
  36. <script>
  37. import { User, FreeButton } from "@/config/api.js";
  38. export default {
  39. props: {
  40. jurisdictionList: {
  41. type: Object,
  42. required: true,
  43. default: {},
  44. },
  45. idAct: {
  46. type: Number,
  47. required: true,
  48. },
  49. },
  50. data() {
  51. return {
  52. isShowAlert: false,
  53. };
  54. },
  55. methods: {
  56. /* 无权限申请开通权限 */
  57. applyAuth() {
  58. /* 区分是否是潜在用户 */
  59. this.jurisdictionList.HasPermission === 3
  60. ? uni.navigateTo({
  61. url: "/pageMy/applyTrial/applyTrial?tryType=Activity&detailId=" + this.idAct,
  62. })
  63. : this.jurisdictionList.HasPermission === 5
  64. ? this.sellerApplyAuth()
  65. : uni.showModal({
  66. title: "",
  67. content: "您已经提交过申请了,请耐心等待",
  68. showCancel: false,
  69. confirmColor: "#3385FF",
  70. success: function (res) {},
  71. });
  72. },
  73. //销售的立即申请
  74. sellerApplyAuth() {
  75. User.applyTry({
  76. TryType: "Activity",
  77. DetailId: this.idAct,
  78. }).then((res) => {
  79. if (res.Ret === 200) {
  80. uni.showModal({
  81. title: "",
  82. content: "提交申请成功,请耐心等待",
  83. showCancel: false,
  84. confirmColor: "#3385FF",
  85. success: function (res) {
  86. this.backIndex();
  87. },
  88. });
  89. }
  90. });
  91. },
  92. // 返回首頁
  93. backIndex() {
  94. uni.navigateBack({
  95. fail() {
  96. uni.switchTab({
  97. url: "/pages/index/index",
  98. });
  99. },
  100. });
  101. },
  102. callPhone(num) {
  103. uni.makePhoneCall({
  104. phoneNumber: num,
  105. });
  106. },
  107. //获取权限弹窗是否展示免费月卡接口
  108. async userIsShowAlert() {
  109. const res = await FreeButton.userIsShowAlert();
  110. if (res.Ret === 200) {
  111. this.isShowAlert = res.Data.IsShow;
  112. }
  113. },
  114. },
  115. mounted() {
  116. // 免费送月卡
  117. // this.userIsShowAlert();
  118. },
  119. };
  120. </script>
  121. <style scoped lang="scss">
  122. .noauth-cont {
  123. padding-top: 150rpx;
  124. text-align: center;
  125. font-size: 28rpx;
  126. .noauth-ico {
  127. width: 365rpx;
  128. height: 229rpx;
  129. margin-bottom: 70rpx;
  130. }
  131. .tip {
  132. width: 532rpx;
  133. margin: 0 auto 100rpx;
  134. .contract {
  135. padding: 40rpx 90rpx 0;
  136. line-height: 44rpx;
  137. text {
  138. display: inline-block;
  139. }
  140. }
  141. }
  142. .btn-cont {
  143. width: 368rpx;
  144. height: 80rpx;
  145. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  146. color: #fff;
  147. font-size: 34rpx;
  148. margin: 0 auto;
  149. text-align: center;
  150. line-height: 80rpx;
  151. &.back-btn {
  152. background: #fff !important;
  153. color: #2c83ff;
  154. border: 1px solid #2c83ff;
  155. margin-top: 30rpx;
  156. }
  157. .btn_bg {
  158. width: 100%;
  159. height: 80rpx;
  160. position: absolute;
  161. left: 0;
  162. top: 0;
  163. }
  164. .btn-txt {
  165. width: 100%;
  166. position: absolute;
  167. z-index: 1;
  168. }
  169. }
  170. .month_card {
  171. width: 100%;
  172. height: 565rpx;
  173. padding-left: -20rpx;
  174. }
  175. .btn-dl {
  176. background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
  177. color: #333 !important;
  178. margin: 30rpx auto !important;
  179. }
  180. .month-back {
  181. background: #f6f6f6 !important;
  182. color: #999 !important;
  183. }
  184. .moneh-text {
  185. text-align: center;
  186. width: 632rpx;
  187. margin: 0 auto 20rpx;
  188. color: #999999;
  189. }
  190. }
  191. </style>