my.vue 5.6 KB

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