paySuccess.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="content">
  3. <text class="success-icon iconfont iconroundcheck"></text>
  4. <text class="tit">支付成功</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 url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. orderId:'',
  17. type:''
  18. }
  19. },
  20. onLoad(opt) {
  21. if(opt.type) {
  22. this.type = opt.type
  23. }
  24. // 保存订单号
  25. this.orderId = opt.orderid;
  26. },
  27. methods: {
  28. }
  29. }
  30. </script>
  31. <style lang='scss'>
  32. .content{
  33. display: flex;
  34. flex-direction: column;
  35. justify-content: center;
  36. align-items: center;
  37. }
  38. .success-icon{
  39. font-size: 160upx;
  40. color: #5dbc7c;
  41. margin-top: 100upx;
  42. }
  43. .tit{
  44. font-size: 38upx;
  45. color: #303133;
  46. }
  47. .btn-group{
  48. padding-top: 100upx;
  49. }
  50. .mix-btn {
  51. margin-top: 30upx;
  52. display: flex;
  53. align-items: center;
  54. justify-content: center;
  55. width: 600upx;
  56. height: 80upx;
  57. font-size: $font-lg;
  58. color: #fff;
  59. background-color: $base-color;
  60. border-radius: 10upx;
  61. &.hollow{
  62. background: #fff;
  63. color: #303133;
  64. border: 1px solid #ccc;
  65. }
  66. }
  67. </style>