personalCenter.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view>
  3. <view style="width: 100%;height: 64rpx;background-color: #FFFFFF;"></view>
  4. <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
  5. <view class="u-m-r-10">
  6. <u-avatar :src="this.$u.http.config.baseUrl+avatar" size="140"></u-avatar>
  7. </view>
  8. <view class="u-flex-1">
  9. <view class="u-font-18 u-p-b-20">{{username}}</view>
  10. <view class="u-font-14 u-tips-color">云仓号:{{username}}</view>
  11. </view>
  12. <view class="u-m-l-10 u-p-10">
  13. <u-icon name="scan" color="#969799" size="28"></u-icon>
  14. </view>
  15. <view class="u-m-l-10 u-p-10">
  16. <u-icon name="arrow-right" color="#969799" size="28"></u-icon>
  17. </view>
  18. </view>
  19. <view class="u-m-t-20">
  20. <u-cell-group>
  21. <!-- <u-cell-item icon="star" title="我的积分"></u-cell-item> -->
  22. <!-- <u-cell-item icon="photo" title="我的客服"></u-cell-item> -->
  23. <!-- <u-cell-item icon="coupon" title="我的推广"></u-cell-item> -->
  24. <u-cell-item icon="heart" title="我的待办"></u-cell-item>
  25. <u-cell-item v-for="(item,index) in contactList" :key="index" :icon="item.icon" :title="item.name" @click="makeACall(item.telephone)"></u-cell-item>
  26. </u-cell-group>
  27. </view>
  28. <view class="u-m-t-20">
  29. <u-cell-group>
  30. <u-cell-item icon="setting" title="我的设置" @tap="$u.debounce(setUp, 500)"></u-cell-item>
  31. </u-cell-group>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. pic: 'https://uviewui.com/common/logo.png',
  40. show: true,
  41. username:'',
  42. contactList:[],
  43. avatar:''
  44. }
  45. },
  46. onShow() {
  47. this.avatar = uni.getStorageSync('avatar')
  48. this.username = uni.getStorageSync('lifeData').vuex_user
  49. this.$u.get('/system/config/list',{configKey:'shortcut.phone.contact'}).then(res=>{
  50. this.contactList = eval(res.rows[0].configValue)
  51. })
  52. },
  53. methods: {
  54. setUp(){
  55. //保留当前页面跳转
  56. this.$u.route('/pages/personalCenter/setUp');
  57. },
  58. makeACall(item){
  59. uni.makePhoneCall({
  60. phoneNumber: item
  61. });
  62. },
  63. }
  64. }
  65. </script>
  66. <style>
  67. page {
  68. background-color: #f0f0f0;
  69. }
  70. </style>
  71. <style lang="scss" scoped>
  72. .camera {
  73. width: 54px;
  74. height: 44px;
  75. &:active {
  76. background-color: #ededed;
  77. }
  78. }
  79. .user-box {
  80. background-color: #fff;
  81. }
  82. </style>