index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="container">
  3. <!-- 提示信息 -->
  4. <view class="hint flex_r flex_ac">请填写本人真实信息</view>
  5. <!-- 提示信息-end -->
  6. <!-- 提交内容 -->
  7. <view class="con">
  8. <view class="list flex_r flex_ac">
  9. <view class="list_name">真实姓名:</view>
  10. <input class="list_input flex_grow" type="text" v-model="name" placeholder="请输入您的真实姓名" />
  11. </view>
  12. <view class="list flex_r flex_ac">
  13. <view class="list_name">身份证号:</view>
  14. <input class="list_input flex_grow" type="text" v-model="code" placeholder="请输入您的身份证号" />
  15. </view>
  16. <div class="checkbox-box flex_r flex_ac">
  17. <checkbox-group @change="checkboxChange" class="flex_r flex_ac">
  18. <label class="checkbox flex_r flex_ac">
  19. <checkbox class='checkboxCom' value="agree" />
  20. <view>我同意</view>
  21. </label>
  22. <navigator url="/pages/serviceAgreement/index" hover-class="li_hover"><text>《用户服务协议》</text></navigator>
  23. <text>和</text>
  24. <navigator url="/pages/agreement/privacy" hover-class="li_hover"><text>《隐私协议》</text></navigator>
  25. </checkbox-group>
  26. </div>
  27. <!-- <view class="privacy">
  28. <navigator url="/pages/agreement/privacy" hover-class="li_hover"><text>查看《隐私协议》</text></navigator>
  29. </view> -->
  30. <view class="btn flex_r flex_ac flex_jc" @tap="submit">提交审核</view>
  31. </view>
  32. <!-- 提交内容-end -->
  33. </view>
  34. </template>
  35. <script>
  36. let page = 1;
  37. let app = getApp();
  38. var appEv = app.$vm.$options;
  39. import {
  40. post
  41. } from "@/request/api.js";
  42. import {
  43. ToPayOpre
  44. } from "@/utils/reqTools.js";
  45. let toPayOpre = new ToPayOpre();
  46. export default {
  47. data() {
  48. return {
  49. name: "",
  50. code: "",
  51. isDisabled: false, //是否选中协议
  52. };
  53. },
  54. onLoad() {
  55. this.loadData()
  56. },
  57. methods: {
  58. submit() {
  59. if(!this.isDisabled){
  60. appEv.errTips("请阅读并同意相关协议");
  61. return;
  62. }
  63. // #ifdef H5
  64. let type = "H5";
  65. // #endif
  66. // #ifdef APP
  67. let type = "app";
  68. // #endif
  69. // #ifdef MP-WEIXIN
  70. let type = "jsapi";
  71. // #endif
  72. let data = {
  73. name: this.name,
  74. card: this.code,
  75. trade_type: type,
  76. amount:this.amount
  77. };
  78. post("/user/authentication", data).then(res => {
  79. if (res.code === 0) {
  80. uni.redirectTo({
  81. url: "/pages/autonym-pay/index?amount=" + this.amount + '&payDetail=' + encodeURIComponent(JSON.stringify(res.data.data)),
  82. });
  83. } else {
  84. appEv.errTips(res.msg)
  85. }
  86. });
  87. },
  88. loadData(){
  89. post('/user/isPayAuth').then(res => {
  90. if(res.code === 0){
  91. this.amount = res.data.amount
  92. }
  93. })
  94. },
  95. checkboxChange(e) {
  96. var value = e.detail.value;
  97. this.isDisabled = value.length != 0
  98. },
  99. }
  100. };
  101. </script>
  102. <style lang="scss" scoped>
  103. // 页面配置
  104. // 页面配置-end
  105. // 提示信息
  106. .hint {
  107. width: 100%;
  108. height: 74rpx;
  109. font-size: 24rpx;
  110. color: #e75b25;
  111. padding: 0 30rpx;
  112. background: #f4f4f4;
  113. }
  114. .privacy{
  115. margin-top:20rpx;
  116. text-align: right;
  117. text{
  118. color: #17bb87;
  119. }
  120. }
  121. // 提示信息-end
  122. // 提交内容
  123. .con {
  124. width: 1005;
  125. overflow: hidden;
  126. padding: 30rpx;
  127. box-sizing: border-box;
  128. }
  129. .list {
  130. width: 100%;
  131. height: 100rpx;
  132. border-bottom: 3rpx solid rgba(0, 0, 0, 0.12);
  133. }
  134. .list_name {
  135. font-size: 28rpx;
  136. color: #333333;
  137. font-weight: "SourceHanSansCN-Medium";
  138. width: 130rpx;
  139. }
  140. .list_input {
  141. width: calc(100% - 140rpx);
  142. margin-left: 10rpx;
  143. height: 100%;
  144. font-size: 28rpx;
  145. color: #333;
  146. }
  147. .btn {
  148. width: 395rpx;
  149. height: 95rpx;
  150. border-radius: 10rpx;
  151. background: #17bb87;
  152. color: #fff;
  153. font-size: 34rpx;
  154. font-family: "SourceHanSansCN-Medium";
  155. margin: 100rpx auto 0;
  156. }
  157. // 提交内容-end
  158. .checkbox-box{
  159. margin-top: 60rpx;
  160. margin-bottom: -20px;
  161. font-size: 28rpx;
  162. }
  163. .checkbox-box text{
  164. /* color: #07d; */
  165. /* color: #44A92F; */
  166. color: #44a92f;
  167. }
  168. .checkbox-box .checkbox .checkboxCom{
  169. transform: scale(0.84);
  170. -webkit-transform: scale(0.84);
  171. }
  172. </style>