ficcReport.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="container-ficc-report-item" @click="goDetail(list)">
  3. <view class="content-img">
  4. <image :src="list.ImgUrl"></image>
  5. </view>
  6. <view class="content-test">
  7. <text>{{ list.Title }}</text>
  8. <text>{{ list.SecondTitle }}</text>
  9. </view>
  10. <u-modal
  11. v-model="showhasPermission"
  12. :content-style="{ fontSize: '32rpx' }"
  13. @confirm="showhasPermissionBtn"
  14. :show-cancel-button="true"
  15. confirm-text="提交申请"
  16. @cancel="showhasPermissionCancel"
  17. :show-title="false"
  18. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  19. :confirm-style="{ fontWeight: '700' }"
  20. >
  21. <view class="slot-content">
  22. <text class="noauth-title">暂无权限</text>
  23. <text>{{ list.HasPermission == 6 || list.HasPermission == 7 ? "您可申请开通试用" : "点击提交申请,提醒对口销售为你开通试用" }}</text>
  24. </view>
  25. </u-modal>
  26. </view>
  27. </template>
  28. <script>
  29. import { User, Reports } from "@/config/api.js";
  30. export default {
  31. name: "",
  32. components: {},
  33. props: {
  34. list: {
  35. type: Object,
  36. default: {},
  37. required: true,
  38. },
  39. },
  40. data() {
  41. return { showhasPermission: false, reportId: 0, hasPermission: 0 };
  42. },
  43. methods: {
  44. async goDetail(item) {
  45. if (!this.isUserBindingPhoneNumber) {
  46. this.pleaseGoLogin();
  47. return;
  48. }
  49. if (item.HasPermission == 1) {
  50. const res = await Reports.postFiccXCXHistory();
  51. if (res.Ret !== 200) return;
  52. uni.navigateToMiniProgram({
  53. appId: item.Appid,
  54. path: item.SourceUrl + item.ThirdCode,
  55. });
  56. } else {
  57. this.showhasPermission = true;
  58. this.reportId = item.ReportId;
  59. this.hasPermission = item.HasPermission;
  60. }
  61. },
  62. async showhasPermissionBtn() {
  63. if (this.hasPermission == 3 || this.hasPermission == 5) {
  64. const res = await User.applyTry({
  65. ApplyMethod: 3,
  66. TryType: "ficcreportxcx",
  67. DetailId: 0,
  68. });
  69. if (res.Ret === 200) {
  70. uni.showModal({
  71. title: "",
  72. content: "申请已提交,请等待销售人员与您联系",
  73. showCancel: false,
  74. confirmColor: "#365595",
  75. success: function (res) {},
  76. });
  77. }
  78. } else if (this.hasPermission == 7) {
  79. uni.navigateTo({
  80. url: "/pageMy/applyTrial/applyTrial?tryType=ficcreportxcx&detailId=" + 0,
  81. });
  82. } else {
  83. uni.showModal({
  84. title: "",
  85. content: "您已经提交过申请了,请耐心等待",
  86. showCancel: false,
  87. confirmColor: "#365595",
  88. success: function (res) {},
  89. });
  90. }
  91. },
  92. showhasPermissionCancel() {
  93. this.showhasPermission = false;
  94. },
  95. },
  96. };
  97. </script>
  98. <style scoped lang="scss">
  99. .container-ficc-report-item {
  100. min-height: 220rpx;
  101. width: 100%;
  102. border-radius: 8rpx;
  103. overflow: hidden;
  104. margin-bottom: 20rpx;
  105. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  106. .content-img {
  107. width: 100%;
  108. height: 60rpx;
  109. image {
  110. width: 100%;
  111. height: 100%;
  112. }
  113. }
  114. .content-test {
  115. width: 100%;
  116. padding: 12rpx;
  117. text {
  118. font-size: 24rpx;
  119. line-height: 36rpx;
  120. color: #333;
  121. margin-bottom: 10rpx;
  122. }
  123. }
  124. .noauth-title {
  125. font-size: 32rpx;
  126. font-weight: 600;
  127. margin-bottom: 15rpx;
  128. }
  129. }
  130. </style>