index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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/agreement/privacy" 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. // let reqApi = new ReqApi();
  39. var appEv = app.$vm.$options;
  40. // import { ReqApi } from "@/utils/reqTools.js";
  41. import {
  42. post
  43. } from "@/request/api.js";
  44. import {
  45. ToPayOpre
  46. } from "@/utils/reqTools.js";
  47. let toPayOpre = new ToPayOpre();
  48. export default {
  49. data() {
  50. return {
  51. name: "",
  52. code: "",
  53. isDisabled: false, //是否选中协议
  54. };
  55. },
  56. onLoad() {
  57. this.loadData()
  58. },
  59. methods: {
  60. submit() {
  61. if(this.isDisabled){
  62. appEv.errTips("请阅读并同意相关协议");
  63. return;
  64. }
  65. // #ifdef H5
  66. let type = "H5";
  67. // #endif
  68. // #ifdef APP
  69. let type = "app";
  70. // #endif
  71. // #ifdef MP-WEIXIN
  72. let type = "jsapi";
  73. // #endif
  74. let data = {
  75. name: this.name,
  76. card: this.code,
  77. trade_type: type,
  78. amount:this.amount
  79. };
  80. post("/user/authentication", data).then(res => {
  81. if (res.code === 0) {
  82. uni.redirectTo({
  83. url: "/pages/autonym-pay/index?amount=" + this.amount + '&payDetail=' + encodeURIComponent(JSON.stringify(res.data.data)),
  84. });
  85. } else {
  86. appEv.errTips(res.msg)
  87. }
  88. });
  89. },
  90. loadData(){
  91. post('/user/isPayAuth').then(res => {
  92. if(res.code === 0){
  93. this.amount = res.data.amount
  94. }
  95. })
  96. },
  97. checkboxChange(e) {
  98. var value = e.detail.value;
  99. this.isDisabled = value.length == 0
  100. },
  101. }
  102. };
  103. </script>
  104. <style lang="scss" scoped>
  105. // 页面配置
  106. // 页面配置-end
  107. // 提示信息
  108. .hint {
  109. width: 100%;
  110. height: 74rpx;
  111. font-size: 24rpx;
  112. color: #e75b25;
  113. padding: 0 30rpx;
  114. background: #f4f4f4;
  115. }
  116. .privacy{
  117. margin-top:20rpx;
  118. text-align: right;
  119. text{
  120. color: #17bb87;
  121. }
  122. }
  123. // 提示信息-end
  124. // 提交内容
  125. .con {
  126. width: 1005;
  127. overflow: hidden;
  128. padding: 30rpx;
  129. box-sizing: border-box;
  130. }
  131. .list {
  132. width: 100%;
  133. height: 100rpx;
  134. border-bottom: 3rpx solid rgba(0, 0, 0, 0.12);
  135. }
  136. .list_name {
  137. font-size: 28rpx;
  138. color: #333333;
  139. font-weight: "SourceHanSansCN-Medium";
  140. width: 130rpx;
  141. }
  142. .list_input {
  143. width: calc(100% - 140rpx);
  144. margin-left: 10rpx;
  145. height: 100%;
  146. font-size: 28rpx;
  147. color: #333;
  148. }
  149. .btn {
  150. width: 395rpx;
  151. height: 95rpx;
  152. border-radius: 10rpx;
  153. background: #17bb87;
  154. color: #fff;
  155. font-size: 34rpx;
  156. font-family: "SourceHanSansCN-Medium";
  157. margin: 100rpx auto 0;
  158. }
  159. // 提交内容-end
  160. .checkbox-box{
  161. margin-top: 60rpx;
  162. margin-bottom: -20px;
  163. font-size: 28rpx;
  164. }
  165. .checkbox-box text{
  166. /* color: #07d; */
  167. /* color: #44A92F; */
  168. color: #44a92f;
  169. }
  170. .checkbox-box .checkbox .checkboxCom{
  171. transform: scale(0.84);
  172. -webkit-transform: scale(0.84);
  173. }
  174. </style>