favorites.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!-- 蓝牙平台限制 todo https://uniapp.dcloud.io/api/system/bluetooth?id=stopbluetoothdevicesdiscovery -->
  2. <template>
  3. <view>
  4. <uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" title="我的关注" color="#000000" 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 v-if="gameList.length==0" class="text-xs text-center text-gray margin-top">
  12. <text>下拉刷新列表</text>
  13. </view>
  14. <view v-else class="cu-list menu margin-top">
  15. <view class="cu-item" :class="true?'arrow':''" v-for="(item,index) in gameList" :key="index">
  16. <view class="content" @tap="_onConnectDevice(item,$event)">
  17. <image :src="item.icon" mode="aspectFit"></image>
  18. <text class="text-grey">{{item.name}}</text>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import reqUtil from "@/util/util-js/requstUtil.js"
  26. import config from "@/common/config.js"
  27. export default {
  28. data() {
  29. return {
  30. gameList: []
  31. }
  32. },
  33. onLoad() {
  34. // reqUtil.requestData(config.URL.FAVORITESGET).then(res => {
  35. // console.log('FAVORITESADD =====', res);
  36. // if (res.code == 0) {
  37. // }
  38. // },
  39. // e => {
  40. // console.log(e)
  41. // });
  42. // reqUtil.requestData(config.URL.RECENTLYPLAYINGADD).then(res => {
  43. // console.log('RECENTLYPLAYINGADD =====', res);
  44. // if (res.code == 0) {
  45. // }
  46. // },
  47. // e => {
  48. // console.log(e)
  49. // });
  50. reqUtil.requestData(config.URL.RECENTLYPLAYINGGET).then(res => {
  51. console.log('RECENTLYPLAYINGGET =====', res);
  52. if (res.code == 0) {
  53. }
  54. },
  55. e => {
  56. console.log(e)
  57. });
  58. },
  59. methods: {
  60. onPullDownRefresh(e) {
  61. reqUtil.requestData(config.URL.FAVORITESGET).then(res => {
  62. console.log('FAVORITESADD =====', res);
  63. if (res.code == 0) {
  64. }
  65. },
  66. e => {
  67. console.log(e)
  68. });
  69. },
  70. onBack(){
  71. uni.navigateBack({
  72. delta:1
  73. })
  74. }
  75. }
  76. }
  77. </script>
  78. <style>
  79. </style>