|
@ -7,13 +7,14 @@ |
|
|
<view class="ld-line">欢迎登录欧轩智能场馆平板端系统!</view> |
|
|
<view class="ld-line">欢迎登录欧轩智能场馆平板端系统!</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="ls-pads"> |
|
|
<view class="ls-pads"> |
|
|
<pads-picker></pads-picker> |
|
|
|
|
|
|
|
|
<pads-picker :padList="padList" :padListOrigin="padListOrigin" @pickerChange="handle_pickerChange"></pads-picker> |
|
|
</view> |
|
|
</view> |
|
|
<view class="ls-botton"> |
|
|
<view class="ls-botton"> |
|
|
<login-button @click="clickJumpIndex">进入使用</login-button> |
|
|
<login-button @click="clickJumpIndex">进入使用</login-button> |
|
|
</view> |
|
|
</view> |
|
|
<view class="ls-links"> |
|
|
<view class="ls-links"> |
|
|
<view class="ll-item" @click="clickUpdate">更新</view> |
|
|
<view class="ll-item" @click="clickUpdate">更新</view> |
|
|
|
|
|
<view class="ll-item" @click="clickUpdatePadList">更新门店</view> |
|
|
<view class="ll-item" @click="clickSetting">设置</view> |
|
|
<view class="ll-item" @click="clickSetting">设置</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -29,14 +30,30 @@ import loginButton from '@/components/login/button.vue'; |
|
|
import settingMask from '@/components/login/setting_mask.vue'; |
|
|
import settingMask from '@/components/login/setting_mask.vue'; |
|
|
|
|
|
|
|
|
import { ref } from 'vue' |
|
|
import { ref } from 'vue' |
|
|
|
|
|
import { onReady } from '@dcloudio/uni-app'; |
|
|
import util from "@/utils/util.js" |
|
|
import util from "@/utils/util.js" |
|
|
|
|
|
import {API} from "@/utils/api"; |
|
|
|
|
|
import {ox} from "@/utils/server"; |
|
|
|
|
|
|
|
|
let showSettingMask = ref(true) |
|
|
|
|
|
|
|
|
let showSettingMask = ref(false) |
|
|
|
|
|
const padList = ref([]) |
|
|
|
|
|
const selectIndex = ref("") |
|
|
|
|
|
const padListOrigin = ref([]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onReady(async () => { |
|
|
|
|
|
updatePadList() |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
function handle_closeSetting(val){ |
|
|
function handle_closeSetting(val){ |
|
|
console.log("handle_closeSetting",val) |
|
|
console.log("handle_closeSetting",val) |
|
|
showSettingMask.value = !showSettingMask.value |
|
|
showSettingMask.value = !showSettingMask.value |
|
|
} |
|
|
} |
|
|
|
|
|
function handle_pickerChange(val){ |
|
|
|
|
|
console.log("handle_pickerChange",val) |
|
|
|
|
|
selectIndex.value = val |
|
|
|
|
|
saveStadiumInfo(val) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function clickJumpIndex(){ |
|
|
function clickJumpIndex(){ |
|
|
util.routeTo(`/pages/index/index`, 'nT'); |
|
|
util.routeTo(`/pages/index/index`, 'nT'); |
|
@ -47,6 +64,50 @@ function clickSetting(){ |
|
|
function clickUpdate(){ |
|
|
function clickUpdate(){ |
|
|
util.showNone("更新功能暂不可用") |
|
|
util.showNone("更新功能暂不可用") |
|
|
} |
|
|
} |
|
|
|
|
|
function clickUpdatePadList(){ |
|
|
|
|
|
console.log("clickUpdatePadList") |
|
|
|
|
|
updatePadList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function saveStadiumInfo(val){ |
|
|
|
|
|
let item = padListOrigin.value[val] |
|
|
|
|
|
let {id:stadium_id} = item |
|
|
|
|
|
getApp().globalData.accountInfo.store_id = stadium_id |
|
|
|
|
|
getApp().globalData.stadiumInfo = item |
|
|
|
|
|
uni.setStorageSync("stadiumInfo",item) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function updatePadList(){ |
|
|
|
|
|
console.log("updatePadList") |
|
|
|
|
|
util.showLoad('更新门店列表...'); |
|
|
|
|
|
let {brand_id,token} = getApp().globalData.accountInfo |
|
|
|
|
|
let urlParams = { |
|
|
|
|
|
brand_id,token, |
|
|
|
|
|
page: 1, |
|
|
|
|
|
page_size: 200 |
|
|
|
|
|
} |
|
|
|
|
|
ox.get({ |
|
|
|
|
|
url: API.padList, |
|
|
|
|
|
data: urlParams, |
|
|
|
|
|
isDefaultGet: true, |
|
|
|
|
|
failMsg: '操作失败!' |
|
|
|
|
|
}) |
|
|
|
|
|
.then(data => { |
|
|
|
|
|
util.hideLoad(); |
|
|
|
|
|
console.log("updatePadList suc: ", data) |
|
|
|
|
|
padListOrigin.value = data.list |
|
|
|
|
|
padList.value = data.list.map((e)=>{ |
|
|
|
|
|
return e.venue_name |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return data |
|
|
|
|
|
}).finally(()=>{ |
|
|
|
|
|
util.hideLoad(); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|