耀实惠小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.8 KiB

  1. <template>
  2. <view class="pages">
  3. <image class="img" :src="img_src+ 'PreferentialSpellGroup_success.png'" mode=""></image>
  4. <text class="title">{{title}}</text>
  5. <button class="btn" @click="toPrize">{{btn_text}}</button>
  6. </view>
  7. </template>
  8. <script>
  9. import config from "@/utils/js/config.js"
  10. export default {
  11. data() {
  12. return {
  13. img_src: config.img_url,
  14. title: "请到我的订单中查看订单情况!",
  15. btn_text: "我知道了",
  16. isback_: true
  17. }
  18. },
  19. onUnload() {
  20. if(this.isback_) {
  21. this.toAnswerQuestionsPrize(1)
  22. }
  23. },
  24. methods: {
  25. // 跳转答题区域
  26. toPrize() {
  27. // uni.redirectTo({
  28. // url: "./../index"
  29. // })
  30. this.isback_ = false;
  31. this.toAnswerQuestionsPrize(2)
  32. },
  33. // 返回到答题列表
  34. toAnswerQuestionsPrize(index) {
  35. var that = this;
  36. let page_url = getCurrentPages()
  37. if (page_url.length > 1) {
  38. var url = page_url[page_url.length-2].route;
  39. console.log(url,"----------------------------");
  40. if (url == "pagesB/homeGridList/answerQuestionsPrize/detale/detale") {
  41. // 返回到答题列表 1为返回一次 因为还有自己的返回 2为点击btn返回所以两次
  42. uni.navigateBack({
  43. delta:index
  44. })
  45. }
  46. }
  47. },
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .pages{
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. .img{
  57. margin-top: 155rpx;
  58. width: 380rpx;
  59. height: 380rpx;
  60. border-radius: 50%;
  61. }
  62. .title{
  63. margin-top: 25rpx;
  64. font-size: 26rpx;
  65. color: #707070;
  66. }
  67. .btn{
  68. margin-top: 130rpx;
  69. width: 536rpx;
  70. height: 76rpx;
  71. border-radius: 26rpx;
  72. border: 3rpx solid #01AEEA;
  73. background-color: #fff;
  74. font-size: 30rpx;
  75. color: #01AEEA;
  76. display: flex;
  77. justify-content: center;
  78. align-items: center;
  79. }
  80. }
  81. </style>