From 7298d5354963a88643a543b51b90192dc9fc934c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 九月 2025 18:43:14 +0800
Subject: [PATCH] 最新版本541200007
---
pda/pages/index/set.vue | 119 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 97 insertions(+), 22 deletions(-)
diff --git a/pda/pages/index/set.vue b/pda/pages/index/set.vue
index 2a6c345..694261b 100644
--- a/pda/pages/index/set.vue
+++ b/pda/pages/index/set.vue
@@ -1,33 +1,74 @@
<template>
<view class="main_app">
- <view class="title">
- <view class="icon"></view>
- <view class="name">瀹夋嘲鐗╂祦鍗歌揣鏈堝彴</view>
- </view>
- <div class="data_list">
- <div
- class="item"
- :class="{ active: i == 1 }"
- v-for="(item, i) in 7"
- :key="i"
- >
- {{ i }}鍙锋湀鍙�
- </div>
- </div>
+ <template v-for="item in platformGroupList">
+ <view class="title">
+ <view class="icon"></view>
+ <view class="name">{{item.name}}</view>
+ </view>
+ <view class="data_list">
+ <view
+ class="item"
+ :class="{ active: platform.showConfig }"
+ v-for="(platform, i) in item.platformList"
+ :key="platform.id"
+ @click="platformClick(platform.id)"
+ >
+ {{platform.name}}
+ </view>
+ </view>
+ </template>
+ <view class="btns">
+ <div class="btn" @click="$goBack">鍙栨秷</div>
+ <div class="btn active" @click="updUserPlatform">纭畾</div>
+ </view>
</view>
</template>
<script>
+import { getPlatformGroupList, updUserPlatformConfig } from '@/api'
export default {
data() {
return {
+ platformGroupList: []
}
},
onLoad() {
-
+ this.getPlatformGroup()
},
methods: {
-
+ updUserPlatform(){
+ const { platformGroupList } = this
+ let ids = []
+ platformGroupList.forEach(item => {
+ item.platformList.forEach(platform => {
+ if(platform.showConfig){
+ ids.push(platform.id)
+ }
+ })
+ })
+ updUserPlatformConfig({ids}).then(res => {
+ this.showToast('鏇存柊鎴愬姛')
+ this.$goBack()
+ })
+ },
+ platformClick(id) {
+ const { platformGroupList } = this
+ platformGroupList.forEach(item => {
+ item.platformList.forEach(platform => {
+ if(platform.id === id){
+ platform.showConfig = !platform.showConfig
+ }
+ })
+ })
+ },
+ getPlatformGroup() {
+ getPlatformGroupList({
+ queryData: 0,
+ queryType: 1
+ }).then(res => {
+ this.platformGroupList = res.data || []
+ })
+ },
}
}
</script>
@@ -43,17 +84,22 @@
margin-bottom: 20rpx;
padding: 30rpx;
background-color: #fff;
+ &:nth-last-child(1){
+ margin-bottom: 120rpx;
+ }
.item {
- width: 210rpx;
+ width: 220rpx;
height: 80rpx;
background: #f3f3f3;
border-radius: 40rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-bottom: 20rpx;
+ line-height: 80rpx;
+ text-align: center;
+ margin-bottom: 15rpx;
font-size: 30rpx;
- margin-right: 30rpx;
+ margin-right: 15rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
&:nth-of-type(3n){
margin-right: 0;
}
@@ -83,4 +129,33 @@
}
}
}
+.btns{
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 750rpx;
+ height: 120rpx;
+ background: #FFFFFF;
+ box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(0,0,0,0.1);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 30rpx;
+ .btn{
+ width: 336rpx;
+ height: 88rpx;
+ background: #FFFFFF;
+ border-radius: 44rpx;
+ border: 1rpx solid #999999;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 32rpx;
+ color: #333333;
+ }
+ .active{
+ background: $uni-color-primary;
+ color: #fff;
+ }
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3