mine.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <template>
  2. <view class="container">
  3. <view :style="{ height: systemBar + 'px', backgroundColor: '#337bad' }" />
  4. <view>
  5. <view class="head-info">
  6. <view class="head-flex">
  7. <view class="flex">
  8. <view style="margin-right: 20rpx">
  9. <!-- <u-avatar :src="avatar" size="80" @tap="$Router.push('/pages/client/clientUser/personal')" /> -->
  10. <u-avatar :src="avatar" size="80" @click='handlerReviewImg' />
  11. </view>
  12. <view>
  13. <view class="nickname">{{ nickname }}</view>
  14. <view class="flex">
  15. <text class="setAuth" @tap="$Router.push('/PageMine/setting/index')">
  16. 设置
  17. </text>
  18. <!-- <text class="setAuth">认证</text> -->
  19. </view>
  20. </view>
  21. </view>
  22. <view @tap="$Router.push('/PageMine/setting/index')">
  23. <u-icon name="setting" color="#ffffff" size="26"></u-icon>
  24. </view>
  25. </view>
  26. <!-- 列表 -->
  27. <!-- <view class="Collect">
  28. <u-grid :border="false" col="4">
  29. <u-grid-item v-for="(listItem, listIndex) in collectList" :key="listIndex"
  30. @tap="$Router.push(listItem.url)">
  31. <u-icon :customStyle="{ paddingTop: 20 + 'rpx' }" :name="listItem.name" :size="28"
  32. color="#fff" />
  33. <text class="grid-text">{{ listItem.title }}</text>
  34. </u-grid-item>
  35. </u-grid>
  36. </view> -->
  37. <!-- 订单 -->
  38. <!-- <view class="order-out-box">
  39. <view class="order-inner-box">
  40. <u-grid :border="false" col="4" style="background-color: #fff">
  41. <u-grid-item v-for="(listItem, listIndex) in oderList" :key="listIndex"
  42. @tap="gotoOrder(listItem)">
  43. <u-icon :name="listItem.name" :size="34" />
  44. <text class="grid-text">{{ listItem.title }}</text>
  45. </u-grid-item>
  46. </u-grid>
  47. </view>
  48. </view> -->
  49. </view>
  50. <!-- 我的收益 -->
  51. <!-- <view class="income" @click="handlerSkipMyProfit"> -->
  52. <view class="income">
  53. <!-- <view class="income-head">
  54. <text class="my-income">我的钱包</text>
  55. <u-icon name="arrow-right" />
  56. </view>
  57. <view class="income-content">
  58. <u-grid :border="false" col="4" bgColor="#fff">
  59. <u-grid-item v-for="(listItem, listIndex) in incomeList" :key="listIndex">
  60. <view class="num-box">{{ listItem.num }}元</view>
  61. <view class="num-title">{{ listItem.title }}</view>
  62. </u-grid-item>
  63. </u-grid>
  64. </view> -->
  65. </view>
  66. <!-- 列表 -->
  67. <TapList></TapList>
  68. </view>
  69. <tabbar currentTab="clientMine" />
  70. </view>
  71. </template>
  72. <script>
  73. import {
  74. mapGetters
  75. } from 'vuex';
  76. import TapList from './components/TapList.vue';
  77. export default {
  78. components: {
  79. TapList
  80. },
  81. data() {
  82. return {
  83. system: {},
  84. systemBar: 0,
  85. collectList: [{
  86. name: 'photo',
  87. title: '收藏',
  88. url: '/PageMine/favourite',
  89. },
  90. // {
  91. // name: 'lock',
  92. // title: '积分',
  93. // url: '/pages/client/clientUser/myScore/index',
  94. // },
  95. {
  96. name: 'star',
  97. title: '购物车',
  98. url: '/PageMine/shopCar',
  99. },
  100. {
  101. name: 'hourglass',
  102. title: '优惠券',
  103. url: '/PageMine/coupon',
  104. },
  105. ],
  106. oderList: [{
  107. name: 'order',
  108. title: '全部订单',
  109. type: 0,
  110. },
  111. {
  112. name: 'bag-fill',
  113. title: '已发货',
  114. type: 1,
  115. },
  116. {
  117. name: 'car-fill',
  118. title: '已完成',
  119. type: 2,
  120. }
  121. // {
  122. // name: 'heart',
  123. // title: '待评价',
  124. // type: 3,
  125. // },
  126. ],
  127. incomeList: [{
  128. num: '0.00',
  129. title: '总收益',
  130. },
  131. {
  132. num: '0.00',
  133. title: '本月收益',
  134. },
  135. {
  136. num: '0.00',
  137. title: '本周收益',
  138. },
  139. {
  140. num: '0.00',
  141. title: '可提现',
  142. },
  143. ]
  144. };
  145. },
  146. computed: {
  147. ...mapGetters(['userId', 'gender', 'avatar', 'nickname'])
  148. },
  149. methods: {
  150. getHeight() {
  151. wx.getSystemInfo({
  152. success: res => {
  153. this.system = res;
  154. },
  155. });
  156. this.systemBar = this.system.statusBarHeight;
  157. },
  158. // 点击跳转到全部订单
  159. gotoOrder(item) {
  160. this.$store.commit('order/GET_ORDER_TYPE', item)
  161. uni.navigateTo({
  162. url: `/PageMine/orderModules/index`,
  163. });
  164. },
  165. // 点击跳转到我的收益
  166. // handlerSkipMyProfit() {
  167. // uni.navigateTo({
  168. // url: '/pages/client/clientUser/myProfit',
  169. // });
  170. // },
  171. // 点击预览图片
  172. handlerReviewImg() {
  173. uni.previewImage({
  174. urls: [this.avatar],
  175. });
  176. }
  177. },
  178. onLoad() {
  179. this.getHeight();
  180. },
  181. };
  182. </script>
  183. <style lang="scss" scoped>
  184. .container {
  185. min-height: 100vh;
  186. background-color: #efefef;
  187. box-sizing: border-box;
  188. .flex {
  189. display: flex;
  190. }
  191. .head-info {
  192. background-color: #337bad;
  193. height: 360rpx;
  194. padding: 20rpx;
  195. position: relative;
  196. .head-flex {
  197. display: flex;
  198. align-items: center;
  199. justify-content: space-between;
  200. .nickname {
  201. font-size: 36rpx;
  202. color: #ffffff;
  203. margin-bottom: 8rpx;
  204. margin-top: 20rpx;
  205. }
  206. .setAuth {
  207. width: 90rpx;
  208. height: 40rpx;
  209. font-size: 24rpx;
  210. display: block;
  211. cursor: pointer;
  212. margin-right: 10rpx;
  213. line-height: 40rpx;
  214. text-align: center;
  215. border-radius: 20rpx;
  216. background-color: rgba(255, 255, 255, 0.4);
  217. }
  218. }
  219. .Collect {
  220. .grid-text {
  221. font-size: 30rpx;
  222. color: #fff;
  223. }
  224. }
  225. .order-out-box {
  226. width: 94%;
  227. position: absolute;
  228. bottom: -80rpx;
  229. .order-inner-box {
  230. padding: 20rpx;
  231. font-size: 30rpx;
  232. border-radius: 10rpx;
  233. background-color: $uni-bg-color;
  234. }
  235. }
  236. }
  237. .income {
  238. padding: 20rpx;
  239. border-radius: 10rpx;
  240. // margin: 100rpx 20rpx 20rpx 20rpx;
  241. margin: 40rpx 20rpx 20rpx 20rpx;
  242. // background-color: $uni-bg-color;
  243. .income-head {
  244. display: flex;
  245. justify-content: space-between;
  246. .my-income {
  247. color: $uni-color-primary;
  248. font-size: 32rpx;
  249. font-weight: 600;
  250. }
  251. }
  252. .income-content {
  253. margin: 15rpx 0;
  254. .num-box {
  255. padding: 20rpx 0;
  256. font-size: 36rpx;
  257. font-weight: 600;
  258. color: $uni-text-color;
  259. }
  260. .num-title {
  261. font-size: 28rpx;
  262. color: $uni-text-color-grey;
  263. }
  264. }
  265. }
  266. }
  267. .flex {
  268. display: flex;
  269. }
  270. </style>