pay.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <view class="">
  3. <view class="pay_tip">
  4. <view class="pay_text1">
  5. {{payState}}
  6. </view>
  7. <view class="pay_text2">
  8. 鱼儿正在向你招手~
  9. </view>
  10. </view>
  11. <view class="pay_detail">
  12. <view class="pay_list">
  13. <text class="name">订单号</text><text class="shuju">{{orderDetails.order_no}}</text>
  14. </view>
  15. <view class="pay_list">
  16. <text class="name">支付金额</text><text class="shuju">{{orderDetails.pay_money}}</text>
  17. </view>
  18. <view class="pay_list">
  19. <text class="name">预约时间</text><text class="shuju">{{orderDetails.subscribe_day}}</text>
  20. </view>
  21. <view class="pay_list">
  22. <text class="name">预约区域</text><text class="shuju">{{orderDetails.seat.name}}</text>
  23. </view>
  24. <view class="pay_list">
  25. <text class="name">预约坐席</text><text class="shuju">{{orderDetails.subscribes.seat.no}}</text>
  26. </view>
  27. </view>
  28. <view class="skip_button">
  29. <view class="skip_detail" @click="skip_detail">
  30. 查看详情
  31. </view>
  32. <view class="skip_index" @click="skip_index">
  33. 返回首页
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default({
  40. data(){
  41. return{
  42. payState:"",
  43. ordeListMessage:"",
  44. orderNo:"",
  45. orderDetails:'',
  46. }
  47. },
  48. onLoad() {
  49. var that=this
  50. wx.request({
  51. url:"https://yutang.web.ximengnaikang.com/api/payOkGetSeatNo?no&type=0",
  52. method:'GET',
  53. header:{
  54. 'content-type':'application/json' ,// 默认值
  55. 'Authorization':getApp().globalData.token,
  56. },
  57. data:{
  58. no:getApp().globalData.no
  59. },
  60. success(res) {
  61. console.log(res,'12222')
  62. that.payState="支付成功"
  63. },fail:function(){
  64. that.payState="支付中"
  65. }
  66. })
  67. wx.request({
  68. url:"https://yutang.web.ximengnaikang.com/api/orders/"+ getApp().globalData.no,
  69. method:'GET',
  70. header:{
  71. 'content-type':'application/json' ,// 默认值
  72. 'Authorization':getApp().globalData.token,
  73. },
  74. data:{
  75. // no:getApp().globalData.no
  76. },
  77. success(res) {
  78. that.orderDetails=res.data.data
  79. console.log(res,"这是订单详情")
  80. }
  81. })
  82. },
  83. methods:{
  84. skip_detail:function(){
  85. wx.switchTab({
  86. url:'../mine/mine',
  87. })
  88. },
  89. skip_index:function(){
  90. wx.switchTab({
  91. url:'../index/index'
  92. })
  93. }
  94. }
  95. })
  96. </script>
  97. <style>
  98. page{
  99. background-color: #f8f7f8;
  100. }
  101. .name{
  102. display: inline-block;
  103. width: 40%;
  104. }
  105. .shuju{
  106. display: inline-block;
  107. width: 60%;
  108. text-align: right;
  109. }
  110. .pay_text1{
  111. width: 100%;
  112. color: white;
  113. display: inline-block;
  114. margin-top: 90rpx;
  115. font-size:50rpx;
  116. font-weight: 550;
  117. text-align: center;
  118. }
  119. .pay_text2{
  120. width: 100%;
  121. color: white;
  122. display: inline-block;
  123. text-align: center;
  124. margin-top: 30rpx;
  125. }
  126. .pay_tip{
  127. height: 350rpx;
  128. background-color: #108cea;
  129. }
  130. .pay_detail{
  131. margin: 40rpx;
  132. padding: 20rpx;
  133. background-color: white;
  134. /* height: 300rpx; */
  135. }
  136. .pay_list{
  137. height: 80rpx;
  138. line-height: 80rpx;
  139. border-bottom: solid 1px #f8f7f8;
  140. }
  141. .skip_detail,.skip_index{
  142. height: 90rpx;
  143. line-height: 90rpx;
  144. text-align: center;
  145. border-radius: 10rpx;
  146. font-size: 34rpx;
  147. width: 240rpx;
  148. display: inline-block;
  149. vertical-align: top;
  150. }
  151. .skip_button{
  152. margin-top: 90rpx;
  153. }
  154. .skip_detail{
  155. margin-left: 15%;
  156. margin-right: 40rpx;
  157. color: white;
  158. background-color: #43c158;
  159. border: solid 1px #d9d8d9;
  160. }
  161. .skip_index{
  162. border: solid 1px #d9d8d9;
  163. }
  164. </style>