components.vue 7.8 KB

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