mine.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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" @click="handlePage('0')">
  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" @click="handlePage('1')">
  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 handlePage = (type) =>{
  72. uni.navigateTo({
  73. url: `/pages/tabBar/mine/subPages/exchange?type=${type}`
  74. });
  75. }
  76. const handleItem = () =>{
  77. uni.navigateTo({
  78. url: `/pages/tabBar/mine/subPages/order`
  79. });
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .base-container {
  84. .user-info {
  85. background: #fff;
  86. border-radius: 16rpx;
  87. padding: 24rpx;
  88. display: flex;
  89. align-items: center;
  90. justify-content: space-between;
  91. .user-left{
  92. display: flex;
  93. align-items: center;
  94. .avatar{
  95. width: 92rpx;
  96. height: 92rpx;
  97. margin-right: 28rpx;
  98. border-radius: 50%;
  99. }
  100. .info{
  101. .name{
  102. font-family: 'PangMenZhengDao';
  103. }
  104. .text{
  105. font-size: 24rpx;
  106. }
  107. }
  108. }
  109. .user-right{
  110. font-size: 24rpx;
  111. padding: 12rpx 32rpx;
  112. border-radius: 50rpx;
  113. color: #000;
  114. background: #FFD95E;
  115. font-weight: 500;
  116. }
  117. }
  118. .grid-wrap{
  119. display: flex;
  120. margin-top: 20rpx;
  121. .grid-item{
  122. padding: 20rpx 28rpx;
  123. flex: 1;
  124. border-radius: 16rpx;
  125. border: 2rpx solid #FFFFFF;
  126. background-image: linear-gradient(180deg,#FFECAE,#FFFFFF);
  127. line-height: 42rpx;
  128. position: relative;
  129. &.coupon{
  130. margin-left: 18rpx;
  131. background-image: linear-gradient(180deg,#FFDFC5,#FFFFFF);
  132. }
  133. .grid-name{
  134. font-family: 'PangMenZhengDao';
  135. }
  136. .grid-text{
  137. font-size: 24rpx;
  138. }
  139. .image{
  140. position: absolute;
  141. bottom: 0;
  142. right: 0;
  143. width: 110rpx;
  144. height: 120rpx;
  145. }
  146. .icon{
  147. position: absolute;
  148. bottom: 0;
  149. right: 0;
  150. width: 110rpx;
  151. height: 110rpx
  152. }
  153. }
  154. }
  155. .list-wrap{
  156. .list-item,.list-card{
  157. background: #fff;
  158. border-radius: 10rpx;
  159. margin-top: 20rpx;
  160. padding: 26rpx 20rpx;
  161. .name{
  162. font-weight: 500;
  163. }
  164. .all{
  165. color: rgba(0, 0, 0, 0.6);
  166. font-size: 26rpx;
  167. }
  168. .card-cont{
  169. margin-top: 20rpx;
  170. .cont-item{
  171. flex: 1;
  172. text-align: center;
  173. font-size: 24rpx;
  174. .icon{
  175. width: 36rpx;
  176. height: 32rpx;
  177. margin-bottom: 4rpx;
  178. }
  179. }
  180. .image-item{
  181. border-radius: 16rpx;
  182. border: 1px solid #E3E3E3;
  183. padding: 10rpx;
  184. position: relative;
  185. .img{
  186. width: 100%;
  187. height: 180rpx;
  188. border-radius: 8rpx;
  189. }
  190. .name{
  191. position: absolute;
  192. bottom: 0;
  193. left: 0;
  194. color: #fff;
  195. padding: 6rpx;
  196. width: 100%;
  197. box-sizing: border-box;
  198. border-radius: 0 0 16rpx 16rpx;
  199. text-align: center;
  200. background: rgba(0, 0, 0, 0.3);
  201. backdrop-filter: blur(6rpx);
  202. }
  203. }
  204. .image-item + .image-item{
  205. margin-left: 20rpx;
  206. }
  207. }
  208. }
  209. .flex-center{
  210. display: flex;
  211. align-items: center;
  212. justify-content: space-between;
  213. }
  214. }
  215. }
  216. </style>