center.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view>
  3. <view class="topBackground" style="overflow:hidden">
  4. <view class="personal" style="background-color: rgba(0, 0, 0, 0);box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);">
  5. <view style="height: 150rpx;">
  6. <view style="float: left;">
  7. <u-avatar :src="src" shape="circle" size="70"
  8. style="box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.4);"></u-avatar>
  9. </view>
  10. <view style="float: left;margin-left: 50rpx;margin-top: 10rpx;">
  11. <u--text color="#fff" :text="userName?userName:''" size="28"></u--text>
  12. <u--text color="#fff" v-if="role" :text="'角色:'+role"></u--text>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="tips">
  18. <view style="text-align: center;font-size: 32rpx;color: #525454;">
  19. <view>今日收入</view>
  20. <u-count-to :startVal="0" :endVal="0" color="#fd5003" fontSize="44"></u-count-to>
  21. <text style="color: #fd5003;">元</text>
  22. <u-grid :border="false">
  23. <u-grid-item>
  24. <text style="color: #525454;">推广海报</text>
  25. </u-grid-item>
  26. <u-grid-item>
  27. <text style="color: #525454;">轮毂升级</text>
  28. </u-grid-item>
  29. <u-grid-item>
  30. <text style="color: #525454;">我的足迹</text>
  31. </u-grid-item>
  32. </u-grid>
  33. </view>
  34. </view>
  35. <!-- <view class="head">
  36. <view style="display: flex;justify-content: space-between;width:96%;height:60rpx;line-height: 60rpx;margin: auto auto 30rpx auto;border-bottom: 1rpx solid #EDEDED;">
  37. <view>业务中心</view>
  38. <view><u--text suffixIcon="arrow-right" iconStyle="font-size: 18px" text="查看更多"></u--text></view>
  39. </view>
  40. <u-grid :border="false" col="4">
  41. <u-grid-item>
  42. <u--image :showLoading="true" src="../../static/images/user/PT.png" width="64rpx" height="64rpx" @click="click"></u--image>
  43. <text class="grid-text">采购跟踪</text>
  44. </u-grid-item>
  45. <u-grid-item>
  46. <u--image :showLoading="true" src="../../static/images/user/SO.png" width="64rpx" height="64rpx" @click="click"></u--image>
  47. <text class="grid-text">销售订单</text>
  48. </u-grid-item>
  49. <u-grid-item>
  50. <u--image :showLoading="true" src="../../static/images/user/CC.png" width="64rpx" height="64rpx" @click="click"></u--image>
  51. <text class="grid-text">渠道客户</text>
  52. </u-grid-item>
  53. <u-grid-item>
  54. <u--image :showLoading="true" src="../../static/images/user/VR.png" width="64rpx" height="64rpx" @click="click"></u--image>
  55. <text class="grid-text">拜访记录</text>
  56. </u-grid-item>
  57. </u-grid>
  58. </view> -->
  59. <!-- <view class="head">
  60. <view style="display: flex;justify-content: space-between;width:96%;height:60rpx;line-height: 60rpx;margin: auto auto 30rpx auto;border-bottom: 1rpx solid #EDEDED;">
  61. 办公中心
  62. </view>
  63. <u-grid :border="false" col="4">
  64. <u-grid-item>
  65. <u--image :showLoading="true" src="../../static/images/user/QX.png" width="64rpx" height="64rpx" @click="click"></u--image>
  66. <text class="grid-text">权限设置</text>
  67. </u-grid-item>
  68. <u-grid-item>
  69. <u--image :showLoading="true" src="../../static/images/user/GG.png" width="64rpx" height="64rpx" @click="click"></u--image>
  70. <text class="grid-text">公告管理</text>
  71. </u-grid-item>
  72. <u-grid-item>
  73. <u--image :showLoading="true" src="../../static/images/user/GC.png" width="64rpx" height="64rpx" @click="click"></u--image>
  74. <text class="grid-text">工厂政策</text>
  75. </u-grid-item>
  76. <u-grid-item>
  77. <u--image :showLoading="true" src="../../static/images/user/YG.png" width="64rpx" height="64rpx" @click="click"></u--image>
  78. <text class="grid-text">员工管理</text>
  79. </u-grid-item>
  80. </u-grid>
  81. </view> -->
  82. <view class="head">
  83. <u-cell-group title-bg-color="rgb(243, 244, 246)" :border="false">
  84. <u-cell title="供应商" icon="account" :isLink="true" center @click="pageJump('supplier')"></u-cell>
  85. <u-cell title="设置" icon="setting" :isLink="true" :border="false" center @click="setUp"></u-cell>
  86. </u-cell-group>
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. export default {
  92. data() {
  93. return {
  94. src: uni.getStorageSync('userInfo').avatar,
  95. revenueTop: 0,
  96. userName: uni.getStorageSync('userInfo').account,
  97. role: uni.getStorageSync('userInfo').role_name
  98. }
  99. },
  100. onLoad() {
  101. uni.getSystemInfo({
  102. success: (e) => {
  103. this.revenueTop = e.statusBarHeight
  104. }
  105. })
  106. },
  107. onShow() {
  108. this.src = uni.getStorageSync('userInfo').avatar
  109. this.userName = uni.getStorageSync('userInfo').account
  110. this.role = uni.getStorageSync('userInfo').role_name
  111. },
  112. methods: {
  113. click() {
  114. uni.showToast({
  115. title: '暂无功能',
  116. icon: 'none'
  117. });
  118. },
  119. setUp() {
  120. this.$u.route('/pages/user/setUp');
  121. },
  122. pageJump(value) {
  123. switch (value) {
  124. case "supplier":
  125. uni.$u.route('/pages/views/supplier/index');
  126. break;
  127. }
  128. }
  129. }
  130. }
  131. </script>
  132. <style lang="scss" scoped>
  133. .topBackground {
  134. width: 100%;
  135. height: 300rpx;
  136. background: url("../../static/images/view/home/head_bg.png") no-repeat;
  137. background-size: 100% 100%;
  138. padding-top: var(--status-bar-height);
  139. }
  140. .tips {
  141. width: 96%;
  142. margin: 0 auto;
  143. padding: 20rpx 0;
  144. background-color: #FFFFFF;
  145. margin-top: -100rpx;
  146. border-radius: 30rpx;
  147. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  148. z-index: 999;
  149. }
  150. .personal {
  151. margin: 0 auto;
  152. background-color: #FFFFFF;
  153. margin-top: 20rpx;
  154. border-radius: 40rpx;
  155. padding: 20rpx;
  156. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  157. }
  158. .head {
  159. margin: 0 auto;
  160. background-color: #FFFFFF;
  161. margin-top: 20rpx;
  162. border-radius: 40rpx;
  163. padding: 20rpx 20rpx 20rpx 20rpx;
  164. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  165. }
  166. .grid-text {
  167. font-size: 14px;
  168. color: #909399;
  169. padding: 10rpx 0 20rpx 0rpx;
  170. /* #ifndef APP-PLUS */
  171. box-sizing: border-box;
  172. /* #endif */
  173. }
  174. </style>