user.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <v-header backgroundColor="#f8f9fb" immersion mode="" scroll headerBackgroundColor="transparent" title=" ">
  3. <image src="/static/images/user-background.png" class="user-background" slot="header-background"></image>
  4. <view class="overflow user-screen">
  5. <view class="user-header" :style="{height:height+'px','padding-top':paddingTop+'px'}">
  6. <view v-if="isLogin" class="screen_all center">
  7. <view class="flex user-header-container relative" @click="routerTarget('personal-user')">
  8. <v-image class="user-header-avatar overflow" :src="user.avatar"></v-image>
  9. <view class="absolute user-header-edit center">
  10. <image src="/static/images/edit.png" class="user-header-edit-icon"></image>
  11. </view>
  12. </view>
  13. <view class="user-header-title">{{user.nickname}}</view>
  14. </view>
  15. <view v-else class="screen_all center">
  16. <view @click="routerLogin" class="user-login-button center">授权登录</view>
  17. </view>
  18. </view>
  19. <view class="center">
  20. <view class="user-integral relative">
  21. <image src="/static/images/user-integral.png" class="screen_all"></image>
  22. <view class="absolute user-integral-container row aCenter">
  23. <image src="/static/images/gold.png" class="user-integral-gold"></image>
  24. <view class="flex-all-1">积分返现</view>
  25. <view @click.stop="routerTarget('integral')" class="user-integral-button center">去查看</view>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 账户余额 -->
  30. <view class="user-wallet flex">
  31. <view class="user-wallet-header row aCenter">
  32. <view class="flex-all-1">我的钱包</view>
  33. <view @click="routerTarget('consumption-record')" class="row aCenter user-order-more">
  34. <view>余额记录</view>
  35. <text class=".user-order-more-icon iconfont iconfont-more"></text>
  36. </view>
  37. </view>
  38. <view class="flex-all-1 row aCenter">
  39. <view class="row aCenter">账户余额:</view>
  40. <text class="user-wallet-price"><text>{{user.money || '0.00'}}</text><text class="user-wallet-em">(元)</text></text>
  41. <view class="flex-all-1"></view>
  42. <view @click="routerTarget('recharge')" class="user-wallet-button center">立即充值</view>
  43. </view>
  44. </view>
  45. <!-- 订单 -->
  46. <view class="user-order flex">
  47. <view class="user-wallet-header user-order-header row aCenter">
  48. <view class="flex-all-1">我的订单</view>
  49. <view @click="routerTarget('my-order')" class="row aCenter user-order-more">
  50. <view>全部订单</view>
  51. <text class=".user-order-more-icon iconfont iconfont-more"></text>
  52. </view>
  53. </view>
  54. <view class="flex-all-1 row">
  55. <view
  56. v-for="(item,index) in orderData"
  57. :key="index"
  58. class="flex-all-1 center relative"
  59. @click="trigger(item)"
  60. >
  61. <dot class="user-order-dot absolute" :value="user[item.key]"></dot>
  62. <image mode="heightFix" :src="'/static/images/order/'+(index+1)+'.png'" class="user-order-icon"></image>
  63. <view class="user-order-title line-1">{{item.label}}</view>
  64. </view>
  65. </view>
  66. </view>
  67. <!-- 功能 -->
  68. <view class="user-control">
  69. <view class="user-control-item row aCenter"
  70. v-for="(item,index) in controlData"
  71. :key="index"
  72. @click="trigger(item,true)"
  73. >
  74. <view class="user-control-icon-container jCenter">
  75. <image :src="'/static/images/control/'+item.icon+'.png'" :style="{width:item.width+'px'}" mode="widthFix" class="user-control-icon"></image>
  76. </view>
  77. <view class="flex-all-1">{{item.key && user[item.key] ? item.labelSuccess+'('+user[item.key]+')' :item.label}}</view>
  78. <text class=".user-order-more-icon iconfont iconfont-more"></text>
  79. </view>
  80. </view>
  81. </view>
  82. <fill-code v-model="codeModal"></fill-code>
  83. </v-header>
  84. </template>
  85. <script>
  86. import vHeader from '@/components/v-header/main.vue';
  87. import dot from '@/components/dot/main.vue';
  88. import vImage from '@/components/v-image/main.vue';
  89. import mixins from './mixins';
  90. import fillCode from '@/components/fill-code/fill-code';
  91. export default {
  92. components: {
  93. vHeader,
  94. dot,
  95. vImage,
  96. fillCode
  97. },
  98. mixins
  99. }
  100. </script>
  101. <style scoped lang="scss" src="./style.scss"></style>