integralExchange.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="exchangeDetail">
  3. <!-- 兑换状态 -->
  4. <view class="detailCard">
  5. <image src="/static/icon/success.png"></image>
  6. <text style="margin-bottom: 20rpx;">商品兑换成功</text>
  7. <text>-{{integral}}积分</text>
  8. </view>
  9. <!-- 按钮 -->
  10. <view class="btn">
  11. <view class="back" @click="goBack">
  12. <text>返回首页</text>
  13. </view>
  14. <view class="checkout" @click="goOrderDetail">
  15. <text>查看订单</text>
  16. </view>
  17. </view>
  18. <!-- 加入会员 -->
  19. <view class="bottomCard" @click="goOther">
  20. <image src="http://t9.9026.com/imgs/Kudosbg.png"></image>
  21. <view class="content">
  22. <text>立即加入IHG会员</text>
  23. <image src="/static/icon/right.png"></image>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. // 积分
  33. integral:0,
  34. }
  35. },
  36. onLoad(op) {
  37. console.log(op)
  38. this.integral=op.integral
  39. },
  40. methods: {
  41. // 返回首页
  42. goBack() {
  43. uni.reLaunch({
  44. url: '/pages/my/my'
  45. })
  46. },
  47. // 跳转订单详情
  48. goOrderDetail() {
  49. uni.navigateTo({
  50. url: '/pages/my/myorders/orders'
  51. })
  52. },
  53. // 跳转其他小程序
  54. goOther() {
  55. wx.navigateToMiniProgram({
  56. appId: 'wx255b58f0992b3c53', //appid
  57. path: 'newUIMain/enrollment/enrollment', //path
  58. extraData: { //参数
  59. foo: 'bar'
  60. },
  61. // envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
  62. success(res) {
  63. console.log('成功')
  64. // 打开成功
  65. },
  66. fail(e) {
  67. console.log(e, '失败')
  68. }
  69. })
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. $pageColor:#F9F9F9;
  76. $bgColor:#FFFFFF;
  77. @mixin flexlayout {
  78. display: flex;
  79. align-items: center;
  80. justify-content: center;
  81. }
  82. .exchangeDetail {
  83. height: 100%;
  84. background: $pageColor;
  85. }
  86. .detailCard {
  87. width: 750rpx;
  88. height: 446rpx;
  89. display: flex;
  90. flex-direction: column;
  91. justify-content: center;
  92. align-items: center;
  93. image {
  94. width: 120rpx;
  95. height: 120rpx;
  96. margin-bottom: 48rpx;
  97. }
  98. text {
  99. display: block;
  100. font-size: 32rpx;
  101. font-family: PingFangSC-Medium, PingFang SC;
  102. font-weight: 500;
  103. color: #080F18;
  104. }
  105. }
  106. .btn {
  107. width: 750rpx;
  108. height: 76rpx;
  109. display: flex;
  110. justify-content: space-between;
  111. align-items: center;
  112. padding:0 32rpx;
  113. .back {
  114. width: 332rpx;
  115. height: 76rpx;
  116. background: #F5F5F5;
  117. border-radius: 8rpx;
  118. @include flexlayout() text {
  119. font-size: 30rpx;
  120. font-family: PingFang-SC-Bold, PingFang-SC;
  121. font-weight: bold;
  122. color: #FF6301;
  123. }
  124. }
  125. .checkout {
  126. width: 332rpx;
  127. height: 76rpx;
  128. background: linear-gradient(270deg, #FF6200 0%, #FF9342 100%);
  129. border-radius: 8rpx;
  130. @include flexlayout() text {
  131. font-size: 30rpx;
  132. font-family: PingFang-SC-Bold, PingFang-SC;
  133. font-weight: bold;
  134. color: #FFFFFF;
  135. }
  136. }
  137. }
  138. .bottomCard {
  139. width: 690rpx;
  140. height: 584rpx;
  141. background: #FFFFFF;
  142. box-shadow: 0px 8rpx 16rpx 0px rgba(220, 222, 229, 0.71);
  143. border-radius: 20rpx;
  144. background: $bgColor;
  145. margin-left: 30rpx;
  146. margin-top: 64rpx;
  147. image {
  148. width: 690rpx;
  149. height: 492rpx;
  150. }
  151. .content {
  152. width: 690rpx;
  153. height: 92rpx;
  154. position: relative;
  155. margin-top:-9rpx;
  156. @include flexlayout();
  157. image{
  158. width: 12rpx;
  159. height: 20rpx;
  160. margin-left: 8rpx;
  161. }
  162. text {
  163. font-size: 30rpx;
  164. font-family: PingFang-SC-Medium, PingFang-SC;
  165. font-weight: 500;
  166. color: #333333;
  167. text-shadow: 0px 8rpx 16rpx rgba(220, 222, 229, 0.71);
  168. }
  169. }
  170. }
  171. </style>