my.vue 5.6 KB

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