my.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/logo3.png"
  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_cjx.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. }
  91. },
  92. onLoad() {
  93. this.initUserData();
  94. },
  95. methods: {
  96. initUserData() {
  97. let that = this;
  98. getMiniCustomerUserInfo().then(res => {
  99. if (res.code == 0) {
  100. that.userPhone = res.data.phone;
  101. that.point = res.data.point;
  102. console.log(that.point);
  103. }
  104. })
  105. },
  106. goBack() {
  107. uni.navigateBack();
  108. },
  109. jumpScanLog() {
  110. uni.navigateTo({
  111. url: '/pages/cjx/record/record'
  112. });
  113. },
  114. jumpScanAddress() {
  115. uni.navigateTo({
  116. url: '/pages/cjx/shop/shop?type=0'
  117. });
  118. }
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. @import url('../../../static/scss/common_cjx.css');
  124. .row-class {
  125. height: 80rpx;
  126. }
  127. .cardTop{
  128. background-image:
  129. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/myCardType.png");
  130. }
  131. .content_text {
  132. height: calc(100% - 370rpx);
  133. }
  134. .theme-text {
  135. height: 10vh;
  136. text-align: center;
  137. line-height: 11vh;
  138. .textImage {
  139. height: 80rpx;
  140. width: 400rpx;
  141. }
  142. }
  143. .intro-card {
  144. margin: 0 32rpx;
  145. padding: 32rpx 24rpx 24rpx 24rpx;
  146. background: rgba(131, 100, 71, 0.5);
  147. border-radius: 10rpx;
  148. .intro-view {
  149. border: 1px solid #341B10;
  150. padding: 10px;
  151. margin: 10px;
  152. position: relative;
  153. .intro-label {
  154. background-image:
  155. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/label.png");
  156. /* 使用绝对路径 */
  157. background-size: contain;
  158. background-repeat: no-repeat;
  159. width: 220rpx;
  160. height: 120rpx;
  161. position: absolute;
  162. margin-top: -70rpx;
  163. align-content: center;
  164. .label-title {
  165. font-weight: bold;
  166. font-size: 30rpx;
  167. color: #341B10;
  168. text-align: center;
  169. margin-left: 10px;
  170. height: 120rpx;
  171. line-height: 110rpx;
  172. }
  173. }
  174. .intro-content {
  175. font-size: 28rpx;
  176. color: #5c4322;
  177. line-height: 1.8;
  178. margin: 20rpx 0px;
  179. text-align: justify;
  180. height: 38vh;
  181. }
  182. }
  183. }
  184. .textImage {
  185. height: 80rpx;
  186. width: 400rpx;
  187. }
  188. .content {
  189. height: 68vh;
  190. border-radius: 10rpx;
  191. margin: 0rpx 40rpx;
  192. padding: 10rpx 24rpx;
  193. overflow: auto;
  194. align-items: center;
  195. justify-content: center;
  196. background-image:
  197. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/cardBgi.png");
  198. background-size: cover;
  199. background-position: center;
  200. background-repeat: no-repeat;
  201. }
  202. .company-img {
  203. width: 160rpx;
  204. height: 160rpx;
  205. border-radius: 12rpx;
  206. object-fit: cover;
  207. margin-top: 10rpx;
  208. background: #eee;
  209. border-radius: 80rpx;
  210. }
  211. .touxiang {
  212. height: 120px;
  213. align-content: center;
  214. justify-content: center;
  215. text-align: center;
  216. }
  217. .tubiao {
  218. background-size: cover;
  219. /* 确保背景图片自适应填充整个容器 */
  220. background-position: center;
  221. /* 背景图片居中显示 */
  222. background-repeat: no-repeat;
  223. /* 防止背景图重复 */
  224. height: 120rpx;
  225. width: 100%;
  226. }
  227. .text-class {
  228. color: #fff;
  229. }
  230. .jf_phone {
  231. font-weight: bold;
  232. font-size: 30rpx;
  233. color: #F5F5F5;
  234. color: #fff;
  235. margin-bottom: 10rpx;
  236. }
  237. .point {
  238. font-weight: bold;
  239. font-size: 30rpx;
  240. color: #E22ADD;
  241. }
  242. </style>