123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <!-- 蓝牙平台限制 todo https://uniapp.dcloud.io/api/system/bluetooth?id=stopbluetoothdevicesdiscovery -->
- <template>
- <view>
- <uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" title="我的关注" color="#000000" fixed="true" :border="false">
- <view slot="left">
- <view class=" flex align-center margin-left">
- <image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
- </view>
- </view>
- </uni-nav-bar>
- <view v-if="gameList.length==0" class="text-xs text-center text-gray margin-top">
- <text>下拉刷新列表</text>
- </view>
- <view v-else class="cu-list menu margin-top">
- <view class="cu-item" :class="true?'arrow':''" v-for="(item,index) in gameList" :key="index">
- <view v-if="platform == gamePlatform[item.platform] || item.platform == 2" class="content" @tap="_onConnectDevice(item,$event)">
- <image :src="item.icon" mode="aspectFit"></image>
- <text class="text-grey">{{item.name}}</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import reqUtil from "@/util/util-js/requstUtil.js"
- import config from "@/common/config.js"
- import {
- mapState
- } from 'vuex';
-
- export default {
- computed: mapState(['platform','gamePlatform']),
- data() {
- return {
- gameList: []
- }
- },
- onLoad() {
- // reqUtil.requestData(config.URL.FAVORITESGET).then(res => {
- // console.log('FAVORITESADD =====', res);
- // if (res.code == 0) {
- // }
- // },
- // e => {
- // console.log(e)
- // });
- // reqUtil.requestData(config.URL.RECENTLYPLAYINGADD).then(res => {
- // console.log('RECENTLYPLAYINGADD =====', res);
- // if (res.code == 0) {
- // }
- // },
- // e => {
- // console.log(e)
- // });
- reqUtil.requestData(config.URL.RECENTLYPLAYINGGETBYPLATFORM).then(res => {
- console.log('RECENTLYPLAYINGGETBYPLATFORM =====', res);
- if (res.code == 0) {
- }
- },
- e => {
- console.log(e)
- });
- },
- methods: {
- onPullDownRefresh(e) {
- reqUtil.requestData(config.URL.FAVORITESGETBYPLATFORM).then(res => {
- console.log('FAVORITESGETBYPLATFORM =====', res);
- if (res.code == 0) {
- }
- },
- e => {
- console.log(e)
- });
- },
- onBack(){
- uni.navigateBack({
- delta:1
- })
- }
- }
- }
- </script>
- <style>
- </style>
|