index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <view class="login">
  3. <!-- header -->
  4. <view class="header bg-gradual-blue flex align-center justify-center" :style="{paddingTop:statusBarHeight+'px'}">
  5. <view class="userInfo text-center">
  6. <view class="userInfo-image flex align-center justify-center" :style="{backgroundImage: 'url(' + userInfo.avator + ')' }">
  7. <text v-if="!userInfo.avator" class="cuIcon-picfill text-xxl text-gray"></text>
  8. </view>
  9. <view class="userInfo-nickname padding-top-sm text-lg">{{userInfo.nickname}}</view>
  10. </view>
  11. </view>
  12. <!-- section -->
  13. <view class="section">
  14. <!-- 我的订单 -->
  15. <view class="order bg-white radius">
  16. <view class="order-header flex align-center justify-between padding-tb-sm">
  17. <view class="text-black">
  18. 我的订单
  19. </view>
  20. <view @click="orderFunc(1)" class="text-grey">
  21. 全部订单
  22. <text class="cuIcon-right lg text-gray"></text>
  23. </view>
  24. </view>
  25. <view class="cu-list grid col-5 no-border">
  26. <view @click="orderFunc(index+2)" class="cu-item text-center" v-for="(item,index) in order" :key="index" >
  27. <view class="list-icon" :style="{backgroundImage:'url('+item.icon+')'}">
  28. <view class="cu-tag badge" v-if="item.badge">
  29. {{item.badge>99?"99+":item.badge}}
  30. </view>
  31. </view>
  32. <text class="text-black margin-top-sm">{{item.label}}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 功能列表 -->
  37. <view class="cu-list menu">
  38. <!-- 我的收藏 -->
  39. <view class="cu-item arrow">
  40. <view class="content">
  41. <text class="cuIcon-likefill text-red"></text>
  42. <text class="text-grey">我的收藏</text>
  43. </view>
  44. <view class="text-grey">999+</view>
  45. </view>
  46. <!-- 评价中心 -->
  47. <view @click="handler('/loginPages/evaluate/index')" class="cu-item arrow">
  48. <view class="content">
  49. <text class="cuIcon-evaluate_fill text-red"></text>
  50. <text class="text-grey">评价中心</text>
  51. </view>
  52. </view>
  53. <!-- 收货地址 -->
  54. <view @click="handler('/loginPages/addressList/index')" class="cu-item arrow">
  55. <view class="content">
  56. <text class="cuIcon-locationfill text-green"></text>
  57. <text class="text-grey ">收货地址</text>
  58. </view>
  59. </view>
  60. <!-- 余额-->
  61. <view class="cu-item arrow">
  62. <view class="content">
  63. <text class="cuIcon-moneybag text-yellow"></text>
  64. <text class="text-grey">余额</text>
  65. </view>
  66. <view class="text-price text-red">999</view>
  67. </view>
  68. <!-- 积分-->
  69. <view class="cu-item arrow">
  70. <view class="content">
  71. <text class="cuIcon-coin text-yellow"></text>
  72. <text class="text-grey">积分</text>
  73. </view>
  74. <view class="text-yellow">999+</view>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- footer -->
  79. <cu-bar active="3" />
  80. </view>
  81. </template>
  82. <script>
  83. import {statusBarHeight,
  84. CustomBarHeight} from "@/common/device/index.js"
  85. import dzf from "@/static/login/dzf.png";
  86. import dfh from "@/static/login/dfh.png";
  87. import ysz from "@/static/login/ysz.png";
  88. import ywc from "@/static/login/ywc.png";
  89. import dpj from "@/static/login/dpj.png";
  90. export default {
  91. data() {
  92. return {
  93. statusBarHeight,CustomBarHeight,
  94. userInfo:{
  95. avator:"https://gd-hbimg.huaban.com/1f50f2135ba51e4b9aa20caef41860b15005c9386f0b-LxqWsh_fw658/format/webp",
  96. nickname:"用户昵称"
  97. },
  98. order:[
  99. {
  100. id:2,
  101. icon:dzf,
  102. badge:99,
  103. label:'待支付',
  104. },
  105. {
  106. id:3,
  107. icon:dfh,
  108. label:'待发货'
  109. },
  110. {
  111. id:4,
  112. icon:ysz,
  113. label:'运输中'
  114. },
  115. {
  116. id:5,
  117. icon:ywc,
  118. label:'已完成'
  119. },
  120. {
  121. id:6,
  122. icon:dpj,
  123. label:'待评价'
  124. }
  125. ]
  126. };
  127. },
  128. onLoad() {},
  129. methods: {
  130. orderFunc(val){
  131. uni.navigateTo({
  132. url:`/pages/order/index?key=${val}`
  133. })
  134. },
  135. handler(path){
  136. uni.navigateTo({
  137. url:path
  138. })
  139. }
  140. },
  141. onShareAppMessage() {
  142. return {};
  143. },
  144. onShareTimeline() {
  145. return {};
  146. }
  147. };
  148. </script>
  149. <style lang="scss" scoped>
  150. .login{
  151. .header{
  152. min-height: 500upx;
  153. box-sizing: border-box;
  154. .userInfo{
  155. .userInfo-image{
  156. width: 120upx;
  157. height: 120upx;
  158. background-color: #fff;
  159. border-radius: 50%;
  160. background-position: center;
  161. background-size: cover;
  162. }
  163. }
  164. }
  165. .section{
  166. .order{
  167. padding: 20upx 30upx;
  168. .list-icon{
  169. position: relative;
  170. width: 80upx;height: 80upx;
  171. margin: 0 auto;
  172. margin-top: 20upx;
  173. background-position: center;
  174. background-size: cover;
  175. }
  176. }
  177. }
  178. }
  179. </style>