推拿小程序前端代码仓库
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.

64 lines
1.2 KiB

3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
2 months ago
3 months ago
  1. <!-- 优惠券弹窗 -->
  2. <template>
  3. <view class="couponPopup">
  4. <uv-popup ref="couponPopup"
  5. customStyle="background-color: transparent;"
  6. :z-index="999999"
  7. >
  8. <view class="couponPopup-wrapper">
  9. <view class="main-container" @click="toCoupon">
  10. <image style="width: 583rpx; height: 601rpx;" src="@/pages_order/static/home/coupon.png"></image>
  11. </view>
  12. </view>
  13. </uv-popup>
  14. </view>
  15. </template>
  16. <script>
  17. import {
  18. mapState
  19. } from 'vuex'
  20. export default {
  21. name: "CouponPopup",
  22. data() {
  23. return {}
  24. },
  25. mounted() {
  26. this.$refs.couponPopup.open()
  27. },
  28. computed: {
  29. ...mapState(['riceInfo'])
  30. },
  31. methods: {
  32. //跳转优惠券页面
  33. toCoupon() {
  34. // todo
  35. this.$refs.couponPopup.close()
  36. this.$api('getRiceCoupon', res => {
  37. if(res.code == 200){
  38. uni.navigateTo({
  39. url: "/pages_order/mine/coupon"
  40. })
  41. }
  42. })
  43. },
  44. close(){
  45. this.$refs.couponPopup.close()
  46. },
  47. },
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .couponPopup {
  52. .couponPopup-wrapper {
  53. width: 100%;
  54. height: 100vh;
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. .main-container {
  59. }
  60. }
  61. }
  62. </style>