mine.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <view class="base-container">
  3. <view class="user-info">
  4. <view class="user-left">
  5. <image class="avatar" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></image>
  6. <view class="info">
  7. <text class="name">听妈妈的话</text>
  8. <view class="text">这是您使用飞鸟有味的第15天</view>
  9. </view>
  10. </view>
  11. <view class="user-right">收货地址</view>
  12. </view>
  13. <view class="grid-wrap">
  14. <view class="grid-item ">
  15. <view class="grid-name">守护兑换</view>
  16. <text class="grid-text">积累能量获大礼</text>
  17. <image class="image" :src="`${config.BASIC_IMG}img/gift.png`"></image>
  18. </view>
  19. <view class="grid-item coupon">
  20. <view class="grid-name">优惠券</view>
  21. <text class="grid-text">满100减50</text>
  22. <image class="icon" :src="`${config.BASIC_IMG}img/coupon.png`"></image>
  23. </view>
  24. </view>
  25. <view class="list-wrap">
  26. <view class="list-card">
  27. <view class="card-head flex-center">
  28. <text class="name">我的订单</text>
  29. <view class="all flex-center">
  30. <text>全部</text>
  31. <up-icon name="arrow-right"></up-icon>
  32. </view>
  33. </view>
  34. <view class="card-cont flex-center">
  35. <view class="cont-item" v-for="(item,index) in orderList" :key="index" @click="handleItem(index)">
  36. <image class="icon" :src="`${config.BASIC_IMG}img/order-icon-${index+1}.png`"></image>
  37. <view>{{item}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="list-card">
  42. <view class="card-head flex-center">
  43. <text class="name">我的守护</text>
  44. <view class="all flex-center">
  45. <text>全部</text>
  46. <up-icon name="arrow-right"></up-icon>
  47. </view>
  48. </view>
  49. <view class="card-cont flex-center">
  50. <view class="cont-item image-item" v-for="(item,index) in 3" :key="index">
  51. <image class="img" :src="`https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png`"></image>
  52. <view class="name">从化荔博园</view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="list-item flex-center">
  57. <text class="name">联系客服</text>
  58. <up-icon name="arrow-right"></up-icon>
  59. </view>
  60. <view class="list-item flex-center">
  61. <text class="name">意见反馈</text>
  62. <up-icon name="arrow-right"></up-icon>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script setup>
  68. import config from "@/api/config.js"
  69. const orderList = ["待付款","待发货","待收货","待评价","退款/售后"]
  70. const imageList = []
  71. const handleItem = () =>{
  72. uni.navigateTo({
  73. url: `/pages/tabBar/mine/subPages/order`
  74. });
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .base-container {
  79. .user-info {
  80. background: #fff;
  81. border-radius: 16rpx;
  82. padding: 24rpx;
  83. display: flex;
  84. align-items: center;
  85. justify-content: space-between;
  86. .user-left{
  87. display: flex;
  88. align-items: center;
  89. .avatar{
  90. width: 92rpx;
  91. height: 92rpx;
  92. margin-right: 28rpx;
  93. border-radius: 50%;
  94. }
  95. .info{
  96. .name{
  97. font-family: 'PangMenZhengDao';
  98. }
  99. .text{
  100. font-size: 24rpx;
  101. }
  102. }
  103. }
  104. .user-right{
  105. font-size: 24rpx;
  106. padding: 12rpx 32rpx;
  107. border-radius: 50rpx;
  108. color: #000;
  109. background: #FFD95E;
  110. font-weight: 500;
  111. }
  112. }
  113. .grid-wrap{
  114. display: flex;
  115. margin-top: 20rpx;
  116. .grid-item{
  117. padding: 20rpx 28rpx;
  118. flex: 1;
  119. border-radius: 16rpx;
  120. border: 2rpx solid #FFFFFF;
  121. background-image: linear-gradient(180deg,#FFECAE,#FFFFFF);
  122. line-height: 42rpx;
  123. position: relative;
  124. &.coupon{
  125. margin-left: 18rpx;
  126. background-image: linear-gradient(180deg,#FFDFC5,#FFFFFF);
  127. }
  128. .grid-name{
  129. font-family: 'PangMenZhengDao';
  130. }
  131. .grid-text{
  132. font-size: 24rpx;
  133. }
  134. .image{
  135. position: absolute;
  136. bottom: 0;
  137. right: 0;
  138. width: 110rpx;
  139. height: 120rpx;
  140. }
  141. .icon{
  142. position: absolute;
  143. bottom: 0;
  144. right: 0;
  145. width: 110rpx;
  146. height: 110rpx
  147. }
  148. }
  149. }
  150. .list-wrap{
  151. .list-item,.list-card{
  152. background: #fff;
  153. border-radius: 10rpx;
  154. margin-top: 20rpx;
  155. padding: 26rpx 20rpx;
  156. .name{
  157. font-weight: 500;
  158. }
  159. .all{
  160. color: rgba(0, 0, 0, 0.6);
  161. font-size: 26rpx;
  162. }
  163. .card-cont{
  164. margin-top: 20rpx;
  165. .cont-item{
  166. flex: 1;
  167. text-align: center;
  168. font-size: 24rpx;
  169. .icon{
  170. width: 36rpx;
  171. height: 32rpx;
  172. margin-bottom: 4rpx;
  173. }
  174. }
  175. .image-item{
  176. border-radius: 16rpx;
  177. border: 1px solid #E3E3E3;
  178. padding: 10rpx;
  179. position: relative;
  180. .img{
  181. width: 100%;
  182. height: 180rpx;
  183. border-radius: 8rpx;
  184. }
  185. .name{
  186. position: absolute;
  187. bottom: 0;
  188. left: 0;
  189. color: #fff;
  190. padding: 6rpx;
  191. width: 100%;
  192. box-sizing: border-box;
  193. border-radius: 0 0 16rpx 16rpx;
  194. text-align: center;
  195. background: rgba(0, 0, 0, 0.3);
  196. backdrop-filter: blur(6rpx);
  197. }
  198. }
  199. .image-item + .image-item{
  200. margin-left: 20rpx;
  201. }
  202. }
  203. }
  204. .flex-center{
  205. display: flex;
  206. align-items: center;
  207. justify-content: space-between;
  208. }
  209. }
  210. }
  211. </style>