工行这里学车报名流程h5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
4.3 KiB

  1. <template>
  2. <view class="step4">
  3. <view class="txt">
  4. 您的学费将由第三方银行资金监管账户进行资金监管学车过程中提供详细的扣费明细记录请放心学车
  5. 请认谁正规渠道报名学车谨慎在其它网络平台报名缴费以免造成损失!
  6. </view>
  7. <view class="flexB">
  8. <view class="lab">
  9. 班型名称
  10. </view>
  11. <view class="text">
  12. {{info.schoolName}}
  13. </view>
  14. </view>
  15. <view class="flexB">
  16. <view class="lab">
  17. 班型学费
  18. </view>
  19. <view class="text">
  20. {{$u.utils.priceTo(info.price)}}
  21. </view>
  22. </view>
  23. <view class="btnBox">
  24. <oneBtn text="签约" @oneBtnClick="showSignConfirmPopup = true"></oneBtn>
  25. </view>
  26. <u-popup v-model="showSignConfirmPopup" border-radius="14" mode="center" >
  27. <view class="popupCon" style="width: 580rpx">
  28. <view class="h1">温馨提示</view>
  29. <view class="p">1. 已了解并知晓学车培训及考试领证过程中相关需支出费用的明细组成</view>
  30. <view class="p">2. 已知晓解除合同因单方面个人原因需承担的服务费或违约金等支付标准</view>
  31. <view class="p">3. 本人身份证在学车培训期间不得交给教练员或其它无关人员违规用于记录培训学时否则由此产生的后果包括且不限于本人违规记录的学时被不予认可并清零自行承担</view>
  32. <view class="popBtn" @click="signContractFn">知道了签署合同</view>
  33. </view>
  34. </u-popup>
  35. <!-- <web-view :src="webVeiwUrl" v-if="showWebView"></web-view> -->
  36. </view>
  37. </template>
  38. <script>
  39. import learnDriveApi from '@/api/learnDrive.js'
  40. // import signWebView from '../webView/webView.vue'
  41. export default {
  42. props: ['trainingApplyId', 'info'],
  43. data() {
  44. return {
  45. showSignConfirmPopup: false,
  46. showWebView: false,
  47. webVeiwUrl: ''
  48. }
  49. },
  50. mounted() {
  51. if(this.showWebView) {
  52. this.$nextTick(()=>{
  53. this.shang()
  54. })
  55. }
  56. },
  57. methods: {
  58. // 获取签约链接
  59. async signContractFn() {
  60. uni.showLoading({
  61. title: '请稍后',
  62. mask: true
  63. })
  64. const [nulls, res] = await learnDriveApi.signContract({trainingApplyId: this.trainingApplyId})
  65. console.log('获取签约链接')
  66. console.log(res)
  67. if(res.code!=0) return this.$u.toast(res.message)
  68. // this.showWebView = true
  69. // this.webVeiwUrl = res.data.url
  70. // console.log(this.webVeiwUrl)
  71. uni.hideLoading()
  72. this.$store.commit('updateWebVeiwUrl',res.data.url)
  73. this.showSignConfirmPopup = false
  74. uni.navigateTo({
  75. url: '/pages/learnDriveStep/webView/webView?id='+ this.trainingApplyId
  76. })
  77. },
  78. shang() {
  79. let _this = this
  80. var currentWebview = this.$scope.$getAppWebview();
  81. setTimeout(()=>{
  82. console.log('currentWebview')
  83. console.log(currentWebview)
  84. let wv = currentWebview.children()[0]
  85. wv.addEventListener('loaded',function() {
  86. let webVeiwUrl = wv.getURL()
  87. console.log(webVeiwUrl)
  88. var reg = RegExp(/wait/i);
  89. if(reg.test(webVeiwUrl)){
  90. console.log('匹配成功了')
  91. // uni.navigateTo({
  92. // url: '/pages/learnDriveStep/payMoney/payMoney?trainingOrderId='+_this.trainingApplyId
  93. // })
  94. this.$emit('signSuccess')
  95. }
  96. console.log('监听到了————————————————————')
  97. console.log(wv.getURL()) //获取url
  98. console.log(wv.getTitle()) //获取标题
  99. }, false);
  100. },500)
  101. },
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .step4 {
  107. width: 100%;
  108. padding: 32rpx;
  109. color: #666;
  110. background: #fff;
  111. font-size: 32rpx;
  112. .txt {
  113. padding-bottom: 32rpx;
  114. border-bottom: 2rpx solid #ededed;
  115. }
  116. .flexB {
  117. display: flex;
  118. justify-content: space-between;
  119. align-items: center;
  120. height: 100rpx;
  121. .lab {
  122. color: #666;
  123. }
  124. .text {
  125. color: #333;
  126. }
  127. }
  128. .btnBox {
  129. width: 100%;
  130. padding-top: 42rpx;
  131. onebtn {
  132. }
  133. }
  134. }
  135. .popupCon {
  136. color: #333;
  137. .h1 {
  138. font-size: 32rpx;
  139. text-align: center;
  140. line-height: 100rpx;
  141. }
  142. .p {
  143. font-size: 26rpx;
  144. color: #666;
  145. margin-bottom: 36rpx;
  146. padding: 10rpx 42rpx;
  147. }
  148. .popBtn {
  149. border-top: 1px solid #ededed;
  150. font-size: 36rpx;
  151. text-align: center;
  152. color: #1989FA;
  153. text-align: center;
  154. height: 110rpx;
  155. line-height: 110rpx;
  156. }
  157. }
  158. </style>