activity-entry.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class="container cashier">
  3. <view class="container-banner" :style="{paddingTop:CustomBar + 230 +'px'}">
  4. <view class="login-input">
  5. <input type="text"
  6. v-model="params.name"
  7. maxlength="20"
  8. class="input"
  9. placeholder="请填写您的姓名"
  10. />
  11. </view>
  12. <view class="login-input">
  13. <input type="number"
  14. v-model="params.shareCode"
  15. maxlength="11"
  16. class="input"
  17. placeholder="请填写您的手机号"
  18. />
  19. </view>
  20. <view class="login-btn" @click="handleEntry">大会签到</view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default{
  26. data(){
  27. return{
  28. shopOrderId:0,
  29. payType:'',
  30. payStatus:true,
  31. payBtnStatus:false,
  32. amuntMoney:0,
  33. successText:'订单支付失败',
  34. isIphoneX:this.$store.state.isIphoneX,
  35. CustomBar:this.CustomBar,// 顶部导航栏高度
  36. params:{
  37. name:'',
  38. shareCode:''
  39. }
  40. }
  41. },
  42. filters:{
  43. NumFormat(value) {
  44. //处理金额
  45. if (value) {
  46. return Number(value).toFixed(2)
  47. } else {
  48. return '0.00'
  49. }
  50. }
  51. },
  52. onLoad(option) {
  53. this.initData(option)
  54. },
  55. methods:{
  56. initOrderInfo() {
  57. this.orderInfo = uni.getStorageSync('orderInfo')
  58. uni.removeStorageSync('orderInfo')
  59. },
  60. handleEntry(){
  61. if(!this.params.name){
  62. this.$util.msg('请填写您的姓名',2000)
  63. return
  64. }
  65. if(!this.params.shareCode){
  66. this.$util.msg('请填写您的联系方式',2000)
  67. return
  68. }
  69. },
  70. initData(option){
  71. const data = JSON.parse(option.data)
  72. this.orderId = data.data.orderId
  73. this.shopOrderId = data.data.shopOrderId
  74. this.payType = data.data.type
  75. this.amuntMoney = data.data.payAmount
  76. if(this.payType == 'success'){
  77. this.payStatus = true
  78. this.successText = '订单支付成功'
  79. }else{
  80. this.payStatus = false
  81. this.successText = '订单支付失败'
  82. }
  83. this.PayOrderCheckoutCounter(this.shopOrderId)
  84. },
  85. async PayOrderCheckoutCounter(shopOrderId){//初始化支付信息
  86. try{
  87. const res = await this.PayService.PayOrderCheckoutCounter({ shopOrderId : shopOrderId })
  88. const data = res.data.shopOrder
  89. const status = data.status //子订单状态
  90. this.mapStateArr.forEach(value => {
  91. if(status === value){
  92. this.payBtnStatus = true
  93. }
  94. })
  95. this.isRepuest = true
  96. }catch(error){
  97. this.$util.msg(error.msg,2000)
  98. }
  99. },
  100. toAgainPay(){
  101. this.$api.reLaunch(`/pages/user/order/order-pay-list?shopOrderId=${this.shopOrderId}`)
  102. },
  103. details(){
  104. this.$api.reLaunch('/pages/user/order/order-details?type=share&shopOrderId='+this.shopOrderId)
  105. }
  106. },
  107. onShow() {
  108. }
  109. }
  110. </script>
  111. <style lang="scss">
  112. page{
  113. background-color: #3d68eb;
  114. height: auto !important;
  115. }
  116. .container-banner{
  117. width: 100%;
  118. height: 1142rpx;
  119. background: url(https://admin.caimei365.com/userfiles/1/images/photo/2024/08/ziluo_bg.jpg) no-repeat;
  120. background-size: contain;
  121. box-sizing: border-box;
  122. padding: 0 150rpx;
  123. .login-input{
  124. width: 100%;
  125. height: 88rpx;
  126. padding:0 24rpx;
  127. margin: 0 auto;
  128. margin-bottom: 60rpx;
  129. background: #FFFFFF;
  130. box-sizing: border-box;
  131. border-radius: 50rpx;
  132. .input{
  133. width: 100%;
  134. height: 100%;
  135. background: #FFFFFF;
  136. font-size: $font-size-28;
  137. line-height: 88rpx;
  138. color: #333333;
  139. border-radius: 50rpx;
  140. }
  141. }
  142. .login-btn {
  143. width: 100%;
  144. height: 88rpx;
  145. font-size: $font-size-28;
  146. line-height: 88rpx;
  147. color: #ffffff;
  148. margin: 0 auto;
  149. margin-bottom: 24rpx;
  150. text-align: center;
  151. background-color: #e10078;
  152. border-radius: 50rpx;
  153. }
  154. }
  155. </style>