save-order.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <view class="save-order-box iPhone-bottom flex-common-css box-border-box">
  3. <view class="bg-box"></view>
  4. <Nav title='提交订单' bgckgroundBox='transparent'></Nav>
  5. <view class="scroll-view-css box-border-box p-24">
  6. <view class="box-card box-border-box mb-20 bgc-f">
  7. <view class="box-input align-items-center box-border-box p-b-20 mb-20">
  8. <view class="fs-28 fw-600 w158">姓名</view>
  9. <input type="text" placeholder="请输入姓名">
  10. </view>
  11. <view class="box-input align-items-center box-border-box p-b-20 mb-20">
  12. <view class="fs-28 fw-600 w158">手机号</view>
  13. <input v-model="fromData.phone" type="number" placeholder="请输入手机号">
  14. <view class="fs-28 fc-41ABF5 code-box" @click="getCode()">{{codeText}}{{isCode?'s':''}}</view>
  15. </view>
  16. <view class="box-input align-items-center box-border-box p-b-20 mb-20">
  17. <view class="fs-28 fw-600 w158">验证码</view>
  18. <input type="number" placeholder="请输入验证码">
  19. </view>
  20. <view class="box-input align-items-center box-border-box p-b-20 mb-20">
  21. <view class="fs-28 fw-600 w158">联系地址</view>
  22. <input type="text" placeholder="请输入联系地址(选填)">
  23. </view>
  24. </view>
  25. <view class="box-card box-border-box mb-20 bgc-f">
  26. <view class="box-top box-border-box flex-justify-space">
  27. <view class="box-left display-flex">
  28. <image src="@/static/img/buy/group-bg.png" mode="scaleToFill"></image>
  29. <view class="w336 fs-28 fw-400">
  30. 巧大耳朵游乐场大耳朵游乐 1大耳朵游乐场
  31. </view>
  32. </view>
  33. <view class="box-right">
  34. <view class="fs-32 fw-600 text-align-right mb-12">¥19.5</view>
  35. <view class="fs-26 text-align-right fc-9">x1</view>
  36. <!-- <view class="display-flex align-items-center">
  37. <view class="right-only-right-red fw-500 text-align-center fs-36 fc-f">-</view>
  38. <view class="right-only-right-2 text-align-center fs-28 fw-400">1</view>
  39. <view class="right-only-right-add fw-500 text-align-center fs-36 fc-f">+</view>
  40. </view> -->
  41. </view>
  42. </view>
  43. <view class="box-buttom text-align-right">
  44. <span class="fs-28 fc-9 fw-400">共5件,</span>
  45. <span class="fs-28 fc-0 fw-400">合计¥</span>
  46. <span class="fs-44 fc-0 fw-b">19.5</span>
  47. </view>
  48. </view>
  49. <view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
  50. <view class="fs-28 fw-600 w158">备注</view>
  51. <input class="text-align-right" type="text" placeholder="请填写你的需求">
  52. </view>
  53. <view class="box-card box-border-box mb-20 bgc-f flex-justify-space">
  54. <view class="fs-28 fw-600 w158">支付方式</view>
  55. <view class="wx-box display-flex">
  56. <image src="@/static/img/common/wx-zf.png" mode="scaleToFill"></image>
  57. <view class="fs-28 fw-400 ml-10">微信支付</view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="bottom-box box-border-box p-24">
  62. <view class="flex-justify-space">
  63. <view class="align-items-flex-end box-1">
  64. <span class="fs-28 fc-f fw-600">¥</span>
  65. <span class="fs-44 fc-f fw-600">19.5</span>
  66. </view>
  67. <view class="text-align-center box-2 fs-32 fc-f fw-600" @click="toSave()">立即支付</view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. import {getCode} from '@/api/common.js';
  74. import tools from "@/service/tools";
  75. export default {
  76. data(){
  77. return{
  78. isCode:false,
  79. codeText:'获取验证码',
  80. fromData:{
  81. id:'',
  82. phone:'',
  83. school_id:'',
  84. code:'',
  85. note:'',
  86. },
  87. }
  88. },
  89. methods:{
  90. getCode(){
  91. if (this.isCode) {
  92. return
  93. }
  94. this.isCode = true;
  95. getCode({phone:this.fromData.phone,send_type:'group_order'}).then((res)=>{
  96. if(res.code === 1){
  97. this.codeText = 60;
  98. let timer = setInterval(() => {
  99. this.codeText -= 1;
  100. if (this.codeText <= 0) {
  101. clearInterval(timer);
  102. this.isCode = false;
  103. this.codeText = '获取验证码'
  104. }
  105. }, 1000);
  106. }else{
  107. this.isCode = false;
  108. tools.error('获取验证码失败,请稍后重试')
  109. }
  110. })
  111. },
  112. },
  113. }
  114. </script>
  115. <style scoped lang="scss">
  116. .save-order-box{
  117. position: relative;
  118. .right-only-right-red{
  119. width: 44rpx;
  120. height: 44rpx;
  121. line-height: 40rpx;
  122. border-radius: 12rpx;
  123. border: 1rpx solid #41ABF5;
  124. color: #41ABF5;
  125. }
  126. .right-only-right-add{
  127. width: 44rpx;
  128. height: 44rpx;
  129. line-height: 40rpx;
  130. background: linear-gradient( 117deg, #57CAFF 0%, #41ABF5 100%);
  131. border-radius: 12rpx;
  132. }
  133. .right-only-right-2{
  134. min-width: 50rpx;
  135. }
  136. .bg-box{
  137. width: 100%;
  138. height: 448rpx;
  139. filter: blur(80rpx);
  140. background: linear-gradient(to right,rgba(176, 252, 250, 0.6),rgba(249,246,224,0.87),rgba(249,246,224,0.87));
  141. position: absolute;
  142. top: 0;
  143. left: 0;
  144. z-index: -1;
  145. }
  146. .bottom-box{
  147. background-color: #fff;
  148. .box-1{
  149. flex: 1;
  150. height: 100rpx;
  151. background: #333;
  152. border-radius: 200rpx 0rpx 0rpx 200rpx;
  153. box-sizing: border-box;
  154. padding-left: 32rpx;
  155. padding-bottom: 20rpx;
  156. }
  157. .box-2{
  158. width: 200rpx;
  159. height: 100rpx;
  160. line-height: 100rpx;
  161. background: #41ABF5;
  162. border-radius: 0rpx 200rpx 200rpx 0rpx;
  163. text-align: center;
  164. }
  165. }
  166. .box-card{
  167. width: 100%;
  168. min-height: 88rpx;
  169. border-radius: 20rpx;
  170. padding: 24rpx 24rpx 0 24rpx;
  171. .box-top{
  172. padding-bottom: 24rpx;
  173. border-bottom: 2rpx solid #F9F9F9;
  174. margin-bottom: 24rpx;
  175. .box-left{
  176. image{
  177. width: 108rpx;
  178. height: 108rpx;
  179. border-radius: 8rpx;
  180. margin-right: 16rpx;
  181. }
  182. .w336{
  183. width: 336rpx;
  184. }
  185. }
  186. }
  187. .box-buttom{
  188. padding-bottom: 24rpx;
  189. }
  190. }
  191. .box-input{
  192. border-bottom: 2rpx solid #F9F9F9;
  193. position: relative;
  194. .w158{
  195. width: 158rpx;
  196. }
  197. input{
  198. font-size: 28rpx;
  199. }
  200. .code-box{
  201. position: absolute;
  202. right: 0;
  203. top: 0;
  204. }
  205. }
  206. .wx-box{
  207. image{
  208. width: 40rpx;
  209. height: 40rpx;
  210. }
  211. }
  212. }
  213. </style>