showResearchDlg.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="show_Research_Dlg">
  3. <u-modal
  4. ref="modalResearch"
  5. async-close
  6. v-model="isShow"
  7. :content-style="{ fontSize: '32rpx' }"
  8. @confirm="confirmModal"
  9. :show-cancel-button="!isShowView"
  10. :confirm-text="isShowView ? '知道了' : '确定'"
  11. cancel-text="取消"
  12. @cancel="cancelModal"
  13. :show-title="false"
  14. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  15. :confirm-style="{ fontWeight: '700' }"
  16. >
  17. <view class="slot-content">
  18. <block v-if="!checkResearchList.CheckPermission"> 签约买方研选套餐才可参与此活动,请联系对口销售 </block>
  19. <block v-else-if="!checkResearchList.CheckTime"> <rich-text :nodes="content"></rich-text></block>
  20. <block v-else-if="!checkResearchList.CheckPoints">
  21. <view class="title-box txt-check">
  22. 点数不足,若想报名,<br />请联系对口销售
  23. <text style="display: inline-block; color: #3385ff" @click="promptTextHandler">升级套餐</text>
  24. </view>
  25. <view class="content-box">
  26. <text>当前剩余点数:</text>
  27. <text>{{ checkResearchList.CompanyPoints }}</text>
  28. </view>
  29. <view class="content-box">
  30. <text>本次会议扣除点数:</text>
  31. <text>{{ checkResearchList.ActivityPoints }}</text>
  32. </view>
  33. </block>
  34. <block v-else-if="!checkResearchList.CheckEmail">
  35. <text class="title-box">应上市公司要求,该会议报名需 提供邮箱,请填写您的工作邮箱</text>
  36. <view class="content-input">
  37. <input v-model="inputVal" type="text" placeholder="请输入正确的邮箱地址" />
  38. </view>
  39. </block>
  40. <block v-else-if="checkResearchList.CheckPoints">
  41. <view class="title-box"> 确定报名参加吗? </view>
  42. <view class="content-box">
  43. <text>当前剩余点数:</text>
  44. <text>{{ checkResearchList.CompanyPoints }}</text>
  45. </view>
  46. <view class="content-box">
  47. <text>本次会议扣除点数:</text>
  48. <text>{{ checkResearchList.ActivityPoints }}</text>
  49. </view>
  50. </block>
  51. </view>
  52. </u-modal>
  53. <u-modal
  54. v-model="show"
  55. :show-title="false"
  56. confirm-text="知道了"
  57. :content-style="{ fontSize: '32rpx' }"
  58. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  59. :confirm-style="{ fontWeight: '700' }"
  60. >
  61. <view class="slot-content slot-content-text">
  62. <rich-text :nodes="TextContent"></rich-text>
  63. </view>
  64. </u-modal>
  65. </view>
  66. </template>
  67. <script>
  68. import { User, activity, FreeButton } from "@/config/api.js";
  69. export default {
  70. data() {
  71. return {
  72. content: "该活动已截止报名<br />若想参加,请联系对口销售",
  73. type: 3,
  74. inputVal: "",
  75. show: false,
  76. TextContent:
  77. "5万/年含无限量调研纪要查阅以及15次公开专家访谈或30次重点公司、专家小范围交流;<br /><br />10万/年含无限量调研纪要查阅以及40次公开专家访谈或80次重点公司、专家小范围交流或20次私享专家一对一",
  78. };
  79. },
  80. props: {
  81. isResearchModalShow: {
  82. default: false,
  83. type: Boolean,
  84. },
  85. checkResearchList: {
  86. default: {},
  87. type: Object,
  88. },
  89. jurisdictionList: {
  90. default: {},
  91. type: Object,
  92. },
  93. },
  94. watch: {},
  95. computed: {
  96. isShowView() {
  97. let list = this.checkResearchList;
  98. let isNum = !list.CheckPermission || !list.CheckPoints ? true : false;
  99. return isNum;
  100. },
  101. isShow: {
  102. get() {
  103. return this.isResearchModalShow;
  104. },
  105. set() {},
  106. },
  107. },
  108. methods: {
  109. cancelModal() {
  110. this.$emit("update:isResearchModalShow", false);
  111. this.$emit("update:checkResearchList", {});
  112. },
  113. promptTextHandler() {
  114. this.cancelModal();
  115. this.$nextTick(() => {
  116. this.show = true;
  117. });
  118. },
  119. async confirmModal() {
  120. if (!this.checkResearchList.CheckPermission || !this.checkResearchList.CheckTime || !this.checkResearchList.CheckPoints) {
  121. this.cancelModal();
  122. return;
  123. } else if (!this.checkResearchList.CheckEmail) {
  124. this.$refs.modalResearch.clearLoading();
  125. if (!this.inputVal)
  126. return uni.showToast({
  127. title: "邮箱不能为空",
  128. icon: "none",
  129. duration: 2000,
  130. });
  131. this.cancelModal();
  132. const res = await activity.activityEmailBinding({
  133. Email: this.inputVal,
  134. });
  135. if (res.Ret === 200) {
  136. this.$parent.researchPointsHandler(this.jurisdictionList.ActivityId, this.checkResearchList.childrenType,this.jurisdictionList);
  137. }
  138. this.inputVal = "";
  139. return;
  140. } else if (this.checkResearchList.CheckPoints) {
  141. this.$parent.myIsApplyHandler(this.jurisdictionList.ActivityId, this.checkResearchList.childrenType);
  142. this.cancelModal();
  143. return;
  144. }
  145. },
  146. },
  147. };
  148. </script>
  149. <style lang="scss">
  150. .show_Research_Dlg {
  151. .title-box {
  152. color: #333333;
  153. font-weight: 600;
  154. font-size: 32rpx;
  155. line-height: 44rpx;
  156. margin-bottom: 35rpx;
  157. }
  158. .content-box {
  159. font-weight: 400;
  160. font-size: 28rpx;
  161. line-height: 44rpx;
  162. color: #333333;
  163. display: flex;
  164. justify-content: center;
  165. text:nth-child(2) {
  166. color: #3385ff;
  167. }
  168. }
  169. .content-input {
  170. display: flex;
  171. input {
  172. width: 100%;
  173. height: 78rpx;
  174. line-height: 78rpx;
  175. background: #f7f7f7;
  176. text-align: left;
  177. padding-left: 30rpx;
  178. }
  179. }
  180. .txt-check {
  181. text {
  182. margin-left: 8rpx;
  183. }
  184. }
  185. }
  186. .slot-content {
  187. width: 100%;
  188. padding: 50rpx;
  189. text-align: center;
  190. font-size: 32rpx;
  191. color: #0f1826;
  192. line-height: 48rpx;
  193. }
  194. .slot-content-text {
  195. text-align: left;
  196. }
  197. .seller-mobile {
  198. display: inline-block;
  199. color: #2979ff;
  200. }
  201. .u-model__footer__button.data-v-3626fcec {
  202. border-right: 1rpx solid #333;
  203. }
  204. </style>