components.vue 8.0 KB

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