paySuccess.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="content">
  3. <text class="success-icon iconfont iconroundcheck"></text>
  4. <text class="tit">{{ type == 1? '抢购成功' : '支付成功'}}</text>
  5. <view class="btn-group">
  6. <navigator v-if="type == '1' " :url="'/pages/order/order'" open-type="redirect" class="mix-btn">查看订单</navigator>
  7. <navigator v-else :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
  8. <navigator v-if="type == '1' " :url="'/pages/hall/hallinfo?id=' + id + '&name=' + name + '&peoplename=' + peoplename" open-type="redirect" class="mix-btn hollow">返回抢画列表</navigator>
  9. <navigator v-else url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. orderId:'',
  18. type:'',
  19. id:'',
  20. name:'',
  21. peoplename:'',
  22. }
  23. },
  24. onLoad(opt) {
  25. if(opt.type) {
  26. this.type = opt.type
  27. }
  28. if(opt.uid) {
  29. this.id = opt.uid
  30. }
  31. if(opt.name) {
  32. this.name = opt.name
  33. }
  34. if(opt.peoplename) {
  35. this.peoplename = opt.peoplename
  36. }
  37. // 保存订单号
  38. this.orderId = opt.orderid;
  39. },
  40. methods: {
  41. }
  42. }
  43. </script>
  44. <style lang='scss'>
  45. .content{
  46. display: flex;
  47. flex-direction: column;
  48. justify-content: center;
  49. align-items: center;
  50. }
  51. .success-icon{
  52. font-size: 160upx;
  53. color: #d13737;
  54. margin-top: 100upx;
  55. }
  56. .tit{
  57. font-size: 38upx;
  58. color: #303133;
  59. }
  60. .btn-group{
  61. padding-top: 100upx;
  62. }
  63. .mix-btn {
  64. margin-top: 30upx;
  65. display: flex;
  66. align-items: center;
  67. justify-content: center;
  68. width: 600upx;
  69. height: 80upx;
  70. font-size: $font-lg;
  71. color: #fff;
  72. background-color: $base-color;
  73. border-radius: 10upx;
  74. &.hollow{
  75. background: #fff;
  76. color: #303133;
  77. border: 1px solid #ccc;
  78. }
  79. }
  80. </style>