my.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view class="intro-page common">
  3. <view class="top-class"></view>
  4. <view class="title">
  5. 个人中心
  6. </view>
  7. <view class="head">
  8. <u-row class="row-class">
  9. <u-col span="4">
  10. <image class="logo-img"
  11. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/logo.png"
  12. mode="aspectFit" />
  13. </u-col>
  14. <u-col span="4">
  15. <image class="commodity-img"
  16. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/commodity.png"
  17. mode="aspectFit" />
  18. </u-col>
  19. <u-col span="4">
  20. <image class="logo-rules"
  21. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/rules.png"
  22. @click="openDetail" />
  23. </u-col>
  24. </u-row>
  25. </view>
  26. <view class="topImg">
  27. <image class="img_1" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/topImg.png"
  28. mode="heightFix" />
  29. </view>
  30. <view class="content">
  31. <view class="cardTop">
  32. </view>
  33. <view class="">
  34. <u-row customStyle="margin-bottom: 10px">
  35. <u-col span="4">
  36. <image class="tubiao"
  37. :src="image"
  38. mode="aspectFit" />
  39. </u-col>
  40. <u-col span="8">
  41. <view class="jf_phone">
  42. {{userPhone}}
  43. </view>
  44. <view class="text-class">
  45. 我的积分: <span class="point">{{ point }} </span>
  46. </view>
  47. </u-col>
  48. </u-row>
  49. </view>
  50. <view class="content_text">
  51. <u-row style="height: 200rpx;">
  52. <u-col span="4" textAlign="center" @click="jumpScanLog">
  53. <image class="tubiao" src="/static/images/tabbar/cjx/scan.png" mode="aspectFit" />
  54. <view class="text-class">
  55. 扫码记录
  56. </view>
  57. </u-col>
  58. <u-col span="4" textAlign="center" @click="jumpScanAddress">
  59. <image class="tubiao"
  60. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/shopIco.png"
  61. mode="aspectFit" />
  62. <view class="text-class">
  63. 积分商城
  64. </view>
  65. </u-col>
  66. <u-col span="4">
  67. </u-col>
  68. </u-row>
  69. </view>
  70. <view class="return_view">
  71. <view class="return-button" @click="goBack()">返回</view>
  72. </view>
  73. </view>
  74. <!-- <CustomTabbar />-->
  75. </view>
  76. </template>
  77. <script>
  78. import CustomTabbar from '@/components/tabbar_common.vue';
  79. import {
  80. getMiniCustomerUserInfo
  81. } from '@/api/scan';
  82. export default {
  83. components: {
  84. CustomTabbar
  85. },
  86. data() {
  87. return {
  88. userPhone: '',
  89. point: 0,
  90. image:''
  91. }
  92. },
  93. onLoad() {
  94. this.initUserData();
  95. },
  96. methods: {
  97. initUserData() {
  98. let that = this;
  99. getMiniCustomerUserInfo().then(res => {
  100. if (res.code == 0) {
  101. that.userPhone = res.data.phone;
  102. that.point = res.data.point;
  103. that.image = res.data.image;
  104. console.log(that.point);
  105. }
  106. })
  107. },
  108. goBack() {
  109. uni.navigateBack();
  110. },
  111. jumpScanLog() {
  112. uni.navigateTo({
  113. url: '/pages/cjx/record/record'
  114. });
  115. },
  116. jumpScanAddress() {
  117. uni.navigateTo({
  118. url: '/pages/cjx/shop/shop?type=0'
  119. });
  120. },
  121. openDetail() {
  122. uni.navigateTo({
  123. url: '/pages/cjx/index/rules'
  124. });
  125. },
  126. }
  127. }
  128. </script>
  129. <style lang="scss" scoped>
  130. @import url('../../../static/scss/common_cjx.css');
  131. .row-class {
  132. height: 80rpx;
  133. }
  134. .cardTop{
  135. background-image:
  136. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/myCardType.png");
  137. }
  138. .content_text {
  139. height: calc(100% - 370rpx);
  140. }
  141. .theme-text {
  142. height: 10vh;
  143. text-align: center;
  144. line-height: 11vh;
  145. .textImage {
  146. height: 80rpx;
  147. width: 400rpx;
  148. }
  149. }
  150. .intro-card {
  151. margin: 0 32rpx;
  152. padding: 32rpx 24rpx 24rpx 24rpx;
  153. background: rgba(131, 100, 71, 0.5);
  154. border-radius: 10rpx;
  155. .intro-view {
  156. border: 1px solid #341B10;
  157. padding: 10px;
  158. margin: 10px;
  159. position: relative;
  160. .intro-label {
  161. background-image:
  162. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/label.png");
  163. /* 使用绝对路径 */
  164. background-size: contain;
  165. background-repeat: no-repeat;
  166. width: 220rpx;
  167. height: 120rpx;
  168. position: absolute;
  169. margin-top: -70rpx;
  170. align-content: center;
  171. .label-title {
  172. font-weight: bold;
  173. font-size: 30rpx;
  174. color: #341B10;
  175. text-align: center;
  176. margin-left: 10px;
  177. height: 120rpx;
  178. line-height: 110rpx;
  179. }
  180. }
  181. .intro-content {
  182. font-size: 28rpx;
  183. color: #5c4322;
  184. line-height: 1.8;
  185. margin: 20rpx 0px;
  186. text-align: justify;
  187. height: 38vh;
  188. }
  189. }
  190. }
  191. .textImage {
  192. height: 80rpx;
  193. width: 400rpx;
  194. }
  195. .content {
  196. height: 68vh;
  197. border-radius: 10rpx;
  198. margin: 0rpx 40rpx;
  199. padding: 10rpx 24rpx;
  200. overflow: auto;
  201. align-items: center;
  202. justify-content: center;
  203. background-image:
  204. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/cardBgi.png");
  205. background-size: cover;
  206. background-position: center;
  207. background-repeat: no-repeat;
  208. }
  209. .company-img {
  210. width: 160rpx;
  211. height: 160rpx;
  212. border-radius: 12rpx;
  213. object-fit: cover;
  214. margin-top: 10rpx;
  215. background: #eee;
  216. border-radius: 80rpx;
  217. }
  218. .touxiang {
  219. height: 120px;
  220. align-content: center;
  221. justify-content: center;
  222. text-align: center;
  223. }
  224. .tubiao {
  225. background-size: cover;
  226. /* 确保背景图片自适应填充整个容器 */
  227. background-position: center;
  228. /* 背景图片居中显示 */
  229. background-repeat: no-repeat;
  230. /* 防止背景图重复 */
  231. height: 120rpx;
  232. width: 100%;
  233. }
  234. .text-class {
  235. color: #fff;
  236. }
  237. .jf_phone {
  238. font-weight: bold;
  239. font-size: 30rpx;
  240. color: #F5F5F5;
  241. color: #fff;
  242. margin-bottom: 10rpx;
  243. }
  244. .point {
  245. font-weight: bold;
  246. font-size: 30rpx;
  247. color: #E22ADD;
  248. }
  249. </style>