achievement.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view >
  3. <uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()"
  4. color="#000000" title="我的成就" fixed="true" :border="false">
  5. <view slot="left">
  6. <view class="flex align-center margin-left">
  7. <image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
  8. </view>
  9. </view>
  10. </uni-nav-bar>
  11. <view style="height: 8px; background-color: #EEEEEE;"></view>
  12. <view class="cu-form-group">
  13. <view class="grid col-4 flex-sub" >
  14. <view class="flex flex-direction align-center padding" v-for="(item,index) in lists" :key="index">
  15. <image style="width: 110rpx;height:110rpx;" :src="item.url"></image>
  16. <text>{{item.name}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import reqUtil from '@/util/util-js/requstUtil.js';
  24. import config from '@/common/config.js';
  25. export default {
  26. data() {
  27. return {
  28. lists:[],
  29. }
  30. },
  31. onLoad() {
  32. reqUtil
  33. .requestData(config.URL.GETALLHONORS, {})
  34. .then(
  35. res => {
  36. if (res.code == 0) {
  37. console.log(JSON.stringify(res.data));
  38. this.lists = res.data;
  39. }
  40. },
  41. e => {
  42. console.log(e);
  43. }
  44. );
  45. },
  46. methods: {
  47. onBack(){
  48. uni.navigateBack({
  49. delta:1
  50. })
  51. }
  52. }
  53. }
  54. </script>
  55. <style>
  56. page{
  57. background-color: #FFFFFF;
  58. }
  59. </style>