completion.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="order_completion_box">
  3. <view class="order_completion_title">
  4. <view class="completion_icon">
  5. <uni-icons class="icon" type="checkmarkempty" size="40" color="#eeeeee"></uni-icons>
  6. </view>
  7. <view class="product_title" v-for="(item,index) in productTitleInfo" :key="index">
  8. {{item.name}}已兑换成功
  9. </view>
  10. </view>
  11. <view class="nav_button">
  12. <view class="nav_order" @click="navOrder()">
  13. <text>查看订单</text>
  14. </view>
  15. <view class="nav_home" @click="navHome()">
  16. <text>返回首页</text>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. //报单成功的商品信息
  26. productTitleInfo:[]
  27. }
  28. },
  29. onLoad(option) {
  30. //接受参数
  31. let productInfo = option.params;
  32. if( productInfo ){
  33. //解密参数
  34. productInfo = decodeURIComponent(productInfo);
  35. //转成js数组对象
  36. productInfo = JSON.parse(productInfo);
  37. this.productTitleInfo = productInfo;
  38. }
  39. },
  40. onShow() {
  41. },
  42. methods: {
  43. navOrder(){
  44. uni.redirectTo({
  45. url:"/pages/score/orders"
  46. })
  47. },
  48. navHome(){
  49. uni.switchTab({
  50. url:"/pages/index/index"
  51. })
  52. },
  53. }
  54. }
  55. </script>
  56. <style lang="less">
  57. .order_completion_box{
  58. display:block;
  59. padding-bottom: 60rpx;
  60. .order_completion_title{
  61. display: block;
  62. width: 630rpx;
  63. // height: 300rpx;
  64. margin: 30rpx auto;
  65. line-height: 2.0;
  66. .completion_icon{
  67. width:150rpx;
  68. height: 150rpx;
  69. margin: 30rpx auto;
  70. border-radius: 50%;
  71. display: flex;
  72. justify-content: center;
  73. align-items: center;
  74. background-color: #00bba5;
  75. }
  76. .product_title{
  77. text-align: center;
  78. font-size: 24rpx;
  79. }
  80. }
  81. .nav_button{
  82. width: 630rpx;
  83. height: 300rpx;
  84. margin: 80rpx auto;
  85. display: block;
  86. line-height: 100rpx;
  87. .nav_order{
  88. text-align: center;
  89. margin: 30rpx 0rpx;
  90. border-radius: 60rpx;
  91. background-color: #00bba5;
  92. text{
  93. color: #fff;
  94. }
  95. }
  96. .nav_home{
  97. text-align: center;
  98. border: 2rpx solid #00bba5;
  99. margin: 30rpx 0rpx;
  100. border-radius: 60rpx;
  101. }
  102. }
  103. }
  104. </style>