index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <app-layout class="app-my">
  3. <view class="container">
  4. <view class="customer">
  5. <view class="bg"></view>
  6. <view class="info dir-top-wrap cross-center main-center">
  7. <view class="head-img">
  8. <u-image
  9. width="140"
  10. height="140"
  11. :src="userData.head_img"
  12. shape="circle"></u-image>
  13. </view>
  14. <view class="nickname">{{userData.nickname}}</view>
  15. <view class="mobile">
  16. {{userData.phone_num}}
  17. <!--#ifdef MP-WEIXIN-->
  18. <u-button size="mini"
  19. v-if="!userData.phone_num"
  20. :custom-style="{backgroundColor: '#097268'}"
  21. type="success" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">获取手机号</u-button>
  22. <!--#endif-->
  23. </view>
  24. </view>
  25. </view>
  26. <u-cell-group :border="false" class="tab-list">
  27. <u-cell-item title="桥架会员" :border-bottom="false" bg-color="#f9f9f9" @click="$jump({url:'/pages/my/member',type:'to'})">
  28. <view slot="icon" class="icon bridge"></view>
  29. </u-cell-item>
  30. <u-cell-item title="会员购买记录" :border-bottom="false" bg-color="#f9f9f9" @click="$jump({url:'/pages/my/member-record',type:'to'})">
  31. <view slot="icon" class="icon member"></view>
  32. </u-cell-item>
  33. <u-cell-item title="分销中心" v-if="setting.open_share" :border-bottom="false" bg-color="#f9f9f9" @click="$jump({url:'/pages/share/index',type:'to'})">
  34. <view slot="icon" class="icon share"></view>
  35. </u-cell-item>
  36. <u-cell-item title="微信号" :border-bottom="false" bg-color="#f9f9f9">
  37. {{setting.service_wechat}}
  38. <view slot="icon" class="icon wechat"></view>
  39. </u-cell-item>
  40. <u-cell-item title="在线客服" :border-bottom="false" bg-color="#f9f9f9">
  41. <view slot="icon" class="icon kefu"></view>
  42. </u-cell-item>
  43. </u-cell-group>
  44. <view class="qrcode dir-top-wrap cross-center">
  45. <view class="img">
  46. <u-image
  47. width="260"
  48. height="260"
  49. :src="setting.service_qrcode"
  50. ></u-image>
  51. </view>
  52. <text class="title">扫描二维码联系客服</text>
  53. </view>
  54. </view>
  55. </app-layout>
  56. </template>
  57. <script>
  58. import appLayout from "@/components/app-layout"
  59. export default {
  60. components:{
  61. appLayout,
  62. },
  63. data() {
  64. return {
  65. userData: this.vuex_user_data,
  66. setting: {}
  67. }
  68. },
  69. methods: {
  70. getPhoneNumber(phoneNumber){
  71. console.log('-->data',phoneNumber)
  72. },
  73. getUser(){
  74. this.$u.api.userGet().then(data => {
  75. console.log('-->data',data)
  76. })
  77. },
  78. getSetting(){
  79. this.$u.api.settingGet().then(data => {
  80. this.setting = data;
  81. })
  82. }
  83. },
  84. onLoad(){
  85. this.userData = this.vuex_user_data
  86. //this.getUser();
  87. },
  88. onShow(){
  89. this.getSetting();
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. /deep/.u-cell{
  95. padding: 22rpx 32rpx !important;
  96. }
  97. .container{
  98. padding: 0;
  99. height: 100vh;
  100. .customer{
  101. position: relative;
  102. .bg{
  103. position: absolute;
  104. background: url("@/static/images/bg.png") no-repeat center;
  105. background-size: 100% 100%;
  106. height: 300rpx;
  107. left: 0;
  108. top: 0;
  109. width: 750rpx;
  110. z-index: 0;
  111. }
  112. .info{
  113. height: 300rpx;
  114. position: relative;
  115. color: #ffffff;
  116. z-index: 1;
  117. .nickname{
  118. margin: 8rpx 0;
  119. font-weight: 600;
  120. }
  121. }
  122. }
  123. .tab-list{
  124. margin-top: 32rpx;
  125. .icon{
  126. width: 32rpx;
  127. height: 32rpx;
  128. background-size: cover;
  129. background-repeat: no-repeat;
  130. background-position: center;
  131. margin-right: 8rpx;
  132. &.bridge{
  133. background-image: url("@/static/images/icons/bridge.png");
  134. }
  135. &.kefu{
  136. background-image: url("@/static/images/icons/kefu.png");
  137. }
  138. &.member{
  139. background-image: url("@/static/images/icons/member.png");
  140. }
  141. &.share{
  142. background-image: url("@/static/images/icons/share.png");
  143. }
  144. &.wechat{
  145. background-image: url("@/static/images/icons/wechat.png");
  146. }
  147. }
  148. }
  149. .qrcode{
  150. margin-top: 32rpx;
  151. >.title{
  152. padding: 8rpx 0;
  153. color: #6e6e6e;
  154. }
  155. }
  156. }
  157. </style>