result.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view>
  3. <view class="content">
  4. <view style="padding-top: 150rpx;">
  5. <text class="cuIcon-roundcheckfill" :class="success?'text-success':'text-error'"
  6. style="font-size: 150rpx;"></text>
  7. </view>
  8. <view class="tips">
  9. <text class="title" v-text="success?'授权成功':'授权失败'"></text>
  10. <text class="desc" v-text="success?'点击确认继续助力':response.message"></text>
  11. </view>
  12. <view class="cu-btn btn radius line-gray" @click.stop="confirm">
  13. 确认
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. response: {},
  23. success: false
  24. }
  25. },
  26. onLoad(options) {
  27. this.response = JSON.parse(decodeURIComponent(options.response))
  28. console.log(this.response);
  29. if (this.response.resultCode == '0000') {
  30. this.success = true
  31. } else {
  32. this.success = false
  33. }
  34. },
  35. methods: {
  36. confirm() {
  37. let productId=this.$cache.get('productId')
  38. if (!productId) {
  39. uni.switchTab({
  40. url:"../index/home"
  41. })
  42. return
  43. }
  44. let params={
  45. id:productId,
  46. authResult:JSON.stringify(this.response)
  47. }
  48. uni.reLaunch({
  49. url:"/pages/activity/activityDetail"+this.$u.queryParams(params),
  50. success: () => {
  51. this.$cache.remove('productId')
  52. }
  53. })
  54. },
  55. }
  56. }
  57. </script>
  58. <style>
  59. page {
  60. background-color: #FFFFFF;
  61. }
  62. </style>
  63. <style lang="scss" scoped>
  64. .text-success {
  65. color: #19be6b;
  66. }
  67. .text-error {
  68. color: #de5454;
  69. }
  70. .content {
  71. display: flex;
  72. flex-direction: column;
  73. display: flex;
  74. justify-content: center;
  75. align-items: center;
  76. image {
  77. width: 150rpx;
  78. height: 150rpx;
  79. }
  80. .tips {
  81. margin-top: 20rpx;
  82. display: flex;
  83. flex-direction: column;
  84. text-align: center;
  85. .title {
  86. font-size: 36rpx;
  87. }
  88. .desc {
  89. margin-top: 20rpx;
  90. font-size: 28rpx;
  91. color: #969696;
  92. }
  93. }
  94. .btn {
  95. margin-top: 40rpx;
  96. width: 50%;
  97. padding: 42rpx;
  98. }
  99. }
  100. </style>