index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="content">
  3. <view class="backg3 flex" style="padding-top: 23rpx" v-if="isWoman" @click="clickMan">
  4. <view style="margin-left: 40rpx">
  5. <view style="color: #000000; font-size: 32rpx; font-weight: 500">女生专区</view>
  6. <image style="width: 48rpx; height: 9rpx; margin-left: 20rpx" src="https://mxys.chuanghai-tech.com/wmfile/20250811/5f75606616aa4c7f8c304368f8663a39.png"></image>
  7. </view>
  8. <view style="margin-left: 73rpx">男生专区</view>
  9. </view>
  10. <view class="backg3 flex" style="padding-top: 23rpx" v-else @click="clickMan">
  11. <view style="margin-left: 40rpx">女生专区</view>
  12. <view style="margin-left: 73rpx">
  13. <view style="color: #000000; font-size: 32rpx; font-weight: 500">男生专区</view>
  14. <image style="width: 48rpx; height: 9rpx; margin-left: 20rpx" src="https://mxys.chuanghai-tech.com/wmfile/20250811/5f75606616aa4c7f8c304368f8663a39.png"></image>
  15. </view>
  16. </view>
  17. <view @click="toXiang" v-for="(item, index) in 3" :key="index" :class="index == 0 ? 'backg1' : 'backg2'">
  18. <image style="width: 289rpx; height: 319rpx; margin: 31rpx 0 0 20rpx; background-color: #000"></image>
  19. <view style="margin: 31rpx 0 0 26rpx">
  20. <view style="font-size: 32rpx; color: #000000; font-weight: 500; margin-top: 7rpx">月度套餐</view>
  21. <view style="margin-top: 7rpx">每月14号配送定制蛋糕</view>
  22. <view class="lijia">例假关怀</view>
  23. <view class="q_time">
  24. <view style="line-height: 30px">时间</view>
  25. <view class="q_line"></view>
  26. <view style="width: 276rpx; margin-left: 13rpx">2025-07-28 12:00:00 —2025-12-31 23:59:59</view>
  27. </view>
  28. <view class="jiage">¥98.00</view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. isWoman: true //true是。false不是
  38. }
  39. },
  40. onLoad() {
  41. this.getData()
  42. },
  43. methods: {
  44. getData() {
  45. let data = {
  46. page: 1,
  47. limit: 6,
  48. suitSex: this.isWoman ? 2 : 1
  49. }
  50. this.$Request.getT('/app/lover-set/page', data).then((res) => {
  51. console.log(res, 966)
  52. })
  53. },
  54. //切换男女专区
  55. clickMan() {
  56. this.isWoman = !this.isWoman
  57. this.getData()
  58. },
  59. //跳转到详情页
  60. toXiang() {
  61. uni.navigateTo({
  62. url: '/my/qinglv/xiang'
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style>
  69. .content {
  70. width: 100%;
  71. height: 100%;
  72. background-color: #f2f2f2;
  73. }
  74. .backg3 {
  75. display: flex;
  76. width: 750rpx;
  77. height: 100%;
  78. background-color: #ffe9ca;
  79. }
  80. .backg1 {
  81. display: flex;
  82. width: 750rpx;
  83. height: 100%;
  84. margin-bottom: 20rpx;
  85. /* background-color: #FFE9CA; */
  86. background: linear-gradient(180deg, #ffe9ca 0%, #ffffff 28.17%, #ffffff 32.53%, #f2f3f5 100%);
  87. }
  88. .backg2 {
  89. display: flex;
  90. margin-top: 20rpx;
  91. width: 750rpx;
  92. height: 100%;
  93. background-color: #ffffff;
  94. }
  95. .lijia {
  96. margin-top: 7rpx;
  97. width: 125rpx;
  98. height: 51rpx;
  99. opacity: 1;
  100. border-radius: 73rpx;
  101. border: 1rpx solid #ff8d1a;
  102. font-size: 24rpx;
  103. line-height: 51rpx;
  104. color: rgba(255, 141, 26, 1);
  105. text-align: center;
  106. }
  107. .q_time {
  108. display: flex;
  109. margin-top: 15rpx;
  110. }
  111. .q_line {
  112. margin: 12rpx 0 0 13rpx;
  113. width: 1rpx;
  114. height: 47rpx;
  115. background-color: #808080;
  116. }
  117. .jiage {
  118. margin-top: 27rpx;
  119. font-size: 40rpx;
  120. font-weight: 500;
  121. color: rgba(255, 91, 26, 1);
  122. }
  123. </style>