xiang.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="content">
  3. <view style="height: 100%;">
  4. <swiper class="swiper" :autoplay="true" interval="2000" duration="500" :circular="true" style="width: 100%; z-index: 1; height: 319rpx">
  5. <swiper-item v-for="(item, index) in 2" :key="index">
  6. <image src="https://mxys.chuanghai-tech.com/wmfile/20240904/05af7c5442bb4a8baa1f5f3071ca2302.jpg" mode="scaleToFill" style="width: 100%"></image>
  7. </swiper-item>
  8. </swiper>
  9. </view>
  10. <view class="title">月度套餐</view>
  11. <view class="beizhu">先囤后用·随时退·过期自动退·可部分退</view>
  12. <!-- 套餐内容 -->
  13. <view class="neirong">
  14. <view class="title title1">套餐内容</view>
  15. <view class="title title2" style="margin-top: 10rpx;">
  16. <view class="cicle"></view>
  17. <view style="margin-left: 16rpx;">例假周期关怀</view>
  18. </view>
  19. <view class="title title2" style="margin-top: 23rpx;">
  20. <view class="cicle"></view>
  21. <view style="margin-left: 16rpx;">创海便利店(二食堂1楼) 13267827921</view>
  22. </view>
  23. <view class="xiangnei" v-for="(item,index) in 2" :key="index">
  24. <view>例假期每天一杯红糖姜茶 x1</view>
  25. <view style="color: #000000;">¥25</view>
  26. </view>
  27. <!-- 菜品图片 -->
  28. <view class="shop_zheng">
  29. <view class="image-container">
  30. <image v-for="(item, index) in 5" :key="index" class="image" src="https://mxys.chuanghai-tech.com/wmfile/20240904/05af7c5442bb4a8baa1f5f3071ca2302.jpg" style="margin-left: 20px" @click="clickImg(item)"></image>
  31. </view>
  32. </view>
  33. </view>
  34. <!-- 购买须知 -->
  35. <view class="xuzhi">
  36. <view class="title title1">购买须知</view>
  37. <view class="title title2" style="margin-top: 10rpx;padding-bottom: 20rpx;">
  38. <view class="cicle"></view>
  39. <view style="margin-left: 16rpx;">此套餐仅限用于女生,如男生请选其他合适的套餐</view>
  40. </view>
  41. </view>
  42. <!-- 购买 -->
  43. <view class="goorder">
  44. <view class="goods_price">¥98.00</view>
  45. <view class="goorder_but" @click="toGou">立即购买</view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. }
  54. },
  55. onLoad() {
  56. },
  57. methods:{
  58. //立即购买
  59. toGou(){
  60. uni.navigateTo({
  61. url: '/my/qinglv/orderX'
  62. })
  63. },
  64. //图片点击放大
  65. clickImg(img) {
  66. uni.previewImage({
  67. urls: [img], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  68. current: '', // 当前显示图片的http链接,默认是第一个
  69. success: function (res) {},
  70. fail: function (res) {},
  71. complete: function (res) {}
  72. })
  73. },
  74. },
  75. }
  76. </script>
  77. <style>
  78. .content{
  79. width: 100%;
  80. height: 100%;
  81. background-color: #F2F2F2;
  82. }
  83. .title{
  84. margin: 13rpx 0 0 23rpx;
  85. font-size: 32rpx;
  86. font-weight: 500;
  87. color: rgba(0, 0, 0, 1);
  88. }
  89. .beizhu{
  90. margin: 23rpx 0 0 22rpx;
  91. width: 518rpx;
  92. height: 77rpx;
  93. background-size: 100%;
  94. background-image: url('https://mxys.chuanghai-tech.com/wmfile/20250812/7b77b0772b6e4c2cb8c0d3a012c7722b.png');
  95. font-size: 24rpx;
  96. font-weight: 400;
  97. line-height: 77rpx;
  98. text-align: center;
  99. color: rgba(255, 87, 51, 1);
  100. }
  101. /* //套餐内容 */
  102. .neirong{
  103. width: 100%;
  104. height: 100%;
  105. background-color: #FFFFFF;
  106. }
  107. .title1{
  108. margin: 14rpx 0 0 19rpx;
  109. }
  110. .cicle{
  111. margin: 12rpx 0 0 0;
  112. width: 10rpx;
  113. height: 10rpx;
  114. background: #CCCCCC;
  115. border-radius: 50%;
  116. }
  117. .title2{
  118. display: flex;
  119. font-size: 28rpx;
  120. }
  121. .xiangnei{
  122. width: 633rpx;
  123. display: flex;
  124. /* 让子元素两端对齐,价格居左,按钮居右 */
  125. justify-content: space-between;
  126. /* 垂直方向居中(可选,根据需求调整) */
  127. margin: 0 0 0 45rpx;
  128. padding-bottom: 10rpx;
  129. font-size: 24rpx;
  130. color: rgba(102, 102, 102, 1);
  131. }
  132. /* 菜品图片 */
  133. .shop_zheng {
  134. background-color: rgba(255, 255, 255, 1);
  135. width: 100%;
  136. margin-left: 20rpx;
  137. margin-top: 8px;
  138. height: 100%;
  139. overflow: hidden;
  140. }
  141. .image-container {
  142. width: 350px;
  143. overflow-x: auto;
  144. padding: 10rpx 0 10rpx 0;
  145. white-space: nowrap;
  146. /* transition: transform 0.3s; /* 可以添加平滑滑动的效果 */
  147. }
  148. .image {
  149. display: inline-block;
  150. width: 166rpx; /* 三张图片平分宽度 */
  151. height: 133rpx;
  152. }
  153. /* 购买须知 */
  154. .xuzhi{
  155. width: 100%;
  156. height: 100%;
  157. background-color: #FFFFFF;
  158. }
  159. /* 购买 */
  160. .goorder {
  161. display: flex;
  162. /* 让子元素两端对齐,价格居左,按钮居右 */
  163. justify-content: space-between;
  164. /* 垂直方向居中(可选,根据需求调整) */
  165. align-items: center;
  166. height: 123rpx;
  167. opacity: 1;
  168. box-shadow: 0px 0px 17px #000000;
  169. width: 100%;
  170. padding: 2% 3%;
  171. position: fixed;
  172. bottom: 0;
  173. background-color: #ffffff;
  174. z-index: 999;
  175. }
  176. .goods_price{
  177. font-size: 40rpx;
  178. font-weight: 500;
  179. color: rgba(255, 91, 26, 1);
  180. }
  181. .goorder_but {
  182. width: 224rpx;
  183. height: 76rpx;
  184. opacity: 1;
  185. border-radius: 104rpx;
  186. background: linear-gradient(90deg, #FCB147 0%, #FF9029 100%);
  187. line-height: 76rpx;
  188. text-align: center;
  189. font-weight: 700;
  190. }
  191. </style>