level.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. <template>
  2. <view >
  3. <view style="margin: 20rpx;">
  4. <u-row gutter="16" justify="center">
  5. <u-col span="9">
  6. <view style="vertical-align: middle;display: flex;">
  7. <image :src="userInfo!=null?$method.splitImgHost(userInfo.avatar):''" style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
  8. <view class="r_t2">{{userInfo.nickname}}</view>
  9. </view>
  10. </u-col>
  11. <u-col span="3" text-align="right">
  12. <view style="height: 80rpx;display: flex;justify-content: center;flex-direction: column;">
  13. <view class="rule">
  14. <text>查看规则</text>
  15. </view>
  16. </view>
  17. </u-col>
  18. </u-row>
  19. </view>
  20. <view class="sv_box">
  21. <scroll-view class="r_sliper" scroll-x="true" >
  22. <view v-for="(item,index) in list" :key="index" class="sv_item_box item_bac1" :style="'background:'+item.bac">
  23. <view style="display: flex;">
  24. <view class="left_t" >
  25. 当前等级
  26. </view>
  27. <view style="position: relative;">
  28. <view style="width: 280rpx;text-align: center;margin-top: 30rpx;">
  29. <text class="left_t2" :style="'color:'+item.title_color">{{item.name}}</text>
  30. </view>
  31. <image :src="item.img" class="level_flower"></image>
  32. </view>
  33. </view>
  34. <view class="progress_box">
  35. <view class="progress_text">0/1000</view>
  36. <u-line-progress height="8" inactive-color="rgba(47, 67, 121, 0.1)" :active-color="item.title_color" :percent="0" :show-percent="false"></u-line-progress>
  37. <view class="tip">{{item.tip}}</view>
  38. </view>
  39. </view>
  40. </scroll-view>
  41. </view>
  42. <view style="padding: 20rpx;">
  43. <view class="box1">
  44. <u-row >
  45. <u-col span="3">
  46. <view class="menu_p">
  47. <view class="menu_box">
  48. <image src="/static/level/menu1.png" class="menu_img"></image>
  49. <view class="menu_t">优惠券</view>
  50. </view>
  51. </view>
  52. </u-col>
  53. <u-col span="3">
  54. <view class="menu_p">
  55. <view class="menu_box">
  56. <image src="/static/level/menu2.png" class="menu_img"></image>
  57. <view class="menu_t">折扣券</view>
  58. </view>
  59. </view>
  60. </u-col>
  61. <u-col span="3">
  62. <view class="menu_p">
  63. <view class="menu_box">
  64. <image src="/static/level/menu3.png" class="menu_img"></image>
  65. <view class="menu_t">解锁题库</view>
  66. </view>
  67. </view>
  68. </u-col>
  69. <u-col span="3">
  70. <view class="menu_p">
  71. <view class="menu_box">
  72. <image src="/static/level/menu4.png" class="menu_img"></image>
  73. <view class="menu_t">解锁课程</view>
  74. </view>
  75. </view>
  76. </u-col>
  77. </u-row>
  78. </view>
  79. <view class="box2">
  80. <view >
  81. <u-row >
  82. <u-col >
  83. <view class="box2_title">做任务得经验</view>
  84. </u-col>
  85. </u-row>
  86. <view style="margin-top: 15rpx;">
  87. <u-row >
  88. <u-col span="2">
  89. <image class="box2_img" src="/static/level/qiandao.png"></image>
  90. </u-col>
  91. <u-col span="5">
  92. <view class="box_qd1">
  93. <view style="width: 95rpx;">签到</view>
  94. <text style="margin-left: 20rpx;">经验 +2</text>
  95. </view>
  96. <view class="box_qd">每日签到</view>
  97. </u-col>
  98. <u-col offset="2" span="3" text-align="right">
  99. <view class="box2_btn">去完成</view>
  100. </u-col>
  101. </u-row>
  102. </view>
  103. <view style="margin-top: 15rpx;">
  104. <u-row >
  105. <u-col span="2">
  106. <image class="box2_img" src="/static/level/spxuexi.png"></image>
  107. </u-col>
  108. <u-col span="5">
  109. <view class="box_qd1">
  110. <view style="width: 95rpx;">视频学习</view>
  111. <text style="margin-left: 20rpx;">经验 +2</text>
  112. </view>
  113. <view class="box_qd">观看课程视频5分钟</view>
  114. </u-col>
  115. <u-col offset="2" span="3" text-align="right">
  116. <view class="box2_btn">去完成</view>
  117. </u-col>
  118. </u-row>
  119. </view>
  120. <view style="margin-top: 15rpx;">
  121. <u-row >
  122. <u-col span="2">
  123. <image class="box2_img" src="/static/level/wsziliao.png"></image>
  124. </u-col>
  125. <u-col span="5">
  126. <view class="box_qd1">
  127. <view style="width: 95rpx;">完善资料</view>
  128. <text style="margin-left: 20rpx;">经验 +1</text>
  129. </view>
  130. <view class="box_qd">完善学习档案信息</view>
  131. </u-col>
  132. <u-col offset="2" span="3" text-align="right">
  133. <view class="box2_btn">去完成</view>
  134. </u-col>
  135. </u-row>
  136. </view>
  137. <view style="margin-top: 15rpx;">
  138. <u-row >
  139. <u-col span="2">
  140. <image class="box2_img" src="/static/level/zffenxiang.png"></image>
  141. </u-col>
  142. <u-col span="5">
  143. <view class="box_qd1">
  144. <view style="width: 95rpx;">转发分享</view>
  145. <text style="margin-left: 20rpx;">经验 +5</text>
  146. </view>
  147. <view class="box_qd">转发分享给好友</view>
  148. </u-col>
  149. <u-col offset="2" span="3" text-align="right">
  150. <view class="box2_btn">去完成</view>
  151. </u-col>
  152. </u-row>
  153. </view>
  154. <view style="margin-top: 15rpx;">
  155. <u-row >
  156. <u-col span="2">
  157. <image class="box2_img" src="/static/level/hdbaoming.png"></image>
  158. </u-col>
  159. <u-col span="5">
  160. <view class="box_qd1">
  161. <view style="width: 95rpx;">活动报名</view>
  162. <text style="margin-left: 20rpx;">经验 +100</text>
  163. </view>
  164. <view class="box_qd">报名参加一次活动</view>
  165. </u-col>
  166. <u-col offset="2" span="3" text-align="right">
  167. <view class="box2_btn">去完成</view>
  168. </u-col>
  169. </u-row>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. </view>
  175. </template>
  176. <script>
  177. import {mapGetters} from 'vuex';
  178. export default {
  179. data() {
  180. return {
  181. list:[
  182. {
  183. title_color:'#0046AB',
  184. name:'初出茅庐',
  185. img:'/static/level/flower_1.png',
  186. tip:'还需 651 经验可升级成为「崭露头角」',
  187. bac:'linear-gradient(45deg, rgba(99, 163, 255, 0.8), rgba(182, 220, 255, 0.8), rgba(114, 190, 255, 0.8));'
  188. },
  189. {
  190. title_color:'#6724BD',
  191. name:'崭露头角',
  192. img:'/static/level/flower_2.png',
  193. tip:'还需 651 经验可升级成为「自成一派」',
  194. bac:'linear-gradient(45deg, rgba(152, 14, 188, 0.4), rgba(173, 108, 254, 0.4));'
  195. },
  196. {
  197. title_color:'#27BA27',
  198. name:'自成一派',
  199. img:'/static/level/flower_3.png',
  200. tip:'还需 651 经验可升级成为「小有名气」',
  201. bac:'linear-gradient(45deg, rgba(8, 202, 96, 0.4), rgba(66, 254, 64, 0.4));'
  202. },
  203. {
  204. title_color:'#E17713',
  205. name:'小有名气',
  206. img:'/static/level/flower_4.png',
  207. tip:'还需 651 经验可升级成为「惊艳四座」',
  208. bac:'linear-gradient(45deg, rgba(231, 105, 45, 0.4), rgba(255, 169, 90, 0.4));'
  209. },
  210. {
  211. title_color:'#C21A7A',
  212. name:'惊艳四座',
  213. img:'/static/level/flower_5.png',
  214. tip:'还需 651 经验可升级成为「初露锋芒」',
  215. bac:'linear-gradient(45deg, rgba(148, 38, 117, 0.4), rgba(228, 83, 165, 0.4));'
  216. },
  217. {
  218. title_color:'#D1B214',
  219. name:'初露锋芒',
  220. img:'/static/level/flower_6.png',
  221. tip:'您已解锁所有成就!',
  222. bac:'linear-gradient(45deg, rgba(240, 157, 9, 0.4), rgba(251, 218, 56, 0.4));'
  223. }
  224. ]
  225. }
  226. },
  227. onLoad(option) {
  228. },
  229. onShow(){
  230. },
  231. methods: {
  232. },
  233. computed: {...mapGetters(['userInfo'])},
  234. }
  235. </script>
  236. <style>
  237. ::-webkit-scrollbar{
  238. width: 0;
  239. height: 0;
  240. color: transparent;
  241. }
  242. </style>
  243. <style scope>
  244. .level_flower{
  245. width: 280rpx;
  246. height: 160rpx;
  247. position: absolute;
  248. top: 0;
  249. left: 0;
  250. }
  251. .menu_p{
  252. display: flex;
  253. flex-direction: column;
  254. justify-content: center;
  255. height: 130rpx;
  256. }
  257. .menu_box{
  258. width: 100%;
  259. text-align: center;
  260. }
  261. .menu_t{
  262. font-size: 24rpx;
  263. font-family: PingFang SC;
  264. font-weight: 500;
  265. color: #32467B;
  266. margin-top: 10rpx;
  267. }
  268. .menu_img{
  269. width: 44rpx;
  270. height: 38rpx;
  271. }
  272. .box_jy{
  273. font-size: 22rpx;
  274. font-family: PingFang SC;
  275. font-weight: 400;
  276. color: #000000;
  277. }
  278. .box_qd1{
  279. font-size: 22rpx;
  280. font-family: PingFang SC;
  281. font-weight: 400;
  282. color: #000000;
  283. display: flex;
  284. }
  285. .box_qd{
  286. font-size: 18rpx;
  287. font-family: PingFang SC;
  288. font-weight: 400;
  289. color: #999999;
  290. margin-top: 8rpx;
  291. }
  292. .box2_btn{
  293. width: 132rpx;
  294. height: 40rpx;
  295. background: rgba(249, 96, 10, 0.6);
  296. border-radius: 20rpx;
  297. font-size: 24rpx;
  298. color: #FFFFFF;
  299. text-align: center;
  300. line-height: 40rpx;
  301. margin-right: 20rpx;
  302. }
  303. .box2_img{
  304. width: 83rpx;
  305. height: 83rpx;
  306. }
  307. .box2_title{
  308. font-size: 24rpx;
  309. font-family: PingFang SC;
  310. font-weight: bold;
  311. color: #32467B;
  312. }
  313. .box2{
  314. width: 100%;
  315. background: #FFFFFF;
  316. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  317. border-radius: 32rpx;
  318. padding: 20rpx;
  319. margin-top: 30rpx;
  320. }
  321. .box1{
  322. width: 100%;
  323. height: 130rpx;
  324. background: #FFFFFF;
  325. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  326. border-radius: 32rpx;
  327. margin-top: 20rpx;
  328. }
  329. .tip{
  330. font-size: 16rpx;
  331. font-family: PingFang SC;
  332. font-weight: 400;
  333. color: #32467B;
  334. margin-top: 8rpx;
  335. }
  336. .progress_box{
  337. padding: 40rpx;
  338. margin-top: 40rpx;
  339. }
  340. .progress_text{
  341. font-size: 24rpx;
  342. font-family: PingFang SC;
  343. font-weight: 800;
  344. color: #2F4379;
  345. position: relative;
  346. top: 15rpx;
  347. }
  348. .left_t2{
  349. font-size: 32rpx;
  350. font-family: PingFang SC;
  351. font-weight: bold;
  352. }
  353. .left_t{
  354. width: 118rpx;
  355. height: 40rpx;
  356. background: rgba(50, 70, 123, 0.5);
  357. border-radius: 0rpx 20rpx 20rpx 0rpx;
  358. color: #FEFEFF;
  359. font-size: 24rpx;
  360. text-align: center;
  361. line-height: 40rpx;
  362. margin-top: 30rpx;
  363. }
  364. .item_bac1{
  365. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  366. border-radius: 32rpx;
  367. }
  368. .sv_item_box{
  369. margin-right: 20rpx;
  370. display:inline-block;
  371. width: 678rpx;
  372. height: 296rpx;
  373. }
  374. .sv_box{
  375. width: 100%;
  376. height: 296rpx;
  377. background: #FFFFFF;
  378. white-space:nowrap;
  379. overflow: hidden;
  380. margin-left: 20rpx;
  381. }
  382. .rule{
  383. width: 132rpx;
  384. height: 40rpx;
  385. background: rgba(255, 255, 255, 0.5);
  386. border: 1rpx solid #32467B;
  387. border-radius: 20rpx;
  388. color: #2F4379;
  389. opacity: 0.5;
  390. font-size: 24rpx;
  391. text-align: center;
  392. }
  393. page {
  394. background: #FFFFFF;
  395. }
  396. .r_t2{
  397. font-size: 32rpx;
  398. font-weight: bold;
  399. color: #32467B;
  400. line-height: 80rpx;
  401. padding-left: 20rpx;
  402. }
  403. </style>