my.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="intro-page common">
  3. <view class="top-class"></view>
  4. <view class="title">个人中心</view>
  5. <view class="head">
  6. <u-row class="row-class" justify="flex-end">
  7. <u-col span="4">
  8. <image class="logo-rules"
  9. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/qilang/common/rules.png"
  10. @click="openDetail" />
  11. </u-col>
  12. </u-row>
  13. </view>
  14. <view class="content">
  15. <view class="">
  16. <u-row customStyle="margin-bottom: 10px">
  17. <u-col span="4">
  18. <image class="tubiao"
  19. :src="image"
  20. mode="aspectFit" />
  21. </u-col>
  22. <u-col span="8">
  23. <view class="jf_phone">
  24. {{userPhone}}
  25. </view>
  26. </u-col>
  27. </u-row>
  28. </view>
  29. <view class="content_title">
  30. 我的服务
  31. </view>
  32. <view class="content_text">
  33. <u-row style="height: 200rpx;">
  34. <u-col span="4" textAlign="center" @click="jumpScanLog">
  35. <image class="tubiao" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/qilang/scan.png" mode="aspectFit" />
  36. <view class="text-class">
  37. 扫码记录
  38. </view>
  39. </u-col>
  40. </u-row>
  41. </view>
  42. <view class="return_view">
  43. <view class="return-button" @click="goBack()">返回</view>
  44. </view>
  45. </view>
  46. <!-- <CustomTabbar />-->
  47. </view>
  48. </template>
  49. <script>
  50. import CustomTabbar from '@/components/tabbar_common.vue';
  51. import {
  52. getMiniCustomerUserInfo
  53. } from '@/api/scan';
  54. export default {
  55. components: {
  56. CustomTabbar
  57. },
  58. data() {
  59. return {
  60. userPhone: '',
  61. point: 0,
  62. image:'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/qilang/common/logo.png'
  63. }
  64. },
  65. onLoad() {
  66. this.initUserData();
  67. },
  68. methods: {
  69. openDetail() {
  70. uni.navigateTo({
  71. url: '/pages/qilang/index/rules'
  72. });
  73. },
  74. initUserData() {
  75. let that = this;
  76. getMiniCustomerUserInfo().then(res => {
  77. if (res.code === 0) {
  78. that.userPhone = res.data.phone;
  79. that.point = res.data.point;
  80. if (res.data.image !== '' && res.data.image != null){
  81. that.image = res.data.image;
  82. }
  83. console.log(that.point);
  84. }
  85. })
  86. },
  87. goBack() {
  88. uni.navigateBack();
  89. },
  90. jumpScanLog() {
  91. uni.navigateTo({
  92. url: '/pages/qilang/record/record'
  93. });
  94. },
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. @import url('../../../static/scss/common_qilang.css');
  100. .row-class {
  101. height: 80rpx;
  102. }
  103. .content_text {
  104. height: calc(100% - 300rpx);
  105. }
  106. .content_title {
  107. font-weight: 700;
  108. font-size: 38rpx;
  109. color: #333333;
  110. margin-bottom: 10rpx;
  111. margin-left: 30rpx;
  112. }
  113. .content {
  114. height: 64vh;
  115. border-radius: 10rpx;
  116. margin: 16vh 40rpx 0vh 40rpx;
  117. padding: 10rpx 24rpx;
  118. overflow: auto;
  119. align-items: center;
  120. justify-content: center;
  121. border-radius: 48px;
  122. background: #FDE2B1;
  123. border: 6px solid #FB911b;
  124. }
  125. .tubiao {
  126. background-size: cover;
  127. /* 确保背景图片自适应填充整个容器 */
  128. background-position: center;
  129. /* 背景图片居中显示 */
  130. background-repeat: no-repeat;
  131. /* 防止背景图重复 */
  132. height: 120rpx;
  133. width: 100%;
  134. }
  135. .text-class {
  136. font-weight: 600;
  137. font-size: 16px;
  138. color: #333333;
  139. }
  140. .jf_phone {
  141. font-weight: bold;
  142. font-size: 30rpx;
  143. color: #000000;
  144. margin-bottom: 10rpx;
  145. }
  146. </style>