components.vue 5.4 KB

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